@dnb/eufemia 10.55.0 → 10.55.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.
- package/CHANGELOG.md +8 -0
- package/cjs/extensions/forms/Field/Upload/Upload.js +18 -17
- package/cjs/extensions/forms/Field/Upload/Upload.js.map +1 -1
- package/cjs/extensions/forms/Value/SummaryList/SummaryList.d.ts +3 -1
- package/cjs/extensions/forms/Value/SummaryList/SummaryList.js +10 -1
- package/cjs/extensions/forms/Value/SummaryList/SummaryList.js.map +1 -1
- package/cjs/extensions/forms/Value/SummaryList/SummaryListContext.d.ts +1 -0
- package/cjs/extensions/forms/Value/SummaryList/SummaryListContext.js.map +1 -1
- package/cjs/extensions/forms/Value/SummaryList/useVerifyChildren.d.ts +13 -0
- package/cjs/extensions/forms/Value/SummaryList/useVerifyChildren.js +46 -0
- package/cjs/extensions/forms/Value/SummaryList/useVerifyChildren.js.map +1 -0
- package/cjs/extensions/forms/hooks/useValueProps.js +5 -0
- package/cjs/extensions/forms/hooks/useValueProps.js.map +1 -1
- package/cjs/shared/Eufemia.d.ts +1 -1
- package/cjs/shared/Eufemia.js +2 -2
- package/cjs/shared/Eufemia.js.map +1 -1
- package/cjs/style/core/scopes.scss +1 -1
- package/cjs/style/dnb-ui-basis.css +1 -1
- package/cjs/style/dnb-ui-basis.min.css +1 -1
- package/cjs/style/dnb-ui-body.css +1 -1
- package/cjs/style/dnb-ui-body.min.css +1 -1
- package/cjs/style/dnb-ui-core.css +1 -1
- package/cjs/style/dnb-ui-core.min.css +1 -1
- package/es/extensions/forms/Field/Upload/Upload.js +17 -16
- package/es/extensions/forms/Field/Upload/Upload.js.map +1 -1
- package/es/extensions/forms/Value/SummaryList/SummaryList.d.ts +3 -1
- package/es/extensions/forms/Value/SummaryList/SummaryList.js +10 -1
- package/es/extensions/forms/Value/SummaryList/SummaryList.js.map +1 -1
- package/es/extensions/forms/Value/SummaryList/SummaryListContext.d.ts +1 -0
- package/es/extensions/forms/Value/SummaryList/SummaryListContext.js.map +1 -1
- package/es/extensions/forms/Value/SummaryList/useVerifyChildren.d.ts +13 -0
- package/es/extensions/forms/Value/SummaryList/useVerifyChildren.js +37 -0
- package/es/extensions/forms/Value/SummaryList/useVerifyChildren.js.map +1 -0
- package/es/extensions/forms/hooks/useValueProps.js +5 -0
- package/es/extensions/forms/hooks/useValueProps.js.map +1 -1
- package/es/shared/Eufemia.d.ts +1 -1
- package/es/shared/Eufemia.js +2 -2
- package/es/shared/Eufemia.js.map +1 -1
- package/es/style/core/scopes.scss +1 -1
- package/es/style/dnb-ui-basis.css +1 -1
- package/es/style/dnb-ui-basis.min.css +1 -1
- package/es/style/dnb-ui-body.css +1 -1
- package/es/style/dnb-ui-body.min.css +1 -1
- package/es/style/dnb-ui-core.css +1 -1
- package/es/style/dnb-ui-core.min.css +1 -1
- package/esm/dnb-ui-basis.min.mjs +1 -1
- package/esm/dnb-ui-components.min.mjs +1 -1
- package/esm/dnb-ui-elements.min.mjs +1 -1
- package/esm/dnb-ui-extensions.min.mjs +1 -1
- package/esm/dnb-ui-lib.min.mjs +1 -1
- package/extensions/forms/Field/Upload/Upload.js +18 -17
- package/extensions/forms/Field/Upload/Upload.js.map +1 -1
- package/extensions/forms/Value/SummaryList/SummaryList.d.ts +3 -1
- package/extensions/forms/Value/SummaryList/SummaryList.js +10 -1
- package/extensions/forms/Value/SummaryList/SummaryList.js.map +1 -1
- package/extensions/forms/Value/SummaryList/SummaryListContext.d.ts +1 -0
- package/extensions/forms/Value/SummaryList/SummaryListContext.js.map +1 -1
- package/extensions/forms/Value/SummaryList/useVerifyChildren.d.ts +13 -0
- package/extensions/forms/Value/SummaryList/useVerifyChildren.js +39 -0
- package/extensions/forms/Value/SummaryList/useVerifyChildren.js.map +1 -0
- package/extensions/forms/hooks/useValueProps.js +5 -0
- package/extensions/forms/hooks/useValueProps.js.map +1 -1
- package/package.json +1 -1
- package/shared/Eufemia.d.ts +1 -1
- package/shared/Eufemia.js +2 -2
- package/shared/Eufemia.js.map +1 -1
- package/style/core/scopes.scss +1 -1
- package/style/dnb-ui-basis.css +1 -1
- package/style/dnb-ui-basis.min.css +1 -1
- package/style/dnb-ui-body.css +1 -1
- package/style/dnb-ui-body.min.css +1 -1
- package/style/dnb-ui-core.css +1 -1
- package/style/dnb-ui-core.min.css +1 -1
- package/umd/dnb-ui-basis.min.js +1 -1
- package/umd/dnb-ui-components.min.js +1 -1
- package/umd/dnb-ui-elements.min.js +1 -1
- package/umd/dnb-ui-extensions.min.js +1 -1
- package/umd/dnb-ui-lib.min.js +1 -1
|
@@ -15,21 +15,22 @@ import { pickSpacingProps } from '../../../../components/flex/utils';
|
|
|
15
15
|
import { HelpButton } from '../../../../components';
|
|
16
16
|
import { useTranslation as useSharedTranslation } from '../../../../shared';
|
|
17
17
|
import { FormError } from '../../utils';
|
|
18
|
+
const validateRequired = (value, {
|
|
19
|
+
required,
|
|
20
|
+
isChanged,
|
|
21
|
+
error
|
|
22
|
+
}) => {
|
|
23
|
+
const hasError = value === null || value === void 0 ? void 0 : value.some(file => file.errorMessage);
|
|
24
|
+
if (hasError) {
|
|
25
|
+
return new FormError('Upload.errorInvalidFiles');
|
|
26
|
+
}
|
|
27
|
+
const hasFiles = (value === null || value === void 0 ? void 0 : value.length) > 0;
|
|
28
|
+
if (required && (!isChanged && !hasFiles || !hasFiles)) {
|
|
29
|
+
return error;
|
|
30
|
+
}
|
|
31
|
+
return undefined;
|
|
32
|
+
};
|
|
18
33
|
function UploadComponent(props) {
|
|
19
|
-
const validateRequired = useCallback((value, {
|
|
20
|
-
required,
|
|
21
|
-
isChanged,
|
|
22
|
-
error
|
|
23
|
-
}) => {
|
|
24
|
-
const hasError = value === null || value === void 0 ? void 0 : value.some(file => file.errorMessage);
|
|
25
|
-
if (hasError) {
|
|
26
|
-
return new FormError('Upload.errorInvalidFiles');
|
|
27
|
-
}
|
|
28
|
-
if (required && (!isChanged || !(value.length > 0))) {
|
|
29
|
-
return error;
|
|
30
|
-
}
|
|
31
|
-
return undefined;
|
|
32
|
-
}, []);
|
|
33
34
|
const sharedTr = useSharedTranslation().Upload;
|
|
34
35
|
const formsTr = useFormsTranslation().Upload;
|
|
35
36
|
const errorMessages = useMemo(() => ({
|
|
@@ -70,7 +71,7 @@ function UploadComponent(props) {
|
|
|
70
71
|
} = useUpload(id);
|
|
71
72
|
useEffect(() => {
|
|
72
73
|
setFiles(value);
|
|
73
|
-
}, [
|
|
74
|
+
}, [setFiles, value]);
|
|
74
75
|
const changeHandler = useCallback(({
|
|
75
76
|
files
|
|
76
77
|
}) => {
|
|
@@ -81,7 +82,7 @@ function UploadComponent(props) {
|
|
|
81
82
|
const width = widthProp;
|
|
82
83
|
const fieldBlockProps = _objectSpread({
|
|
83
84
|
id,
|
|
84
|
-
forId: id
|
|
85
|
+
forId: `${id}-input`,
|
|
85
86
|
labelSrOnly: true,
|
|
86
87
|
className,
|
|
87
88
|
width
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Upload.js","names":["React","useCallback","useEffect","useMemo","FieldBlock","useFieldProps","useTranslation","useFormsTranslation","Upload","useUpload","pickSpacingProps","HelpButton","useSharedTranslation","FormError","
|
|
1
|
+
{"version":3,"file":"Upload.js","names":["React","useCallback","useEffect","useMemo","FieldBlock","useFieldProps","useTranslation","useFormsTranslation","Upload","useUpload","pickSpacingProps","HelpButton","useSharedTranslation","FormError","validateRequired","value","required","isChanged","error","hasError","some","file","errorMessage","hasFiles","length","undefined","UploadComponent","props","sharedTr","formsTr","errorMessages","errorRequired","preparedProps","_objectSpread","_useFieldProps","executeOnChangeRegardlessOfError","id","className","width","widthProp","label","labelDescription","help","htmlAttributes","handleChange","handleFocus","handleBlur","rest","_objectWithoutProperties","_excluded","title","text","acceptedFileTypes","filesAmountLimit","fileMaxSize","skeleton","onFileDelete","setFiles","changeHandler","files","fieldBlockProps","forId","labelSrOnly","createElement","_extends","onChange","Fragment","left","content","_supportsSpacingProps"],"sources":["../../../../../../src/extensions/forms/Field/Upload/Upload.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useMemo } from 'react'\nimport FieldBlock, {\n Props as FieldBlockProps,\n FieldBlockWidth,\n} from '../../FieldBlock'\nimport {\n useFieldProps,\n useTranslation as useFormsTranslation,\n} from '../../hooks'\nimport { FieldHelpProps, FieldProps } from '../../types'\nimport Upload, {\n UploadFile,\n UploadFileNative,\n UploadProps,\n} from '../../../../components/Upload'\nimport useUpload from '../../../../components/upload/useUpload'\nimport { pickSpacingProps } from '../../../../components/flex/utils'\nimport { HelpButton } from '../../../../components'\nimport { useTranslation as useSharedTranslation } from '../../../../shared'\nimport { SpacingProps } from '../../../../shared/types'\nimport { FormError } from '../../utils'\n\nexport type UploadValue = Array<UploadFile | UploadFileNative>\nexport type Props = FieldHelpProps &\n Omit<FieldProps<UploadValue, UploadValue | undefined>, 'name'> &\n SpacingProps & {\n width?: Omit<FieldBlockWidth, 'medium' | 'small'>\n } & Pick<\n Partial<UploadProps>,\n | 'title'\n | 'text'\n | 'acceptedFileTypes'\n | 'filesAmountLimit'\n | 'fileMaxSize'\n | 'onFileDelete'\n | 'skeleton'\n >\n\nconst validateRequired = (\n value: UploadValue,\n { required, isChanged, error }\n) => {\n const hasError = value?.some((file) => file.errorMessage)\n if (hasError) {\n return new FormError('Upload.errorInvalidFiles')\n }\n\n const hasFiles = value?.length > 0\n if (required && ((!isChanged && !hasFiles) || !hasFiles)) {\n return error\n }\n\n return undefined\n}\n\nfunction UploadComponent(props: Props) {\n const sharedTr = useSharedTranslation().Upload\n const formsTr = useFormsTranslation().Upload\n\n const errorMessages = useMemo(\n () => ({\n 'Field.errorRequired': formsTr.errorRequired,\n }),\n [formsTr.errorRequired]\n )\n\n const preparedProps = {\n errorMessages,\n validateRequired,\n ...props,\n }\n\n const {\n id,\n className,\n width: widthProp = 'stretch',\n value,\n label,\n labelDescription,\n help,\n htmlAttributes,\n handleChange,\n handleFocus,\n handleBlur,\n ...rest\n } = useFieldProps(preparedProps, {\n executeOnChangeRegardlessOfError: true,\n })\n\n // Upload props\n const {\n title = sharedTr.title,\n text = sharedTr.text,\n acceptedFileTypes = ['pdf', 'png', 'jpg', 'jpeg'],\n filesAmountLimit = 100,\n fileMaxSize = 5,\n skeleton,\n onFileDelete,\n } = rest\n\n const { setFiles } = useUpload(id)\n\n useEffect(() => {\n setFiles(value)\n }, [setFiles, value])\n\n const changeHandler = useCallback(\n ({ files }: { files: UploadValue }) => {\n // Prevents the form-status from showing up\n handleBlur()\n handleFocus()\n handleChange(files)\n },\n [handleBlur, handleChange, handleFocus]\n )\n\n const width = widthProp as FieldBlockWidth\n const fieldBlockProps: FieldBlockProps = {\n id,\n forId: `${id}-input`,\n labelSrOnly: true,\n className,\n width,\n ...pickSpacingProps(props),\n }\n\n return (\n <FieldBlock {...fieldBlockProps}>\n <Upload\n id={id}\n acceptedFileTypes={acceptedFileTypes}\n filesAmountLimit={filesAmountLimit}\n fileMaxSize={fileMaxSize}\n skeleton={skeleton}\n onChange={changeHandler}\n onFileDelete={onFileDelete}\n title={label ?? title}\n text={\n help ? (\n <>\n {labelDescription ?? text}\n <HelpButton\n left={text ? 'x-small' : false}\n title={help.title}\n >\n {help.content}\n </HelpButton>\n </>\n ) : (\n labelDescription ?? text\n )\n }\n {...htmlAttributes}\n />\n </FieldBlock>\n )\n}\n\nexport default UploadComponent\n\nUploadComponent._supportsSpacingProps = true\n"],"mappings":";;;;;;;;AAAA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,SAAS,EAAEC,OAAO,QAAQ,OAAO;AAC9D,OAAOC,UAAU,MAGV,kBAAkB;AACzB,SACEC,aAAa,EACbC,cAAc,IAAIC,mBAAmB,QAChC,aAAa;AAEpB,OAAOC,MAAM,MAIN,+BAA+B;AACtC,OAAOC,SAAS,MAAM,yCAAyC;AAC/D,SAASC,gBAAgB,QAAQ,mCAAmC;AACpE,SAASC,UAAU,QAAQ,wBAAwB;AACnD,SAASL,cAAc,IAAIM,oBAAoB,QAAQ,oB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,aAAc;IACxBF,YAAY,EAAEA,YAAa;IAC3BN,KAAK,EAAEV,KAAK,aAALA,KAAK,cAALA,KAAK,GAAIU,KAAM;IACtBC,IAAI,EACFT,IAAI,GACF1C,KAAA,CAAA+D,aAAA,CAAA/D,KAAA,CAAAkE,QAAA,QACGzB,gBAAgB,aAAhBA,gBAAgB,cAAhBA,gBAAgB,GAAIU,IAAI,EACzBnD,KAAA,CAAA+D,aAAA,CAACpD,UAAU;MACTwD,IAAI,EAAEhB,IAAI,GAAG,SAAS,GAAG,KAAM;MAC/BD,KAAK,EAAER,IAAI,CAACQ;IAAM,GAEjBR,IAAI,CAAC0B,OACI,CACZ,CAAC,GAEH3B,gBAAgB,aAAhBA,gBAAgB,cAAhBA,gBAAgB,GAAIU;EAEvB,GACGR,cAAc,CACnB,CACS,CAAC;AAEjB;AAEA,eAAejB,eAAe;AAE9BA,eAAe,CAAC2C,qBAAqB,GAAG,IAAI"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { DlAllProps } from '../../../../elements/Dl';
|
|
2
3
|
import { ValueProps } from '../../types';
|
|
3
|
-
export type Props = Omit<DlAllProps, 'label'> & {
|
|
4
|
+
export type Props = Omit<DlAllProps, 'label' | 'children'> & {
|
|
5
|
+
children: React.ReactNode;
|
|
4
6
|
transformLabel?: ValueProps['transformLabel'];
|
|
5
7
|
inheritVisibility?: ValueProps['inheritVisibility'];
|
|
6
8
|
inheritLabel?: ValueProps['inheritLabel'];
|
|
@@ -7,6 +7,7 @@ import { removeUndefinedProps } from '../../../../shared/component-helper';
|
|
|
7
7
|
import SummaryListContext from './SummaryListContext';
|
|
8
8
|
import Dl from '../../../../elements/Dl';
|
|
9
9
|
import ValueProvider from '../Provider/ValueProvider';
|
|
10
|
+
import { useVerifyChildren } from './useVerifyChildren';
|
|
10
11
|
function SummaryList(props) {
|
|
11
12
|
const {
|
|
12
13
|
className,
|
|
@@ -22,9 +23,17 @@ function SummaryList(props) {
|
|
|
22
23
|
inheritVisibility,
|
|
23
24
|
inheritLabel
|
|
24
25
|
});
|
|
26
|
+
const {
|
|
27
|
+
verifyChild
|
|
28
|
+
} = useVerifyChildren({
|
|
29
|
+
children,
|
|
30
|
+
message: 'Value.SummaryList accepts only Value.* components!',
|
|
31
|
+
ignoreTypes: ['ValueBlock']
|
|
32
|
+
});
|
|
25
33
|
return React.createElement(SummaryListContext.Provider, {
|
|
26
34
|
value: {
|
|
27
|
-
layout
|
|
35
|
+
layout,
|
|
36
|
+
verifyChild
|
|
28
37
|
}
|
|
29
38
|
}, React.createElement(Dl, _extends({
|
|
30
39
|
className: classnames('dnb-forms-summary-list', className),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SummaryList.js","names":["React","classnames","removeUndefinedProps","SummaryListContext","Dl","ValueProvider","SummaryList","props","className","children","layout","transformLabel","inheritVisibility","inheritLabel","rest","_objectWithoutProperties","_excluded","valueProviderProps","createElement","Provider","value","_extends","_supportsSpacingProps"],"sources":["../../../../../../src/extensions/forms/Value/SummaryList/SummaryList.tsx"],"sourcesContent":["import React from 'react'\nimport classnames from 'classnames'\nimport { removeUndefinedProps } from '../../../../shared/component-helper'\nimport SummaryListContext from './SummaryListContext'\nimport Dl, { DlAllProps } from '../../../../elements/Dl'\nimport ValueProvider from '../Provider/ValueProvider'\nimport { ValueProps } from '../../types'\n\nexport type Props = Omit<DlAllProps, 'label'> & {\n transformLabel?: ValueProps['transformLabel']\n inheritVisibility?: ValueProps['inheritVisibility']\n inheritLabel?: ValueProps['inheritLabel']\n}\n\nfunction SummaryList(props: Props) {\n const {\n className,\n children,\n layout,\n transformLabel,\n inheritVisibility,\n inheritLabel,\n ...rest\n } = props\n\n const valueProviderProps = removeUndefinedProps({\n transformLabel,\n inheritVisibility,\n inheritLabel,\n })\n\n return (\n <SummaryListContext.Provider value={{ layout }}>\n <Dl\n className={classnames('dnb-forms-summary-list', className)}\n layout={layout}\n {...rest}\n >\n <ValueProvider {...valueProviderProps}>{children}</ValueProvider>\n </Dl>\n </SummaryListContext.Provider>\n )\n}\n\nSummaryList._supportsSpacingProps = true\n\nexport default SummaryList\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,UAAU,MAAM,YAAY;AACnC,SAASC,oBAAoB,QAAQ,qCAAqC;AAC1E,OAAOC,kBAAkB,MAAM,sBAAsB;AACrD,OAAOC,EAAE,MAAsB,yBAAyB;AACxD,OAAOC,aAAa,MAAM,2BAA2B;
|
|
1
|
+
{"version":3,"file":"SummaryList.js","names":["React","classnames","removeUndefinedProps","SummaryListContext","Dl","ValueProvider","useVerifyChildren","SummaryList","props","className","children","layout","transformLabel","inheritVisibility","inheritLabel","rest","_objectWithoutProperties","_excluded","valueProviderProps","verifyChild","message","ignoreTypes","createElement","Provider","value","_extends","_supportsSpacingProps"],"sources":["../../../../../../src/extensions/forms/Value/SummaryList/SummaryList.tsx"],"sourcesContent":["import React from 'react'\nimport classnames from 'classnames'\nimport { removeUndefinedProps } from '../../../../shared/component-helper'\nimport SummaryListContext from './SummaryListContext'\nimport Dl, { DlAllProps } from '../../../../elements/Dl'\nimport ValueProvider from '../Provider/ValueProvider'\nimport { ValueProps } from '../../types'\nimport { useVerifyChildren } from './useVerifyChildren'\n\nexport type Props = Omit<DlAllProps, 'label' | 'children'> & {\n children: React.ReactNode\n transformLabel?: ValueProps['transformLabel']\n inheritVisibility?: ValueProps['inheritVisibility']\n inheritLabel?: ValueProps['inheritLabel']\n}\n\nfunction SummaryList(props: Props) {\n const {\n className,\n children,\n layout,\n transformLabel,\n inheritVisibility,\n inheritLabel,\n ...rest\n } = props\n\n const valueProviderProps = removeUndefinedProps({\n transformLabel,\n inheritVisibility,\n inheritLabel,\n })\n\n const { verifyChild } = useVerifyChildren({\n children,\n message: 'Value.SummaryList accepts only Value.* components!',\n ignoreTypes: ['ValueBlock'],\n })\n\n return (\n <SummaryListContext.Provider value={{ layout, verifyChild }}>\n <Dl\n className={classnames('dnb-forms-summary-list', className)}\n layout={layout}\n {...rest}\n >\n <ValueProvider {...valueProviderProps}>{children}</ValueProvider>\n </Dl>\n </SummaryListContext.Provider>\n )\n}\n\nSummaryList._supportsSpacingProps = true\n\nexport default SummaryList\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,UAAU,MAAM,YAAY;AACnC,SAASC,oBAAoB,QAAQ,qCAAqC;AAC1E,OAAOC,kBAAkB,MAAM,sBAAsB;AACrD,OAAOC,EAAE,MAAsB,yBAAyB;AACxD,OAAOC,aAAa,MAAM,2BAA2B;AAErD,SAASC,iBAAiB,QAAQ,qBAAqB;AASvD,SAASC,WAAWA,CAACC,KAAY,EAAE;EACjC,MAAM;MACJC,SAAS;MACTC,QAAQ;MACRC,MAAM;MACNC,cAAc;MACdC,iBAAiB;MACjBC;IAEF,CAAC,GAAGN,KAAK;IADJO,IAAI,GAAAC,wBAAA,CACLR,KAAK,EAAAS,SAAA;EAET,MAAMC,kBAAkB,GAAGhB,oBAAoB,CAAC;IAC9CU,cAAc;IACdC,iBAAiB;IACjBC;EACF,CAAC,CAAC;EAEF,MAAM;IAAEK;EAAY,CAAC,GAAGb,iBAAiB,CAAC;IACxCI,QAAQ;IACRU,OAAO,EAAE,oDAAoD;IAC7DC,WAAW,EAAE,CAAC,YAAY;EAC5B,CAAC,CAAC;EAEF,OACErB,KAAA,CAAAsB,aAAA,CAACnB,kBAAkB,CAACoB,QAAQ;IAACC,KAAK,EAAE;MAAEb,MAAM;MAAEQ;IAAY;EAAE,GAC1DnB,KAAA,CAAAsB,aAAA,CAAClB,EAAE,EAAAqB,QAAA;IACDhB,SAAS,EAAER,UAAU,CAAC,wBAAwB,EAAEQ,SAAS,CAAE;IAC3DE,MAAM,EAAEA;EAAO,GACXI,IAAI,GAERf,KAAA,CAAAsB,aAAA,CAACjB,aAAa,EAAKa,kBAAkB,EAAGR,QAAwB,CAC9D,CACuB,CAAC;AAElC;AAEAH,WAAW,CAACmB,qBAAqB,GAAG,IAAI;AAExC,eAAenB,WAAW"}
|
|
@@ -3,6 +3,7 @@ import { DlProps } from '../../../../elements/Dl';
|
|
|
3
3
|
export type SummaryListContextProps = {
|
|
4
4
|
layout?: DlProps['layout'];
|
|
5
5
|
isNested?: boolean;
|
|
6
|
+
verifyChild?: () => void;
|
|
6
7
|
};
|
|
7
8
|
declare const SummaryListContext: React.Context<SummaryListContextProps>;
|
|
8
9
|
export default SummaryListContext;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SummaryListContext.js","names":["React","SummaryListContext","createContext","undefined"],"sources":["../../../../../../src/extensions/forms/Value/SummaryList/SummaryListContext.tsx"],"sourcesContent":["import React from 'react'\nimport { DlProps } from '../../../../elements/Dl'\n\nexport type SummaryListContextProps = {\n layout?: DlProps['layout']\n isNested?: boolean\n}\n\nconst SummaryListContext = React.createContext<\n SummaryListContextProps | undefined\n>(undefined)\n\nexport default SummaryListContext\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;
|
|
1
|
+
{"version":3,"file":"SummaryListContext.js","names":["React","SummaryListContext","createContext","undefined"],"sources":["../../../../../../src/extensions/forms/Value/SummaryList/SummaryListContext.tsx"],"sourcesContent":["import React from 'react'\nimport { DlProps } from '../../../../elements/Dl'\n\nexport type SummaryListContextProps = {\n layout?: DlProps['layout']\n isNested?: boolean\n verifyChild?: () => void\n}\n\nconst SummaryListContext = React.createContext<\n SummaryListContextProps | undefined\n>(undefined)\n\nexport default SummaryListContext\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AASzB,MAAMC,kBAAkB,GAAGD,KAAK,CAACE,aAAa,CAE5CC,SAAS,CAAC;AAEZ,eAAeF,kBAAkB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare function useVerifyChildren({ children, message, ignoreTypes, }: {
|
|
3
|
+
ignoreTypes?: Array<string>;
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
message: string;
|
|
6
|
+
}): {
|
|
7
|
+
verifyChild: () => void;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Count the children of a React node,
|
|
11
|
+
* without counting React.Fragment or primitive nodes.
|
|
12
|
+
*/
|
|
13
|
+
export declare const countChildren: (children: React.ReactNode, ignoreTypes?: Array<string>, count?: number) => any;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { Children, Fragment, isValidElement, useCallback, useEffect, useRef } from 'react';
|
|
4
|
+
import { warn } from '../../../../shared/helpers';
|
|
5
|
+
export function useVerifyChildren({
|
|
6
|
+
children,
|
|
7
|
+
message,
|
|
8
|
+
ignoreTypes
|
|
9
|
+
}) {
|
|
10
|
+
const verifyCount = useRef(0);
|
|
11
|
+
verifyCount.current = 0;
|
|
12
|
+
const verifyChild = useCallback(() => {
|
|
13
|
+
verifyCount.current += 1;
|
|
14
|
+
}, []);
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
17
|
+
const count = countChildren(children, ignoreTypes);
|
|
18
|
+
if (count > 0 && count > verifyCount.current) {
|
|
19
|
+
warn(message);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}, [children, message]);
|
|
23
|
+
return {
|
|
24
|
+
verifyChild
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export const countChildren = (children, ignoreTypes, count = 0) => {
|
|
28
|
+
return Children.toArray(children).reduce((count, child) => {
|
|
29
|
+
var _child$type;
|
|
30
|
+
if ((child === null || child === void 0 ? void 0 : child['type']) === Fragment) {
|
|
31
|
+
var _child$props;
|
|
32
|
+
return countChildren((_child$props = child['props']) === null || _child$props === void 0 ? void 0 : _child$props.children, ignoreTypes, count);
|
|
33
|
+
}
|
|
34
|
+
return count + (isValidElement(child) && !(ignoreTypes !== null && ignoreTypes !== void 0 && ignoreTypes.includes(child === null || child === void 0 ? void 0 : (_child$type = child.type) === null || _child$type === void 0 ? void 0 : _child$type['name'])) ? 1 : 0);
|
|
35
|
+
}, count);
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=useVerifyChildren.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useVerifyChildren.js","names":["Children","Fragment","isValidElement","useCallback","useEffect","useRef","warn","useVerifyChildren","children","message","ignoreTypes","verifyCount","current","verifyChild","process","env","NODE_ENV","count","countChildren","toArray","reduce","child","_child$type","_child$props","includes","type"],"sources":["../../../../../../src/extensions/forms/Value/SummaryList/useVerifyChildren.ts"],"sourcesContent":["import {\n Children,\n Fragment,\n isValidElement,\n useCallback,\n useEffect,\n useRef,\n} from 'react'\nimport { warn } from '../../../../shared/helpers'\n\nexport function useVerifyChildren({\n children,\n message,\n ignoreTypes,\n}: {\n ignoreTypes?: Array<string>\n children: React.ReactNode\n message: string\n}) {\n const verifyCount = useRef(0)\n verifyCount.current = 0\n const verifyChild = useCallback(() => {\n verifyCount.current += 1\n }, [])\n\n useEffect(() => {\n if (process.env.NODE_ENV !== 'production') {\n const count = countChildren(children, ignoreTypes)\n if (count > 0 && count > verifyCount.current) {\n warn(message)\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [children, message])\n\n return { verifyChild }\n}\n\n/**\n * Count the children of a React node,\n * without counting React.Fragment or primitive nodes.\n */\nexport const countChildren = (\n children: React.ReactNode,\n ignoreTypes?: Array<string>,\n count = 0\n) => {\n return Children.toArray(children).reduce((count: number, child) => {\n if (child?.['type'] === Fragment) {\n return countChildren(child['props']?.children, ignoreTypes, count)\n }\n\n return (\n count +\n (isValidElement(child) &&\n !ignoreTypes?.includes(child?.type?.['name'])\n ? 1\n : 0)\n )\n }, count)\n}\n"],"mappings":";;AAAA,SACEA,QAAQ,EACRC,QAAQ,EACRC,cAAc,EACdC,WAAW,EACXC,SAAS,EACTC,MAAM,QACD,OAAO;AACd,SAASC,IAAI,QAAQ,4BAA4B;AAEjD,OAAO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ALA,KAAK,wBAAAC,WAAA,GAALD,KAAK,CAAEI,IAAI,cAAAH,WAAA,uBAAXA,WAAA,CAAc,MAAM,CAAC,CAAC,IACzC,CAAC,GACD,CAAC,CAAC;EAEV,CAAC,EAAEL,KAAK,CAAC;AACX,CAAC"}
|
|
@@ -8,6 +8,7 @@ import useExternalValue from './useExternalValue';
|
|
|
8
8
|
import usePath from './usePath';
|
|
9
9
|
import DataContext from '../DataContext/Context';
|
|
10
10
|
import ValueProviderContext from '../Value/Provider/ValueProviderContext';
|
|
11
|
+
import SummaryListContext from '../Value/SummaryList/SummaryListContext';
|
|
11
12
|
export default function useValueProps(localProps) {
|
|
12
13
|
var _useExternalValue, _props$label, _fieldPropsRef$curren, _fieldPropsRef$curren2;
|
|
13
14
|
const [, forceUpdate] = useReducer(() => ({}), {});
|
|
@@ -15,6 +16,10 @@ export default function useValueProps(localProps) {
|
|
|
15
16
|
extend
|
|
16
17
|
} = useContext(ValueProviderContext);
|
|
17
18
|
const props = extend(localProps);
|
|
19
|
+
const {
|
|
20
|
+
verifyChild
|
|
21
|
+
} = useContext(SummaryListContext) || {};
|
|
22
|
+
verifyChild === null || verifyChild === void 0 ? void 0 : verifyChild();
|
|
18
23
|
const {
|
|
19
24
|
path: pathProp,
|
|
20
25
|
value: valueProp,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useValueProps.js","names":["useCallback","useContext","useEffect","useReducer","useRef","useExternalValue","usePath","DataContext","ValueProviderContext","useValueProps","localProps","_useExternalValue","_props$label","_fieldPropsRef$curren","_fieldPropsRef$curren2","forceUpdate","extend","props","path","pathProp","value","valueProp","itemPath","defaultValue","inheritVisibility","inheritLabel","transformIn","toInput","fromExternal","transformers","externalValue","fieldPropsRef","mountedFieldsRef","setValueProps","setFieldEventListener","requestAnimationFrame","shouldBeVisible","_mountedFieldsRef$cur","item","current","isVisible","isPreMounted","wasStepChange","undefined","label","_objectSpread"],"sources":["../../../../../src/extensions/forms/hooks/useValueProps.ts"],"sourcesContent":["import {\n useCallback,\n useContext,\n useEffect,\n useReducer,\n useRef,\n} from 'react'\nimport { Path, ValueProps } from '../types'\nimport useExternalValue from './useExternalValue'\nimport usePath from './usePath'\nimport DataContext from '../DataContext/Context'\nimport ValueProviderContext from '../Value/Provider/ValueProviderContext'\n\nexport type Props<Value> = ValueProps<Value>\n\nexport default function useValueProps<\n Value = unknown,\n Props extends ValueProps<Value> = ValueProps<Value>,\n>(localProps: Props): Props & ValueProps<Value> {\n const [, forceUpdate] = useReducer(() => ({}), {})\n\n const { extend } = useContext(ValueProviderContext)\n const props = extend(localProps)\n\n const {\n path: pathProp,\n value: valueProp,\n itemPath,\n defaultValue,\n inheritVisibility,\n inheritLabel,\n transformIn = (value: Value) => value,\n toInput = (value: Value) => value,\n fromExternal = (value: Value) => value,\n } = props\n\n const transformers = useRef({\n transformIn,\n toInput,\n fromExternal,\n })\n\n const { path } = usePath({ path: pathProp, itemPath })\n\n const externalValue =\n useExternalValue<Value>({\n path,\n itemPath,\n value: valueProp,\n transformers,\n }) ?? defaultValue\n\n const {\n fieldPropsRef,\n mountedFieldsRef,\n setValueProps,\n setFieldEventListener,\n } = useContext(DataContext) || {}\n setValueProps?.(path, props)\n\n useEffect(() => {\n if (inheritLabel || inheritVisibility) {\n setFieldEventListener?.(path, 'onMount', () => {\n // This is needed to make values, rendered before the field, to get the correct visibility state\n requestAnimationFrame(forceUpdate)\n })\n }\n }, [setFieldEventListener, path, inheritVisibility, inheritLabel])\n\n const shouldBeVisible = useCallback(\n (path: Path): boolean => {\n const item = mountedFieldsRef?.current?.[path]\n\n if (!item || !inheritVisibility) {\n return true\n }\n\n return (\n item.isVisible !== false &&\n (item.isPreMounted !== false || item.wasStepChange === true)\n )\n },\n [inheritVisibility, mountedFieldsRef]\n )\n\n const value = shouldBeVisible(path)\n ? transformIn(toInput(externalValue))\n : undefined\n\n const label =\n props.label ??\n (inheritLabel ? fieldPropsRef?.current?.[path]?.label : undefined)\n\n return { ...props, label, value }\n}\n"],"mappings":";;;;;AAAA,SACEA,WAAW,EACXC,UAAU,EACVC,SAAS,EACTC,UAAU,EACVC,MAAM,QACD,OAAO;AAEd,OAAOC,gBAAgB,MAAM,oBAAoB;AACjD,OAAOC,OAAO,MAAM,WAAW;AAC/B,OAAOC,WAAW,MAAM,wBAAwB;AAChD,OAAOC,oBAAoB,MAAM,wCAAwC;
|
|
1
|
+
{"version":3,"file":"useValueProps.js","names":["useCallback","useContext","useEffect","useReducer","useRef","useExternalValue","usePath","DataContext","ValueProviderContext","SummaryListContext","useValueProps","localProps","_useExternalValue","_props$label","_fieldPropsRef$curren","_fieldPropsRef$curren2","forceUpdate","extend","props","verifyChild","path","pathProp","value","valueProp","itemPath","defaultValue","inheritVisibility","inheritLabel","transformIn","toInput","fromExternal","transformers","externalValue","fieldPropsRef","mountedFieldsRef","setValueProps","setFieldEventListener","requestAnimationFrame","shouldBeVisible","_mountedFieldsRef$cur","item","current","isVisible","isPreMounted","wasStepChange","undefined","label","_objectSpread"],"sources":["../../../../../src/extensions/forms/hooks/useValueProps.ts"],"sourcesContent":["import {\n useCallback,\n useContext,\n useEffect,\n useReducer,\n useRef,\n} from 'react'\nimport { Path, ValueProps } from '../types'\nimport useExternalValue from './useExternalValue'\nimport usePath from './usePath'\nimport DataContext from '../DataContext/Context'\nimport ValueProviderContext from '../Value/Provider/ValueProviderContext'\nimport SummaryListContext from '../Value/SummaryList/SummaryListContext'\n\nexport type Props<Value> = ValueProps<Value>\n\nexport default function useValueProps<\n Value = unknown,\n Props extends ValueProps<Value> = ValueProps<Value>,\n>(localProps: Props): Props & ValueProps<Value> {\n const [, forceUpdate] = useReducer(() => ({}), {})\n\n const { extend } = useContext(ValueProviderContext)\n const props = extend(localProps)\n\n // Only to log a warning in the Value.SummaryList component\n const { verifyChild } = useContext(SummaryListContext) || {}\n verifyChild?.()\n\n const {\n path: pathProp,\n value: valueProp,\n itemPath,\n defaultValue,\n inheritVisibility,\n inheritLabel,\n transformIn = (value: Value) => value,\n toInput = (value: Value) => value,\n fromExternal = (value: Value) => value,\n } = props\n\n const transformers = useRef({\n transformIn,\n toInput,\n fromExternal,\n })\n\n const { path } = usePath({ path: pathProp, itemPath })\n\n const externalValue =\n useExternalValue<Value>({\n path,\n itemPath,\n value: valueProp,\n transformers,\n }) ?? defaultValue\n\n const {\n fieldPropsRef,\n mountedFieldsRef,\n setValueProps,\n setFieldEventListener,\n } = useContext(DataContext) || {}\n setValueProps?.(path, props)\n\n useEffect(() => {\n if (inheritLabel || inheritVisibility) {\n setFieldEventListener?.(path, 'onMount', () => {\n // This is needed to make values, rendered before the field, to get the correct visibility state\n requestAnimationFrame(forceUpdate)\n })\n }\n }, [setFieldEventListener, path, inheritVisibility, inheritLabel])\n\n const shouldBeVisible = useCallback(\n (path: Path): boolean => {\n const item = mountedFieldsRef?.current?.[path]\n\n if (!item || !inheritVisibility) {\n return true\n }\n\n return (\n item.isVisible !== false &&\n (item.isPreMounted !== false || item.wasStepChange === true)\n )\n },\n [inheritVisibility, mountedFieldsRef]\n )\n\n const value = shouldBeVisible(path)\n ? transformIn(toInput(externalValue))\n : undefined\n\n const label =\n props.label ??\n (inheritLabel ? fieldPropsRef?.current?.[path]?.label : undefined)\n\n return { ...props, label, value }\n}\n"],"mappings":";;;;;AAAA,SACEA,WAAW,EACXC,UAAU,EACVC,SAAS,EACTC,UAAU,EACVC,MAAM,QACD,OAAO;AAEd,OAAOC,gBAAgB,MAAM,oBAAoB;AACjD,OAAOC,OAAO,MAAM,WAAW;AAC/B,OAAOC,WAAW,MAAM,wBAAwB;AAChD,OAAOC,oBAAoB,MAAM,wCAAwC;AACzE,OAAOC,kBAAkB,MAAM,yCAAyC;AAIxE,eAAe,SAASC,aAAaA,CAGnCC,UAAiB,EAA6B;EAAA,IAAAC,iBAAA,EAAAC,YAAA,EAAAC,qBAAA,EAAAC,sBAAA;EAC9C,MAAM,GAAGC,WAAW,CAAC,GAAGb,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,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|
-
export declare const version = "10.55.
|
|
1
|
+
export declare const version = "10.55.1";
|
|
2
2
|
export declare function init(): void;
|
package/es/shared/Eufemia.js
CHANGED
package/es/shared/Eufemia.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Eufemia.js","names":["version","init","window","Eufemia"],"sources":["../../../src/shared/Eufemia.ts"],"sourcesContent":["export const version = '10.55.
|
|
1
|
+
{"version":3,"file":"Eufemia.js","names":["version","init","window","Eufemia"],"sources":["../../../src/shared/Eufemia.ts"],"sourcesContent":["export const version = '10.55.1'\n\nexport function init() {\n if (typeof window !== 'undefined') {\n class Eufemia {\n get version() {\n return '10.55.1'\n }\n }\n\n window.Eufemia = new Eufemia()\n }\n}\n"],"mappings":"AAAA,OAAO,MAAMA,OAAO,GAAG,SAAS;AAEhC,OAAO,SAASC,IAAIA,CAAA,EAAG;EACrB,IAAI,OAAOC,MAAM,KAAK,WAAW,EAAE;IACjC,MAAMC,OAAO,CAAC;MACZ,IAAIH,OAAOA,CAAA,EAAG;QACZ,OAAO,SAAS;MAClB;IACF;IAEAE,MAAM,CAACC,OAAO,GAAG,IAAIA,OAAO,CAAC,CAAC;EAChC;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";html{font-size:100%}html:not([data-visual-test]){scroll-behavior:smooth}@supports (-webkit-touch-callout:none){@supports (font:-apple-system-body){html{font:-apple-system-body}}}html[xmlns="http://www.w3.org/1999/xhtml"] a:hover{-webkit-text-decoration:none;text-decoration:none}html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-anchor--active{color:var(--color-mint-green)!important}html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-anchor--contrast:not(:hover){color:var(--color-white)!important}html[xmlns="http://www.w3.org/1999/xhtml"] a.dnb-button--primary{color:var(--color-white)}html[xmlns="http://www.w3.org/1999/xhtml"] ul{list-style:initial}html[xmlns="http://www.w3.org/1999/xhtml"] p{background-color:initial;overflow:initial;text-align:inherit}html[xmlns="http://www.w3.org/1999/xhtml"] i{font-style:italic}html[xmlns="http://www.w3.org/1999/xhtml"] #column_left,html[xmlns="http://www.w3.org/1999/xhtml"] #root{width:100%}html[xmlns="http://www.w3.org/1999/xhtml"] body#dnbLayoutDefault #wrapper,html[xmlns="http://www.w3.org/1999/xhtml"] body#dnbLayoutDefaultStartPage #wrapper{max-width:60rem;width:100%}html[xmlns="http://www.w3.org/1999/xhtml"] #column_content{box-shadow:none}body{margin:0}.dnb-core-style{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:rgba(0,0,0,0);-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;--eufemia-version:"10.55.
|
|
1
|
+
@charset "UTF-8";html{font-size:100%}html:not([data-visual-test]){scroll-behavior:smooth}@supports (-webkit-touch-callout:none){@supports (font:-apple-system-body){html{font:-apple-system-body}}}html[xmlns="http://www.w3.org/1999/xhtml"] a:hover{-webkit-text-decoration:none;text-decoration:none}html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-anchor--active{color:var(--color-mint-green)!important}html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-anchor--contrast:not(:hover){color:var(--color-white)!important}html[xmlns="http://www.w3.org/1999/xhtml"] a.dnb-button--primary{color:var(--color-white)}html[xmlns="http://www.w3.org/1999/xhtml"] ul{list-style:initial}html[xmlns="http://www.w3.org/1999/xhtml"] p{background-color:initial;overflow:initial;text-align:inherit}html[xmlns="http://www.w3.org/1999/xhtml"] i{font-style:italic}html[xmlns="http://www.w3.org/1999/xhtml"] #column_left,html[xmlns="http://www.w3.org/1999/xhtml"] #root{width:100%}html[xmlns="http://www.w3.org/1999/xhtml"] body#dnbLayoutDefault #wrapper,html[xmlns="http://www.w3.org/1999/xhtml"] body#dnbLayoutDefaultStartPage #wrapper{max-width:60rem;width:100%}html[xmlns="http://www.w3.org/1999/xhtml"] #column_content{box-shadow:none}body{margin:0}.dnb-core-style{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:rgba(0,0,0,0);-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;--eufemia-version:"10.55.1";color:var(--theme-color-body,var(--color-black-80,#333));font-family:var(--font-family-default);font-size:var(--font-size-small);font-style:normal;font-weight:var(--font-weight-basis);line-height:var(--line-height-basis);tab-size:4;-moz-tab-size:4;word-break:break-word}.dnb-core-style *,.dnb-core-style :after,.dnb-core-style :before{background-repeat:no-repeat;box-sizing:border-box}.dnb-core-style :after,.dnb-core-style :before{text-decoration:inherit;vertical-align:inherit}.dnb-core-style hr{height:0;overflow:visible}.dnb-core-style main{display:block}.dnb-core-style nav ol,.dnb-core-style nav ul{list-style:none}.dnb-core-style abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.dnb-core-style b,.dnb-core-style strong{font-weight:bolder}.dnb-core-style code,.dnb-core-style kbd,.dnb-core-style pre,.dnb-core-style samp{font-family:var(--font-family-monospace)}.dnb-core-style ::selection{background-color:#b3d4fc;color:#000;text-shadow:none}.dnb-core-style audio,.dnb-core-style canvas,.dnb-core-style iframe,.dnb-core-style img,.dnb-core-style svg,.dnb-core-style video{vertical-align:middle}.dnb-core-style audio,.dnb-core-style video{display:inline-block}.dnb-core-style audio:not([controls]){display:none;height:0}.dnb-core-style img{border-style:none}.dnb-core-style svg:not([fill]){fill:currentcolor}.dnb-core-style svg:not(:root){overflow:hidden}.dnb-core-style table{border-collapse:collapse}.dnb-core-style button,.dnb-core-style input,.dnb-core-style select,.dnb-core-style textarea{font-family:inherit;font-size:inherit;line-height:inherit}.dnb-core-style button,.dnb-core-style figure,.dnb-core-style input,.dnb-core-style select{margin:0}.dnb-core-style button{overflow:visible;text-transform:none}.dnb-core-style input{overflow:visible;word-break:normal}.dnb-core-style legend{color:inherit;display:table;max-width:100%;white-space:normal}.dnb-core-style progress{display:inline-block;vertical-align:baseline}.dnb-core-style select{text-transform:none}.dnb-core-style textarea{overflow:auto;resize:vertical}.dnb-core-style [type=checkbox],.dnb-core-style [type=radio]{padding:0}.dnb-core-style input[type=search]{-webkit-appearance:textfield;appearance:textfield;outline-offset:-2px}.dnb-core-style ::-webkit-inner-spin-button,.dnb-core-style ::-webkit-outer-spin-button{height:auto}.dnb-core-style ::input-placeholder{color:inherit;opacity:.54}.dnb-core-style ::-webkit-search-decoration{-webkit-appearance:none;appearance:none}.dnb-core-style ::-webkit-file-upload-button{background-color:transparent;border:none;font:inherit}.dnb-core-style ::-moz-focus-inner{border-style:none;padding:0}.dnb-core-style details{display:block}.dnb-core-style summary{display:list-item}.dnb-core-style canvas{display:inline-block}.dnb-core-style template{display:none}.dnb-core-style [tabindex],.dnb-core-style a,.dnb-core-style area,.dnb-core-style button,.dnb-core-style input,.dnb-core-style label,.dnb-core-style select,.dnb-core-style summary,.dnb-core-style textarea{touch-action:manipulation}.dnb-core-style [hidden]{display:none}.dnb-core-style [aria-busy=true]{cursor:progress}.dnb-core-style [aria-controls]:not(input){cursor:pointer}.dnb-core-style [aria-disabled=true],.dnb-core-style [disabled]{cursor:not-allowed}.dnb-core-style [aria-hidden=false][hidden]:not(:focus){clip:rect(0,0,0,0);display:inherit;position:absolute}@media print{.dnb-core-style{background-color:#fff;color:#000}}.dnb-core-style .eufemia-theme{color:var(--theme-color-body,var(--color-black-80,#333));font-family:var(--font-family-default);font-size:var(--font-size-small);font-style:normal;font-weight:var(--font-weight-basis);line-height:var(--line-height-basis)}.dnb-no-focus,.dnb-tab-focus,.dnb-tab-focus:focus{outline:none}html[data-whatinput=keyboard] .dnb-tab-focus:focus{--border-color:var(--focus-ring-color);--border-width:var(--focus-ring-width);border-color:transparent;box-shadow:0 0 0 var(--border-width) var(--border-color)}.dnb-mouse-focus,.dnb-mouse-focus:focus{outline:none}html[data-whatinput=mouse] .dnb-mouse-focus:focus{box-shadow:0 0 0 var(--border-width) var(--border-color)}.dnb-focus-ring,html[data-whatinput=mouse] .dnb-mouse-focus:focus{--border-color:var(--focus-ring-color);--border-width:var(--focus-ring-width);border-color:transparent}.dnb-focus-ring{box-shadow:0 0 0 var(--border-width) var(--border-color)!important}.dnb-scrollbar-appearance{-webkit-overflow-scrolling:touch;-ms-overflow-style:auto;scrollbar-color:var(--scrollbar-thumb-color,#888) transparent}@supports not (scrollbar-color:auto){.dnb-scrollbar-appearance::-webkit-scrollbar{background-color:var(--scrollbar-track-color,#eee);border-radius:var(--scrollbar-thumb-width,.5rem)}.dnb-scrollbar-appearance::-webkit-scrollbar:vertical{width:var(--scrollbar-track-width,.5rem)}.dnb-scrollbar-appearance::-webkit-scrollbar:horizontal{height:var(--scrollbar-track-width,.5rem)}.dnb-scrollbar-appearance::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb-color,#888);border-radius:var(--scrollbar-thumb-width,.5rem)}.dnb-scrollbar-appearance::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-thumb-hover-color,#666)}}.dnb-skip-link{opacity:.3;position:absolute;top:-100vh;transition:opacity .3s ease-out;z-index:0}.dnb-skip-link--active,.dnb-skip-link:focus{background-color:transparent;border:none;border-radius:0;box-shadow:none;color:var(--skip-link-color);font-size:var(--font-size-basis);left:40%;margin:0;outline:none;padding:.5rem 1rem;position:fixed;text-align:center;-webkit-text-decoration:none;text-decoration:none;top:5%;user-select:none;-webkit-user-select:none;white-space:nowrap;z-index:9999}.dnb-skip-link--active:after,.dnb-skip-link:focus:after{background-color:hsla(0,0%,100%,.85);box-shadow:150vw 150vh 0 0 hsla(0,0%,100%,.85);content:"";height:150vh;left:-200vw;position:absolute;top:-200vh;width:150vw;z-index:-2}.dnb-skip-link--active:before,.dnb-skip-link:focus:before{background-color:var(--skip-link-background);border-radius:1.5rem;content:"";height:100%;left:0;outline:none;position:absolute;top:0;width:100%;z-index:-1}html[data-whatinput=mouse] .dnb-skip-link--active:before,html[data-whatinput=mouse] .dnb-skip-link:focus:before{--border-color:var(--focus-ring-color);--border-width:var(--focus-ring-width);border-color:transparent;box-shadow:0 0 0 var(--border-width) var(--border-color)}.dnb-skip-link--active:hover:before,.dnb-skip-link:focus:hover:before{background-color:var(--skip-link-background--hover)}.dnb-skip-link--active:active:before,.dnb-skip-link:focus:active:before{background-color:var(--skip-link-background--active)}.dnb-skip-link--active:focus:not(:active):before,.dnb-skip-link:focus:focus:not(:active):before{outline:none}html[data-whatinput=keyboard] .dnb-skip-link--active:focus:not(:active):before,html[data-whatinput=keyboard] .dnb-skip-link:focus:focus:not(:active):before{--border-color:var(--focus-ring-color);--border-width:var(--focus-ring-width);border-color:transparent;box-shadow:0 0 0 var(--border-width) var(--border-color)}.dnb-skip-link--active:focus,.dnb-skip-link:focus:focus{opacity:1}.dnb-skip-link--active:hover,.dnb-skip-link:focus:hover{background-color:transparent;box-shadow:none;color:var(--skip-link-color--hover)}.dnb-skip-link--active:focus:not(:hover):not(:active),.dnb-skip-link:focus:focus:not(:hover):not(:active){background-color:transparent;box-shadow:none;color:var(--skip-link-color)}.dnb-skip-link--active:active,.dnb-skip-link:focus:active{background-color:transparent;color:var(--skip-link-color--active)}html[data-whatintent=touch] .dnb-skip-link{display:none}.dnb-alignment-helper,.dnb-alignment-helper:before{speak:none;display:inline-block;font-size:var(--font-size-small);height:0;width:0}.dnb-alignment-helper:before{content:""}.dnb-drop-shadow{box-shadow:var(--shadow-default)}.dnb-sr-only{-webkit-touch-callout:none!important;border:0!important;clip-path:inset(50%)!important;margin:0!important;max-height:1px!important;max-width:1px!important;overflow:hidden!important;padding:0!important;pointer-events:none!important;position:absolute!important;-webkit-user-select:none!important;user-select:none!important;white-space:nowrap!important}.dnb-suffix{font-size:var(--font-size-basis);line-height:var(--line-height-basis);padding-left:.5rem;word-break:normal}
|
package/es/style/dnb-ui-body.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
html{-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%;cursor:default;font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:var(--line-height-basis);-moz-tab-size:4;tab-size:4;word-break:break-word}body{margin:0}html{font-size:100%}html:not([data-visual-test]){scroll-behavior:smooth}@supports (-webkit-touch-callout:none){@supports (font:-apple-system-body){html{font:-apple-system-body}}}html[xmlns="http://www.w3.org/1999/xhtml"] a:hover{-webkit-text-decoration:none;text-decoration:none}html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-anchor--active{color:var(--color-mint-green)!important}html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-anchor--contrast:not(:hover){color:var(--color-white)!important}html[xmlns="http://www.w3.org/1999/xhtml"] a.dnb-button--primary{color:var(--color-white)}html[xmlns="http://www.w3.org/1999/xhtml"] ul{list-style:initial}html[xmlns="http://www.w3.org/1999/xhtml"] p{background-color:initial;overflow:initial;text-align:inherit}html[xmlns="http://www.w3.org/1999/xhtml"] i{font-style:italic}html[xmlns="http://www.w3.org/1999/xhtml"] #column_left,html[xmlns="http://www.w3.org/1999/xhtml"] #root{width:100%}html[xmlns="http://www.w3.org/1999/xhtml"] body#dnbLayoutDefault #wrapper,html[xmlns="http://www.w3.org/1999/xhtml"] body#dnbLayoutDefaultStartPage #wrapper{max-width:60rem;width:100%}html[xmlns="http://www.w3.org/1999/xhtml"] #column_content{box-shadow:none}body{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:rgba(0,0,0,0);-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;--eufemia-version:"10.55.
|
|
1
|
+
html{-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%;cursor:default;font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:var(--line-height-basis);-moz-tab-size:4;tab-size:4;word-break:break-word}body{margin:0}html{font-size:100%}html:not([data-visual-test]){scroll-behavior:smooth}@supports (-webkit-touch-callout:none){@supports (font:-apple-system-body){html{font:-apple-system-body}}}html[xmlns="http://www.w3.org/1999/xhtml"] a:hover{-webkit-text-decoration:none;text-decoration:none}html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-anchor--active{color:var(--color-mint-green)!important}html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-anchor--contrast:not(:hover){color:var(--color-white)!important}html[xmlns="http://www.w3.org/1999/xhtml"] a.dnb-button--primary{color:var(--color-white)}html[xmlns="http://www.w3.org/1999/xhtml"] ul{list-style:initial}html[xmlns="http://www.w3.org/1999/xhtml"] p{background-color:initial;overflow:initial;text-align:inherit}html[xmlns="http://www.w3.org/1999/xhtml"] i{font-style:italic}html[xmlns="http://www.w3.org/1999/xhtml"] #column_left,html[xmlns="http://www.w3.org/1999/xhtml"] #root{width:100%}html[xmlns="http://www.w3.org/1999/xhtml"] body#dnbLayoutDefault #wrapper,html[xmlns="http://www.w3.org/1999/xhtml"] body#dnbLayoutDefaultStartPage #wrapper{max-width:60rem;width:100%}html[xmlns="http://www.w3.org/1999/xhtml"] #column_content{box-shadow:none}body{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:rgba(0,0,0,0);-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;--eufemia-version:"10.55.1";color:var(--theme-color-body,var(--color-black-80,#333));font-family:var(--font-family-default);font-size:var(--font-size-small);font-style:normal;font-weight:var(--font-weight-basis);line-height:var(--line-height-basis);tab-size:4;-moz-tab-size:4;word-break:break-word}body *,body :after,body :before{background-repeat:no-repeat;box-sizing:border-box}body :after,body :before{text-decoration:inherit;vertical-align:inherit}body hr{height:0;overflow:visible}body main{display:block}body nav ol,body nav ul{list-style:none}body abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}body b,body strong{font-weight:bolder}body code,body kbd,body pre,body samp{font-family:var(--font-family-monospace)}body ::selection{background-color:#b3d4fc;color:#000;text-shadow:none}body audio,body canvas,body iframe,body img,body svg,body video{vertical-align:middle}body audio,body video{display:inline-block}body audio:not([controls]){display:none;height:0}body img{border-style:none}body svg:not([fill]){fill:currentcolor}body svg:not(:root){overflow:hidden}body table{border-collapse:collapse}body button,body input,body select,body textarea{font-family:inherit;font-size:inherit;line-height:inherit}body button,body figure,body input,body select{margin:0}body button{overflow:visible;text-transform:none}body input{overflow:visible;word-break:normal}body legend{color:inherit;display:table;max-width:100%;white-space:normal}body progress{display:inline-block;vertical-align:baseline}body select{text-transform:none}body textarea{overflow:auto;resize:vertical}body [type=checkbox],body [type=radio]{padding:0}body input[type=search]{-webkit-appearance:textfield;appearance:textfield;outline-offset:-2px}body ::-webkit-inner-spin-button,body ::-webkit-outer-spin-button{height:auto}body ::input-placeholder{color:inherit;opacity:.54}body ::-webkit-search-decoration{-webkit-appearance:none;appearance:none}body ::-webkit-file-upload-button{background-color:transparent;border:none;font:inherit}body ::-moz-focus-inner{border-style:none;padding:0}body details{display:block}body summary{display:list-item}body canvas{display:inline-block}body template{display:none}body [tabindex],body a,body area,body button,body input,body label,body select,body summary,body textarea{touch-action:manipulation}body [hidden]{display:none}body [aria-busy=true]{cursor:progress}body [aria-controls]:not(input){cursor:pointer}body [aria-disabled=true],body [disabled]{cursor:not-allowed}body [aria-hidden=false][hidden]:not(:focus){clip:rect(0,0,0,0);display:inherit;position:absolute}@media print{body{background-color:#fff;color:#000}}body .eufemia-theme{color:var(--theme-color-body,var(--color-black-80,#333));font-family:var(--font-family-default);font-size:var(--font-size-small);font-style:normal;font-weight:var(--font-weight-basis);line-height:var(--line-height-basis)}
|
package/es/style/dnb-ui-core.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";html{-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%;cursor:default;font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:var(--line-height-basis);-moz-tab-size:4;tab-size:4;word-break:break-word}body{margin:0}html{font-size:100%}html:not([data-visual-test]){scroll-behavior:smooth}@supports (-webkit-touch-callout:none){@supports (font:-apple-system-body){html{font:-apple-system-body}}}html[xmlns="http://www.w3.org/1999/xhtml"] a:hover{-webkit-text-decoration:none;text-decoration:none}html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-anchor--active{color:var(--color-mint-green)!important}html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-anchor--contrast:not(:hover){color:var(--color-white)!important}html[xmlns="http://www.w3.org/1999/xhtml"] a.dnb-button--primary{color:var(--color-white)}html[xmlns="http://www.w3.org/1999/xhtml"] ul{list-style:initial}html[xmlns="http://www.w3.org/1999/xhtml"] p{background-color:initial;overflow:initial;text-align:inherit}html[xmlns="http://www.w3.org/1999/xhtml"] i{font-style:italic}html[xmlns="http://www.w3.org/1999/xhtml"] #column_left,html[xmlns="http://www.w3.org/1999/xhtml"] #root{width:100%}html[xmlns="http://www.w3.org/1999/xhtml"] body#dnbLayoutDefault #wrapper,html[xmlns="http://www.w3.org/1999/xhtml"] body#dnbLayoutDefaultStartPage #wrapper{max-width:60rem;width:100%}html[xmlns="http://www.w3.org/1999/xhtml"] #column_content{box-shadow:none}.dnb-core-style,body{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:rgba(0,0,0,0);-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;--eufemia-version:"10.55.0";color:var(--theme-color-body,var(--color-black-80,#333));font-family:var(--font-family-default);font-size:var(--font-size-small);font-style:normal;font-weight:var(--font-weight-basis);line-height:var(--line-height-basis);tab-size:4;-moz-tab-size:4;word-break:break-word}.dnb-core-style *,.dnb-core-style :after,.dnb-core-style :before,body *,body :after,body :before{background-repeat:no-repeat;box-sizing:border-box}.dnb-core-style :after,.dnb-core-style :before,body :after,body :before{text-decoration:inherit;vertical-align:inherit}.dnb-core-style hr,body hr{height:0;overflow:visible}.dnb-core-style main,body main{display:block}.dnb-core-style nav ol,.dnb-core-style nav ul,body nav ol,body nav ul{list-style:none}.dnb-core-style abbr[title],body abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.dnb-core-style b,.dnb-core-style strong,body b,body strong{font-weight:bolder}.dnb-core-style code,.dnb-core-style kbd,.dnb-core-style pre,.dnb-core-style samp,body code,body kbd,body pre,body samp{font-family:var(--font-family-monospace)}.dnb-core-style ::selection,body ::selection{background-color:#b3d4fc;color:#000;text-shadow:none}.dnb-core-style audio,.dnb-core-style canvas,.dnb-core-style iframe,.dnb-core-style img,.dnb-core-style svg,.dnb-core-style video,body audio,body canvas,body iframe,body img,body svg,body video{vertical-align:middle}.dnb-core-style audio,.dnb-core-style video,body audio,body video{display:inline-block}.dnb-core-style audio:not([controls]),body audio:not([controls]){display:none;height:0}.dnb-core-style img,body img{border-style:none}.dnb-core-style svg:not([fill]),body svg:not([fill]){fill:currentcolor}.dnb-core-style svg:not(:root),body svg:not(:root){overflow:hidden}.dnb-core-style table,body table{border-collapse:collapse}.dnb-core-style button,.dnb-core-style input,.dnb-core-style select,.dnb-core-style textarea,body button,body input,body select,body textarea{font-family:inherit;font-size:inherit;line-height:inherit}.dnb-core-style button,.dnb-core-style figure,.dnb-core-style input,.dnb-core-style select,body button,body figure,body input,body select{margin:0}.dnb-core-style button,body button{overflow:visible;text-transform:none}.dnb-core-style input,body input{overflow:visible;word-break:normal}.dnb-core-style legend,body legend{color:inherit;display:table;max-width:100%;white-space:normal}.dnb-core-style progress,body progress{display:inline-block;vertical-align:baseline}.dnb-core-style select,body select{text-transform:none}.dnb-core-style textarea,body textarea{overflow:auto;resize:vertical}.dnb-core-style [type=checkbox],.dnb-core-style [type=radio],body [type=checkbox],body [type=radio]{padding:0}.dnb-core-style input[type=search],body input[type=search]{-webkit-appearance:textfield;appearance:textfield;outline-offset:-2px}.dnb-core-style ::-webkit-inner-spin-button,.dnb-core-style ::-webkit-outer-spin-button,body ::-webkit-inner-spin-button,body ::-webkit-outer-spin-button{height:auto}.dnb-core-style ::input-placeholder,body ::input-placeholder{color:inherit;opacity:.54}.dnb-core-style ::-webkit-search-decoration,body ::-webkit-search-decoration{-webkit-appearance:none;appearance:none}.dnb-core-style ::-webkit-file-upload-button,body ::-webkit-file-upload-button{background-color:transparent;border:none;font:inherit}.dnb-core-style ::-moz-focus-inner,body ::-moz-focus-inner{border-style:none;padding:0}.dnb-core-style details,body details{display:block}.dnb-core-style summary,body summary{display:list-item}.dnb-core-style canvas,body canvas{display:inline-block}.dnb-core-style template,body template{display:none}.dnb-core-style [tabindex],.dnb-core-style a,.dnb-core-style area,.dnb-core-style button,.dnb-core-style input,.dnb-core-style label,.dnb-core-style select,.dnb-core-style summary,.dnb-core-style textarea,body [tabindex],body a,body area,body button,body input,body label,body select,body summary,body textarea{touch-action:manipulation}.dnb-core-style [hidden],body [hidden]{display:none}.dnb-core-style [aria-busy=true],body [aria-busy=true]{cursor:progress}.dnb-core-style [aria-controls]:not(input),body [aria-controls]:not(input){cursor:pointer}.dnb-core-style [aria-disabled=true],.dnb-core-style [disabled],body [aria-disabled=true],body [disabled]{cursor:not-allowed}.dnb-core-style [aria-hidden=false][hidden]:not(:focus),body [aria-hidden=false][hidden]:not(:focus){clip:rect(0,0,0,0);display:inherit;position:absolute}@media print{.dnb-core-style,body{background-color:#fff;color:#000}}.dnb-core-style .eufemia-theme,body .eufemia-theme{color:var(--theme-color-body,var(--color-black-80,#333));font-family:var(--font-family-default);font-size:var(--font-size-small);font-style:normal;font-weight:var(--font-weight-basis);line-height:var(--line-height-basis)}.dnb-no-focus,.dnb-tab-focus,.dnb-tab-focus:focus{outline:none}html[data-whatinput=keyboard] .dnb-tab-focus:focus{--border-color:var(--focus-ring-color);--border-width:var(--focus-ring-width);border-color:transparent;box-shadow:0 0 0 var(--border-width) var(--border-color)}.dnb-mouse-focus,.dnb-mouse-focus:focus{outline:none}html[data-whatinput=mouse] .dnb-mouse-focus:focus{box-shadow:0 0 0 var(--border-width) var(--border-color)}.dnb-focus-ring,html[data-whatinput=mouse] .dnb-mouse-focus:focus{--border-color:var(--focus-ring-color);--border-width:var(--focus-ring-width);border-color:transparent}.dnb-focus-ring{box-shadow:0 0 0 var(--border-width) var(--border-color)!important}.dnb-scrollbar-appearance{-webkit-overflow-scrolling:touch;-ms-overflow-style:auto;scrollbar-color:var(--scrollbar-thumb-color,#888) transparent}@supports not (scrollbar-color:auto){.dnb-scrollbar-appearance::-webkit-scrollbar{background-color:var(--scrollbar-track-color,#eee);border-radius:var(--scrollbar-thumb-width,.5rem)}.dnb-scrollbar-appearance::-webkit-scrollbar:vertical{width:var(--scrollbar-track-width,.5rem)}.dnb-scrollbar-appearance::-webkit-scrollbar:horizontal{height:var(--scrollbar-track-width,.5rem)}.dnb-scrollbar-appearance::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb-color,#888);border-radius:var(--scrollbar-thumb-width,.5rem)}.dnb-scrollbar-appearance::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-thumb-hover-color,#666)}}.dnb-skip-link{opacity:.3;position:absolute;top:-100vh;transition:opacity .3s ease-out;z-index:0}.dnb-skip-link--active,.dnb-skip-link:focus{background-color:transparent;border:none;border-radius:0;box-shadow:none;color:var(--skip-link-color);font-size:var(--font-size-basis);left:40%;margin:0;outline:none;padding:.5rem 1rem;position:fixed;text-align:center;-webkit-text-decoration:none;text-decoration:none;top:5%;user-select:none;-webkit-user-select:none;white-space:nowrap;z-index:9999}.dnb-skip-link--active:after,.dnb-skip-link:focus:after{background-color:hsla(0,0%,100%,.85);box-shadow:150vw 150vh 0 0 hsla(0,0%,100%,.85);content:"";height:150vh;left:-200vw;position:absolute;top:-200vh;width:150vw;z-index:-2}.dnb-skip-link--active:before,.dnb-skip-link:focus:before{background-color:var(--skip-link-background);border-radius:1.5rem;content:"";height:100%;left:0;outline:none;position:absolute;top:0;width:100%;z-index:-1}html[data-whatinput=mouse] .dnb-skip-link--active:before,html[data-whatinput=mouse] .dnb-skip-link:focus:before{--border-color:var(--focus-ring-color);--border-width:var(--focus-ring-width);border-color:transparent;box-shadow:0 0 0 var(--border-width) var(--border-color)}.dnb-skip-link--active:hover:before,.dnb-skip-link:focus:hover:before{background-color:var(--skip-link-background--hover)}.dnb-skip-link--active:active:before,.dnb-skip-link:focus:active:before{background-color:var(--skip-link-background--active)}.dnb-skip-link--active:focus:not(:active):before,.dnb-skip-link:focus:focus:not(:active):before{outline:none}html[data-whatinput=keyboard] .dnb-skip-link--active:focus:not(:active):before,html[data-whatinput=keyboard] .dnb-skip-link:focus:focus:not(:active):before{--border-color:var(--focus-ring-color);--border-width:var(--focus-ring-width);border-color:transparent;box-shadow:0 0 0 var(--border-width) var(--border-color)}.dnb-skip-link--active:focus,.dnb-skip-link:focus:focus{opacity:1}.dnb-skip-link--active:hover,.dnb-skip-link:focus:hover{background-color:transparent;box-shadow:none;color:var(--skip-link-color--hover)}.dnb-skip-link--active:focus:not(:hover):not(:active),.dnb-skip-link:focus:focus:not(:hover):not(:active){background-color:transparent;box-shadow:none;color:var(--skip-link-color)}.dnb-skip-link--active:active,.dnb-skip-link:focus:active{background-color:transparent;color:var(--skip-link-color--active)}html[data-whatintent=touch] .dnb-skip-link{display:none}.dnb-alignment-helper,.dnb-alignment-helper:before{speak:none;display:inline-block;font-size:var(--font-size-small);height:0;width:0}.dnb-alignment-helper:before{content:""}.dnb-drop-shadow{box-shadow:var(--shadow-default)}.dnb-sr-only{-webkit-touch-callout:none!important;border:0!important;clip-path:inset(50%)!important;margin:0!important;max-height:1px!important;max-width:1px!important;overflow:hidden!important;padding:0!important;pointer-events:none!important;position:absolute!important;-webkit-user-select:none!important;user-select:none!important;white-space:nowrap!important}.dnb-suffix{font-size:var(--font-size-basis);line-height:var(--line-height-basis);padding-left:.5rem;word-break:normal}
|
|
1
|
+
@charset "UTF-8";html{-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%;cursor:default;font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:var(--line-height-basis);-moz-tab-size:4;tab-size:4;word-break:break-word}body{margin:0}html{font-size:100%}html:not([data-visual-test]){scroll-behavior:smooth}@supports (-webkit-touch-callout:none){@supports (font:-apple-system-body){html{font:-apple-system-body}}}html[xmlns="http://www.w3.org/1999/xhtml"] a:hover{-webkit-text-decoration:none;text-decoration:none}html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-anchor--active{color:var(--color-mint-green)!important}html[xmlns="http://www.w3.org/1999/xhtml"] .dnb-anchor--contrast:not(:hover){color:var(--color-white)!important}html[xmlns="http://www.w3.org/1999/xhtml"] a.dnb-button--primary{color:var(--color-white)}html[xmlns="http://www.w3.org/1999/xhtml"] ul{list-style:initial}html[xmlns="http://www.w3.org/1999/xhtml"] p{background-color:initial;overflow:initial;text-align:inherit}html[xmlns="http://www.w3.org/1999/xhtml"] i{font-style:italic}html[xmlns="http://www.w3.org/1999/xhtml"] #column_left,html[xmlns="http://www.w3.org/1999/xhtml"] #root{width:100%}html[xmlns="http://www.w3.org/1999/xhtml"] body#dnbLayoutDefault #wrapper,html[xmlns="http://www.w3.org/1999/xhtml"] body#dnbLayoutDefaultStartPage #wrapper{max-width:60rem;width:100%}html[xmlns="http://www.w3.org/1999/xhtml"] #column_content{box-shadow:none}.dnb-core-style,body{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:rgba(0,0,0,0);-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;--eufemia-version:"10.55.1";color:var(--theme-color-body,var(--color-black-80,#333));font-family:var(--font-family-default);font-size:var(--font-size-small);font-style:normal;font-weight:var(--font-weight-basis);line-height:var(--line-height-basis);tab-size:4;-moz-tab-size:4;word-break:break-word}.dnb-core-style *,.dnb-core-style :after,.dnb-core-style :before,body *,body :after,body :before{background-repeat:no-repeat;box-sizing:border-box}.dnb-core-style :after,.dnb-core-style :before,body :after,body :before{text-decoration:inherit;vertical-align:inherit}.dnb-core-style hr,body hr{height:0;overflow:visible}.dnb-core-style main,body main{display:block}.dnb-core-style nav ol,.dnb-core-style nav ul,body nav ol,body nav ul{list-style:none}.dnb-core-style abbr[title],body abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.dnb-core-style b,.dnb-core-style strong,body b,body strong{font-weight:bolder}.dnb-core-style code,.dnb-core-style kbd,.dnb-core-style pre,.dnb-core-style samp,body code,body kbd,body pre,body samp{font-family:var(--font-family-monospace)}.dnb-core-style ::selection,body ::selection{background-color:#b3d4fc;color:#000;text-shadow:none}.dnb-core-style audio,.dnb-core-style canvas,.dnb-core-style iframe,.dnb-core-style img,.dnb-core-style svg,.dnb-core-style video,body audio,body canvas,body iframe,body img,body svg,body video{vertical-align:middle}.dnb-core-style audio,.dnb-core-style video,body audio,body video{display:inline-block}.dnb-core-style audio:not([controls]),body audio:not([controls]){display:none;height:0}.dnb-core-style img,body img{border-style:none}.dnb-core-style svg:not([fill]),body svg:not([fill]){fill:currentcolor}.dnb-core-style svg:not(:root),body svg:not(:root){overflow:hidden}.dnb-core-style table,body table{border-collapse:collapse}.dnb-core-style button,.dnb-core-style input,.dnb-core-style select,.dnb-core-style textarea,body button,body input,body select,body textarea{font-family:inherit;font-size:inherit;line-height:inherit}.dnb-core-style button,.dnb-core-style figure,.dnb-core-style input,.dnb-core-style select,body button,body figure,body input,body select{margin:0}.dnb-core-style button,body button{overflow:visible;text-transform:none}.dnb-core-style input,body input{overflow:visible;word-break:normal}.dnb-core-style legend,body legend{color:inherit;display:table;max-width:100%;white-space:normal}.dnb-core-style progress,body progress{display:inline-block;vertical-align:baseline}.dnb-core-style select,body select{text-transform:none}.dnb-core-style textarea,body textarea{overflow:auto;resize:vertical}.dnb-core-style [type=checkbox],.dnb-core-style [type=radio],body [type=checkbox],body [type=radio]{padding:0}.dnb-core-style input[type=search],body input[type=search]{-webkit-appearance:textfield;appearance:textfield;outline-offset:-2px}.dnb-core-style ::-webkit-inner-spin-button,.dnb-core-style ::-webkit-outer-spin-button,body ::-webkit-inner-spin-button,body ::-webkit-outer-spin-button{height:auto}.dnb-core-style ::input-placeholder,body ::input-placeholder{color:inherit;opacity:.54}.dnb-core-style ::-webkit-search-decoration,body ::-webkit-search-decoration{-webkit-appearance:none;appearance:none}.dnb-core-style ::-webkit-file-upload-button,body ::-webkit-file-upload-button{background-color:transparent;border:none;font:inherit}.dnb-core-style ::-moz-focus-inner,body ::-moz-focus-inner{border-style:none;padding:0}.dnb-core-style details,body details{display:block}.dnb-core-style summary,body summary{display:list-item}.dnb-core-style canvas,body canvas{display:inline-block}.dnb-core-style template,body template{display:none}.dnb-core-style [tabindex],.dnb-core-style a,.dnb-core-style area,.dnb-core-style button,.dnb-core-style input,.dnb-core-style label,.dnb-core-style select,.dnb-core-style summary,.dnb-core-style textarea,body [tabindex],body a,body area,body button,body input,body label,body select,body summary,body textarea{touch-action:manipulation}.dnb-core-style [hidden],body [hidden]{display:none}.dnb-core-style [aria-busy=true],body [aria-busy=true]{cursor:progress}.dnb-core-style [aria-controls]:not(input),body [aria-controls]:not(input){cursor:pointer}.dnb-core-style [aria-disabled=true],.dnb-core-style [disabled],body [aria-disabled=true],body [disabled]{cursor:not-allowed}.dnb-core-style [aria-hidden=false][hidden]:not(:focus),body [aria-hidden=false][hidden]:not(:focus){clip:rect(0,0,0,0);display:inherit;position:absolute}@media print{.dnb-core-style,body{background-color:#fff;color:#000}}.dnb-core-style .eufemia-theme,body .eufemia-theme{color:var(--theme-color-body,var(--color-black-80,#333));font-family:var(--font-family-default);font-size:var(--font-size-small);font-style:normal;font-weight:var(--font-weight-basis);line-height:var(--line-height-basis)}.dnb-no-focus,.dnb-tab-focus,.dnb-tab-focus:focus{outline:none}html[data-whatinput=keyboard] .dnb-tab-focus:focus{--border-color:var(--focus-ring-color);--border-width:var(--focus-ring-width);border-color:transparent;box-shadow:0 0 0 var(--border-width) var(--border-color)}.dnb-mouse-focus,.dnb-mouse-focus:focus{outline:none}html[data-whatinput=mouse] .dnb-mouse-focus:focus{box-shadow:0 0 0 var(--border-width) var(--border-color)}.dnb-focus-ring,html[data-whatinput=mouse] .dnb-mouse-focus:focus{--border-color:var(--focus-ring-color);--border-width:var(--focus-ring-width);border-color:transparent}.dnb-focus-ring{box-shadow:0 0 0 var(--border-width) var(--border-color)!important}.dnb-scrollbar-appearance{-webkit-overflow-scrolling:touch;-ms-overflow-style:auto;scrollbar-color:var(--scrollbar-thumb-color,#888) transparent}@supports not (scrollbar-color:auto){.dnb-scrollbar-appearance::-webkit-scrollbar{background-color:var(--scrollbar-track-color,#eee);border-radius:var(--scrollbar-thumb-width,.5rem)}.dnb-scrollbar-appearance::-webkit-scrollbar:vertical{width:var(--scrollbar-track-width,.5rem)}.dnb-scrollbar-appearance::-webkit-scrollbar:horizontal{height:var(--scrollbar-track-width,.5rem)}.dnb-scrollbar-appearance::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb-color,#888);border-radius:var(--scrollbar-thumb-width,.5rem)}.dnb-scrollbar-appearance::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-thumb-hover-color,#666)}}.dnb-skip-link{opacity:.3;position:absolute;top:-100vh;transition:opacity .3s ease-out;z-index:0}.dnb-skip-link--active,.dnb-skip-link:focus{background-color:transparent;border:none;border-radius:0;box-shadow:none;color:var(--skip-link-color);font-size:var(--font-size-basis);left:40%;margin:0;outline:none;padding:.5rem 1rem;position:fixed;text-align:center;-webkit-text-decoration:none;text-decoration:none;top:5%;user-select:none;-webkit-user-select:none;white-space:nowrap;z-index:9999}.dnb-skip-link--active:after,.dnb-skip-link:focus:after{background-color:hsla(0,0%,100%,.85);box-shadow:150vw 150vh 0 0 hsla(0,0%,100%,.85);content:"";height:150vh;left:-200vw;position:absolute;top:-200vh;width:150vw;z-index:-2}.dnb-skip-link--active:before,.dnb-skip-link:focus:before{background-color:var(--skip-link-background);border-radius:1.5rem;content:"";height:100%;left:0;outline:none;position:absolute;top:0;width:100%;z-index:-1}html[data-whatinput=mouse] .dnb-skip-link--active:before,html[data-whatinput=mouse] .dnb-skip-link:focus:before{--border-color:var(--focus-ring-color);--border-width:var(--focus-ring-width);border-color:transparent;box-shadow:0 0 0 var(--border-width) var(--border-color)}.dnb-skip-link--active:hover:before,.dnb-skip-link:focus:hover:before{background-color:var(--skip-link-background--hover)}.dnb-skip-link--active:active:before,.dnb-skip-link:focus:active:before{background-color:var(--skip-link-background--active)}.dnb-skip-link--active:focus:not(:active):before,.dnb-skip-link:focus:focus:not(:active):before{outline:none}html[data-whatinput=keyboard] .dnb-skip-link--active:focus:not(:active):before,html[data-whatinput=keyboard] .dnb-skip-link:focus:focus:not(:active):before{--border-color:var(--focus-ring-color);--border-width:var(--focus-ring-width);border-color:transparent;box-shadow:0 0 0 var(--border-width) var(--border-color)}.dnb-skip-link--active:focus,.dnb-skip-link:focus:focus{opacity:1}.dnb-skip-link--active:hover,.dnb-skip-link:focus:hover{background-color:transparent;box-shadow:none;color:var(--skip-link-color--hover)}.dnb-skip-link--active:focus:not(:hover):not(:active),.dnb-skip-link:focus:focus:not(:hover):not(:active){background-color:transparent;box-shadow:none;color:var(--skip-link-color)}.dnb-skip-link--active:active,.dnb-skip-link:focus:active{background-color:transparent;color:var(--skip-link-color--active)}html[data-whatintent=touch] .dnb-skip-link{display:none}.dnb-alignment-helper,.dnb-alignment-helper:before{speak:none;display:inline-block;font-size:var(--font-size-small);height:0;width:0}.dnb-alignment-helper:before{content:""}.dnb-drop-shadow{box-shadow:var(--shadow-default)}.dnb-sr-only{-webkit-touch-callout:none!important;border:0!important;clip-path:inset(50%)!important;margin:0!important;max-height:1px!important;max-width:1px!important;overflow:hidden!important;padding:0!important;pointer-events:none!important;position:absolute!important;-webkit-user-select:none!important;user-select:none!important;white-space:nowrap!important}.dnb-suffix{font-size:var(--font-size-basis);line-height:var(--line-height-basis);padding-left:.5rem;word-break:normal}
|
package/esm/dnb-ui-basis.min.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"react";var e,t="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},n={};e=function(){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var i=t[o]={exports:{},id:o,loaded:!1};return e[o].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}return n.m=e,n.c=t,n.p="",n(0)}([function(e,t){e.exports=function(){if("undefined"==typeof document||"undefined"==typeof window)return{ask:function(){return"initial"},element:function(){return null},ignoreKeys:function(){},specificKeys:function(){},registerOnChange:function(){},unRegisterOnChange:function(){}};var e=document.documentElement,t=null,n="initial",o=n,i=Date.now(),r="false",a=["button","input","select","textarea"],d=[],u=[16,17,18,91,93],s=[],c={keydown:"keyboard",keyup:"keyboard",mousedown:"mouse",mousemove:"mouse",MSPointerDown:"pointer",MSPointerMove:"pointer",pointerdown:"pointer",pointermove:"pointer",touchstart:"touch",touchend:"touch"},f=!1,w={x:null,y:null},l={2:"touch",3:"touch",4:"mouse"},p=!1;try{var m=Object.defineProperty({},"passive",{get:function(){p=!0}});window.addEventListener("test",null,m)}catch(e){}var v=function(){var e=!!p&&{passive:!0};document.addEventListener("DOMContentLoaded",g),window.PointerEvent?(window.addEventListener("pointerdown",h),window.addEventListener("pointermove",E)):window.MSPointerEvent?(window.addEventListener("MSPointerDown",h),window.addEventListener("MSPointerMove",E)):(window.addEventListener("mousedown",h),window.addEventListener("mousemove",E),"ontouchstart"in window&&(window.addEventListener("touchstart",h,e),window.addEventListener("touchend",h))),window.addEventListener(M(),E,e),window.addEventListener("keydown",h),window.addEventListener("keyup",h),window.addEventListener("focusin",x),window.addEventListener("focusout",L)},g=function(){if(r=!(e.getAttribute("data-whatpersist")||"false"===document.body.getAttribute("data-whatpersist")))try{window.sessionStorage.getItem("what-input")&&(n=window.sessionStorage.getItem("what-input")),window.sessionStorage.getItem("what-intent")&&(o=window.sessionStorage.getItem("what-intent"))}catch(e){}y("input"),y("intent")},h=function(e){var t=e.which,i=c[e.type];"pointer"===i&&(i=S(e));var r=!s.length&&-1===u.indexOf(t),d=s.length&&-1!==s.indexOf(t),f="keyboard"===i&&t&&(r||d)||"mouse"===i||"touch"===i;if(A(i)&&(f=!1),f&&n!==i&&(b("input",n=i),y("input")),f&&o!==i){var w=document.activeElement;w&&w.nodeName&&(-1===a.indexOf(w.nodeName.toLowerCase())||"button"===w.nodeName.toLowerCase()&&!k(w,"form"))&&(b("intent",o=i),y("intent"))}},y=function(t){e.setAttribute("data-what"+t,"input"===t?n:o),O(t)},E=function(e){var t=c[e.type];"pointer"===t&&(t=S(e)),P(e),(!f&&!A(t)||f&&"wheel"===e.type||"mousewheel"===e.type||"DOMMouseScroll"===e.type)&&o!==t&&(b("intent",o=t),y("intent"))},x=function(n){n.target.nodeName?(t=n.target.nodeName.toLowerCase(),e.setAttribute("data-whatelement",t),n.target.classList&&n.target.classList.length&&e.setAttribute("data-whatclasses",n.target.classList.toString().replace(" ",","))):L()},L=function(){t=null,e.removeAttribute("data-whatelement"),e.removeAttribute("data-whatclasses")},b=function(e,t){if(r)try{window.sessionStorage.setItem("what-"+e,t)}catch(e){}},S=function(e){return"number"==typeof e.pointerType?l[e.pointerType]:"pen"===e.pointerType?"touch":e.pointerType},A=function(e){var t=Date.now(),o="mouse"===e&&"touch"===n&&t-i<200;return i=t,o},M=function(){return"onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll"},O=function(e){for(var t=0,i=d.length;t<i;t++)d[t].type===e&&d[t].fn.call(void 0,"input"===e?n:o)},P=function(e){w.x!==e.screenX||w.y!==e.screenY?(f=!1,w.x=e.screenX,w.y=e.screenY):f=!0},k=function(e,t){var n=window.Element.prototype;if(n.matches||(n.matches=n.msMatchesSelector||n.webkitMatchesSelector),n.closest)return e.closest(t);do{if(e.matches(t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null};return"addEventListener"in window&&Array.prototype.indexOf&&(c[M()]="mouse",v()),{ask:function(e){return"intent"===e?o:n},element:function(){return t},ignoreKeys:function(e){u=e},specificKeys:function(e){s=e},registerOnChange:function(e,t){d.push({fn:e,type:t||"input"})},unRegisterOnChange:function(e){var t=function(e){for(var t=0,n=d.length;t<n;t++)if(d[t].fn===e)return t}(e);(t||0===t)&&d.splice(t,1)},clearStorage:function(){window.sessionStorage.clear()}}}()}])},{get exports(){return n},set exports(e){n=e}}.exports=e();var o=n;"function"==typeof t.setTimeout&&setTimeout,"function"==typeof t.clearTimeout&&clearTimeout;function i(e,t){this.fun=e,this.array=t}i.prototype.run=function(){this.fun.apply(null,this.array)};var r=t.performance||{};r.now||r.mozNow||r.msNow||r.oNow||r.webkitNow;new Date;const a="Mac|iPad|iPhone|iPod",d="Linux";let u=!1;var s,c,f,w,l,p,m,v;"undefined"!=typeof navigator&&/edge/i.test(null===(s=navigator)||void 0===s?void 0:s.userAgent),"undefined"!=typeof navigator&&new RegExp("iOS|iPhone|iPad|iPod","i").test(null===(c=navigator)||void 0===c?void 0:c.platform),u="undefined"!=typeof navigator&&/safari/i.test(null===(f=navigator)||void 0===f?void 0:f.userAgent)&&!/chrome/i.test(null===(w=navigator)||void 0===w?void 0:w.userAgent),"undefined"!=typeof navigator&&new RegExp("Win","i").test(null===(l=navigator)||void 0===l?void 0:l.platform),"undefined"!=typeof navigator&&new RegExp("Android","i").test(null===(p=navigator)||void 0===p?void 0:p.userAgent),"undefined"!=typeof navigator&&new RegExp(a,"i").test(null===(m=navigator)||void 0===m?void 0:m.platform),"undefined"!=typeof navigator&&new RegExp(d,"i").test(null===(v=navigator)||void 0===v?void 0:v.platform);function g(){if("undefined"!=typeof document){let e=!1;try{e=document.documentElement.getAttribute("data-whatintent")}catch(e){}return"touch"===e}return!1}function h(){const e=()=>{if("undefined"!=typeof document&&"undefined"!=typeof window&&"undefined"!=typeof navigator){try{"undefined"!=typeof window&&window.IS_TEST?document.documentElement.setAttribute("data-os","other"):null!==navigator.platform.match(new RegExp(a))?document.documentElement.setAttribute("data-os","mac"):null!==navigator.platform.match(new RegExp("Win"))?document.documentElement.setAttribute("data-os","win"):null!==navigator.platform.match(new RegExp(d))&&document.documentElement.setAttribute("data-os","linux")}catch(e){}document.removeEventListener("DOMContentLoaded",e)}};"undefined"!=typeof document&&"loading"===document.readyState?document.addEventListener("DOMContentLoaded",e):e()}!function(){try{0}catch(e){console.error(e)}}(),function(){if("undefined"!=typeof window){class e{get version(){return"10.55.
|
|
1
|
+
import"react";var e,t="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},n={};e=function(){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var i=t[o]={exports:{},id:o,loaded:!1};return e[o].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}return n.m=e,n.c=t,n.p="",n(0)}([function(e,t){e.exports=function(){if("undefined"==typeof document||"undefined"==typeof window)return{ask:function(){return"initial"},element:function(){return null},ignoreKeys:function(){},specificKeys:function(){},registerOnChange:function(){},unRegisterOnChange:function(){}};var e=document.documentElement,t=null,n="initial",o=n,i=Date.now(),r="false",a=["button","input","select","textarea"],d=[],u=[16,17,18,91,93],s=[],c={keydown:"keyboard",keyup:"keyboard",mousedown:"mouse",mousemove:"mouse",MSPointerDown:"pointer",MSPointerMove:"pointer",pointerdown:"pointer",pointermove:"pointer",touchstart:"touch",touchend:"touch"},f=!1,w={x:null,y:null},l={2:"touch",3:"touch",4:"mouse"},p=!1;try{var m=Object.defineProperty({},"passive",{get:function(){p=!0}});window.addEventListener("test",null,m)}catch(e){}var v=function(){var e=!!p&&{passive:!0};document.addEventListener("DOMContentLoaded",g),window.PointerEvent?(window.addEventListener("pointerdown",h),window.addEventListener("pointermove",E)):window.MSPointerEvent?(window.addEventListener("MSPointerDown",h),window.addEventListener("MSPointerMove",E)):(window.addEventListener("mousedown",h),window.addEventListener("mousemove",E),"ontouchstart"in window&&(window.addEventListener("touchstart",h,e),window.addEventListener("touchend",h))),window.addEventListener(M(),E,e),window.addEventListener("keydown",h),window.addEventListener("keyup",h),window.addEventListener("focusin",x),window.addEventListener("focusout",L)},g=function(){if(r=!(e.getAttribute("data-whatpersist")||"false"===document.body.getAttribute("data-whatpersist")))try{window.sessionStorage.getItem("what-input")&&(n=window.sessionStorage.getItem("what-input")),window.sessionStorage.getItem("what-intent")&&(o=window.sessionStorage.getItem("what-intent"))}catch(e){}y("input"),y("intent")},h=function(e){var t=e.which,i=c[e.type];"pointer"===i&&(i=S(e));var r=!s.length&&-1===u.indexOf(t),d=s.length&&-1!==s.indexOf(t),f="keyboard"===i&&t&&(r||d)||"mouse"===i||"touch"===i;if(A(i)&&(f=!1),f&&n!==i&&(b("input",n=i),y("input")),f&&o!==i){var w=document.activeElement;w&&w.nodeName&&(-1===a.indexOf(w.nodeName.toLowerCase())||"button"===w.nodeName.toLowerCase()&&!k(w,"form"))&&(b("intent",o=i),y("intent"))}},y=function(t){e.setAttribute("data-what"+t,"input"===t?n:o),O(t)},E=function(e){var t=c[e.type];"pointer"===t&&(t=S(e)),P(e),(!f&&!A(t)||f&&"wheel"===e.type||"mousewheel"===e.type||"DOMMouseScroll"===e.type)&&o!==t&&(b("intent",o=t),y("intent"))},x=function(n){n.target.nodeName?(t=n.target.nodeName.toLowerCase(),e.setAttribute("data-whatelement",t),n.target.classList&&n.target.classList.length&&e.setAttribute("data-whatclasses",n.target.classList.toString().replace(" ",","))):L()},L=function(){t=null,e.removeAttribute("data-whatelement"),e.removeAttribute("data-whatclasses")},b=function(e,t){if(r)try{window.sessionStorage.setItem("what-"+e,t)}catch(e){}},S=function(e){return"number"==typeof e.pointerType?l[e.pointerType]:"pen"===e.pointerType?"touch":e.pointerType},A=function(e){var t=Date.now(),o="mouse"===e&&"touch"===n&&t-i<200;return i=t,o},M=function(){return"onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll"},O=function(e){for(var t=0,i=d.length;t<i;t++)d[t].type===e&&d[t].fn.call(void 0,"input"===e?n:o)},P=function(e){w.x!==e.screenX||w.y!==e.screenY?(f=!1,w.x=e.screenX,w.y=e.screenY):f=!0},k=function(e,t){var n=window.Element.prototype;if(n.matches||(n.matches=n.msMatchesSelector||n.webkitMatchesSelector),n.closest)return e.closest(t);do{if(e.matches(t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null};return"addEventListener"in window&&Array.prototype.indexOf&&(c[M()]="mouse",v()),{ask:function(e){return"intent"===e?o:n},element:function(){return t},ignoreKeys:function(e){u=e},specificKeys:function(e){s=e},registerOnChange:function(e,t){d.push({fn:e,type:t||"input"})},unRegisterOnChange:function(e){var t=function(e){for(var t=0,n=d.length;t<n;t++)if(d[t].fn===e)return t}(e);(t||0===t)&&d.splice(t,1)},clearStorage:function(){window.sessionStorage.clear()}}}()}])},{get exports(){return n},set exports(e){n=e}}.exports=e();var o=n;"function"==typeof t.setTimeout&&setTimeout,"function"==typeof t.clearTimeout&&clearTimeout;function i(e,t){this.fun=e,this.array=t}i.prototype.run=function(){this.fun.apply(null,this.array)};var r=t.performance||{};r.now||r.mozNow||r.msNow||r.oNow||r.webkitNow;new Date;const a="Mac|iPad|iPhone|iPod",d="Linux";let u=!1;var s,c,f,w,l,p,m,v;"undefined"!=typeof navigator&&/edge/i.test(null===(s=navigator)||void 0===s?void 0:s.userAgent),"undefined"!=typeof navigator&&new RegExp("iOS|iPhone|iPad|iPod","i").test(null===(c=navigator)||void 0===c?void 0:c.platform),u="undefined"!=typeof navigator&&/safari/i.test(null===(f=navigator)||void 0===f?void 0:f.userAgent)&&!/chrome/i.test(null===(w=navigator)||void 0===w?void 0:w.userAgent),"undefined"!=typeof navigator&&new RegExp("Win","i").test(null===(l=navigator)||void 0===l?void 0:l.platform),"undefined"!=typeof navigator&&new RegExp("Android","i").test(null===(p=navigator)||void 0===p?void 0:p.userAgent),"undefined"!=typeof navigator&&new RegExp(a,"i").test(null===(m=navigator)||void 0===m?void 0:m.platform),"undefined"!=typeof navigator&&new RegExp(d,"i").test(null===(v=navigator)||void 0===v?void 0:v.platform);function g(){if("undefined"!=typeof document){let e=!1;try{e=document.documentElement.getAttribute("data-whatintent")}catch(e){}return"touch"===e}return!1}function h(){const e=()=>{if("undefined"!=typeof document&&"undefined"!=typeof window&&"undefined"!=typeof navigator){try{"undefined"!=typeof window&&window.IS_TEST?document.documentElement.setAttribute("data-os","other"):null!==navigator.platform.match(new RegExp(a))?document.documentElement.setAttribute("data-os","mac"):null!==navigator.platform.match(new RegExp("Win"))?document.documentElement.setAttribute("data-os","win"):null!==navigator.platform.match(new RegExp(d))&&document.documentElement.setAttribute("data-os","linux")}catch(e){}document.removeEventListener("DOMContentLoaded",e)}};"undefined"!=typeof document&&"loading"===document.readyState?document.addEventListener("DOMContentLoaded",e):e()}!function(){try{0}catch(e){console.error(e)}}(),function(){if("undefined"!=typeof window){class e{get version(){return"10.55.1"}}window.Eufemia=new e}}(),o.specificKeys([9]),h();export{h as defineNavigator,g as isTouchDevice};
|