@laerdal/life-react-components 5.0.8-dev.2.full → 5.0.8-dev.3

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 +1 @@
1
- {"version":3,"file":"ChipInputTypes.cjs","names":[],"sources":["../../src/ChipsInput/ChipInputTypes.ts"],"sourcesContent":["import {Size} from '../types';\r\nimport {ChipVariant} from '../Chips/ChipTypes';\r\nimport React from \"react\";\r\n\r\n\r\nexport interface ChipInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'autoSave' | 'list' | 'type' | 'id' | 'required' | 'tabIndex' | 'value' | 'onChange' | 'onKeyDown' | 'placeholder' | 'onClick' | 'disabled' | 'size'> {\r\n inputId: string;\r\n values: string[];\r\n icon?: React.ReactNode;\r\n variants?: ChipVariant[];\r\n placeholder?: string;\r\n altPlaceholder?: string;\r\n\r\n onValueChange: (chips: string[]) => void;\r\n multiLine?: boolean;\r\n disabled?: boolean;\r\n size?: Size.Medium | Size.Small;\r\n\r\n validationMessage?: string;\r\n\r\n required?: boolean;\r\n\r\n autoSave?: boolean;\r\n}\r\n\r\n\r\nexport interface ChipItem {\r\n label: string;\r\n icon?: React.ReactNode;\r\n disabled?: boolean;\r\n variant?: ChipVariant;\r\n}\r\n\r\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"ChipInputTypes.cjs","names":[],"sources":["../../src/ChipsInput/ChipInputTypes.ts"],"sourcesContent":["import {Size} from '../types';\r\nimport {ChipVariant} from '../Chips/ChipTypes';\r\nimport React from \"react\";\r\n\r\n\r\nexport interface ChipInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'autoSave' | 'list' | 'type' | 'id' | 'required' | 'tabIndex' | 'value' | 'onChange' | 'onKeyDown' | 'placeholder' | 'onClick' | 'disabled' | 'size'> {\r\n /**\r\n * Required. The ID of the input element.\r\n */\r\n inputId: string;\r\n /**\r\n * Required. An array of strings representing the current values (chips) in the input.\r\n */\r\n values: string[];\r\n /**\r\n * Optional. An icon to be displayed inside the input.\r\n */\r\n icon?: React.ReactNode;\r\n /**\r\n * Optional. An array of ChipVariant objects representing the variants of the chips.\r\n */\r\n variants?: ChipVariant[];\r\n /**\r\n * Optional. The placeholder text to be displayed in the input when it is empty and no items available for selecting.\r\n */\r\n placeholder?: string;\r\n /**\r\n * Optional. An alternative placeholder text to be displayed in the input when it is empty and there are items to select.\r\n */\r\n altPlaceholder?: string;\r\n /**\r\n * Required. A function to be called when the values (chips) change.\r\n * It should take an array of strings representing the new values.\r\n */\r\n onValueChange: (chips: string[]) => void;\r\n /**\r\n * Optional. A boolean indicating whether the input supports multiple lines.\r\n */\r\n multiLine?: boolean;\r\n /**\r\n * Optional. A boolean indicating whether the input is disabled.\r\n */\r\n disabled?: boolean;\r\n /**\r\n * Optional. The size of the input. Can be 'Medium' or 'Small'.\r\n */\r\n size?: Size.Medium | Size.Small;\r\n /**\r\n * Optional. The validation message to be displayed when the input is in an error state.\r\n */\r\n validationMessage?: string;\r\n /**\r\n * Optional. A boolean indicating whether the input is required.\r\n */\r\n required?: boolean;\r\n /**\r\n * Optional. A boolean indicating whether the input should automatically save its value.\r\n */\r\n autoSave?: boolean;\r\n}\r\n\r\n\r\nexport interface ChipItem {\r\n label: string;\r\n icon?: React.ReactNode;\r\n disabled?: boolean;\r\n variant?: ChipVariant;\r\n}\r\n\r\n"],"mappings":"","ignoreList":[]}
@@ -2,18 +2,58 @@ import { Size } from '../types';
2
2
  import { ChipVariant } from '../Chips/ChipTypes';
3
3
  import React from "react";
4
4
  export interface ChipInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'autoSave' | 'list' | 'type' | 'id' | 'required' | 'tabIndex' | 'value' | 'onChange' | 'onKeyDown' | 'placeholder' | 'onClick' | 'disabled' | 'size'> {
5
+ /**
6
+ * Required. The ID of the input element.
7
+ */
5
8
  inputId: string;
9
+ /**
10
+ * Required. An array of strings representing the current values (chips) in the input.
11
+ */
6
12
  values: string[];
13
+ /**
14
+ * Optional. An icon to be displayed inside the input.
15
+ */
7
16
  icon?: React.ReactNode;
17
+ /**
18
+ * Optional. An array of ChipVariant objects representing the variants of the chips.
19
+ */
8
20
  variants?: ChipVariant[];
21
+ /**
22
+ * Optional. The placeholder text to be displayed in the input when it is empty and no items available for selecting.
23
+ */
9
24
  placeholder?: string;
25
+ /**
26
+ * Optional. An alternative placeholder text to be displayed in the input when it is empty and there are items to select.
27
+ */
10
28
  altPlaceholder?: string;
29
+ /**
30
+ * Required. A function to be called when the values (chips) change.
31
+ * It should take an array of strings representing the new values.
32
+ */
11
33
  onValueChange: (chips: string[]) => void;
34
+ /**
35
+ * Optional. A boolean indicating whether the input supports multiple lines.
36
+ */
12
37
  multiLine?: boolean;
38
+ /**
39
+ * Optional. A boolean indicating whether the input is disabled.
40
+ */
13
41
  disabled?: boolean;
42
+ /**
43
+ * Optional. The size of the input. Can be 'Medium' or 'Small'.
44
+ */
14
45
  size?: Size.Medium | Size.Small;
46
+ /**
47
+ * Optional. The validation message to be displayed when the input is in an error state.
48
+ */
15
49
  validationMessage?: string;
50
+ /**
51
+ * Optional. A boolean indicating whether the input is required.
52
+ */
16
53
  required?: boolean;
54
+ /**
55
+ * Optional. A boolean indicating whether the input should automatically save its value.
56
+ */
17
57
  autoSave?: boolean;
18
58
  }
19
59
  export interface ChipItem {
@@ -1 +1 @@
1
- {"version":3,"file":"ChipInputTypes.js","names":[],"sources":["../../src/ChipsInput/ChipInputTypes.ts"],"sourcesContent":["import {Size} from '../types';\r\nimport {ChipVariant} from '../Chips/ChipTypes';\r\nimport React from \"react\";\r\n\r\n\r\nexport interface ChipInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'autoSave' | 'list' | 'type' | 'id' | 'required' | 'tabIndex' | 'value' | 'onChange' | 'onKeyDown' | 'placeholder' | 'onClick' | 'disabled' | 'size'> {\r\n inputId: string;\r\n values: string[];\r\n icon?: React.ReactNode;\r\n variants?: ChipVariant[];\r\n placeholder?: string;\r\n altPlaceholder?: string;\r\n\r\n onValueChange: (chips: string[]) => void;\r\n multiLine?: boolean;\r\n disabled?: boolean;\r\n size?: Size.Medium | Size.Small;\r\n\r\n validationMessage?: string;\r\n\r\n required?: boolean;\r\n\r\n autoSave?: boolean;\r\n}\r\n\r\n\r\nexport interface ChipItem {\r\n label: string;\r\n icon?: React.ReactNode;\r\n disabled?: boolean;\r\n variant?: ChipVariant;\r\n}\r\n\r\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"ChipInputTypes.js","names":[],"sources":["../../src/ChipsInput/ChipInputTypes.ts"],"sourcesContent":["import {Size} from '../types';\r\nimport {ChipVariant} from '../Chips/ChipTypes';\r\nimport React from \"react\";\r\n\r\n\r\nexport interface ChipInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'autoSave' | 'list' | 'type' | 'id' | 'required' | 'tabIndex' | 'value' | 'onChange' | 'onKeyDown' | 'placeholder' | 'onClick' | 'disabled' | 'size'> {\r\n /**\r\n * Required. The ID of the input element.\r\n */\r\n inputId: string;\r\n /**\r\n * Required. An array of strings representing the current values (chips) in the input.\r\n */\r\n values: string[];\r\n /**\r\n * Optional. An icon to be displayed inside the input.\r\n */\r\n icon?: React.ReactNode;\r\n /**\r\n * Optional. An array of ChipVariant objects representing the variants of the chips.\r\n */\r\n variants?: ChipVariant[];\r\n /**\r\n * Optional. The placeholder text to be displayed in the input when it is empty and no items available for selecting.\r\n */\r\n placeholder?: string;\r\n /**\r\n * Optional. An alternative placeholder text to be displayed in the input when it is empty and there are items to select.\r\n */\r\n altPlaceholder?: string;\r\n /**\r\n * Required. A function to be called when the values (chips) change.\r\n * It should take an array of strings representing the new values.\r\n */\r\n onValueChange: (chips: string[]) => void;\r\n /**\r\n * Optional. A boolean indicating whether the input supports multiple lines.\r\n */\r\n multiLine?: boolean;\r\n /**\r\n * Optional. A boolean indicating whether the input is disabled.\r\n */\r\n disabled?: boolean;\r\n /**\r\n * Optional. The size of the input. Can be 'Medium' or 'Small'.\r\n */\r\n size?: Size.Medium | Size.Small;\r\n /**\r\n * Optional. The validation message to be displayed when the input is in an error state.\r\n */\r\n validationMessage?: string;\r\n /**\r\n * Optional. A boolean indicating whether the input is required.\r\n */\r\n required?: boolean;\r\n /**\r\n * Optional. A boolean indicating whether the input should automatically save its value.\r\n */\r\n autoSave?: boolean;\r\n}\r\n\r\n\r\nexport interface ChipItem {\r\n label: string;\r\n icon?: React.ReactNode;\r\n disabled?: boolean;\r\n variant?: ChipVariant;\r\n}\r\n\r\n"],"mappings":"","ignoreList":[]}
@@ -61,6 +61,7 @@ const RenderTileItem = function (item, size) {
61
61
  items: item.items,
62
62
  itemsType: item.itemsType,
63
63
  onClick: item.onClick,
64
+ value: item.value,
64
65
  icon: item.icon,
65
66
  tooltip: item.tooltip,
66
67
  action: item.action,
@@ -75,6 +76,28 @@ const RenderTileItem = function (item, size) {
75
76
  disabled: item.disabled
76
77
  }, key);
77
78
  }
79
+ case 'text-dropdown':
80
+ {
81
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Dropdown.DropdownButton, {
82
+ type: 'text',
83
+ items: item.items,
84
+ itemsType: item.itemsType,
85
+ onClick: item.onClick,
86
+ value: item.value,
87
+ label: item.label,
88
+ keepLabel: item.keepLabel,
89
+ action: item.action,
90
+ actionIcon: item.actionIcon,
91
+ actionLabel: item.actionLabel,
92
+ actionVariant: item.actionVariant,
93
+ actionLoading: item.actionLoading,
94
+ multiSelect: item.multiSelect,
95
+ scrollable: item.scrollable,
96
+ pinTopItem: item.pinTopItem,
97
+ maxHeight: item.maxHeight,
98
+ disabled: item.disabled
99
+ }, key);
100
+ }
78
101
  case 'note':
