@laerdal/life-react-components 6.0.0-dev.12.full → 6.0.0-dev.13.full

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.
@@ -33,6 +33,7 @@ const VerticalTabs = _ref => {
33
33
  onLinkClick: e => {
34
34
  if (entry.onClick) {
35
35
  entry.onClick(e);
36
+ e.preventDefault && e.preventDefault();
36
37
  }
37
38
  }
38
39
  }, entry.to))
@@ -1 +1 @@
1
- {"version":3,"file":"VerticalTabs.cjs","names":["React","_interopRequireWildcard","require","_Tabs","_interopRequireDefault","_TabLink","_types","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","VerticalTabs","_ref","size","entries","jsx","Size","Large","children","map","entry","href","to","requiredLine","optionalLine","endLineIcon","OptionalLineIcon","optionalLineIcon","disabled","showNotificationDot","variant","onLinkClick","onClick","propTypes","_propTypes","arrayOf","shape","string","isRequired","node","bool","func","oneOf","_default","exports"],"sources":["../../src/Tabs/VerticalTabs.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport Tabs from './Tabs';\r\nimport TabLink from './TabLink';\r\nimport { BaseProps } from '../icons';\r\nimport { Size } from '../types';\r\n\r\nexport interface VerticalTabEntry {\r\n /**\r\n * Required. The main text to be displayed on the tab.\r\n */\r\n requiredLine: string;\r\n\r\n /**\r\n * Optional. The secondary text to be displayed on the tab link under the required line.\r\n */\r\n optionalLine?: string;\r\n\r\n /**\r\n * Optional. The icon to be displayed next to the secondary text on the tab link under the required line.\r\n */\r\n optionalLineIcon?: React.ReactNode;\r\n\r\n /**\r\n * Optional. The icon to be displayed at the end of the tab.\r\n */\r\n endLineIcon?: React.ReactNode;\r\n\r\n /**\r\n * Required. The URL to which the tab links.\r\n */\r\n to: string;\r\n\r\n /**\r\n * Optional. A boolean indicating whether the tab is disabled.\r\n * If true, the tab will be unclickable and will have a disabled appearance.\r\n */\r\n disabled?: boolean;\r\n\r\n /**\r\n * Optional. The handler function to be called when the tab is clicked.\r\n */\r\n onClick?: (e: React.MouseEvent) => void;\r\n\r\n /**\r\n * Optional. A boolean indicating whether a notification dot should be shown on the tab.\r\n */\r\n showNotificationDot?: boolean;\r\n\r\n /**\r\n * Optional. The variant of the notification dot. It can be 'critical' or 'positive'. Defaults to 'Critical'\r\n */\r\n variant?: 'critical' | 'positive';\r\n}\r\n\r\nexport interface VerticalTabsProps {\r\n size?: Size.Small | Size.Medium | Size.Large;\r\n entries: VerticalTabEntry[];\r\n}\r\n\r\nconst VerticalTabs = ({ size, entries }: VerticalTabsProps) => {\r\n return (\r\n <Tabs size={size ?? Size.Large}>\r\n {entries?.map((entry: VerticalTabEntry) => (\r\n <TabLink\r\n key={entry.to}\r\n href={entry.to}\r\n requiredLine={entry.requiredLine}\r\n optionalLine={entry.optionalLine}\r\n endLineIcon={entry.endLineIcon}\r\n OptionalLineIcon={entry.optionalLineIcon}\r\n disabled={entry.disabled}\r\n showNotificationDot={entry.showNotificationDot}\r\n size={size}\r\n variant={entry.variant}\r\n onLinkClick={(e) => {\r\n if (entry.onClick) {\r\n entry.onClick(e);\r\n }\r\n }}/>\r\n ))}\r\n </Tabs>\r\n );\r\n};\r\n\r\nexport default VerticalTabs;\r\n"],"mappings":";;;;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,KAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,QAAA,GAAAD,sBAAA,CAAAF,OAAA;AAEA,IAAAI,MAAA,GAAAJ,OAAA;AAAgC,IAAAK,WAAA,GAAAL,OAAA;AAAA,SAAAM,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SA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AAAA,IAAAK,QAAA,GAAAC,OAAA,CAAA/C,OAAA,GAiCpBc,YAAY","ignoreList":[]}
1
+ {"version":3,"file":"VerticalTabs.cjs","names":["React","_interopRequireWildcard","require","_Tabs","_interopRequireDefault","_TabLink","_types","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","VerticalTabs","_ref","size","entries","jsx","Size","Large","children","map","entry","href","to","requiredLine","optionalLine","endLineIcon","OptionalLineIcon","optionalLineIcon","disabled","showNotificationDot","variant","onLinkClick","onClick","preventDefault","propTypes","_propTypes","arrayOf","shape","string","isRequired","node","bool","func","oneOf","_default","exports"],"sources":["../../src/Tabs/VerticalTabs.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport Tabs from './Tabs';\r\nimport TabLink from './TabLink';\r\nimport { BaseProps } from '../icons';\r\nimport { Size } from '../types';\r\n\r\nexport interface VerticalTabEntry {\r\n /**\r\n * Required. The main text to be displayed on the tab.\r\n */\r\n requiredLine: string;\r\n\r\n /**\r\n * Optional. The secondary text to be displayed on the tab link under the required line.\r\n */\r\n optionalLine?: string;\r\n\r\n /**\r\n * Optional. The icon to be displayed next to the secondary text on the tab link under the required line.\r\n */\r\n optionalLineIcon?: React.ReactNode;\r\n\r\n /**\r\n * Optional. The icon to be displayed at the end of the tab.\r\n */\r\n endLineIcon?: React.ReactNode;\r\n\r\n /**\r\n * Required. The URL to which the tab links.\r\n */\r\n to: string;\r\n\r\n /**\r\n * Optional. A boolean indicating whether the tab is disabled.\r\n * If true, the tab will be unclickable and will have a disabled appearance.\r\n */\r\n disabled?: boolean;\r\n\r\n /**\r\n * Optional. The handler function to be called when the tab is clicked.\r\n */\r\n onClick?: (e: React.MouseEvent) => void;\r\n\r\n /**\r\n * Optional. A boolean indicating whether a notification dot should be shown on the tab.\r\n */\r\n showNotificationDot?: boolean;\r\n\r\n /**\r\n * Optional. The variant of the notification dot. It can be 'critical' or 'positive'. Defaults to 'Critical'\r\n */\r\n variant?: 'critical' | 'positive';\r\n}\r\n\r\nexport interface VerticalTabsProps {\r\n size?: Size.Small | Size.Medium | Size.Large;\r\n entries: VerticalTabEntry[];\r\n}\r\n\r\nconst VerticalTabs = ({ size, entries }: VerticalTabsProps) => {\r\n return (\r\n <Tabs size={size ?? Size.Large}>\r\n {entries?.map((entry: VerticalTabEntry) => (\r\n <TabLink\r\n key={entry.to}\r\n href={entry.to}\r\n requiredLine={entry.requiredLine}\r\n optionalLine={entry.optionalLine}\r\n endLineIcon={entry.endLineIcon}\r\n OptionalLineIcon={entry.optionalLineIcon}\r\n disabled={entry.disabled}\r\n showNotificationDot={entry.showNotificationDot}\r\n size={size}\r\n variant={entry.variant}\r\n onLinkClick={(e) => {\r\n if (entry.onClick) {\r\n entry.onClick(e);\r\n e.preventDefault && e.preventDefault();\r\n }\r\n }}/>\r\n ))}\r\n </Tabs>\r\n );\r\n};\r\n\r\nexport default VerticalTabs;\r\n"],"mappings":";;;;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,KAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,QAAA,GAAAD,sBAAA,CAAAF,OAAA;AAEA,IAAAI,MAAA,GAAAJ,OAAA;AAAgC,IAAAK,WAAA,GAAAL,OAAA;AAAA,SAAAM,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAR,wBAAAQ,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ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24
24
  onLinkClick: e => {
25
25
  if (entry.onClick) {
26
26
  entry.onClick(e);
27
+ e.preventDefault && e.preventDefault();
27
28
  }
28
29
  }
29
30
  }, entry.to))
