@dnb/eufemia 10.51.0 → 10.51.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 +13 -0
- package/cjs/components/dropdown/Dropdown.js +1 -1
- package/cjs/components/dropdown/Dropdown.js.map +1 -1
- package/cjs/components/dropdown/style/dnb-dropdown.css +7 -6
- package/cjs/components/dropdown/style/dnb-dropdown.min.css +1 -1
- package/cjs/components/dropdown/style/dnb-dropdown.scss +17 -17
- package/cjs/components/icon/Icon.d.ts +1 -1
- package/cjs/components/icon/Icon.js.map +1 -1
- package/cjs/extensions/forms/Form/data-context/useData.d.ts +1 -1
- package/cjs/extensions/forms/Form/data-context/useData.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-components.css +7 -6
- package/cjs/style/dnb-ui-components.min.css +1 -1
- package/cjs/style/dnb-ui-core.css +1 -1
- package/cjs/style/dnb-ui-core.min.css +1 -1
- package/cjs/style/themes/theme-eiendom/eiendom-theme-components.css +7 -6
- package/cjs/style/themes/theme-eiendom/eiendom-theme-components.min.css +1 -1
- package/cjs/style/themes/theme-sbanken/sbanken-theme-components.css +7 -6
- package/cjs/style/themes/theme-sbanken/sbanken-theme-components.min.css +1 -1
- package/cjs/style/themes/theme-ui/ui-theme-components.css +7 -6
- package/cjs/style/themes/theme-ui/ui-theme-components.min.css +1 -1
- package/components/dropdown/Dropdown.js +1 -1
- package/components/dropdown/Dropdown.js.map +1 -1
- package/components/dropdown/style/dnb-dropdown.css +7 -6
- package/components/dropdown/style/dnb-dropdown.min.css +1 -1
- package/components/dropdown/style/dnb-dropdown.scss +17 -17
- package/components/icon/Icon.d.ts +1 -1
- package/components/icon/Icon.js.map +1 -1
- package/es/components/dropdown/Dropdown.js +1 -1
- package/es/components/dropdown/Dropdown.js.map +1 -1
- package/es/components/dropdown/style/dnb-dropdown.css +7 -6
- package/es/components/dropdown/style/dnb-dropdown.min.css +1 -1
- package/es/components/dropdown/style/dnb-dropdown.scss +17 -17
- package/es/components/icon/Icon.d.ts +1 -1
- package/es/components/icon/Icon.js.map +1 -1
- package/es/extensions/forms/Form/data-context/useData.d.ts +1 -1
- package/es/extensions/forms/Form/data-context/useData.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-components.css +7 -6
- package/es/style/dnb-ui-components.min.css +1 -1
- package/es/style/dnb-ui-core.css +1 -1
- package/es/style/dnb-ui-core.min.css +1 -1
- package/es/style/themes/theme-eiendom/eiendom-theme-components.css +7 -6
- package/es/style/themes/theme-eiendom/eiendom-theme-components.min.css +1 -1
- package/es/style/themes/theme-sbanken/sbanken-theme-components.css +7 -6
- package/es/style/themes/theme-sbanken/sbanken-theme-components.min.css +1 -1
- package/es/style/themes/theme-ui/ui-theme-components.css +7 -6
- package/es/style/themes/theme-ui/ui-theme-components.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 +3 -3
- package/esm/dnb-ui-lib.min.mjs +1 -1
- package/extensions/forms/Form/data-context/useData.d.ts +1 -1
- package/extensions/forms/Form/data-context/useData.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-components.css +7 -6
- package/style/dnb-ui-components.min.css +1 -1
- package/style/dnb-ui-core.css +1 -1
- package/style/dnb-ui-core.min.css +1 -1
- package/style/themes/theme-eiendom/eiendom-theme-components.css +7 -6
- package/style/themes/theme-eiendom/eiendom-theme-components.min.css +1 -1
- package/style/themes/theme-sbanken/sbanken-theme-components.css +7 -6
- package/style/themes/theme-sbanken/sbanken-theme-components.min.css +1 -1
- package/style/themes/theme-ui/ui-theme-components.css +7 -6
- package/style/themes/theme-ui/ui-theme-components.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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useData.js","names":["_react","require","_jsonPointer","_interopRequireDefault","_useSharedState","_useMountEffect","_Context","obj","__esModule","default","useData","id","arguments","length","undefined","initialData","sharedDataRef","useRef","sharedAttachmentsRef","forceUpdate","useReducer","current","useSharedState","rerenderUseDataHook","dataContext","useContext","DataContext","hasContext","Error","data","filterDataHandler","updateDataValue","setData","set","useCallback","newData","update","path","value","existingData","structuredClone","existingValue","pointer","has","get","newValue","extend","remove","reduceToVisibleFields","_dataContext$visibleD","options","_sharedAttachmentsRef","_sharedAttachmentsRef2","visibleDataHandler","call","filterData","filter","_dataContext$filterDa","_sharedAttachmentsRef3","_sharedAttachmentsRef4","getValue","useMountEffect","hadInitialData","useMemo"],"sources":["../../../../../../src/extensions/forms/Form/data-context/useData.tsx"],"sourcesContent":["import {\n useCallback,\n useContext,\n useMemo,\n useReducer,\n useRef,\n} from 'react'\nimport pointer, { JsonObject } from '../../utils/json-pointer'\nimport {\n SharedStateId,\n useSharedState,\n} from '../../../../shared/helpers/useSharedState'\nimport useMountEffect from '../../../../shared/helpers/useMountEffect'\nimport type { Path } from '../../types'\nimport DataContext, {\n FilterData,\n FilterDataHandler,\n VisibleDataHandler,\n} from '../../DataContext/Context'\n\ntype PathImpl<T, P extends string> = P extends `${infer Key}/${infer Rest}`\n ? Key extends keyof T\n ? Rest extends ''\n ? T[Key]\n : PathImpl<T[Key], Rest>\n : never\n : T[P & keyof T]\n\ntype PathType<T, P extends string> = P extends `/${infer Rest}`\n ? PathImpl<T, Rest>\n : never\n\ntype UseDataReturnUpdate<Data> = <P extends Path>(\n path: P,\n value: ((value: PathType<Data, P>) => unknown) | unknown\n) => void\n\nexport type UseDataReturnGetValue<Data> = <P extends Path>(\n path: P\n) => PathType<Data, P> | unknown\n\nexport type UseDataReturnFilterData<Data> = (\n filterDataHandler: FilterData,\n data?: Data\n) => Partial<Data>\n\nexport type UseDataReturnVisibleData<Data> = VisibleDataHandler<Data>\n\ntype UseDataReturn<Data> = {\n data: Data\n set: (newData: Data) => void\n update: UseDataReturnUpdate<Data>\n remove: (path: Path) => void\n getValue: UseDataReturnGetValue<Data>\n filterData: UseDataReturnFilterData<Data>\n reduceToVisibleFields: UseDataReturnVisibleData<Data>\n}\n\ntype SharedAttachment<Data> = {\n rerenderUseDataHook: () => void\n filterDataHandler?: FilterDataHandler<Data>\n visibleDataHandler?: VisibleDataHandler<Data>\n}\n\n/**\n * Custom hook that provides form data management functionality.\n *\n * @template Data - The type of data being managed.\n * @param {SharedStateId} id - The identifier for the data.\n * @param {Data} initialData - The initial data value (optional).\n * @returns {UseDataReturn<Data>} An object containing the data and data management functions.\n */\nexport default function useData<Data = JsonObject>(\n id: SharedStateId = undefined,\n initialData: Data = undefined\n): UseDataReturn<Data> {\n const sharedDataRef =\n useRef<ReturnType<typeof useSharedState<Data>>>(null)\n const sharedAttachmentsRef =\n useRef<ReturnType<typeof useSharedState<SharedAttachment<Data>>>>(null)\n const [, forceUpdate] = useReducer(() => ({}), {})\n\n sharedDataRef.current = useSharedState<Data>(\n id,\n initialData,\n forceUpdate\n )\n\n sharedAttachmentsRef.current = useSharedState<SharedAttachment<Data>>(\n id + '-attachments',\n { rerenderUseDataHook: forceUpdate }\n )\n\n // If no id is provided, use the context data\n const dataContext = useContext(DataContext)\n if (!id) {\n if (!dataContext.hasContext) {\n throw new Error(\n 'useData needs to run inside DataContext (Form.Handler) or have a valid id'\n )\n }\n\n sharedDataRef.current.data = dataContext.data\n sharedAttachmentsRef.current.data.filterDataHandler =\n dataContext.filterDataHandler\n }\n\n const updateDataValue = dataContext?.updateDataValue\n const setData = dataContext?.setData\n\n const set = useCallback(\n (newData: Data) => {\n if (id) {\n sharedDataRef.current.update(newData)\n } else {\n setData?.(newData)\n }\n },\n [id, setData]\n )\n\n const update = useCallback<UseDataReturnUpdate<Data>>(\n (path, value = undefined) => {\n const existingData = structuredClone(\n sharedDataRef.current.data || {}\n ) as Data & JsonObject\n const existingValue = pointer.has(existingData, path)\n ? pointer.get(existingData, path)\n : undefined\n\n // Get new value\n const newValue =\n typeof value === 'function' ? value(existingValue) : value\n\n if (newValue !== existingValue) {\n // Update existing data\n pointer.set(existingData, path, newValue)\n\n // Update provider with new data\n if (id) {\n sharedDataRef.current.extend(existingData)\n } else {\n updateDataValue(path, newValue)\n }\n }\n },\n [id, updateDataValue]\n )\n\n const remove = useCallback<UseDataReturn<Data>['remove']>(\n (path) => {\n const existingData = structuredClone(\n sharedDataRef.current.data || {}\n ) as Data & JsonObject\n\n if (pointer.has(existingData, path)) {\n // Remove existing data\n pointer.remove(existingData, path)\n\n // Update provider with new data\n if (id) {\n sharedDataRef.current.set(existingData)\n } else {\n updateDataValue(path, undefined)\n }\n }\n },\n [id, updateDataValue]\n )\n\n const reduceToVisibleFields = useCallback<\n UseDataReturn<Data>['reduceToVisibleFields']\n >(\n (data, options = {}) => {\n if (id) {\n return sharedAttachmentsRef.current.data?.visibleDataHandler?.(\n data,\n options\n )\n }\n\n return dataContext?.visibleDataHandler?.(data, options)\n },\n [dataContext, id]\n )\n\n const filterData = useCallback<UseDataReturn<Data>['filterData']>(\n (filter, data = sharedDataRef.current.data) => {\n if (id) {\n return sharedAttachmentsRef.current.data?.filterDataHandler?.(\n data,\n filter\n )\n }\n\n return dataContext?.filterDataHandler?.(data, filter)\n },\n [dataContext, id]\n )\n\n const getValue = useCallback<UseDataReturn<Data>['getValue']>((path) => {\n if (pointer.has(sharedDataRef.current.data, path)) {\n return pointer.get(sharedDataRef.current.data, path)\n }\n\n return undefined\n }, [])\n\n useMountEffect(() => {\n if (id && !sharedDataRef.current.hadInitialData && initialData) {\n sharedDataRef.current.extend(initialData)\n }\n })\n\n const { data } = sharedDataRef.current\n\n return useMemo(\n () => ({\n data,\n remove,\n update,\n set,\n getValue,\n reduceToVisibleFields,\n filterData,\n }),\n [\n data,\n remove,\n update,\n set,\n getValue,\n reduceToVisibleFields,\n filterData,\n ]\n )\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAOA,IAAAC,YAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,eAAA,GAAAH,OAAA;AAIA,IAAAI,eAAA,GAAAF,sBAAA,CAAAF,OAAA;AAEA,IAAAK,QAAA,GAAAH,sBAAA,CAAAF,OAAA;AAIkC,SAAAE,uBAAAI,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAsDnB,SAASG,OAAOA,CAAA,EAGR;EAAA,IAFrBC,EAAiB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAGE,SAAS;EAAA,IAC7BC,WAAiB,GAAAH,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAGE,S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CAAAI,sBAAA,EACL7B,IAAI,EACJ2B,MACF,CAAC;IACH;IAEA,OAAOhC,WAAW,aAAXA,WAAW,wBAAAiC,qBAAA,GAAXjC,WAAW,CAAEM,iBAAiB,cAAA2B,qBAAA,uBAA9BA,qBAAA,CAAAH,IAAA,CAAA9B,WAAW,EAAsBK,IAAI,EAAE2B,MAAM,CAAC;EACvD,CAAC,EACD,CAAChC,WAAW,EAAEb,EAAE,CAClB,CAAC;EAED,MAAMiD,QAAQ,GAAG,IAAA1B,kBAAW,EAAmCG,IAAI,IAAK;IACtE,IAAIK,oBAAO,CAACC,GAAG,CAAC3B,aAAa,CAACK,OAAO,CAACQ,IAAI,EAAEQ,IAAI,CAAC,EAAE;MACjD,OAAOK,oBAAO,CAACE,GAAG,CAAC5B,aAAa,CAACK,OAAO,CAACQ,IAAI,EAAEQ,IAAI,CAAC;IACtD;IAEA,OAAOvB,SAAS;EAClB,CAAC,EAAE,EAAE,CAAC;EAEN,IAAA+C,uBAAc,EAAC,MAAM;IACnB,IAAIlD,EAAE,IAAI,CAACK,aAAa,CAACK,OAAO,CAACyC,cAAc,IAAI/C,WAAW,EAAE;MAC9DC,aAAa,CAACK,OAAO,CAACyB,MAAM,CAAC/B,WAAW,CAAC;IAC3C;EACF,CAAC,CAAC;EAEF,MAAM;IAAEc;EAAK,CAAC,GAAGb,aAAa,CAACK,OAAO;EAEtC,OAAO,IAAA0C,cAAO,EACZ,OAAO;IACLlC,IAAI;IACJkB,MAAM;IACNX,MAAM;IACNH,GAAG;IACH2B,QAAQ;IACRZ,qBAAqB;IACrBO;EACF,CAAC,CAAC,EACF,CACE1B,IAAI,EACJkB,MAAM,EACNX,MAAM,EACNH,GAAG,EACH2B,QAAQ,EACRZ,qBAAqB,EACrBO,UAAU,CAEd,CAAC;AACH"}
|
|
1
|
+
{"version":3,"file":"useData.js","names":["_react","require","_jsonPointer","_interopRequireDefault","_useSharedState","_useMountEffect","_Context","obj","__esModule","default","useData","id","arguments","length","undefined","initialData","sharedDataRef","useRef","sharedAttachmentsRef","forceUpdate","useReducer","current","useSharedState","rerenderUseDataHook","dataContext","useContext","DataContext","hasContext","Error","data","filterDataHandler","updateDataValue","setData","set","useCallback","newData","update","path","value","existingData","structuredClone","existingValue","pointer","has","get","newValue","extend","remove","reduceToVisibleFields","_dataContext$visibleD","options","_sharedAttachmentsRef","_sharedAttachmentsRef2","visibleDataHandler","call","filterData","filter","_dataContext$filterDa","_sharedAttachmentsRef3","_sharedAttachmentsRef4","getValue","useMountEffect","hadInitialData","useMemo"],"sources":["../../../../../../src/extensions/forms/Form/data-context/useData.tsx"],"sourcesContent":["import {\n useCallback,\n useContext,\n useMemo,\n useReducer,\n useRef,\n} from 'react'\nimport pointer, { JsonObject } from '../../utils/json-pointer'\nimport {\n SharedStateId,\n useSharedState,\n} from '../../../../shared/helpers/useSharedState'\nimport useMountEffect from '../../../../shared/helpers/useMountEffect'\nimport type { Path } from '../../types'\nimport DataContext, {\n FilterData,\n FilterDataHandler,\n VisibleDataHandler,\n} from '../../DataContext/Context'\n\ntype PathImpl<T, P extends string> = P extends `${infer Key}/${infer Rest}`\n ? Key extends keyof T\n ? Rest extends ''\n ? T[Key]\n : PathImpl<T[Key], Rest>\n : never\n : T[P & keyof T]\n\ntype PathType<T, P extends string> = P extends `/${infer Rest}`\n ? PathImpl<T, Rest>\n : never\n\ntype UseDataReturnUpdate<Data> = <P extends Path>(\n path: P,\n value: ((value: PathType<Data, P>) => unknown) | unknown\n) => void\n\nexport type UseDataReturnGetValue<Data> = <P extends Path>(\n path: P\n) => PathType<Data, P> | any\n\nexport type UseDataReturnFilterData<Data> = (\n filterDataHandler: FilterData,\n data?: Data\n) => Partial<Data>\n\nexport type UseDataReturnVisibleData<Data> = VisibleDataHandler<Data>\n\ntype UseDataReturn<Data> = {\n data: Data\n set: (newData: Data) => void\n update: UseDataReturnUpdate<Data>\n remove: (path: Path) => void\n getValue: UseDataReturnGetValue<Data>\n filterData: UseDataReturnFilterData<Data>\n reduceToVisibleFields: UseDataReturnVisibleData<Data>\n}\n\ntype SharedAttachment<Data> = {\n rerenderUseDataHook: () => void\n filterDataHandler?: FilterDataHandler<Data>\n visibleDataHandler?: VisibleDataHandler<Data>\n}\n\n/**\n * Custom hook that provides form data management functionality.\n *\n * @template Data - The type of data being managed.\n * @param {SharedStateId} id - The identifier for the data.\n * @param {Data} initialData - The initial data value (optional).\n * @returns {UseDataReturn<Data>} An object containing the data and data management functions.\n */\nexport default function useData<Data = JsonObject>(\n id: SharedStateId = undefined,\n initialData: Data = undefined\n): UseDataReturn<Data> {\n const sharedDataRef =\n useRef<ReturnType<typeof useSharedState<Data>>>(null)\n const sharedAttachmentsRef =\n useRef<ReturnType<typeof useSharedState<SharedAttachment<Data>>>>(null)\n const [, forceUpdate] = useReducer(() => ({}), {})\n\n sharedDataRef.current = useSharedState<Data>(\n id,\n initialData,\n forceUpdate\n )\n\n sharedAttachmentsRef.current = useSharedState<SharedAttachment<Data>>(\n id + '-attachments',\n { rerenderUseDataHook: forceUpdate }\n )\n\n // If no id is provided, use the context data\n const dataContext = useContext(DataContext)\n if (!id) {\n if (!dataContext.hasContext) {\n throw new Error(\n 'useData needs to run inside DataContext (Form.Handler) or have a valid id'\n )\n }\n\n sharedDataRef.current.data = dataContext.data\n sharedAttachmentsRef.current.data.filterDataHandler =\n dataContext.filterDataHandler\n }\n\n const updateDataValue = dataContext?.updateDataValue\n const setData = dataContext?.setData\n\n const set = useCallback(\n (newData: Data) => {\n if (id) {\n sharedDataRef.current.update(newData)\n } else {\n setData?.(newData)\n }\n },\n [id, setData]\n )\n\n const update = useCallback<UseDataReturnUpdate<Data>>(\n (path, value = undefined) => {\n const existingData = structuredClone(\n sharedDataRef.current.data || {}\n ) as Data & JsonObject\n const existingValue = pointer.has(existingData, path)\n ? pointer.get(existingData, path)\n : undefined\n\n // Get new value\n const newValue =\n typeof value === 'function' ? value(existingValue) : value\n\n if (newValue !== existingValue) {\n // Update existing data\n pointer.set(existingData, path, newValue)\n\n // Update provider with new data\n if (id) {\n sharedDataRef.current.extend(existingData)\n } else {\n updateDataValue(path, newValue)\n }\n }\n },\n [id, updateDataValue]\n )\n\n const remove = useCallback<UseDataReturn<Data>['remove']>(\n (path) => {\n const existingData = structuredClone(\n sharedDataRef.current.data || {}\n ) as Data & JsonObject\n\n if (pointer.has(existingData, path)) {\n // Remove existing data\n pointer.remove(existingData, path)\n\n // Update provider with new data\n if (id) {\n sharedDataRef.current.set(existingData)\n } else {\n updateDataValue(path, undefined)\n }\n }\n },\n [id, updateDataValue]\n )\n\n const reduceToVisibleFields = useCallback<\n UseDataReturn<Data>['reduceToVisibleFields']\n >(\n (data, options = {}) => {\n if (id) {\n return sharedAttachmentsRef.current.data?.visibleDataHandler?.(\n data,\n options\n )\n }\n\n return dataContext?.visibleDataHandler?.(data, options)\n },\n [dataContext, id]\n )\n\n const filterData = useCallback<UseDataReturn<Data>['filterData']>(\n (filter, data = sharedDataRef.current.data) => {\n if (id) {\n return sharedAttachmentsRef.current.data?.filterDataHandler?.(\n data,\n filter\n )\n }\n\n return dataContext?.filterDataHandler?.(data, filter)\n },\n [dataContext, id]\n )\n\n const getValue = useCallback<UseDataReturn<Data>['getValue']>((path) => {\n if (pointer.has(sharedDataRef.current.data, path)) {\n return pointer.get(sharedDataRef.current.data, path)\n }\n\n return undefined\n }, [])\n\n useMountEffect(() => {\n if (id && !sharedDataRef.current.hadInitialData && initialData) {\n sharedDataRef.current.extend(initialData)\n }\n })\n\n const { data } = sharedDataRef.current\n\n return useMemo(\n () => ({\n data,\n remove,\n update,\n set,\n getValue,\n reduceToVisibleFields,\n filterData,\n }),\n [\n data,\n remove,\n update,\n set,\n getValue,\n reduceToVisibleFields,\n filterData,\n ]\n )\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAOA,IAAAC,YAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,eAAA,GAAAH,OAAA;AAIA,IAAAI,eAAA,GAAAF,sBA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AGb,aAAa,CAACK,OAAO;EAEtC,OAAO,IAAA0C,cAAO,EACZ,OAAO;IACLlC,IAAI;IACJkB,MAAM;IACNX,MAAM;IACNH,GAAG;IACH2B,QAAQ;IACRZ,qBAAqB;IACrBO;EACF,CAAC,CAAC,EACF,CACE1B,IAAI,EACJkB,MAAM,EACNX,MAAM,EACNH,GAAG,EACH2B,QAAQ,EACRZ,qBAAqB,EACrBO,UAAU,CAEd,CAAC;AACH"}
|
package/cjs/shared/Eufemia.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "10.51.
|
|
1
|
+
export declare const version = "10.51.1";
|
|
2
2
|
export declare function init(): void;
|
package/cjs/shared/Eufemia.js
CHANGED
|
@@ -5,13 +5,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.init = init;
|
|
7
7
|
exports.version = void 0;
|
|
8
|
-
const version = '10.51.
|
|
8
|
+
const version = '10.51.1';
|
|
9
9
|
exports.version = version;
|
|
10
10
|
function init() {
|
|
11
11
|
if (typeof window !== 'undefined') {
|
|
12
12
|
class Eufemia {
|
|
13
13
|
get version() {
|
|
14
|
-
return '10.51.
|
|
14
|
+
return '10.51.1';
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
window.Eufemia = new Eufemia();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Eufemia.js","names":["version","exports","init","window","Eufemia"],"sources":["../../../src/shared/Eufemia.ts"],"sourcesContent":["export const version = '10.51.
|
|
1
|
+
{"version":3,"file":"Eufemia.js","names":["version","exports","init","window","Eufemia"],"sources":["../../../src/shared/Eufemia.ts"],"sourcesContent":["export const version = '10.51.1'\n\nexport function init() {\n if (typeof window !== 'undefined') {\n class Eufemia {\n get version() {\n return '10.51.1'\n }\n }\n\n window.Eufemia = new Eufemia()\n }\n}\n"],"mappings":";;;;;;;AAAO,MAAMA,OAAO,GAAG,SAAS;AAAAC,OAAA,CAAAD,OAAA,GAAAA,OAAA;AAEzB,SAASE,IAAIA,CAAA,EAAG;EACrB,IAAI,OAAOC,MAAM,KAAK,WAAW,EAAE;IACjC,MAAMC,OAAO,CAAC;MACZ,IAAIJ,OAAOA,CAAA,EAAG;QACZ,OAAO,SAAS;MAClB;IACF;IAEAG,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.51.
|
|
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.51.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 fieldset{padding:.35rem .75rem .625rem}.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}
|
|
@@ -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.51.
|
|
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.51.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 fieldset{padding:.35rem .75rem .625rem}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)}
|
|
@@ -4078,12 +4078,6 @@ html:not([data-visual-test]) .dnb-drawer--hide.dnb-drawer--bottom {
|
|
|
4078
4078
|
.dnb-dropdown__row {
|
|
4079
4079
|
display: inline-flex;
|
|
4080
4080
|
}
|
|
4081
|
-
.dnb-dropdown--large .dnb-drawer-list__triangle {
|
|
4082
|
-
margin-left: calc(var(--dropdown-padding-horizontal) - 0.25rem);
|
|
4083
|
-
}
|
|
4084
|
-
.dnb-dropdown--icon-position-left.dnb-dropdown--large .dnb-drawer-list__triangle {
|
|
4085
|
-
margin-left: calc(var(--dropdown-padding-horizontal) + 0.25rem);
|
|
4086
|
-
}
|
|
4087
4081
|
.dnb-dropdown__icon {
|
|
4088
4082
|
position: relative;
|
|
4089
4083
|
order: 2;
|
|
@@ -4326,6 +4320,13 @@ label + .dnb-dropdown[class*=__form-status] .dnb-dropdown__shell {
|
|
|
4326
4320
|
}
|
|
4327
4321
|
}
|
|
4328
4322
|
|
|
4323
|
+
.dnb-drawer-list--triangle-position-left .dnb-dropdown__list--tertiary .dnb-drawer-list__triangle {
|
|
4324
|
+
margin-left: 0.5rem;
|
|
4325
|
+
}
|
|
4326
|
+
.dnb-drawer-list--triangle-position-right .dnb-dropdown__list--tertiary .dnb-drawer-list__triangle {
|
|
4327
|
+
margin-right: 0.5rem;
|
|
4328
|
+
}
|
|
4329
|
+
|
|
4329
4330
|
.dnb-flex-container {
|
|
4330
4331
|
display: flex;
|
|
4331
4332
|
row-gap: var(--gap, 0);
|