79
102
  {
80
103
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(TileNoteWrapper, {
@@ -1 +1 @@
1
- {"version":3,"file":"TileCommonItems.cjs","names":["_Button","require","_Toggles","_Dropdown","_react","_interopRequireDefault","_styledComponents","_styles","_HyperLink","_types","_jsxRuntime","_excluded","_excluded2","_templateObject","_templateObject2","_templateObject3","_templateObject4","_templateObject5","_templateObject6","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","default","getOwnPropertyDescriptors","defineProperties","defineProperty","TileNoteText","exports","styled","div","_taggedTemplateLiteral2","TileNoteIcon","TileNoteWrapper","props","COLORS","getColor","theme","ComponentXXSStyling","ComponentTextStyle","Regular","ComponentXSStyling","ComponentSStyling","TileHyperLinkIcon","TileHyperLinkText","TileHyperLinkWrapper","Bold","ComponentMStyling","ComponentLStyling","RenderTileItem","item","size","key","undefined","componentType","_item$variant","_item$shape","jsx","IconButton","variant","useTransparentBackground","shape","action","tooltip","disabled","children","icon","ToggleButton","active","onChange","defaultState","activeState","DropdownButton","type","items","itemsType","onClick","actionIcon","actionLabel","actionVariant","actionLoading","multiSelect","scrollable","pinTopItem","maxHeight","jsxs","className","noteIcon","React","cloneElement","Size","Large","noteText","linkText","linkIcon","rest","_objectWithoutProperties2","HyperLink","buttonText","Button","XSmall","XXSmall","includes","Small","Medium"],"sources":["../../src/Tile/TileCommonItems.tsx"],"sourcesContent":["import {\r\n TileDropdownButton,\r\n TileHyperLink,\r\n TileIconButton,\r\n TileNote,\r\n TileStandardButton,\r\n TileToggleButton\r\n} from './TileTypes';\r\nimport {Button, IconButton} from '../Button';\r\nimport {ToggleButton} from '../Toggles';\r\nimport {DropdownButton} from '../Dropdown';\r\nimport React from 'react';\r\nimport styled from 'styled-components';\r\nimport {\r\n COLORS, ComponentLStyling,\r\n ComponentMStyling,\r\n ComponentSStyling,\r\n ComponentTextStyle,\r\n ComponentXSStyling,\r\n ComponentXXSStyling\r\n} from '../styles';\r\nimport {HyperLink} from '../HyperLink';\r\nimport {Size} from '../types';\r\n\r\n\r\nexport const TileNoteText = styled.div``;\r\nexport const TileNoteIcon = styled.div`display: flex;`;\r\nexport const TileNoteWrapper = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n color: ${props => COLORS.getColor('neutral_600', props.theme)};\r\n\r\n &.small {\r\n gap: 4px;\r\n\r\n ${TileNoteIcon} {\r\n width: 16px;\r\n height: 16px;\r\n }\r\n\r\n ${TileNoteText} {\r\n ${ComponentXXSStyling(ComponentTextStyle.Regular, null)}\r\n }\r\n }\r\n\r\n &.medium {\r\n gap: 6px;\r\n\r\n ${TileNoteIcon} {\r\n width: 16px;\r\n height: 16px;\r\n }\r\n\r\n ${TileNoteText} {\r\n ${ComponentXSStyling(ComponentTextStyle.Regular, null)}\r\n }\r\n\r\n }\r\n\r\n &.large {\r\n gap: 8px;\r\n\r\n ${TileNoteIcon} {\r\n width: 20px;\r\n height: 20px;\r\n }\r\n\r\n ${TileNoteText} {\r\n ${ComponentSStyling(ComponentTextStyle.Regular, null)}\r\n }\r\n }\r\n`;\r\n\r\n\r\nexport const TileHyperLinkIcon = styled.div`display: flex`;\r\nexport const TileHyperLinkText = styled.div``;\r\n\r\nexport const TileHyperLinkWrapper = styled.div`\r\n width: max-content;\r\n\r\n ${props => ComponentSStyling(ComponentTextStyle.Bold, COLORS.getColor('primary_500', props.theme))}\r\n a {\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n gap: 4px;\r\n }\r\n\r\n &.small {\r\n ${TileHyperLinkIcon} {\r\n width: 24px;\r\n height: 24px;\r\n }\r\n\r\n ${TileHyperLinkText} {\r\n ${ComponentSStyling(ComponentTextStyle.Bold, null)}\r\n }\r\n\r\n a {\r\n gap: 4px;\r\n }\r\n }\r\n\r\n &.medium {\r\n ${TileHyperLinkIcon} {\r\n width: 24px;\r\n height: 24px;\r\n }\r\n\r\n ${TileHyperLinkText} {\r\n ${ComponentMStyling(ComponentTextStyle.Bold, null)}\r\n }\r\n\r\n a {\r\n gap: 6px;\r\n }\r\n }\r\n\r\n &.large {\r\n ${TileHyperLinkIcon} {\r\n width: 28px;\r\n height: 28px;\r\n }\r\n\r\n ${TileHyperLinkText} {\r\n ${ComponentLStyling(ComponentTextStyle.Bold, null)}\r\n }\r\n\r\n a {\r\n gap: 8px;\r\n }\r\n }\r\n`\r\n\r\nexport const RenderTileItem = (item: TileIconButton | TileToggleButton | TileDropdownButton | TileStandardButton | TileNote | TileHyperLink,\r\n size: Size,\r\n key: any | undefined = undefined) => {\r\n switch (item.componentType) {\r\n case 'icon': {\r\n return <IconButton key={key}\r\n variant={item.variant ?? 'secondary'}\r\n useTransparentBackground={item.variant == 'secondary' ? true : false}\r\n shape={item.shape ?? 'circular'}\r\n action={item.action}\r\n tooltip={item.tooltip}\r\n disabled={item.disabled}>\r\n {item.icon}\r\n </IconButton>\r\n }\r\n case 'toggle': {\r\n return <ToggleButton key={key}\r\n active={item.active}\r\n onChange={item.onChange}\r\n defaultState={item.defaultState}\r\n activeState={item.activeState}\r\n disabled={item.disabled}/>\r\n }\r\n case 'dropdown': {\r\n return <DropdownButton key={key}\r\n type={'icon'}\r\n items={item.items}\r\n itemsType={item.itemsType}\r\n onClick={item.onClick}\r\n icon={item.icon}\r\n tooltip={item.tooltip}\r\n action={item.action}\r\n actionIcon={item.actionIcon}\r\n actionLabel={item.actionLabel}\r\n actionVariant={item.actionVariant}\r\n actionLoading={item.actionLoading}\r\n multiSelect={item.multiSelect}\r\n scrollable={item.scrollable}\r\n pinTopItem={item.pinTopItem}\r\n maxHeight={item.maxHeight}\r\n disabled={item.disabled}/>\r\n\r\n }\r\n case 'note': {\r\n return <TileNoteWrapper key={key} className={size}>\r\n {\r\n item.noteIcon &&\r\n <TileNoteIcon>\r\n {React.cloneElement(item.noteIcon as React.ReactElement, {size: size === Size.Large ? '20px' : '16'})}\r\n </TileNoteIcon>\r\n }\r\n <TileNoteText>{item.noteText}</TileNoteText>\r\n </TileNoteWrapper>\r\n\r\n }\r\n case 'link': {\r\n const {linkText, componentType, linkIcon, ...rest} = item;\r\n return <TileHyperLinkWrapper className={size} key={key}>\r\n <HyperLink {...rest}>\r\n <TileHyperLinkText>{linkText}</TileHyperLinkText>\r\n {\r\n linkIcon &&\r\n <TileHyperLinkIcon>\r\n {React.cloneElement(linkIcon as React.ReactElement, {size: size === Size.Large ? '28px' : '24px'})}\r\n </TileHyperLinkIcon>\r\n }\r\n </HyperLink>\r\n </TileHyperLinkWrapper>\r\n }\r\n case 'button': {\r\n const {buttonText, componentType, ...rest} = item;\r\n return <Button key={key}\r\n size={[Size.XSmall, Size.XSmall, Size.XXSmall].includes(size) ? Size.Small: \r\n size == Size.Large ? Size.Large : Size.Medium}\r\n {...rest}>\r\n {buttonText}\r\n </Button>\r\n }\r\n }\r\n}\r\n"],"mappings":";;;;;;;;;;AAQA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,iBAAA,GAAAD,sBAAA,CAAAJ,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AAQA,IAAAO,UAAA,GAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AAA8B,IAAAS,WAAA,GAAAT,OAAA;AAAA,MAAAU,SAAA;EAAAC,UAAA;AAAA,IAAAC,eAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA;AAAA,SAAAC,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAJ,CAAA,OAAAG,MAAA,CAAAE,qBAAA,QAAAC,CAAA,GAAAH,MAAA,CAAAE,qBAAA,CAAAL,CAAA,GAAAC,CAAA,KAAAK,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAN,CAAA,WAAAE,MAAA,CAAAK,wBAAA,CAAAR,CAAA,EAAAC,CAAA,EAAAQ,UAAA,OAAAP,CAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,CAAA,EAAAI,CAAA,YAAAJ,CAAA;AAAA,SAAAU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E,WAAA,CAAAyF,IAAA,EAAC3F,UAAA,CAAAuG,SAAS,EAAA/E,aAAA,CAAAA,aAAA,KAAK6E,IAAI;YAAA9B,QAAA,gBACjB,IAAArE,WAAA,CAAA6D,GAAA,EAACb,iBAAiB;cAAAqB,QAAA,EAAE4B;YAAQ,CAAoB,CAAC,EAE/CC,QAAQ,iBACR,IAAAlG,WAAA,CAAA6D,GAAA,EAACd,iBAAiB;cAAAsB,QAAA,eACfuB,cAAK,CAACC,YAAY,CAACK,QAAQ,EAAwB;gBAAC3C,IAAI,EAAEA,IAAI,KAAKuC,WAAI,CAACC,KAAK,GAAG,MAAM,GAAG;cAAM,CAAC;YAAC,CACjF,CAAC;UAAA,EAEb;QAAC,GATqCvC,GAU7B,CAAC;MACzB;IACA,KAAK,QAAQ;MAAE;QACb,MAAM;YAAC8C,UAAU;YAAE5C;UAAsB,CAAC,GAAGJ,IAAI;UAAZ6C,IAAI,OAAAC,yBAAA,CAAAzE,OAAA,EAAI2B,IAAI,EAAApD,UAAA;QACjD,oBAAO,IAAAF,WAAA,CAAA6D,GAAA,EAACvE,OAAA,CAAAiH,MAAM,EAAAjF,aAAA,CAAAA,aAAA;UACCiC,IAAI,EAAE,CAACuC,WAAI,CAACU,MAAM,EAAEV,WAAI,CAACU,MAAM,EAAEV,WAAI,CAACW,OAAO,CAAC,CAACC,QAAQ,CAACnD,IAAI,CAAC,GAAGuC,WAAI,CAACa,KAAK,GACzEpD,IAAI,IAAIuC,WAAI,CAACC,KAAK,GAAGD,WAAI,CAACC,KAAK,GAAGD,WAAI,CAACc;QAAO,GAC3CT,IAAI;UAAA9B,QAAA,EACpBiC;QAAU,IAJO9C,GAKZ,CAAC;MACX;EACF;AACF,CAAC;AAAAxB,OAAA,CAAAqB,cAAA,GAAAA,cAAA","ignoreList":[]}
1
+ {"version":3,"file":"TileCommonItems.cjs","names":["_Button","require","_Toggles","_Dropdown","_react","_interopRequireDefault","_styledComponents","_styles","_HyperLink","_types","_jsxRuntime","_excluded","_excluded2","_templateObject","_templateObject2","_templateObject3","_templateObject4","_templateObject5","_templateObject6","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","default","getOwnPropertyDescriptors","defineProperties","defineProperty","TileNoteText","exports","styled","div","_taggedTemplateLiteral2","TileNoteIcon","TileNoteWrapper","props","COLORS","getColor","theme","ComponentXXSStyling","ComponentTextStyle","Regular","ComponentXSStyling","ComponentSStyling","TileHyperLinkIcon","TileHyperLinkText","TileHyperLinkWrapper","Bold","ComponentMStyling","ComponentLStyling","RenderTileItem","item","size","key","undefined","componentType","_item$variant","_item$shape","jsx","IconButton","variant","useTransparentBackground","shape","action","tooltip","disabled","children","icon","ToggleButton","active","onChange","defaultState","activeState","DropdownButton","type","items","itemsType","onClick","value","actionIcon","actionLabel","actionVariant","actionLoading","multiSelect","scrollable","pinTopItem","maxHeight","label","keepLabel","jsxs","className","noteIcon","React","cloneElement","Size","Large","noteText","linkText","linkIcon","rest","_objectWithoutProperties2","HyperLink","buttonText","Button","XSmall","XXSmall","includes","Small","Medium"],"sources":["../../src/Tile/TileCommonItems.tsx"],"sourcesContent":["import {\r\n TileDropdownButton,\r\n TileHyperLink,\r\n TileIconButton,\r\n TileNote,\r\n TileStandardButton, TileTextDropdownButton,\r\n TileToggleButton\r\n} from './TileTypes';\r\nimport {Button, IconButton} from '../Button';\r\nimport {ToggleButton} from '../Toggles';\r\nimport {DropdownButton} from '../Dropdown';\r\nimport React from 'react';\r\nimport styled from 'styled-components';\r\nimport {\r\n COLORS, ComponentLStyling,\r\n ComponentMStyling,\r\n ComponentSStyling,\r\n ComponentTextStyle,\r\n ComponentXSStyling,\r\n ComponentXXSStyling\r\n} from '../styles';\r\nimport {HyperLink} from '../HyperLink';\r\nimport {Size} from '../types';\r\n\r\n\r\nexport const TileNoteText = styled.div``;\r\nexport const TileNoteIcon = styled.div`display: flex;`;\r\nexport const TileNoteWrapper = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n color: ${props => COLORS.getColor('neutral_600', props.theme)};\r\n\r\n &.small {\r\n gap: 4px;\r\n\r\n ${TileNoteIcon} {\r\n width: 16px;\r\n height: 16px;\r\n }\r\n\r\n ${TileNoteText} {\r\n ${ComponentXXSStyling(ComponentTextStyle.Regular, null)}\r\n }\r\n }\r\n\r\n &.medium {\r\n gap: 6px;\r\n\r\n ${TileNoteIcon} {\r\n width: 16px;\r\n height: 16px;\r\n }\r\n\r\n ${TileNoteText} {\r\n ${ComponentXSStyling(ComponentTextStyle.Regular, null)}\r\n }\r\n\r\n }\r\n\r\n &.large {\r\n gap: 8px;\r\n\r\n ${TileNoteIcon} {\r\n width: 20px;\r\n height: 20px;\r\n }\r\n\r\n ${TileNoteText} {\r\n ${ComponentSStyling(ComponentTextStyle.Regular, null)}\r\n }\r\n }\r\n`;\r\n\r\n\r\nexport const TileHyperLinkIcon = styled.div`display: flex`;\r\nexport const TileHyperLinkText = styled.div``;\r\n\r\nexport const TileHyperLinkWrapper = styled.div`\r\n width: max-content;\r\n\r\n ${props => ComponentSStyling(ComponentTextStyle.Bold, COLORS.getColor('primary_500', props.theme))}\r\n a {\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n gap: 4px;\r\n }\r\n\r\n &.small {\r\n ${TileHyperLinkIcon} {\r\n width: 24px;\r\n height: 24px;\r\n }\r\n\r\n ${TileHyperLinkText} {\r\n ${ComponentSStyling(ComponentTextStyle.Bold, null)}\r\n }\r\n\r\n a {\r\n gap: 4px;\r\n }\r\n }\r\n\r\n &.medium {\r\n ${TileHyperLinkIcon} {\r\n width: 24px;\r\n height: 24px;\r\n }\r\n\r\n ${TileHyperLinkText} {\r\n ${ComponentMStyling(ComponentTextStyle.Bold, null)}\r\n }\r\n\r\n a {\r\n gap: 6px;\r\n }\r\n }\r\n\r\n &.large {\r\n ${TileHyperLinkIcon} {\r\n width: 28px;\r\n height: 28px;\r\n }\r\n\r\n ${TileHyperLinkText} {\r\n ${ComponentLStyling(ComponentTextStyle.Bold, null)}\r\n }\r\n\r\n a {\r\n gap: 8px;\r\n }\r\n }\r\n`\r\n\r\nexport const RenderTileItem = (item: TileIconButton | TileToggleButton | TileDropdownButton | TileTextDropdownButton | TileStandardButton | TileNote | TileHyperLink,\r\n size: Size,\r\n key: any | undefined = undefined) => {\r\n switch (item.componentType) {\r\n case 'icon': {\r\n return <IconButton key={key}\r\n variant={item.variant ?? 'secondary'}\r\n useTransparentBackground={item.variant == 'secondary' ? true : false}\r\n shape={item.shape ?? 'circular'}\r\n action={item.action}\r\n tooltip={item.tooltip}\r\n disabled={item.disabled}>\r\n {item.icon}\r\n </IconButton>\r\n }\r\n case 'toggle': {\r\n return <ToggleButton key={key}\r\n active={item.active}\r\n onChange={item.onChange}\r\n defaultState={item.defaultState}\r\n activeState={item.activeState}\r\n disabled={item.disabled}/>\r\n }\r\n case 'dropdown': {\r\n return <DropdownButton key={key}\r\n type={'icon'}\r\n items={item.items}\r\n itemsType={item.itemsType}\r\n onClick={item.onClick}\r\n value={item.value}\r\n icon={item.icon}\r\n tooltip={item.tooltip}\r\n action={item.action}\r\n actionIcon={item.actionIcon}\r\n actionLabel={item.actionLabel}\r\n actionVariant={item.actionVariant}\r\n actionLoading={item.actionLoading}\r\n multiSelect={item.multiSelect}\r\n scrollable={item.scrollable}\r\n pinTopItem={item.pinTopItem}\r\n maxHeight={item.maxHeight}\r\n disabled={item.disabled}/>\r\n\r\n }\r\n case 'text-dropdown': {\r\n return <DropdownButton key={key}\r\n type={'text'}\r\n items={item.items}\r\n itemsType={item.itemsType}\r\n onClick={item.onClick}\r\n value={item.value}\r\n label={item.label}\r\n keepLabel={item.keepLabel}\r\n action={item.action}\r\n actionIcon={item.actionIcon}\r\n actionLabel={item.actionLabel}\r\n actionVariant={item.actionVariant}\r\n actionLoading={item.actionLoading}\r\n multiSelect={item.multiSelect}\r\n scrollable={item.scrollable}\r\n pinTopItem={item.pinTopItem}\r\n maxHeight={item.maxHeight}\r\n disabled={item.disabled}/>\r\n\r\n }\r\n case 'note': {\r\n return <TileNoteWrapper key={key} className={size}>\r\n {\r\n item.noteIcon &&\r\n <TileNoteIcon>\r\n {React.cloneElement(item.noteIcon as React.ReactElement, {size: size === Size.Large ? '20px' : '16'})}\r\n </TileNoteIcon>\r\n }\r\n <TileNoteText>{item.noteText}</TileNoteText>\r\n </TileNoteWrapper>\r\n\r\n }\r\n case 'link': {\r\n const {linkText, componentType, linkIcon, ...rest} = item;\r\n return <TileHyperLinkWrapper className={size} key={key}>\r\n <HyperLink {...rest}>\r\n <TileHyperLinkText>{linkText}</TileHyperLinkText>\r\n {\r\n linkIcon &&\r\n <TileHyperLinkIcon>\r\n {React.cloneElement(linkIcon as React.ReactElement, {size: size === Size.Large ? '28px' : '24px'})}\r\n </TileHyperLinkIcon>\r\n }\r\n </HyperLink>\r\n </TileHyperLinkWrapper>\r\n }\r\n case 'button': {\r\n const {buttonText, componentType, ...rest} = item;\r\n return <Button key={key}\r\n size={[Size.XSmall, Size.XSmall, Size.XXSmall].includes(size) ? Size.Small: \r\n size == Size.Large ? Size.Large : Size.Medium}\r\n {...rest}>\r\n {buttonText}\r\n </Button>\r\n }\r\n }\r\n}\r\n"],"mappings":";;;;;;;;;;AAQA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,iBAAA,GAAAD,sBAAA,CAAAJ,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AAQA,IAAAO,UAAA,GAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AAA8B,IAAAS,WAAA,GAAAT,OAAA;AAAA,MAAAU,SAAA;EAAAC,UAAA;AAAA,IAAAC,eAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,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ton, TileToggleButton } from './TileTypes';
1
+ import { TileDropdownButton, TileHyperLink, TileIconButton, TileNote, TileStandardButton, TileTextDropdownButton, TileToggleButton } from './TileTypes';
2
2
  import React from 'react';
3
3
  import { Size } from '../types';
4
4
  export declare const TileNoteText: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
@@ -7,4 +7,4 @@ export declare const TileNoteWrapper: import("styled-components/dist/types").ISt
7
7
  export declare const TileHyperLinkIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
8
8
  export declare const TileHyperLinkText: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
9
9
  export declare const TileHyperLinkWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
10
- export declare const RenderTileItem: (item: TileIconButton | TileToggleButton | TileDropdownButton | TileStandardButton | TileNote | TileHyperLink, size: Size, key?: any | undefined) => React.JSX.Element;
10
+ export declare const RenderTileItem: (item: TileIconButton | TileToggleButton | TileDropdownButton | TileTextDropdownButton | TileStandardButton | TileNote | TileHyperLink, size: Size, key?: any | undefined) => React.JSX.Element;
@@ -54,6 +54,7 @@ export const RenderTileItem = function (item, size) {
54
54
  items: item.items,
55
55
  itemsType: item.itemsType,
56
56
  onClick: item.onClick,
57
+ value: item.value,
57
58
  icon: item.icon,
58
59
  tooltip: item.tooltip,
59
60
  action: item.action,
@@ -68,6 +69,28 @@ export const RenderTileItem = function (item, size) {
68
69
  disabled: item.disabled
69
70
  }, key);
70
71
  }
72
+ case 'text-dropdown':
73
+ {
74
+ return /*#__PURE__*/_jsx(DropdownButton, {
75
+ type: 'text',
76
+ items: item.items,
77
+ itemsType: item.itemsType,
78
+ onClick: item.onClick,
79
+ value: item.value,
80
+ label: item.label,
81
+ keepLabel: item.keepLabel,
82
+ action: item.action,
83
+ actionIcon: item.actionIcon,
84
+ actionLabel: item.actionLabel,
85
+ actionVariant: item.actionVariant,
86
+ actionLoading: item.actionLoading,
87
+ multiSelect: item.multiSelect,
88
+ scrollable: item.scrollable,
89
+ pinTopItem: item.pinTopItem,
90
+ maxHeight: item.maxHeight,
91
+ disabled: item.disabled
92
+ }, key);
93
+ }
71
94
  case 'note':
72
95
  {
73
96
  return /*#__PURE__*/_jsxs(TileNoteWrapper, {
@@ -1 +1 @@
1
- {"version":3,"file":"TileCommonItems.js","names":["Button","IconButton","ToggleButton","DropdownButton","React","styled","COLORS","ComponentLStyling","ComponentMStyling","ComponentSStyling","ComponentTextStyle","ComponentXSStyling","ComponentXXSStyling","HyperLink","Size","jsx","_jsx","jsxs","_jsxs","TileNoteText","div","_templateObject","_taggedTemplateLiteral","TileNoteIcon","_templateObject2","TileNoteWrapper","_templateObject3","props","getColor","theme","Regular","TileHyperLinkIcon","_templateObject4","TileHyperLinkText","_templateObject5","TileHyperLinkWrapper","_templateObject6","Bold","RenderTileItem","item","size","key","arguments","length","undefined","componentType","_item$variant","_item$shape","variant","useTransparentBackground","shape","action","tooltip","disabled","children","icon","active","onChange","defaultState","activeState","type","items","itemsType","onClick","actionIcon","actionLabel","actionVariant","actionLoading","multiSelect","scrollable","pinTopItem","maxHeight","className","noteIcon","cloneElement","Large","noteText","linkText","linkIcon","rest","_objectWithoutProperties","_excluded","_objectSpread","buttonText","_excluded2","XSmall","XXSmall","includes","Small","Medium"],"sources":["../../src/Tile/TileCommonItems.tsx"],"sourcesContent":["import {\r\n TileDropdownButton,\r\n TileHyperLink,\r\n TileIconButton,\r\n TileNote,\r\n TileStandardButton,\r\n TileToggleButton\r\n} from './TileTypes';\r\nimport {Button, IconButton} from '../Button';\r\nimport {ToggleButton} from '../Toggles';\r\nimport {DropdownButton} from '../Dropdown';\r\nimport React from 'react';\r\nimport styled from 'styled-components';\r\nimport {\r\n COLORS, ComponentLStyling,\r\n ComponentMStyling,\r\n ComponentSStyling,\r\n ComponentTextStyle,\r\n ComponentXSStyling,\r\n ComponentXXSStyling\r\n} from '../styles';\r\nimport {HyperLink} from '../HyperLink';\r\nimport {Size} from '../types';\r\n\r\n\r\nexport const TileNoteText = styled.div``;\r\nexport const TileNoteIcon = styled.div`display: flex;`;\r\nexport const TileNoteWrapper = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n color: ${props => COLORS.getColor('neutral_600', props.theme)};\r\n\r\n &.small {\r\n gap: 4px;\r\n\r\n ${TileNoteIcon} {\r\n width: 16px;\r\n height: 16px;\r\n }\r\n\r\n ${TileNoteText} {\r\n ${ComponentXXSStyling(ComponentTextStyle.Regular, null)}\r\n }\r\n }\r\n\r\n &.medium {\r\n gap: 6px;\r\n\r\n ${TileNoteIcon} {\r\n width: 16px;\r\n height: 16px;\r\n }\r\n\r\n ${TileNoteText} {\r\n ${ComponentXSStyling(ComponentTextStyle.Regular, null)}\r\n }\r\n\r\n }\r\n\r\n &.large {\r\n gap: 8px;\r\n\r\n ${TileNoteIcon} {\r\n width: 20px;\r\n height: 20px;\r\n }\r\n\r\n ${TileNoteText} {\r\n ${ComponentSStyling(ComponentTextStyle.Regular, null)}\r\n }\r\n }\r\n`;\r\n\r\n\r\nexport const TileHyperLinkIcon = styled.div`display: flex`;\r\nexport const TileHyperLinkText = styled.div``;\r\n\r\nexport const TileHyperLinkWrapper = styled.div`\r\n width: max-content;\r\n\r\n ${props => ComponentSStyling(ComponentTextStyle.Bold, COLORS.getColor('primary_500', props.theme))}\r\n a {\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n gap: 4px;\r\n }\r\n\r\n &.small {\r\n ${TileHyperLinkIcon} {\r\n width: 24px;\r\n height: 24px;\r\n }\r\n\r\n ${TileHyperLinkText} {\r\n ${ComponentSStyling(ComponentTextStyle.Bold, null)}\r\n }\r\n\r\n a {\r\n gap: 4px;\r\n }\r\n }\r\n\r\n &.medium {\r\n ${TileHyperLinkIcon} {\r\n width: 24px;\r\n height: 24px;\r\n }\r\n\r\n ${TileHyperLinkText} {\r\n ${ComponentMStyling(ComponentTextStyle.Bold, null)}\r\n }\r\n\r\n a {\r\n gap: 6px;\r\n }\r\n }\r\n\r\n &.large {\r\n ${TileHyperLinkIcon} {\r\n width: 28px;\r\n height: 28px;\r\n }\r\n\r\n ${TileHyperLinkText} {\r\n ${ComponentLStyling(ComponentTextStyle.Bold, null)}\r\n }\r\n\r\n a {\r\n gap: 8px;\r\n }\r\n }\r\n`\r\n\r\nexport const RenderTileItem = (item: TileIconButton | TileToggleButton | TileDropdownButton | TileStandardButton | TileNote | TileHyperLink,\r\n size: Size,\r\n key: any | undefined = undefined) => {\r\n switch (item.componentType) {\r\n case 'icon': {\r\n return <IconButton key={key}\r\n variant={item.variant ?? 'secondary'}\r\n useTransparentBackground={item.variant == 'secondary' ? true : false}\r\n shape={item.shape ?? 'circular'}\r\n action={item.action}\r\n tooltip={item.tooltip}\r\n disabled={item.disabled}>\r\n {item.icon}\r\n </IconButton>\r\n }\r\n case 'toggle': {\r\n return <ToggleButton key={key}\r\n active={item.active}\r\n onChange={item.onChange}\r\n defaultState={item.defaultState}\r\n activeState={item.activeState}\r\n disabled={item.disabled}/>\r\n }\r\n case 'dropdown': {\r\n return <DropdownButton key={key}\r\n type={'icon'}\r\n items={item.items}\r\n itemsType={item.itemsType}\r\n onClick={item.onClick}\r\n icon={item.icon}\r\n tooltip={item.tooltip}\r\n action={item.action}\r\n actionIcon={item.actionIcon}\r\n actionLabel={item.actionLabel}\r\n actionVariant={item.actionVariant}\r\n actionLoading={item.actionLoading}\r\n multiSelect={item.multiSelect}\r\n scrollable={item.scrollable}\r\n pinTopItem={item.pinTopItem}\r\n maxHeight={item.maxHeight}\r\n disabled={item.disabled}/>\r\n\r\n }\r\n case 'note': {\r\n return <TileNoteWrapper key={key} className={size}>\r\n {\r\n item.noteIcon &&\r\n <TileNoteIcon>\r\n {React.cloneElement(item.noteIcon as React.ReactElement, {size: size === Size.Large ? '20px' : '16'})}\r\n </TileNoteIcon>\r\n }\r\n <TileNoteText>{item.noteText}</TileNoteText>\r\n </TileNoteWrapper>\r\n\r\n }\r\n case 'link': {\r\n const {linkText, componentType, linkIcon, ...rest} = item;\r\n return <TileHyperLinkWrapper className={size} key={key}>\r\n <HyperLink {...rest}>\r\n <TileHyperLinkText>{linkText}</TileHyperLinkText>\r\n {\r\n linkIcon &&\r\n <TileHyperLinkIcon>\r\n {React.cloneElement(linkIcon as React.ReactElement, {size: size === Size.Large ? '28px' : '24px'})}\r\n </TileHyperLinkIcon>\r\n }\r\n </HyperLink>\r\n </TileHyperLinkWrapper>\r\n }\r\n case 'button': {\r\n const {buttonText, componentType, ...rest} = item;\r\n return <Button key={key}\r\n size={[Size.XSmall, Size.XSmall, Size.XXSmall].includes(size) ? Size.Small: \r\n size == Size.Large ? Size.Large : Size.Medium}\r\n {...rest}>\r\n {buttonText}\r\n </Button>\r\n }\r\n }\r\n}\r\n"],"mappings":";;;;;;;;AAQA,SAAQA,MAAM,EAAEC,UAAU,QAAO,WAAW;AAC5C,SAAQC,YAAY,QAAO,YAAY;AACvC,SAAQC,cAAc,QAAO,aAAa;AAC1C,OAAOC,KAAK,MAAM,OAAO;AACzB,OAAOC,MAAM,MAAM,mBAAmB;AACtC,SACEC,MAAM,EAAEC,iBAAiB,EACzBC,iBAAiB,EACjBC,iBAAiB,EACjBC,kBAAkB,EAClBC,kBAAkB,EAClBC,mBAAmB,QACd,WAAW;AAClB,SAAQC,SAAS,QAAO,cAAc;AACtC,SAAQC,IAAI,QAAO,UAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAG9B,OAAO,MAAMC,YAAY,GAAGd,MAAM,CAACe,GAAG,CAAAC,eA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AAA0C,SAAA;QACzD,oBAAOjE,IAAA,CAACmB,oBAAoB;UAACqC,SAAS,EAAEhC,IAAK;UAAAc,QAAA,eAC3CpC,KAAA,CAACL,SAAS,EAAAqE,aAAA,CAAAA,aAAA,KAAKH,IAAI;YAAAzB,QAAA,gBACjBtC,IAAA,CAACiB,iBAAiB;cAAAqB,QAAA,EAAEuB;YAAQ,CAAoB,CAAC,EAE/CC,QAAQ,iBACR9D,IAAA,CAACe,iBAAiB;cAAAuB,QAAA,eACflD,KAAK,CAACsE,YAAY,CAACI,QAAQ,EAAwB;gBAACtC,IAAI,EAAEA,IAAI,KAAK1B,IAAI,CAAC6D,KAAK,GAAG,MAAM,GAAG;cAAM,CAAC;YAAC,CACjF,CAAC;UAAA,EAEb;QAAC,GATqClC,GAU7B,CAAC;MACzB;IACA,KAAK,QAAQ;MAAE;QACb,MAAM;YAAC0C,UAAU;YAAEtC;UAAsB,CAAC,GAAGN,IAAI;UAAZwC,IAAI,GAAAC,wBAAA,CAAIzC,IAAI,EAAA6C,UAAA;QACjD,oBAAOpE,IAAA,CAAChB,MAAM,EAAAkF,aAAA,CAAAA,aAAA;UACC1C,IAAI,EAAE,CAAC1B,IAAI,CAACuE,MAAM,EAAEvE,IAAI,CAACuE,MAAM,EAAEvE,IAAI,CAACwE,OAAO,CAAC,CAACC,QAAQ,CAAC/C,IAAI,CAAC,GAAG1B,IAAI,CAAC0E,KAAK,GACzEhD,IAAI,IAAI1B,IAAI,CAAC6D,KAAK,GAAG7D,IAAI,CAAC6D,KAAK,GAAG7D,IAAI,CAAC2E;QAAO,GAC3CV,IAAI;UAAAzB,QAAA,EACpB6B;QAAU,IAJO1C,GAKZ,CAAC;MACX;EACF;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"TileCommonItems.js","names":["Button","IconButton","ToggleButton","DropdownButton","React","styled","COLORS","ComponentLStyling","ComponentMStyling","ComponentSStyling","ComponentTextStyle","ComponentXSStyling","ComponentXXSStyling","HyperLink","Size","jsx","_jsx","jsxs","_jsxs","TileNoteText","div","_templateObject","_taggedTemplateLiteral","TileNoteIcon","_templateObject2","TileNoteWrapper","_templateObject3","props","getColor","theme","Regular","TileHyperLinkIcon","_templateObject4","TileHyperLinkText","_templateObject5","TileHyperLinkWrapper","_templateObject6","Bold","RenderTileItem","item","size","key","arguments","length","undefined","componentType","_item$variant","_item$shape","variant","useTransparentBackground","shape","action","tooltip","disabled","children","icon","active","onChange","defaultState","activeState","type","items","itemsType","onClick","value","actionIcon","actionLabel","actionVariant","actionLoading","multiSelect","scrollable","pinTopItem","maxHeight","label","keepLabel","className","noteIcon","cloneElement","Large","noteText","linkText","linkIcon","rest","_objectWithoutProperties","_excluded","_objectSpread","buttonText","_excluded2","XSmall","XXSmall","includes","Small","Medium"],"sources":["../../src/Tile/TileCommonItems.tsx"],"sourcesContent":["import {\r\n TileDropdownButton,\r\n TileHyperLink,\r\n TileIconButton,\r\n TileNote,\r\n TileStandardButton, TileTextDropdownButton,\r\n TileToggleButton\r\n} from './TileTypes';\r\nimport {Button, IconButton} from '../Button';\r\nimport {ToggleButton} from '../Toggles';\r\nimport {DropdownButton} from '../Dropdown';\r\nimport React from 'react';\r\nimport styled from 'styled-components';\r\nimport {\r\n COLORS, ComponentLStyling,\r\n ComponentMStyling,\r\n ComponentSStyling,\r\n ComponentTextStyle,\r\n ComponentXSStyling,\r\n ComponentXXSStyling\r\n} from '../styles';\r\nimport {HyperLink} from '../HyperLink';\r\nimport {Size} from '../types';\r\n\r\n\r\nexport const TileNoteText = styled.div``;\r\nexport const TileNoteIcon = styled.div`display: flex;`;\r\nexport const TileNoteWrapper = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n color: ${props => COLORS.getColor('neutral_600', props.theme)};\r\n\r\n &.small {\r\n gap: 4px;\r\n\r\n ${TileNoteIcon} {\r\n width: 16px;\r\n height: 16px;\r\n }\r\n\r\n ${TileNoteText} {\r\n ${ComponentXXSStyling(ComponentTextStyle.Regular, null)}\r\n }\r\n }\r\n\r\n &.medium {\r\n gap: 6px;\r\n\r\n ${TileNoteIcon} {\r\n width: 16px;\r\n height: 16px;\r\n }\r\n\r\n ${TileNoteText} {\r\n ${ComponentXSStyling(ComponentTextStyle.Regular, null)}\r\n }\r\n\r\n }\r\n\r\n &.large {\r\n gap: 8px;\r\n\r\n ${TileNoteIcon} {\r\n width: 20px;\r\n height: 20px;\r\n }\r\n\r\n ${TileNoteText} {\r\n ${ComponentSStyling(ComponentTextStyle.Regular, null)}\r\n }\r\n }\r\n`;\r\n\r\n\r\nexport const TileHyperLinkIcon = styled.div`display: flex`;\r\nexport const TileHyperLinkText = styled.div``;\r\n\r\nexport const TileHyperLinkWrapper = styled.div`\r\n width: max-content;\r\n\r\n ${props => ComponentSStyling(ComponentTextStyle.Bold, COLORS.getColor('primary_500', props.theme))}\r\n a {\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n gap: 4px;\r\n }\r\n\r\n &.small {\r\n ${TileHyperLinkIcon} {\r\n width: 24px;\r\n height: 24px;\r\n }\r\n\r\n ${TileHyperLinkText} {\r\n ${ComponentSStyling(ComponentTextStyle.Bold, null)}\r\n }\r\n\r\n a {\r\n gap: 4px;\r\n }\r\n }\r\n\r\n &.medium {\r\n ${TileHyperLinkIcon} {\r\n width: 24px;\r\n height: 24px;\r\n }\r\n\r\n ${TileHyperLinkText} {\r\n ${ComponentMStyling(ComponentTextStyle.Bold, null)}\r\n }\r\n\r\n a {\r\n gap: 6px;\r\n }\r\n }\r\n\r\n &.large {\r\n ${TileHyperLinkIcon} {\r\n width: 28px;\r\n height: 28px;\r\n }\r\n\r\n ${TileHyperLinkText} {\r\n ${ComponentLStyling(ComponentTextStyle.Bold, null)}\r\n }\r\n\r\n a {\r\n gap: 8px;\r\n }\r\n }\r\n`\r\n\r\nexport const RenderTileItem = (item: TileIconButton | TileToggleButton | TileDropdownButton | TileTextDropdownButton | TileStandardButton | TileNote | TileHyperLink,\r\n size: Size,\r\n key: any | undefined = undefined) => {\r\n switch (item.componentType) {\r\n case 'icon': {\r\n return <IconButton key={key}\r\n variant={item.variant ?? 'secondary'}\r\n useTransparentBackground={item.variant == 'secondary' ? true : false}\r\n shape={item.shape ?? 'circular'}\r\n action={item.action}\r\n tooltip={item.tooltip}\r\n disabled={item.disabled}>\r\n {item.icon}\r\n </IconButton>\r\n }\r\n case 'toggle': {\r\n return <ToggleButton key={key}\r\n active={item.active}\r\n onChange={item.onChange}\r\n defaultState={item.defaultState}\r\n activeState={item.activeState}\r\n disabled={item.disabled}/>\r\n }\r\n case 'dropdown': {\r\n return <DropdownButton key={key}\r\n type={'icon'}\r\n items={item.items}\r\n itemsType={item.itemsType}\r\n onClick={item.onClick}\r\n value={item.value}\r\n icon={item.icon}\r\n tooltip={item.tooltip}\r\n action={item.action}\r\n actionIcon={item.actionIcon}\r\n actionLabel={item.actionLabel}\r\n actionVariant={item.actionVariant}\r\n actionLoading={item.actionLoading}\r\n multiSelect={item.multiSelect}\r\n scrollable={item.scrollable}\r\n pinTopItem={item.pinTopItem}\r\n maxHeight={item.maxHeight}\r\n disabled={item.disabled}/>\r\n\r\n }\r\n case 'text-dropdown': {\r\n return <DropdownButton key={key}\r\n type={'text'}\r\n items={item.items}\r\n itemsType={item.itemsType}\r\n onClick={item.onClick}\r\n value={item.value}\r\n label={item.label}\r\n keepLabel={item.keepLabel}\r\n action={item.action}\r\n actionIcon={item.actionIcon}\r\n actionLabel={item.actionLabel}\r\n actionVariant={item.actionVariant}\r\n actionLoading={item.actionLoading}\r\n multiSelect={item.multiSelect}\r\n scrollable={item.scrollable}\r\n pinTopItem={item.pinTopItem}\r\n maxHeight={item.maxHeight}\r\n disabled={item.disabled}/>\r\n\r\n }\r\n case 'note': {\r\n return <TileNoteWrapper key={key} className={size}>\r\n {\r\n item.noteIcon &&\r\n <TileNoteIcon>\r\n {React.cloneElement(item.noteIcon as React.ReactElement, {size: size === Size.Large ? '20px' : '16'})}\r\n </TileNoteIcon>\r\n }\r\n <TileNoteText>{item.noteText}</TileNoteText>\r\n </TileNoteWrapper>\r\n\r\n }\r\n case 'link': {\r\n const {linkText, componentType, linkIcon, ...rest} = item;\r\n return <TileHyperLinkWrapper className={size} key={key}>\r\n <HyperLink {...rest}>\r\n <TileHyperLinkText>{linkText}</TileHyperLinkText>\r\n {\r\n linkIcon &&\r\n <TileHyperLinkIcon>\r\n {React.cloneElement(linkIcon as React.ReactElement, {size: size === Size.Large ? '28px' : '24px'})}\r\n </TileHyperLinkIcon>\r\n }\r\n </HyperLink>\r\n </TileHyperLinkWrapper>\r\n }\r\n case 'button': {\r\n const {buttonText, componentType, ...rest} = item;\r\n return <Button key={key}\r\n size={[Size.XSmall, Size.XSmall, Size.XXSmall].includes(size) ? Size.Small: \r\n size == Size.Large ? Size.Large : Size.Medium}\r\n {...rest}>\r\n {buttonText}\r\n </Button>\r\n }\r\n }\r\n}\r\n"],"mappings":";;;;;;;;AAQA,SAAQA,MAAM,EAAEC,UAAU,QAAO,WAAW;AAC5C,SAAQC,YAAY,QAAO,YAAY;AACvC,SAAQC,cAAc,QAAO,aAAa;AAC1C,OAAOC,KAAK,MAAM,OAAO;AACzB,OAAOC,MAAM,MAAM,mBAAmB;AACtC,SACEC,MAAM,EAAEC,iBAAiB,EACzBC,iBAAiB,EACjBC,iBAAiB,EACjBC,kBAAkB,EAClBC,kBAAkB,EAClBC,mBAAmB,QACd,WAAW;AAClB,SAAQC,SAAS,QAAO,cAAc;AACtC,SAAQC,IAAI,QAAO,UAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAG9B,OAAO,MAAMC,YAAY,GAAGd,MAAM,CAACe,GAAG,CAAAC,eAAA,KAAAA,eAAA,GAAAC,sBAAA,QAAE;AACxC,OAAO,MAAMC,YAAY,GAAGlB,MAAM,CAACe,GAAG,CAAAI,gBAAA,KAAAA,gBAAA,GAAAF,sBAAA,sBAAgB;AACtD,OAAO,MAAMG,eAAe,GAAGpB,MAAM,CAAC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2C,IAAI,GAAAC,wBAAA,CAAI5C,IAAI,EAAAgD,UAAA;QACjD,oBAAOvE,IAAA,CAAChB,MAAM,EAAAqF,aAAA,CAAAA,aAAA;UACC7C,IAAI,EAAE,CAAC1B,IAAI,CAAC0E,MAAM,EAAE1E,IAAI,CAAC0E,MAAM,EAAE1E,IAAI,CAAC2E,OAAO,CAAC,CAACC,QAAQ,CAAClD,IAAI,CAAC,GAAG1B,IAAI,CAAC6E,KAAK,GACzEnD,IAAI,IAAI1B,IAAI,CAACgE,KAAK,GAAGhE,IAAI,CAACgE,KAAK,GAAGhE,IAAI,CAAC8E;QAAO,GAC3CV,IAAI;UAAA5B,QAAA,EACpBgC;QAAU,IAJO7C,GAKZ,CAAC;MACX;EACF;AACF,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"TileTypes.cjs","names":[],"sources":["../../src/Tile/TileTypes.ts"],"sourcesContent":["import React from 'react';\r\nimport {IconButtonProps} from '../Button/Iconbutton';\r\nimport {ToggleButtonProps} from '../Toggles/ToggleButton';\r\nimport {DropdownButtonProps} from '../Dropdown/DropdownButtonTypes';\r\nimport {ButtonProps} from '../Button/Button';\r\nimport {HyperlinkProps} from '../HyperLink/HyperLink';\r\nimport {Size} from '../types';\r\nimport {TooltipProps} from \"../Tooltips/TooltipTypes\";\r\nimport {TagProps} from \"../Tag\";\r\n\r\n\r\nexport type TileIconButton = Pick<IconButtonProps, 'action' | 'disabled' | 'tooltip' | 'variant' | 'shape'> & {\r\n componentType: 'icon';\r\n icon: React.ReactNode;\r\n}\r\n\r\nexport type TileToggleButton =\r\n Pick<ToggleButtonProps, 'active' | 'onChange' | 'disabled' | 'defaultState' | 'activeState'>\r\n & { componentType: 'toggle'; }\r\n\r\nexport type TileDropdownButton =\r\n Pick<DropdownButtonProps, 'items' | 'onClick' | 'disabled' | 'itemsType' | 'action' | 'actionIcon' | 'actionLabel' | 'actionLoading' | 'actionVariant' | 'multiSelect' | 'scrollable' | 'pinTopItem' | 'maxHeight'>\r\n & {\r\n componentType: 'dropdown';\r\n icon: React.ReactNode;\r\n tooltip?: TooltipProps;\r\n}\r\n\r\nexport type TileStandardButton = Pick<ButtonProps, 'width' | 'variant' | 'loading' | 'icon' | 'onClick' | 'disabled'> & {\r\n componentType: 'button';\r\n buttonText: string;\r\n}\r\n\r\nexport type TileNote = {\r\n componentType: 'note';\r\n noteIcon?: React.ReactNode;\r\n noteText: string;\r\n}\r\n\r\n\r\nexport type TileHyperLink = HyperlinkProps & {\r\n componentType: 'link';\r\n linkIcon?: React.ReactNode;\r\n linkText: string;\r\n}\r\n\r\nexport type FooterButtons = TileIconButton | TileToggleButton | TileDropdownButton | TileStandardButton;\r\nexport type HeaderButtons = TileIconButton | TileToggleButton | TileDropdownButton | TileStandardButton;\r\n\r\nexport interface TileHeaderProps {\r\n title: string;\r\n tag?: TagProps;\r\n tooltip?: string;\r\n subtitle?: string;\r\n subtitleIcon?: React.ReactNode;\r\n\r\n buttons?: HeaderButtons[];\r\n}\r\n\r\nexport interface TileFooterProps {\r\n leftItem?: TileNote | TileHyperLink | TileStandardButton;\r\n buttons?: FooterButtons[];\r\n}\r\n\r\n\r\nexport interface TileProps extends React.HTMLAttributes<HTMLDivElement>{\r\n style?: {\r\n width?: string,\r\n minWidth?: string,\r\n maxWidth?: string,\r\n height?: string,\r\n minHeight?: string,\r\n maxHeight?: string,\r\n };\r\n\r\n size?: Size.Small | Size.Medium | Size.Large\r\n\r\n header?: TileHeaderProps;\r\n footer?: TileFooterProps;\r\n}\r\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"TileTypes.cjs","names":[],"sources":["../../src/Tile/TileTypes.ts"],"sourcesContent":["import React from 'react';\r\nimport {IconButtonProps} from '../Button/Iconbutton';\r\nimport {ToggleButtonProps} from '../Toggles/ToggleButton';\r\nimport {DropdownButtonProps, TextDropdownButtonProps} from '../Dropdown/DropdownButtonTypes';\r\nimport {ButtonProps} from '../Button/Button';\r\nimport {HyperlinkProps} from '../HyperLink/HyperLink';\r\nimport {Size} from '../types';\r\nimport {TooltipProps} from \"../Tooltips/TooltipTypes\";\r\nimport {TagProps} from \"../Tag\";\r\n\r\n\r\nexport type TileIconButton = Pick<IconButtonProps, 'action' | 'disabled' | 'tooltip' | 'variant' | 'shape'> & {\r\n componentType: 'icon';\r\n icon: React.ReactNode;\r\n}\r\n\r\nexport type TileToggleButton =\r\n Pick<ToggleButtonProps, 'active' | 'onChange' | 'disabled' | 'defaultState' | 'activeState'>\r\n & { componentType: 'toggle'; }\r\n\r\nexport type TileDropdownButton =\r\n Pick<DropdownButtonProps, 'items' | 'value' | 'onClick' | 'disabled' | 'itemsType' | 'action' | 'actionIcon' | 'actionLabel' | 'actionLoading' | 'actionVariant' | 'multiSelect' | 'scrollable' | 'pinTopItem' | 'maxHeight'>\r\n & {\r\n componentType: 'dropdown';\r\n icon: React.ReactNode;\r\n tooltip?: TooltipProps;\r\n}\r\n\r\nexport type TileTextDropdownButton =\r\n Pick<TextDropdownButtonProps, 'value' | 'label' | 'keepLabel' | 'items' | 'onClick' | 'disabled' | 'itemsType' | 'action' | 'actionIcon' | 'actionLabel' | 'actionLoading' | 'actionVariant' | 'multiSelect' | 'scrollable' | 'pinTopItem' | 'maxHeight'>\r\n & {\r\n componentType: 'text-dropdown';\r\n}\r\n\r\nexport type TileStandardButton = Pick<ButtonProps, 'width' | 'variant' | 'loading' | 'icon' | 'onClick' | 'disabled'> & {\r\n componentType: 'button';\r\n buttonText: string;\r\n}\r\n\r\nexport type TileNote = {\r\n componentType: 'note';\r\n noteIcon?: React.ReactNode;\r\n noteText: string;\r\n}\r\n\r\n\r\nexport type TileHyperLink = HyperlinkProps & {\r\n componentType: 'link';\r\n linkIcon?: React.ReactNode;\r\n linkText: string;\r\n}\r\n\r\nexport type FooterButtons = TileIconButton | TileToggleButton | TileDropdownButton | TileStandardButton | TileTextDropdownButton;\r\nexport type HeaderButtons = TileIconButton | TileToggleButton | TileDropdownButton | TileStandardButton | TileTextDropdownButton;\r\n\r\nexport interface TileHeaderProps {\r\n title: string;\r\n tag?: TagProps;\r\n tooltip?: string;\r\n subtitle?: string;\r\n subtitleIcon?: React.ReactNode;\r\n\r\n buttons?: HeaderButtons[];\r\n}\r\n\r\nexport interface TileFooterProps {\r\n leftItem?: TileNote | TileHyperLink | TileStandardButton;\r\n buttons?: FooterButtons[];\r\n}\r\n\r\n\r\nexport interface TileProps extends React.HTMLAttributes<HTMLDivElement>{\r\n style?: {\r\n width?: string,\r\n minWidth?: string,\r\n maxWidth?: string,\r\n height?: string,\r\n minHeight?: string,\r\n maxHeight?: string,\r\n };\r\n\r\n size?: Size.Small | Size.Medium | Size.Large\r\n\r\n header?: TileHeaderProps;\r\n footer?: TileFooterProps;\r\n}\r\n"],"mappings":"","ignoreList":[]}
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { IconButtonProps } from '../Button/Iconbutton';
3
3
  import { ToggleButtonProps } from '../Toggles/ToggleButton';
4
- import { DropdownButtonProps } from '../Dropdown/DropdownButtonTypes';
4
+ import { DropdownButtonProps, TextDropdownButtonProps } from '../Dropdown/DropdownButtonTypes';
5
5
  import { ButtonProps } from '../Button/Button';
6
6
  import { HyperlinkProps } from '../HyperLink/HyperLink';
7
7
  import { Size } from '../types';
@@ -14,11 +14,14 @@ export type TileIconButton = Pick<IconButtonProps, 'action' | 'disabled' | 'tool
14
14
  export type TileToggleButton = Pick<ToggleButtonProps, 'active' | 'onChange' | 'disabled' | 'defaultState' | 'activeState'> & {
15
15
  componentType: 'toggle';
16
16
  };
17
- export type TileDropdownButton = Pick<DropdownButtonProps, 'items' | 'onClick' | 'disabled' | 'itemsType' | 'action' | 'actionIcon' | 'actionLabel' | 'actionLoading' | 'actionVariant' | 'multiSelect' | 'scrollable' | 'pinTopItem' | 'maxHeight'> & {
17
+ export type TileDropdownButton = Pick<DropdownButtonProps, 'items' | 'value' | 'onClick' | 'disabled' | 'itemsType' | 'action' | 'actionIcon' | 'actionLabel' | 'actionLoading' | 'actionVariant' | 'multiSelect' | 'scrollable' | 'pinTopItem' | 'maxHeight'> & {
18
18
  componentType: 'dropdown';
19
19
  icon: React.ReactNode;
20
20
  tooltip?: TooltipProps;
21
21
  };
22
+ export type TileTextDropdownButton = Pick<TextDropdownButtonProps, 'value' | 'label' | 'keepLabel' | 'items' | 'onClick' | 'disabled' | 'itemsType' | 'action' | 'actionIcon' | 'actionLabel' | 'actionLoading' | 'actionVariant' | 'multiSelect' | 'scrollable' | 'pinTopItem' | 'maxHeight'> & {
23
+ componentType: 'text-dropdown';
24
+ };
22
25
  export type TileStandardButton = Pick<ButtonProps, 'width' | 'variant' | 'loading' | 'icon' | 'onClick' | 'disabled'> & {
23
26
  componentType: 'button';
24
27
  buttonText: string;
@@ -33,8 +36,8 @@ export type TileHyperLink = HyperlinkProps & {
33
36
  linkIcon?: React.ReactNode;
34
37
  linkText: string;
35
38
  };
36
- export type FooterButtons = TileIconButton | TileToggleButton | TileDropdownButton | TileStandardButton;
37
- export type HeaderButtons = TileIconButton | TileToggleButton | TileDropdownButton | TileStandardButton;
39
+ export type FooterButtons = TileIconButton | TileToggleButton | TileDropdownButton | TileStandardButton | TileTextDropdownButton;
40
+ export type HeaderButtons = TileIconButton | TileToggleButton | TileDropdownButton | TileStandardButton | TileTextDropdownButton;
38
41
  export interface TileHeaderProps {
39
42
  title: string;
40
43
  tag?: TagProps;
@@ -1 +1 @@
1
- {"version":3,"file":"TileTypes.js","names":[],"sources":["../../src/Tile/TileTypes.ts"],"sourcesContent":["import React from 'react';\r\nimport {IconButtonProps} from '../Button/Iconbutton';\r\nimport {ToggleButtonProps} from '../Toggles/ToggleButton';\r\nimport {DropdownButtonProps} from '../Dropdown/DropdownButtonTypes';\r\nimport {ButtonProps} from '../Button/Button';\r\nimport {HyperlinkProps} from '../HyperLink/HyperLink';\r\nimport {Size} from '../types';\r\nimport {TooltipProps} from \"../Tooltips/TooltipTypes\";\r\nimport {TagProps} from \"../Tag\";\r\n\r\n\r\nexport type TileIconButton = Pick<IconButtonProps, 'action' | 'disabled' | 'tooltip' | 'variant' | 'shape'> & {\r\n componentType: 'icon';\r\n icon: React.ReactNode;\r\n}\r\n\r\nexport type TileToggleButton =\r\n Pick<ToggleButtonProps, 'active' | 'onChange' | 'disabled' | 'defaultState' | 'activeState'>\r\n & { componentType: 'toggle'; }\r\n\r\nexport type TileDropdownButton =\r\n Pick<DropdownButtonProps, 'items' | 'onClick' | 'disabled' | 'itemsType' | 'action' | 'actionIcon' | 'actionLabel' | 'actionLoading' | 'actionVariant' | 'multiSelect' | 'scrollable' | 'pinTopItem' | 'maxHeight'>\r\n & {\r\n componentType: 'dropdown';\r\n icon: React.ReactNode;\r\n tooltip?: TooltipProps;\r\n}\r\n\r\nexport type TileStandardButton = Pick<ButtonProps, 'width' | 'variant' | 'loading' | 'icon' | 'onClick' | 'disabled'> & {\r\n componentType: 'button';\r\n buttonText: string;\r\n}\r\n\r\nexport type TileNote = {\r\n componentType: 'note';\r\n noteIcon?: React.ReactNode;\r\n noteText: string;\r\n}\r\n\r\n\r\nexport type TileHyperLink = HyperlinkProps & {\r\n componentType: 'link';\r\n linkIcon?: React.ReactNode;\r\n linkText: string;\r\n}\r\n\r\nexport type FooterButtons = TileIconButton | TileToggleButton | TileDropdownButton | TileStandardButton;\r\nexport type HeaderButtons = TileIconButton | TileToggleButton | TileDropdownButton | TileStandardButton;\r\n\r\nexport interface TileHeaderProps {\r\n title: string;\r\n tag?: TagProps;\r\n tooltip?: string;\r\n subtitle?: string;\r\n subtitleIcon?: React.ReactNode;\r\n\r\n buttons?: HeaderButtons[];\r\n}\r\n\r\nexport interface TileFooterProps {\r\n leftItem?: TileNote | TileHyperLink | TileStandardButton;\r\n buttons?: FooterButtons[];\r\n}\r\n\r\n\r\nexport interface TileProps extends React.HTMLAttributes<HTMLDivElement>{\r\n style?: {\r\n width?: string,\r\n minWidth?: string,\r\n maxWidth?: string,\r\n height?: string,\r\n minHeight?: string,\r\n maxHeight?: string,\r\n };\r\n\r\n size?: Size.Small | Size.Medium | Size.Large\r\n\r\n header?: TileHeaderProps;\r\n footer?: TileFooterProps;\r\n}\r\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"TileTypes.js","names":[],"sources":["../../src/Tile/TileTypes.ts"],"sourcesContent":["import React from 'react';\r\nimport {IconButtonProps} from '../Button/Iconbutton';\r\nimport {ToggleButtonProps} from '../Toggles/ToggleButton';\r\nimport {DropdownButtonProps, TextDropdownButtonProps} from '../Dropdown/DropdownButtonTypes';\r\nimport {ButtonProps} from '../Button/Button';\r\nimport {HyperlinkProps} from '../HyperLink/HyperLink';\r\nimport {Size} from '../types';\r\nimport {TooltipProps} from \"../Tooltips/TooltipTypes\";\r\nimport {TagProps} from \"../Tag\";\r\n\r\n\r\nexport type TileIconButton = Pick<IconButtonProps, 'action' | 'disabled' | 'tooltip' | 'variant' | 'shape'> & {\r\n componentType: 'icon';\r\n icon: React.ReactNode;\r\n}\r\n\r\nexport type TileToggleButton =\r\n Pick<ToggleButtonProps, 'active' | 'onChange' | 'disabled' | 'defaultState' | 'activeState'>\r\n & { componentType: 'toggle'; }\r\n\r\nexport type TileDropdownButton =\r\n Pick<DropdownButtonProps, 'items' | 'value' | 'onClick' | 'disabled' | 'itemsType' | 'action' | 'actionIcon' | 'actionLabel' | 'actionLoading' | 'actionVariant' | 'multiSelect' | 'scrollable' | 'pinTopItem' | 'maxHeight'>\r\n & {\r\n componentType: 'dropdown';\r\n icon: React.ReactNode;\r\n tooltip?: TooltipProps;\r\n}\r\n\r\nexport type TileTextDropdownButton =\r\n Pick<TextDropdownButtonProps, 'value' | 'label' | 'keepLabel' | 'items' | 'onClick' | 'disabled' | 'itemsType' | 'action' | 'actionIcon' | 'actionLabel' | 'actionLoading' | 'actionVariant' | 'multiSelect' | 'scrollable' | 'pinTopItem' | 'maxHeight'>\r\n & {\r\n componentType: 'text-dropdown';\r\n}\r\n\r\nexport type TileStandardButton = Pick<ButtonProps, 'width' | 'variant' | 'loading' | 'icon' | 'onClick' | 'disabled'> & {\r\n componentType: 'button';\r\n buttonText: string;\r\n}\r\n\r\nexport type TileNote = {\r\n componentType: 'note';\r\n noteIcon?: React.ReactNode;\r\n noteText: string;\r\n}\r\n\r\n\r\nexport type TileHyperLink = HyperlinkProps & {\r\n componentType: 'link';\r\n linkIcon?: React.ReactNode;\r\n linkText: string;\r\n}\r\n\r\nexport type FooterButtons = TileIconButton | TileToggleButton | TileDropdownButton | TileStandardButton | TileTextDropdownButton;\r\nexport type HeaderButtons = TileIconButton | TileToggleButton | TileDropdownButton | TileStandardButton | TileTextDropdownButton;\r\n\r\nexport interface TileHeaderProps {\r\n title: string;\r\n tag?: TagProps;\r\n tooltip?: string;\r\n subtitle?: string;\r\n subtitleIcon?: React.ReactNode;\r\n\r\n buttons?: HeaderButtons[];\r\n}\r\n\r\nexport interface TileFooterProps {\r\n leftItem?: TileNote | TileHyperLink | TileStandardButton;\r\n buttons?: FooterButtons[];\r\n}\r\n\r\n\r\nexport interface TileProps extends React.HTMLAttributes<HTMLDivElement>{\r\n style?: {\r\n width?: string,\r\n minWidth?: string,\r\n maxWidth?: string,\r\n height?: string,\r\n minHeight?: string,\r\n maxHeight?: string,\r\n };\r\n\r\n size?: Size.Small | Size.Medium | Size.Large\r\n\r\n header?: TileHeaderProps;\r\n footer?: TileFooterProps;\r\n}\r\n"],"mappings":"","ignoreList":[]}
package/package.json CHANGED
@@ -1,148 +1,145 @@
1
1
  {
2
- "name": "@laerdal/life-react-components",
3
- "version": "5.0.8-dev.2.full",
4
- "private": false,
5
- "author": "Erik Martirosyan \u003cerik.martirosyan@laerdal.com\u003e",
6
- "contributors": [
7
-
8
- ],
9
- "description": "Laerdal LIFE component library for React.",
10
- "keywords": [
11
-
12
- ],
13
- "license": "UNLICENSED",
14
- "repository": {
15
- "type": "git",
16
- "url": "https://github.com/Laerdal-Medical/dcs-life-react-js"
17
- },
18
- "main": "dist/index.cjs",
19
- "module": "dist/index.js",
20
- "types": "dist/index.d.ts",
21
- "exports": {
22
- ".": {
23
- "require": "./dist/index.cjs",
24
- "import": "./dist/index.js",
25
- "types": "./dist/index.d.ts"
26
- }
27
- },
28
- "sideEffects": false,
29
- "files": [
30
- "dist"
31
- ],
32
- "scripts": {
33
- "bump": "yarn version --patch",
34
- "build": "yarn build:babel:esm \u0026\u0026 yarn build:babel:cjs \u0026\u0026 tsc --emitDeclarationOnly --declaration --declarationDir dist \u0026\u0026 node scripts/copyTS.cjs",
35
- "build:babel:esm": "cross-env BABEL_ENV=esm babel --source-maps --extensions \".js,.ts,.tsx\" src --out-dir dist --out-file-extension .js",
36
- "build:babel:cjs": "cross-env BABEL_ENV=cjs babel --source-maps --extensions \".js,.ts,.tsx\" src --out-dir dist --out-file-extension .cjs",
37
- "clean": "rimraf dist",
38
- "develop": "yarn build:babel:esm --skip-initial-build --watch --verbose",
39
- "test": "jest src/",
40
- "test:coverage": "jest --collectCoverage src/",
41
- "test-watch": "jest --watch",
42
- "storybook": "storybook dev -p 6006",
43
- "build-storybook": "storybook build"
44
- },
45
- "eslintConfig": {
46
- "extends": [
47
- "react-app",
48
- "plugin:storybook/recommended"
49
- ]
50
- },
51
- "browserslist": {
52
- "production": [
53
- "\u003e0.2%",
54
- "not dead",
55
- "not op_mini all"
56
- ],
57
- "development": [
58
- "last 1 chrome version",
59
- "last 1 firefox version",
60
- "last 1 safari version"
61
- ]
62
- },
63
- "omlet": {
64
- "exports": {
65
- ".": "src/index.ts"
66
- }
67
- },
68
- "dependencies": {
69
- "@babel/runtime": "^7.19.0",
70
- "@laerdal/figma-svg": "^5.2.2",
71
- "@types/node": "^18.0.6",
72
- "animated-scroll-to": "^2.3.0",
73
- "dayjs": "^1.11.5",
74
- "nanoid": "3.3.4",
75
- "react": "^18.2.0",
76
- "react-datepicker": "^4.11.0",
77
- "react-dom": "^18.2.0",
78
- "react-inlinesvg": "^3.0.0",
79
- "react-modal": "^3.15.1",
80
- "react-quill": "^2.0.0",
81
- "react-resize-detector": "^7.1.2",
82
- "rooks": "^7.1.1",
83
- "styled-components": "^6.1.13",
84
- "typescript": "^4.8.2"
85
- },
86
- "devDependencies": {
87
- "@babel/cli": "^7.18.10",
88
- "@babel/plugin-proposal-class-properties": "^7.18.6",
89
- "@babel/plugin-proposal-export-default-from": "^7.18.10",
90
- "@babel/plugin-proposal-numeric-separator": "^7.18.6",
91
- "@babel/plugin-proposal-object-rest-spread": "^7.18.9",
92
- "@babel/plugin-transform-runtime": "^7.18.10",
93
- "@babel/preset-env": "^7.19.0",
94
- "@babel/preset-react": "^7.18.6",
95
- "@babel/preset-typescript": "^7.18.6",
96
- "@babel/runtime": "^7.19.0",
97
- "@chromatic-com/storybook": "1.4.0",
98
- "@laerdal/navigation": "^3.2.0",
99
- "@storybook/addon-essentials": "^8.1.3",
100
- "@storybook/addon-interactions": "^8.1.3",
101
- "@storybook/addon-links": "^8.1.3",
102
- "@storybook/addon-onboarding": "^8.1.3",
103
- "@storybook/addon-webpack5-compiler-swc": "1.0.2",
104
- "@storybook/addons": "^7.6.17",
105
- "@storybook/blocks": "^8.1.3",
106
- "@storybook/react": "^8.1.3",
107
- "@storybook/react-webpack5": "^8.1.3",
108
- "@storybook/test": "^8.1.3",
109
- "@testing-library/dom": "^10.4.0",
110
- "@testing-library/jest-dom": "^6.5.0",
111
- "@testing-library/react": "^16.0.1",
112
- "@testing-library/user-event": "^14.5.2",
113
- "@types/jest": "^29.5.12",
114
- "@types/node": "^18.0.6",
115
- "@types/react": "^18.3.3",
116
- "@types/react-datepicker": "^4.4.2",
117
- "@types/react-dom": "^18.3.0",
118
- "@types/react-modal": "^3.13.1",
119
- "@types/react-router-dom": "^5.3.3",
120
- "babel-plugin-inline-react-svg": "^2.0.1",
121
- "babel-plugin-typescript-to-proptypes": "^2.0.0",
122
- "concurrently": "^5.2.0",
123
- "cross-env": "^7.0.3",
124
- "eslint-plugin-storybook": "^0.8.0",
125
- "history": "^5.3.0",
126
- "jest": "^29.7.0",
127
- "jest-environment-jsdom": "^29.7.0",
128
- "jest-styled-components": "^7.2.0",
129
- "jest-svg-transformer": "^1.0.0",
130
- "react-router": "^6.3.0",
131
- "react-router-dom": "^6.3.0",
132
- "react-share": "^5.1.0",
133
- "regenerator-runtime": "^0.13.9",
134
- "storybook": "^8.1.3",
135
- "ts-jest": "^29.2.5"
136
- },
137
- "peerDependencies": {
138
- "@babel/core": "^7.0.0",
139
- "react": "^18",
140
- "react-dom": "^18",
141
- "react-router-dom": "^6"
142
- },
143
- "resolutions": {
144
- "nwsapi": "2.2.9",
145
- "date-fns": "2.24.0",
146
- "@types/react": "18.3.3"
147
- }
2
+ "name": "@laerdal/life-react-components",
3
+ "version": "5.0.8-dev.3",
4
+ "private": false,
5
+ "author": "Erik Martirosyan <erik.martirosyan@laerdal.com>",
6
+ "contributors": [],
7
+ "description": "Laerdal LIFE component library for React.",
8
+ "keywords": [],
9
+ "license": "UNLICENSED",
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "https://github.com/Laerdal-Medical/dcs-life-react-js"
13
+ },
14
+ "main": "dist/index.cjs",
15
+ "module": "dist/index.js",
16
+ "types": "dist/index.d.ts",
17
+ "exports": {
18
+ ".": {
19
+ "require": "./dist/index.cjs",
20
+ "import": "./dist/index.js",
21
+ "types": "./dist/index.d.ts"
22
+ }
23
+ },
24
+ "sideEffects": false,
25
+ "files": [
26
+ "dist"
27
+ ],
28
+ "scripts": {
29
+ "bump": "yarn version --patch",
30
+ "build": "yarn build:babel:esm && yarn build:babel:cjs && tsc --emitDeclarationOnly --declaration --declarationDir dist && node scripts/copyTS.cjs",
31
+ "build:babel:esm": "cross-env BABEL_ENV=esm babel --source-maps --extensions \".js,.ts,.tsx\" src --out-dir dist --out-file-extension .js",
32
+ "build:babel:cjs": "cross-env BABEL_ENV=cjs babel --source-maps --extensions \".js,.ts,.tsx\" src --out-dir dist --out-file-extension .cjs",
33
+ "clean": "rimraf dist",
34
+ "develop": "yarn build:babel:esm --skip-initial-build --watch --verbose",
35
+ "test": "jest src/",
36
+ "test:coverage": "jest --collectCoverage src/",
37
+ "test-watch": "jest --watch",
38
+ "storybook": "storybook dev -p 6006",
39
+ "build-storybook": "storybook build"
40
+ },
41
+ "eslintConfig": {
42
+ "extends": [
43
+ "react-app",
44
+ "plugin:storybook/recommended"
45
+ ]
46
+ },
47
+ "browserslist": {
48
+ "production": [
49
+ ">0.2%",
50
+ "not dead",
51
+ "not op_mini all"
52
+ ],
53
+ "development": [
54
+ "last 1 chrome version",
55
+ "last 1 firefox version",
56
+ "last 1 safari version"
57
+ ]
58
+ },
59
+ "omlet": {
60
+ "exports": {
61
+ ".": "src/index.ts"
62
+ }
63
+ },
64
+ "dependencies": {
65
+ "@babel/runtime": "^7.19.0",
66
+ "@laerdal/figma-svg": "^5.2.2",
67
+ "@types/node": "^18.0.6",
68
+ "animated-scroll-to": "^2.3.0",
69
+ "dayjs": "^1.11.5",
70
+ "nanoid": "3.3.4",
71
+ "react": "^18.2.0",
72
+ "react-datepicker": "^4.11.0",
73
+ "react-dom": "^18.2.0",
74
+ "react-inlinesvg": "^3.0.0",
75
+ "react-modal": "^3.15.1",
76
+ "react-quill": "^2.0.0",
77
+ "react-resize-detector": "^7.1.2",
78
+ "rooks": "^7.1.1",
79
+ "styled-components": "^6.1.13",
80
+ "typescript": "^4.8.2"
81
+ },
82
+ "devDependencies": {
83
+ "@babel/cli": "^7.18.10",
84
+ "@babel/plugin-proposal-class-properties": "^7.18.6",
85
+ "@babel/plugin-proposal-export-default-from": "^7.18.10",
86
+ "@babel/plugin-proposal-numeric-separator": "^7.18.6",
87
+ "@babel/plugin-proposal-object-rest-spread": "^7.18.9",
88
+ "@babel/plugin-transform-runtime": "^7.18.10",
89
+ "@babel/preset-env": "^7.19.0",
90
+ "@babel/preset-react": "^7.18.6",
91
+ "@babel/preset-typescript": "^7.18.6",
92
+ "@babel/runtime": "^7.19.0",
93
+ "@chromatic-com/storybook": "1.4.0",
94
+ "@laerdal/navigation": "^3.2.0",
95
+ "@storybook/addon-essentials": "^8.1.3",
96
+ "@storybook/addon-interactions": "^8.1.3",
97
+ "@storybook/addon-links": "^8.1.3",
98
+ "@storybook/addon-onboarding": "^8.1.3",
99
+ "@storybook/addon-webpack5-compiler-swc": "1.0.2",
100
+ "@storybook/addons": "^7.6.17",
101
+ "@storybook/blocks": "^8.1.3",
102
+ "@storybook/react": "^8.1.3",
103
+ "@storybook/react-webpack5": "^8.1.3",
104
+ "@storybook/test": "^8.1.3",
105
+ "@testing-library/dom": "^10.4.0",
106
+ "@testing-library/jest-dom": "^6.5.0",
107
+ "@testing-library/react": "^16.0.1",
108
+ "@testing-library/user-event": "^14.5.2",
109
+ "@types/jest": "^29.5.12",
110
+ "@types/node": "^18.0.6",
111
+ "@types/react": "^18.3.3",
112
+ "@types/react-datepicker": "^4.4.2",
113
+ "@types/react-dom": "^18.3.0",
114
+ "@types/react-modal": "^3.13.1",
115
+ "@types/react-router-dom": "^5.3.3",
116
+ "babel-plugin-inline-react-svg": "^2.0.1",
117
+ "babel-plugin-typescript-to-proptypes": "^2.0.0",
118
+ "concurrently": "^5.2.0",
119
+ "cross-env": "^7.0.3",
120
+ "eslint-plugin-storybook": "^0.8.0",
121
+ "history": "^5.3.0",
122
+ "jest": "^29.7.0",
123
+ "jest-environment-jsdom": "^29.7.0",
124
+ "jest-styled-components": "^7.2.0",
125
+ "jest-svg-transformer": "^1.0.0",
126
+ "react-router": "^6.3.0",
127
+ "react-router-dom": "^6.3.0",
128
+ "react-share": "^5.1.0",
129
+ "regenerator-runtime": "^0.13.9",
130
+ "storybook": "^8.1.3",
131
+ "ts-jest": "^29.2.5",
132
+ "@laerdal/life-react-components":"5.0.7"
133
+ },
134
+ "peerDependencies": {
135
+ "@babel/core": "^7.0.0",
136
+ "react": "^18",
137
+ "react-dom": "^18",
138
+ "react-router-dom": "^6"
139
+ },
140
+ "resolutions": {
141
+ "nwsapi":"2.2.9",
142
+ "date-fns": "2.24.0",
143
+ "@types/react": "18.3.3"
144
+ }
148
145
  }