@veeqo/ui 9.14.3 → 9.14.5

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.
@@ -1,20 +1,21 @@
1
1
  'use strict';
2
2
 
3
3
  var React = require('react');
4
+ var FlexRow = require('../../Flex/FlexRow/FlexRow.cjs');
4
5
  var constants = require('../constants.cjs');
5
6
  var Text = require('../../Text/Text.cjs');
6
7
  var constants$1 = require('./constants.cjs');
7
- var styled = require('./styled.cjs');
8
8
 
9
9
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
10
10
 
11
11
  var React__default = /*#__PURE__*/_interopDefaultCompat(React);
12
12
 
13
+ // Will need to use themeInjector every time this component is used
13
14
  const MiniAlert = ({ title, variant = 'default', iconSlot, customTitleColour, customIconColour, }) => {
14
15
  const IconSlot = iconSlot || constants.IconMap[variant];
15
16
  const iconColour = customIconColour !== null && customIconColour !== undefined ? customIconColour : constants.ColourMap[variant].primary;
16
17
  const titleColour = customTitleColour !== null && customTitleColour !== undefined ? customTitleColour : constants$1.TextColourMap[variant];
17
- return (React__default.default.createElement(styled.MiniAlertContainer, null,
18
+ return (React__default.default.createElement(FlexRow.FlexRow, { gap: "xs" },
18
19
  React__default.default.createElement(IconSlot, { "aria-hidden": true, color: iconColour, style: constants$1.IconStyles }),
19
20
  React__default.default.createElement(Text.Text, { variant: "bodySmallBold", style: { color: titleColour } }, title)));
20
21
  };
@@ -1 +1 @@
1
- {"version":3,"file":"MiniAlert.cjs","sources":["../../../../src/components/Alerts/MiniAlert/MiniAlert.tsx"],"sourcesContent":["import React from 'react';\nimport { ColourMap, IconMap } from '../constants';\nimport { Text } from '../../Text';\nimport { MiniAlertProps } from './types';\nimport { IconStyles, TextColourMap } from './constants';\nimport { MiniAlertContainer } from './styled';\n\nexport const MiniAlert = ({\n title,\n variant = 'default',\n iconSlot,\n customTitleColour,\n customIconColour,\n}: MiniAlertProps) => {\n const IconSlot = iconSlot || IconMap[variant];\n const iconColour = customIconColour ?? ColourMap[variant].primary;\n const titleColour = customTitleColour ?? TextColourMap[variant];\n\n return (\n <MiniAlertContainer>\n <IconSlot aria-hidden color={iconColour} style={IconStyles} />\n <Text variant=\"bodySmallBold\" style={{ color: titleColour }}>\n {title}\n </Text>\n </MiniAlertContainer>\n );\n};\n"],"names":["IconMap","ColourMap","TextColourMap","React","MiniAlertContainer","IconStyles","Text"],"mappings":";;;;;;;;;;;;AAOa,MAAA,SAAS,GAAG,CAAC,EACxB,KAAK,EACL,OAAO,GAAG,SAAS,EACnB,QAAQ,EACR,iBAAiB,EACjB,gBAAgB,GACD,KAAI;IACnB,MAAM,QAAQ,GAAG,QAAQ,IAAIA,iBAAO,CAAC,OAAO,CAAC;AAC7C,IAAA,MAAM,UAAU,GAAG,gBAAgB,KAAA,IAAA,IAAhB,gBAAgB,KAAhB,SAAA,GAAA,gBAAgB,GAAIC,mBAAS,CAAC,OAAO,CAAC,CAAC,OAAO;AACjE,IAAA,MAAM,WAAW,GAAG,iBAAiB,KAAA,IAAA,IAAjB,iBAAiB,KAAA,SAAA,GAAjB,iBAAiB,GAAIC,yBAAa,CAAC,OAAO,CAAC;IAE/D,QACEC,qCAACC,yBAAkB,EAAA,IAAA;QACjBD,sBAAC,CAAA,aAAA,CAAA,QAAQ,yBAAa,KAAK,EAAE,UAAU,EAAE,KAAK,EAAEE,sBAAU,EAAI,CAAA;AAC9D,QAAAF,sBAAA,CAAA,aAAA,CAACG,SAAI,EAAC,EAAA,OAAO,EAAC,eAAe,EAAC,KAAK,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,EAAA,EACxD,KAAK,CACD,CACY;AAEzB;;;;"}
1
+ {"version":3,"file":"MiniAlert.cjs","sources":["../../../../src/components/Alerts/MiniAlert/MiniAlert.tsx"],"sourcesContent":["import React from 'react';\nimport { FlexRow } from '../../Flex/FlexRow';\nimport { ColourMap, IconMap } from '../constants';\nimport { Text } from '../../Text';\n\nimport { MiniAlertProps } from './types';\nimport { IconStyles, TextColourMap } from './constants';\n\n// Will need to use themeInjector every time this component is used\nexport const MiniAlert = ({\n title,\n variant = 'default',\n iconSlot,\n customTitleColour,\n customIconColour,\n}: MiniAlertProps) => {\n const IconSlot = iconSlot || IconMap[variant];\n const iconColour = customIconColour ?? ColourMap[variant].primary;\n const titleColour = customTitleColour ?? TextColourMap[variant];\n return (\n <FlexRow gap=\"xs\">\n <IconSlot aria-hidden color={iconColour} style={IconStyles} />\n <Text variant=\"bodySmallBold\" style={{ color: titleColour }}>\n {title}\n </Text>\n </FlexRow>\n );\n};\n"],"names":["IconMap","ColourMap","TextColourMap","React","FlexRow","IconStyles","Text"],"mappings":";;;;;;;;;;;;AAQA;AACa,MAAA,SAAS,GAAG,CAAC,EACxB,KAAK,EACL,OAAO,GAAG,SAAS,EACnB,QAAQ,EACR,iBAAiB,EACjB,gBAAgB,GACD,KAAI;IACnB,MAAM,QAAQ,GAAG,QAAQ,IAAIA,iBAAO,CAAC,OAAO,CAAC;AAC7C,IAAA,MAAM,UAAU,GAAG,gBAAgB,KAAA,IAAA,IAAhB,gBAAgB,KAAhB,SAAA,GAAA,gBAAgB,GAAIC,mBAAS,CAAC,OAAO,CAAC,CAAC,OAAO;AACjE,IAAA,MAAM,WAAW,GAAG,iBAAiB,KAAA,IAAA,IAAjB,iBAAiB,KAAA,SAAA,GAAjB,iBAAiB,GAAIC,yBAAa,CAAC,OAAO,CAAC;AAC/D,IAAA,QACEC,sBAAC,CAAA,aAAA,CAAAC,eAAO,EAAC,EAAA,GAAG,EAAC,IAAI,EAAA;QACfD,sBAAC,CAAA,aAAA,CAAA,QAAQ,yBAAa,KAAK,EAAE,UAAU,EAAE,KAAK,EAAEE,sBAAU,EAAI,CAAA;AAC9D,QAAAF,sBAAA,CAAA,aAAA,CAACG,SAAI,EAAC,EAAA,OAAO,EAAC,eAAe,EAAC,KAAK,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,EAAA,EACxD,KAAK,CACD,CACC;AAEd;;;;"}
@@ -1,14 +1,15 @@
1
1
  import React__default from 'react';
2
+ import { FlexRow } from '../../Flex/FlexRow/FlexRow.js';
2
3
  import { ColourMap, IconMap } from '../constants.js';
3
4
  import { Text } from '../../Text/Text.js';
4
5
  import { IconStyles, TextColourMap } from './constants.js';
5
- import { MiniAlertContainer } from './styled.js';
6
6
 
7
+ // Will need to use themeInjector every time this component is used
7
8
  const MiniAlert = ({ title, variant = 'default', iconSlot, customTitleColour, customIconColour, }) => {
8
9
  const IconSlot = iconSlot || IconMap[variant];
9
10
  const iconColour = customIconColour !== null && customIconColour !== undefined ? customIconColour : ColourMap[variant].primary;
10
11
  const titleColour = customTitleColour !== null && customTitleColour !== undefined ? customTitleColour : TextColourMap[variant];
11
- return (React__default.createElement(MiniAlertContainer, null,
12
+ return (React__default.createElement(FlexRow, { gap: "xs" },
12
13
  React__default.createElement(IconSlot, { "aria-hidden": true, color: iconColour, style: IconStyles }),
13
14
  React__default.createElement(Text, { variant: "bodySmallBold", style: { color: titleColour } }, title)));
14
15
  };
@@ -1 +1 @@
1
- {"version":3,"file":"MiniAlert.js","sources":["../../../../src/components/Alerts/MiniAlert/MiniAlert.tsx"],"sourcesContent":["import React from 'react';\nimport { ColourMap, IconMap } from '../constants';\nimport { Text } from '../../Text';\nimport { MiniAlertProps } from './types';\nimport { IconStyles, TextColourMap } from './constants';\nimport { MiniAlertContainer } from './styled';\n\nexport const MiniAlert = ({\n title,\n variant = 'default',\n iconSlot,\n customTitleColour,\n customIconColour,\n}: MiniAlertProps) => {\n const IconSlot = iconSlot || IconMap[variant];\n const iconColour = customIconColour ?? ColourMap[variant].primary;\n const titleColour = customTitleColour ?? TextColourMap[variant];\n\n return (\n <MiniAlertContainer>\n <IconSlot aria-hidden color={iconColour} style={IconStyles} />\n <Text variant=\"bodySmallBold\" style={{ color: titleColour }}>\n {title}\n </Text>\n </MiniAlertContainer>\n );\n};\n"],"names":["React"],"mappings":";;;;;;AAOa,MAAA,SAAS,GAAG,CAAC,EACxB,KAAK,EACL,OAAO,GAAG,SAAS,EACnB,QAAQ,EACR,iBAAiB,EACjB,gBAAgB,GACD,KAAI;IACnB,MAAM,QAAQ,GAAG,QAAQ,IAAI,OAAO,CAAC,OAAO,CAAC;AAC7C,IAAA,MAAM,UAAU,GAAG,gBAAgB,KAAA,IAAA,IAAhB,gBAAgB,KAAhB,SAAA,GAAA,gBAAgB,GAAI,SAAS,CAAC,OAAO,CAAC,CAAC,OAAO;AACjE,IAAA,MAAM,WAAW,GAAG,iBAAiB,KAAA,IAAA,IAAjB,iBAAiB,KAAA,SAAA,GAAjB,iBAAiB,GAAI,aAAa,CAAC,OAAO,CAAC;IAE/D,QACEA,6BAAC,kBAAkB,EAAA,IAAA;QACjBA,cAAC,CAAA,aAAA,CAAA,QAAQ,yBAAa,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAI,CAAA;AAC9D,QAAAA,cAAA,CAAA,aAAA,CAAC,IAAI,EAAC,EAAA,OAAO,EAAC,eAAe,EAAC,KAAK,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,EAAA,EACxD,KAAK,CACD,CACY;AAEzB;;;;"}
1
+ {"version":3,"file":"MiniAlert.js","sources":["../../../../src/components/Alerts/MiniAlert/MiniAlert.tsx"],"sourcesContent":["import React from 'react';\nimport { FlexRow } from '../../Flex/FlexRow';\nimport { ColourMap, IconMap } from '../constants';\nimport { Text } from '../../Text';\n\nimport { MiniAlertProps } from './types';\nimport { IconStyles, TextColourMap } from './constants';\n\n// Will need to use themeInjector every time this component is used\nexport const MiniAlert = ({\n title,\n variant = 'default',\n iconSlot,\n customTitleColour,\n customIconColour,\n}: MiniAlertProps) => {\n const IconSlot = iconSlot || IconMap[variant];\n const iconColour = customIconColour ?? ColourMap[variant].primary;\n const titleColour = customTitleColour ?? TextColourMap[variant];\n return (\n <FlexRow gap=\"xs\">\n <IconSlot aria-hidden color={iconColour} style={IconStyles} />\n <Text variant=\"bodySmallBold\" style={{ color: titleColour }}>\n {title}\n </Text>\n </FlexRow>\n );\n};\n"],"names":["React"],"mappings":";;;;;;AAQA;AACa,MAAA,SAAS,GAAG,CAAC,EACxB,KAAK,EACL,OAAO,GAAG,SAAS,EACnB,QAAQ,EACR,iBAAiB,EACjB,gBAAgB,GACD,KAAI;IACnB,MAAM,QAAQ,GAAG,QAAQ,IAAI,OAAO,CAAC,OAAO,CAAC;AAC7C,IAAA,MAAM,UAAU,GAAG,gBAAgB,KAAA,IAAA,IAAhB,gBAAgB,KAAhB,SAAA,GAAA,gBAAgB,GAAI,SAAS,CAAC,OAAO,CAAC,CAAC,OAAO;AACjE,IAAA,MAAM,WAAW,GAAG,iBAAiB,KAAA,IAAA,IAAjB,iBAAiB,KAAA,SAAA,GAAjB,iBAAiB,GAAI,aAAa,CAAC,OAAO,CAAC;AAC/D,IAAA,QACEA,cAAC,CAAA,aAAA,CAAA,OAAO,EAAC,EAAA,GAAG,EAAC,IAAI,EAAA;QACfA,cAAC,CAAA,aAAA,CAAA,QAAQ,yBAAa,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAI,CAAA;AAC9D,QAAAA,cAAA,CAAA,aAAA,CAAC,IAAI,EAAC,EAAA,OAAO,EAAC,eAAe,EAAC,KAAK,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,EAAA,EACxD,KAAK,CACD,CACC;AAEd;;;;"}
@@ -34,8 +34,9 @@ const addPrefixToUrl = (url) => { var _a; return `${((_a = window.veeqoContext)
34
34
  * @returns {string} The processed URL
35
35
  */
36
36
  const createContextAwareUrl = (url) => {
37
- // Don't modify anchor URLs (they should be treated as absolute)
38
- if (!url || isAnchorUrl(url) || !shouldAddPrefix() || !isRelativeUrl(url))
37
+ if (!url)
38
+ return '';
39
+ if (isAnchorUrl(url) || !shouldAddPrefix() || !isRelativeUrl(url))
39
40
  return url;
40
41
  return addPrefixToUrl(url);
41
42
  };
@@ -1 +1 @@
1
- {"version":3,"file":"urlUtils.cjs","sources":["../../../../src/components/Anchor/utils/urlUtils.ts"],"sourcesContent":["/**\n * Utility functions for URL processing\n */\n\n/**\n * Checks if the URL should have a prefix added based on the current context\n * @returns {boolean} Whether a prefix should be added\n */\nexport const shouldAddPrefix = (): boolean =>\n !!(\n window.veeqoContext &&\n window.veeqoContext.vqHost !== 'standalone' &&\n window.veeqoContext.baseUrl\n );\n\n/**\n * Checks if a URL is relative (not starting with http://, https://, or //)\n * @param {string} url - The URL to check\n * @returns {boolean} Whether the URL is relative\n */\nexport const isRelativeUrl = (url: string): boolean => !url.match(/^(https?:\\/\\/|\\/\\/)/);\n\n/**\n * Checks if a URL is an anchor link (starts with #)\n * @param {string} url - The URL to check\n * @returns {boolean} Whether the URL is an anchor link\n */\nexport const isAnchorUrl = (url: string): boolean => url.startsWith('#');\n\n/**\n * Adds the appropriate prefix to a URL based on the current context\n * @param {string} url - The URL to add a prefix to\n * @returns {string} The URL with prefix added if needed\n */\nexport const addPrefixToUrl = (url: string): string =>\n `${window.veeqoContext?.baseUrl || ''}${url.startsWith('/') ? '' : '/'}${url}`;\n\n/**\n * Processes a URL by adding the appropriate prefix if needed\n * @param {string} url - The URL to process\n * @returns {string} The processed URL\n */\nexport const createContextAwareUrl = (url: string | undefined): string | undefined => {\n // Don't modify anchor URLs (they should be treated as absolute)\n if (!url || isAnchorUrl(url) || !shouldAddPrefix() || !isRelativeUrl(url)) return url;\n\n return addPrefixToUrl(url);\n};\n"],"names":[],"mappings":";;AAAA;;AAEG;AAEH;;;AAGG;AACI,MAAM,eAAe,GAAG,MAC7B,CAAC,EACC,MAAM,CAAC,YAAY;AACnB,IAAA,MAAM,CAAC,YAAY,CAAC,MAAM,KAAK,YAAY;AAC3C,IAAA,MAAM,CAAC,YAAY,CAAC,OAAO;AAG/B;;;;AAIG;AACU,MAAA,aAAa,GAAG,CAAC,GAAW,KAAc,CAAC,GAAG,CAAC,KAAK,CAAC,qBAAqB;AAEvF;;;;AAIG;AACI,MAAM,WAAW,GAAG,CAAC,GAAW,KAAc,GAAG,CAAC,UAAU,CAAC,GAAG;AAEvE;;;;AAIG;AACU,MAAA,cAAc,GAAG,CAAC,GAAW,KAAY,EAAA,IAAA,EAAA,CAAA,CACpD,OAAA,CAAA,EAAG,CAAA,CAAA,EAAA,GAAA,MAAM,CAAC,YAAY,MAAA,IAAA,IAAA,EAAA,KAAA,SAAA,GAAA,SAAA,GAAA,EAAA,CAAE,OAAO,KAAI,EAAE,CAAG,EAAA,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,GAAG,CAAA,EAAG,GAAG,CAAE,CAAA,CAAA;AAEhF;;;;AAIG;AACU,MAAA,qBAAqB,GAAG,CAAC,GAAuB,KAAwB;;AAEnF,IAAA,IAAI,CAAC,GAAG,IAAI,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC;AAAE,QAAA,OAAO,GAAG;AAErF,IAAA,OAAO,cAAc,CAAC,GAAG,CAAC;AAC5B;;;;;;;;"}
1
+ {"version":3,"file":"urlUtils.cjs","sources":["../../../../src/components/Anchor/utils/urlUtils.ts"],"sourcesContent":["/**\n * Utility functions for URL processing\n */\n\n/**\n * Checks if the URL should have a prefix added based on the current context\n * @returns {boolean} Whether a prefix should be added\n */\nexport const shouldAddPrefix = (): boolean =>\n !!(\n window.veeqoContext &&\n window.veeqoContext.vqHost !== 'standalone' &&\n window.veeqoContext.baseUrl\n );\n\n/**\n * Checks if a URL is relative (not starting with http://, https://, or //)\n * @param {string} url - The URL to check\n * @returns {boolean} Whether the URL is relative\n */\nexport const isRelativeUrl = (url: string): boolean => !url.match(/^(https?:\\/\\/|\\/\\/)/);\n\n/**\n * Checks if a URL is an anchor link (starts with #)\n * @param {string} url - The URL to check\n * @returns {boolean} Whether the URL is an anchor link\n */\nexport const isAnchorUrl = (url: string): boolean => url.startsWith('#');\n\n/**\n * Adds the appropriate prefix to a URL based on the current context\n * @param {string} url - The URL to add a prefix to\n * @returns {string} The URL with prefix added if needed\n */\nexport const addPrefixToUrl = (url: string): string =>\n `${window.veeqoContext?.baseUrl || ''}${url.startsWith('/') ? '' : '/'}${url}`;\n\n/**\n * Processes a URL by adding the appropriate prefix if needed\n * @param {string} url - The URL to process\n * @returns {string} The processed URL\n */\nexport const createContextAwareUrl = (url: string | undefined | null): string => {\n if (!url) return '';\n if (isAnchorUrl(url) || !shouldAddPrefix() || !isRelativeUrl(url)) return url;\n\n return addPrefixToUrl(url);\n};\n"],"names":[],"mappings":";;AAAA;;AAEG;AAEH;;;AAGG;AACI,MAAM,eAAe,GAAG,MAC7B,CAAC,EACC,MAAM,CAAC,YAAY;AACnB,IAAA,MAAM,CAAC,YAAY,CAAC,MAAM,KAAK,YAAY;AAC3C,IAAA,MAAM,CAAC,YAAY,CAAC,OAAO;AAG/B;;;;AAIG;AACU,MAAA,aAAa,GAAG,CAAC,GAAW,KAAc,CAAC,GAAG,CAAC,KAAK,CAAC,qBAAqB;AAEvF;;;;AAIG;AACI,MAAM,WAAW,GAAG,CAAC,GAAW,KAAc,GAAG,CAAC,UAAU,CAAC,GAAG;AAEvE;;;;AAIG;AACU,MAAA,cAAc,GAAG,CAAC,GAAW,KAAY,EAAA,IAAA,EAAA,CAAA,CACpD,OAAA,CAAA,EAAG,CAAA,CAAA,EAAA,GAAA,MAAM,CAAC,YAAY,MAAA,IAAA,IAAA,EAAA,KAAA,SAAA,GAAA,SAAA,GAAA,EAAA,CAAE,OAAO,KAAI,EAAE,CAAG,EAAA,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,GAAG,CAAA,EAAG,GAAG,CAAE,CAAA,CAAA;AAEhF;;;;AAIG;AACU,MAAA,qBAAqB,GAAG,CAAC,GAA8B,KAAY;AAC9E,IAAA,IAAI,CAAC,GAAG;AAAE,QAAA,OAAO,EAAE;AACnB,IAAA,IAAI,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC;AAAE,QAAA,OAAO,GAAG;AAE7E,IAAA,OAAO,cAAc,CAAC,GAAG,CAAC;AAC5B;;;;;;;;"}
@@ -29,4 +29,4 @@ export declare const addPrefixToUrl: (url: string) => string;
29
29
  * @param {string} url - The URL to process
30
30
  * @returns {string} The processed URL
31
31
  */
32
- export declare const createContextAwareUrl: (url: string | undefined) => string | undefined;
32
+ export declare const createContextAwareUrl: (url: string | undefined | null) => string;
@@ -32,8 +32,9 @@ const addPrefixToUrl = (url) => { var _a; return `${((_a = window.veeqoContext)
32
32
  * @returns {string} The processed URL
33
33
  */
34
34
  const createContextAwareUrl = (url) => {
35
- // Don't modify anchor URLs (they should be treated as absolute)
36
- if (!url || isAnchorUrl(url) || !shouldAddPrefix() || !isRelativeUrl(url))
35
+ if (!url)
36
+ return '';
37
+ if (isAnchorUrl(url) || !shouldAddPrefix() || !isRelativeUrl(url))
37
38
  return url;
38
39
  return addPrefixToUrl(url);
39
40
  };
@@ -1 +1 @@
1
- {"version":3,"file":"urlUtils.js","sources":["../../../../src/components/Anchor/utils/urlUtils.ts"],"sourcesContent":["/**\n * Utility functions for URL processing\n */\n\n/**\n * Checks if the URL should have a prefix added based on the current context\n * @returns {boolean} Whether a prefix should be added\n */\nexport const shouldAddPrefix = (): boolean =>\n !!(\n window.veeqoContext &&\n window.veeqoContext.vqHost !== 'standalone' &&\n window.veeqoContext.baseUrl\n );\n\n/**\n * Checks if a URL is relative (not starting with http://, https://, or //)\n * @param {string} url - The URL to check\n * @returns {boolean} Whether the URL is relative\n */\nexport const isRelativeUrl = (url: string): boolean => !url.match(/^(https?:\\/\\/|\\/\\/)/);\n\n/**\n * Checks if a URL is an anchor link (starts with #)\n * @param {string} url - The URL to check\n * @returns {boolean} Whether the URL is an anchor link\n */\nexport const isAnchorUrl = (url: string): boolean => url.startsWith('#');\n\n/**\n * Adds the appropriate prefix to a URL based on the current context\n * @param {string} url - The URL to add a prefix to\n * @returns {string} The URL with prefix added if needed\n */\nexport const addPrefixToUrl = (url: string): string =>\n `${window.veeqoContext?.baseUrl || ''}${url.startsWith('/') ? '' : '/'}${url}`;\n\n/**\n * Processes a URL by adding the appropriate prefix if needed\n * @param {string} url - The URL to process\n * @returns {string} The processed URL\n */\nexport const createContextAwareUrl = (url: string | undefined): string | undefined => {\n // Don't modify anchor URLs (they should be treated as absolute)\n if (!url || isAnchorUrl(url) || !shouldAddPrefix() || !isRelativeUrl(url)) return url;\n\n return addPrefixToUrl(url);\n};\n"],"names":[],"mappings":"AAAA;;AAEG;AAEH;;;AAGG;AACI,MAAM,eAAe,GAAG,MAC7B,CAAC,EACC,MAAM,CAAC,YAAY;AACnB,IAAA,MAAM,CAAC,YAAY,CAAC,MAAM,KAAK,YAAY;AAC3C,IAAA,MAAM,CAAC,YAAY,CAAC,OAAO;AAG/B;;;;AAIG;AACU,MAAA,aAAa,GAAG,CAAC,GAAW,KAAc,CAAC,GAAG,CAAC,KAAK,CAAC,qBAAqB;AAEvF;;;;AAIG;AACI,MAAM,WAAW,GAAG,CAAC,GAAW,KAAc,GAAG,CAAC,UAAU,CAAC,GAAG;AAEvE;;;;AAIG;AACU,MAAA,cAAc,GAAG,CAAC,GAAW,KAAY,EAAA,IAAA,EAAA,CAAA,CACpD,OAAA,CAAA,EAAG,CAAA,CAAA,EAAA,GAAA,MAAM,CAAC,YAAY,MAAA,IAAA,IAAA,EAAA,KAAA,SAAA,GAAA,SAAA,GAAA,EAAA,CAAE,OAAO,KAAI,EAAE,CAAG,EAAA,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,GAAG,CAAA,EAAG,GAAG,CAAE,CAAA,CAAA;AAEhF;;;;AAIG;AACU,MAAA,qBAAqB,GAAG,CAAC,GAAuB,KAAwB;;AAEnF,IAAA,IAAI,CAAC,GAAG,IAAI,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC;AAAE,QAAA,OAAO,GAAG;AAErF,IAAA,OAAO,cAAc,CAAC,GAAG,CAAC;AAC5B;;;;"}
1
+ {"version":3,"file":"urlUtils.js","sources":["../../../../src/components/Anchor/utils/urlUtils.ts"],"sourcesContent":["/**\n * Utility functions for URL processing\n */\n\n/**\n * Checks if the URL should have a prefix added based on the current context\n * @returns {boolean} Whether a prefix should be added\n */\nexport const shouldAddPrefix = (): boolean =>\n !!(\n window.veeqoContext &&\n window.veeqoContext.vqHost !== 'standalone' &&\n window.veeqoContext.baseUrl\n );\n\n/**\n * Checks if a URL is relative (not starting with http://, https://, or //)\n * @param {string} url - The URL to check\n * @returns {boolean} Whether the URL is relative\n */\nexport const isRelativeUrl = (url: string): boolean => !url.match(/^(https?:\\/\\/|\\/\\/)/);\n\n/**\n * Checks if a URL is an anchor link (starts with #)\n * @param {string} url - The URL to check\n * @returns {boolean} Whether the URL is an anchor link\n */\nexport const isAnchorUrl = (url: string): boolean => url.startsWith('#');\n\n/**\n * Adds the appropriate prefix to a URL based on the current context\n * @param {string} url - The URL to add a prefix to\n * @returns {string} The URL with prefix added if needed\n */\nexport const addPrefixToUrl = (url: string): string =>\n `${window.veeqoContext?.baseUrl || ''}${url.startsWith('/') ? '' : '/'}${url}`;\n\n/**\n * Processes a URL by adding the appropriate prefix if needed\n * @param {string} url - The URL to process\n * @returns {string} The processed URL\n */\nexport const createContextAwareUrl = (url: string | undefined | null): string => {\n if (!url) return '';\n if (isAnchorUrl(url) || !shouldAddPrefix() || !isRelativeUrl(url)) return url;\n\n return addPrefixToUrl(url);\n};\n"],"names":[],"mappings":"AAAA;;AAEG;AAEH;;;AAGG;AACI,MAAM,eAAe,GAAG,MAC7B,CAAC,EACC,MAAM,CAAC,YAAY;AACnB,IAAA,MAAM,CAAC,YAAY,CAAC,MAAM,KAAK,YAAY;AAC3C,IAAA,MAAM,CAAC,YAAY,CAAC,OAAO;AAG/B;;;;AAIG;AACU,MAAA,aAAa,GAAG,CAAC,GAAW,KAAc,CAAC,GAAG,CAAC,KAAK,CAAC,qBAAqB;AAEvF;;;;AAIG;AACI,MAAM,WAAW,GAAG,CAAC,GAAW,KAAc,GAAG,CAAC,UAAU,CAAC,GAAG;AAEvE;;;;AAIG;AACU,MAAA,cAAc,GAAG,CAAC,GAAW,KAAY,EAAA,IAAA,EAAA,CAAA,CACpD,OAAA,CAAA,EAAG,CAAA,CAAA,EAAA,GAAA,MAAM,CAAC,YAAY,MAAA,IAAA,IAAA,EAAA,KAAA,SAAA,GAAA,SAAA,GAAA,EAAA,CAAE,OAAO,KAAI,EAAE,CAAG,EAAA,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,GAAG,CAAA,EAAG,GAAG,CAAE,CAAA,CAAA;AAEhF;;;;AAIG;AACU,MAAA,qBAAqB,GAAG,CAAC,GAA8B,KAAY;AAC9E,IAAA,IAAI,CAAC,GAAG;AAAE,QAAA,OAAO,EAAE;AACnB,IAAA,IAAI,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC;AAAE,QAAA,OAAO,GAAG;AAE7E,IAAA,OAAO,cAAc,CAAC,GAAG,CAAC;AAC5B;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veeqo/ui",
3
- "version": "9.14.3",
3
+ "version": "9.14.5",
4
4
  "description": "New optimised component library for Veeqo.",
5
5
  "author": "Robert Wealthall",
6
6
  "license": "ISC",
@@ -1,13 +0,0 @@
1
- 'use strict';
2
-
3
- var styled = require('styled-components');
4
- var index = require('../../../theme/index.cjs');
5
-
6
- function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
7
-
8
- var styled__default = /*#__PURE__*/_interopDefaultCompat(styled);
9
-
10
- const MiniAlertContainer = styled__default.default.div.withConfig({ displayName: "vui--MiniAlertContainer", componentId: "vui--1n2xu5o" }) `display:flex;gap:${index.theme.sizes.xs};`;
11
-
12
- exports.MiniAlertContainer = MiniAlertContainer;
13
- //# sourceMappingURL=styled.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"styled.cjs","sources":["../../../../src/components/Alerts/MiniAlert/styled.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { theme } from 'Theme';\n\nexport const MiniAlertContainer = styled.div`\n display: flex;\n gap: ${theme.sizes.xs};\n`;\n"],"names":["styled","theme"],"mappings":";;;;;;;;;AAGO,MAAM,kBAAkB,GAAGA,uBAAM,CAAC,GAAG,CAEnC,UAAA,CAAA,EAAA,WAAA,EAAA,yBAAA,EAAA,WAAA,EAAA,cAAA,EAAA,CAAA,CAAA,CAAA,iBAAA,EAAAC,WAAK,CAAC,KAAK,CAAC,EAAE;;;;"}
@@ -1 +0,0 @@
1
- export declare const MiniAlertContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -1,7 +0,0 @@
1
- import styled from 'styled-components';
2
- import { theme } from '../../../theme/index.js';
3
-
4
- const MiniAlertContainer = styled.div.withConfig({ displayName: "vui--MiniAlertContainer", componentId: "vui--1n2xu5o" }) `display:flex;gap:${theme.sizes.xs};`;
5
-
6
- export { MiniAlertContainer };
7
- //# sourceMappingURL=styled.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"styled.js","sources":["../../../../src/components/Alerts/MiniAlert/styled.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { theme } from 'Theme';\n\nexport const MiniAlertContainer = styled.div`\n display: flex;\n gap: ${theme.sizes.xs};\n`;\n"],"names":[],"mappings":";;;AAGO,MAAM,kBAAkB,GAAG,MAAM,CAAC,GAAG,CAEnC,UAAA,CAAA,EAAA,WAAA,EAAA,yBAAA,EAAA,WAAA,EAAA,cAAA,EAAA,CAAA,CAAA,CAAA,iBAAA,EAAA,KAAK,CAAC,KAAK,CAAC,EAAE;;;;"}