@@ -1 +1 @@
1
- {"version":3,"file":"VerticalTabs.js","names":["React","Tabs","TabLink","Size","jsx","_jsx","VerticalTabs","_ref","size","entries","Large","children","map","entry","href","to","requiredLine","optionalLine","endLineIcon","OptionalLineIcon","optionalLineIcon","disabled","showNotificationDot","variant","onLinkClick","e","onClick","propTypes","_pt","arrayOf","shape","string","isRequired","node","bool","func","oneOf"],"sources":["../../src/Tabs/VerticalTabs.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport Tabs from './Tabs';\r\nimport TabLink from './TabLink';\r\nimport { BaseProps } from '../icons';\r\nimport { Size } from '../types';\r\n\r\nexport interface VerticalTabEntry {\r\n /**\r\n * Required. The main text to be displayed on the tab.\r\n */\r\n requiredLine: string;\r\n\r\n /**\r\n * Optional. The secondary text to be displayed on the tab link under the required line.\r\n */\r\n optionalLine?: string;\r\n\r\n /**\r\n * Optional. The icon to be displayed next to the secondary text on the tab link under the required line.\r\n */\r\n optionalLineIcon?: React.ReactNode;\r\n\r\n /**\r\n * Optional. The icon to be displayed at the end of the tab.\r\n */\r\n endLineIcon?: React.ReactNode;\r\n\r\n /**\r\n * Required. The URL to which the tab links.\r\n */\r\n to: string;\r\n\r\n /**\r\n * Optional. A boolean indicating whether the tab is disabled.\r\n * If true, the tab will be unclickable and will have a disabled appearance.\r\n */\r\n disabled?: boolean;\r\n\r\n /**\r\n * Optional. The handler function to be called when the tab is clicked.\r\n */\r\n onClick?: (e: React.MouseEvent) => void;\r\n\r\n /**\r\n * Optional. A boolean indicating whether a notification dot should be shown on the tab.\r\n */\r\n showNotificationDot?: boolean;\r\n\r\n /**\r\n * Optional. The variant of the notification dot. It can be 'critical' or 'positive'. Defaults to 'Critical'\r\n */\r\n variant?: 'critical' | 'positive';\r\n}\r\n\r\nexport interface VerticalTabsProps {\r\n size?: Size.Small | Size.Medium | Size.Large;\r\n entries: VerticalTabEntry[];\r\n}\r\n\r\nconst VerticalTabs = ({ size, entries }: VerticalTabsProps) => {\r\n return (\r\n <Tabs size={size ?? Size.Large}>\r\n {entries?.map((entry: VerticalTabEntry) => (\r\n <TabLink\r\n key={entry.to}\r\n href={entry.to}\r\n requiredLine={entry.requiredLine}\r\n optionalLine={entry.optionalLine}\r\n endLineIcon={entry.endLineIcon}\r\n OptionalLineIcon={entry.optionalLineIcon}\r\n disabled={entry.disabled}\r\n showNotificationDot={entry.showNotificationDot}\r\n size={size}\r\n variant={entry.variant}\r\n onLinkClick={(e) => {\r\n if (entry.onClick) {\r\n entry.onClick(e);\r\n }\r\n }}/>\r\n ))}\r\n </Tabs>\r\n );\r\n};\r\n\r\nexport default VerticalTabs;\r\n"],"mappings":";AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAOC,IAAI,MAAM,QAAQ;AACzB,OAAOC,OAAO,MAAM,WAAW;AAE/B,SAASC,IAAI,QAAQ,UAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAuDhC,MAAMC,YAAY,GAAGC,IAAA,IAA0C;EAAA,IAAzC;IAAEC,IAAI;IAAEC;EAA2B,CAAC,GAAAF,IAAA;EACxD,oBACEF,IAAA,CAACJ,IAAI;IAACO,IAAI,EAAEA,IAAI,IAAIL,IAAI,CAACO,KAAM;IAAAC,QAAA,EAC5BF,OAAO,EAAEG,GAAG,CAAEC,KAAuB,iBACpCR,IAAA,CAACH,OAAO;MAENY,IAAI,EAAED,KAAK,CAACE,EAAG;MACfC,YAAY,EAAEH,KAAK,CAACG,YAAa;MACjCC,YAAY,EAAEJ,KAAK,CAACI,YAAa;MACjCC,WAAW,EAAEL,KAAK,CAACK,WAAY;MAC/BC,gBAAgB,EAAEN,KAAK,CAACO,gBAAiB;MACzCC,QAAQ,EAAER,KAAK,CAACQ,QAAS;MACzBC,mBAAmB,EAAET,KAAK,CAACS,mBAAoB;MAC/Cd,IAAI,EAAEA,IAAK;MACXe,OAAO,EAAEV,KAAK,CAACU,OAAQ;MACvBC,WAAW,EAAGC,CAAC,IAAK;QAClB,IAAIZ,KAAK,CAACa,OAAO,EAAE;UACjBb,KAAK,CAACa,OAAO,CAACD,CAAC,CAAC;QAClB;MACF;IAAE,GAdGZ,KAAK,CAACE,EAcR,CACN;EAAC,CACE,CAAC;AAEX,CAAC;AAACT,YAAA,CAAAqB,SAAA;EA1BAlB,OAAO,EAAAmB,GAAA,CAAAC,OAAA,CAAAD,GAAA,CAAAE,KAAA;IA9CPd,YAAY,EAAAY,GAAA,CAAAG,MAAA,CAAAC,UAAA;IAKZf,YAAY,EAAAW,GAAA,CAAAG,MAAA;IAKZX,gBAAgB,EAAAQ,GAAA,CAAAK,IAAA;IAKhBf,WAAW,EAAAU,GAAA,CAAAK,IAAA;IAKXlB,EAAE,EAAAa,GAAA,CAAAG,MAAA,CAAAC,UAAA;IAMFX,QAAQ,EAAAO,GAAA,CAAAM,IAAA;IAKRR,OAAO,EAAAE,GAAA,CAAAO,IAAA;IAKPb,mBAAmB,EAAAM,GAAA,CAAAM,IAAA;IAKnBX,OAAO,EAAAK,GAAA,CAAAQ,KAAA,EAAG,UAAU,EAAG,UAAU;EAAA,IAAAJ;AAAA;AAiCnC,eAAe1B,YAAY","ignoreList":[]}
1
+ {"version":3,"file":"VerticalTabs.js","names":["React","Tabs","TabLink","Size","jsx","_jsx","VerticalTabs","_ref","size","entries","Large","children","map","entry","href","to","requiredLine","optionalLine","endLineIcon","OptionalLineIcon","optionalLineIcon","disabled","showNotificationDot","variant","onLinkClick","e","onClick","preventDefault","propTypes","_pt","arrayOf","shape","string","isRequired","node","bool","func","oneOf"],"sources":["../../src/Tabs/VerticalTabs.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport Tabs from './Tabs';\r\nimport TabLink from './TabLink';\r\nimport { BaseProps } from '../icons';\r\nimport { Size } from '../types';\r\n\r\nexport interface VerticalTabEntry {\r\n /**\r\n * Required. The main text to be displayed on the tab.\r\n */\r\n requiredLine: string;\r\n\r\n /**\r\n * Optional. The secondary text to be displayed on the tab link under the required line.\r\n */\r\n optionalLine?: string;\r\n\r\n /**\r\n * Optional. The icon to be displayed next to the secondary text on the tab link under the required line.\r\n */\r\n optionalLineIcon?: React.ReactNode;\r\n\r\n /**\r\n * Optional. The icon to be displayed at the end of the tab.\r\n */\r\n endLineIcon?: React.ReactNode;\r\n\r\n /**\r\n * Required. The URL to which the tab links.\r\n */\r\n to: string;\r\n\r\n /**\r\n * Optional. A boolean indicating whether the tab is disabled.\r\n * If true, the tab will be unclickable and will have a disabled appearance.\r\n */\r\n disabled?: boolean;\r\n\r\n /**\r\n * Optional. The handler function to be called when the tab is clicked.\r\n */\r\n onClick?: (e: React.MouseEvent) => void;\r\n\r\n /**\r\n * Optional. A boolean indicating whether a notification dot should be shown on the tab.\r\n */\r\n showNotificationDot?: boolean;\r\n\r\n /**\r\n * Optional. The variant of the notification dot. It can be 'critical' or 'positive'. Defaults to 'Critical'\r\n */\r\n variant?: 'critical' | 'positive';\r\n}\r\n\r\nexport interface VerticalTabsProps {\r\n size?: Size.Small | Size.Medium | Size.Large;\r\n entries: VerticalTabEntry[];\r\n}\r\n\r\nconst VerticalTabs = ({ size, entries }: VerticalTabsProps) => {\r\n return (\r\n <Tabs size={size ?? Size.Large}>\r\n {entries?.map((entry: VerticalTabEntry) => (\r\n <TabLink\r\n key={entry.to}\r\n href={entry.to}\r\n requiredLine={entry.requiredLine}\r\n optionalLine={entry.optionalLine}\r\n endLineIcon={entry.endLineIcon}\r\n OptionalLineIcon={entry.optionalLineIcon}\r\n disabled={entry.disabled}\r\n showNotificationDot={entry.showNotificationDot}\r\n size={size}\r\n variant={entry.variant}\r\n onLinkClick={(e) => {\r\n if (entry.onClick) {\r\n entry.onClick(e);\r\n e.preventDefault && e.preventDefault();\r\n }\r\n }}/>\r\n ))}\r\n </Tabs>\r\n );\r\n};\r\n\r\nexport default VerticalTabs;\r\n"],"mappings":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,gBAAgB,EAAAS,GAAA,CAAAK,IAAA;IAKhBhB,WAAW,EAAAW,GAAA,CAAAK,IAAA;IAKXnB,EAAE,EAAAc,GAAA,CAAAG,MAAA,CAAAC,UAAA;IAMFZ,QAAQ,EAAAQ,GAAA,CAAAM,IAAA;IAKRT,OAAO,EAAAG,GAAA,CAAAO,IAAA;IAKPd,mBAAmB,EAAAO,GAAA,CAAAM,IAAA;IAKnBZ,OAAO,EAAAM,GAAA,CAAAQ,KAAA,EAAG,UAAU,EAAG,UAAU;EAAA,IAAAJ;AAAA;AAkCnC,eAAe3B,YAAY","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@laerdal/life-react-components",
3
- "version": "6.0.0-dev.12.full",
3
+ "version": "6.0.0-dev.13.full",
4
4
  "private": false,
5
5
  "author": "Erik Martirosyan <erik.martirosyan@laerdal.com>",
6
6
  "contributors": [],