@iobroker/adapter-react-v5 7.6.8 → 7.6.10

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.
Files changed (177) hide show
  1. package/build/Components/DeviceType/DeviceTypeIcon.d.ts +29 -0
  2. package/build/Components/DeviceType/DeviceTypeIcon.js +127 -0
  3. package/build/Components/DeviceType/DeviceTypeIcon.js.map +1 -0
  4. package/build/Components/DeviceType/DeviceTypeOptions.d.ts +2 -0
  5. package/build/Components/DeviceType/DeviceTypeOptions.js +69 -0
  6. package/build/Components/DeviceType/DeviceTypeOptions.js.map +1 -0
  7. package/build/Components/DeviceType/DeviceTypeSelector.d.ts +20 -0
  8. package/build/Components/DeviceType/DeviceTypeSelector.js +102 -0
  9. package/build/Components/DeviceType/DeviceTypeSelector.js.map +1 -0
  10. package/build/Components/DeviceType/i18n/de.json +45 -0
  11. package/build/Components/DeviceType/i18n/en.json +45 -0
  12. package/build/Components/DeviceType/i18n/fr.json +45 -0
  13. package/build/Components/DeviceType/i18n/it.json +45 -0
  14. package/build/Components/DeviceType/i18n/nl.json +45 -0
  15. package/build/Components/DeviceType/i18n/pl.json +45 -0
  16. package/build/Components/DeviceType/i18n/pt.json +45 -0
  17. package/build/Components/DeviceType/i18n/ru.json +45 -0
  18. package/build/Components/DeviceType/i18n/uk.json +45 -0
  19. package/build/Components/DeviceType/i18n/zh-cn.json +45 -0
  20. package/build/Components/DeviceType/icons/Cleaner.d.ts +3 -0
  21. package/build/Components/DeviceType/icons/Cleaner.js +14 -0
  22. package/build/Components/DeviceType/icons/Cleaner.js.map +1 -0
  23. package/build/Components/DeviceType/icons/DoorClosed.d.ts +3 -0
  24. package/build/Components/DeviceType/icons/DoorClosed.js +7 -0
  25. package/build/Components/DeviceType/icons/DoorClosed.js.map +1 -0
  26. package/build/Components/DeviceType/icons/DoorOpened.d.ts +3 -0
  27. package/build/Components/DeviceType/icons/DoorOpened.js +7 -0
  28. package/build/Components/DeviceType/icons/DoorOpened.js.map +1 -0
  29. package/build/Components/DeviceType/icons/FireOff.d.ts +3 -0
  30. package/build/Components/DeviceType/icons/FireOff.js +8 -0
  31. package/build/Components/DeviceType/icons/FireOff.js.map +1 -0
  32. package/build/Components/DeviceType/icons/FireOn.d.ts +3 -0
  33. package/build/Components/DeviceType/icons/FireOn.js +14 -0
  34. package/build/Components/DeviceType/icons/FireOn.js.map +1 -0
  35. package/build/Components/DeviceType/icons/FloodOff.d.ts +3 -0
  36. package/build/Components/DeviceType/icons/FloodOff.js +11 -0
  37. package/build/Components/DeviceType/icons/FloodOff.js.map +1 -0
  38. package/build/Components/DeviceType/icons/FloodOn.d.ts +3 -0
  39. package/build/Components/DeviceType/icons/FloodOn.js +18 -0
  40. package/build/Components/DeviceType/icons/FloodOn.js.map +1 -0
  41. package/build/Components/DeviceType/icons/Gate.d.ts +3 -0
  42. package/build/Components/DeviceType/icons/Gate.js +8 -0
  43. package/build/Components/DeviceType/icons/Gate.js.map +1 -0
  44. package/build/Components/DeviceType/icons/HeatValve.d.ts +3 -0
  45. package/build/Components/DeviceType/icons/HeatValve.js +6 -0
  46. package/build/Components/DeviceType/icons/HeatValve.js.map +1 -0
  47. package/build/Components/DeviceType/icons/Home.d.ts +3 -0
  48. package/build/Components/DeviceType/icons/Home.js +6 -0
  49. package/build/Components/DeviceType/icons/Home.js.map +1 -0
  50. package/build/Components/DeviceType/icons/Humidity.d.ts +3 -0
  51. package/build/Components/DeviceType/icons/Humidity.js +8 -0
  52. package/build/Components/DeviceType/icons/Humidity.js.map +1 -0
  53. package/build/Components/DeviceType/icons/IconHome.d.ts +5 -0
  54. package/build/Components/DeviceType/icons/IconHome.js +21 -0
  55. package/build/Components/DeviceType/icons/IconHome.js.map +1 -0
  56. package/build/Components/DeviceType/icons/Jalousie.d.ts +3 -0
  57. package/build/Components/DeviceType/icons/Jalousie.js +7 -0
  58. package/build/Components/DeviceType/icons/Jalousie.js.map +1 -0
  59. package/build/Components/DeviceType/icons/Material.d.ts +3 -0
  60. package/build/Components/DeviceType/icons/Material.js +8 -0
  61. package/build/Components/DeviceType/icons/Material.js.map +1 -0
  62. package/build/Components/DeviceType/icons/MotionOff.d.ts +3 -0
  63. package/build/Components/DeviceType/icons/MotionOff.js +11 -0
  64. package/build/Components/DeviceType/icons/MotionOff.js.map +1 -0
  65. package/build/Components/DeviceType/icons/MotionOn.d.ts +3 -0
  66. package/build/Components/DeviceType/icons/MotionOn.js +7 -0
  67. package/build/Components/DeviceType/icons/MotionOn.js.map +1 -0
  68. package/build/Components/DeviceType/icons/PushButton.d.ts +3 -0
  69. package/build/Components/DeviceType/icons/PushButton.js +9 -0
  70. package/build/Components/DeviceType/icons/PushButton.js.map +1 -0
  71. package/build/Components/DeviceType/icons/RGB.d.ts +3 -0
  72. package/build/Components/DeviceType/icons/RGB.js +43 -0
  73. package/build/Components/DeviceType/icons/RGB.js.map +1 -0
  74. package/build/Components/DeviceType/icons/RepairExpert.d.ts +3 -0
  75. package/build/Components/DeviceType/icons/RepairExpert.js +6 -0
  76. package/build/Components/DeviceType/icons/RepairExpert.js.map +1 -0
  77. package/build/Components/DeviceType/icons/Socket.d.ts +3 -0
  78. package/build/Components/DeviceType/icons/Socket.js +8 -0
  79. package/build/Components/DeviceType/icons/Socket.js.map +1 -0
  80. package/build/Components/DeviceType/icons/Thermometer.d.ts +3 -0
  81. package/build/Components/DeviceType/icons/Thermometer.js +7 -0
  82. package/build/Components/DeviceType/icons/Thermometer.js.map +1 -0
  83. package/build/Components/DeviceType/icons/ThermometerSimple.d.ts +3 -0
  84. package/build/Components/DeviceType/icons/ThermometerSimple.js +8 -0
  85. package/build/Components/DeviceType/icons/ThermometerSimple.js.map +1 -0
  86. package/build/Components/DeviceType/icons/Thermostat.d.ts +3 -0
  87. package/build/Components/DeviceType/icons/Thermostat.js +9 -0
  88. package/build/Components/DeviceType/icons/Thermostat.js.map +1 -0
  89. package/build/Components/DeviceType/icons/Valve.d.ts +3 -0
  90. package/build/Components/DeviceType/icons/Valve.js +7 -0
  91. package/build/Components/DeviceType/icons/Valve.js.map +1 -0
  92. package/build/Components/DeviceType/icons/WindowClosed.d.ts +3 -0
  93. package/build/Components/DeviceType/icons/WindowClosed.js +8 -0
  94. package/build/Components/DeviceType/icons/WindowClosed.js.map +1 -0
  95. package/build/Components/DeviceType/icons/WindowOpened.d.ts +3 -0
  96. package/build/Components/DeviceType/icons/WindowOpened.js +9 -0
  97. package/build/Components/DeviceType/icons/WindowOpened.js.map +1 -0
  98. package/build/Components/DeviceType/icons/WindowTilted.d.ts +3 -0
  99. package/build/Components/DeviceType/icons/WindowTilted.js +8 -0
  100. package/build/Components/DeviceType/icons/WindowTilted.js.map +1 -0
  101. package/build/Components/DeviceType/icons/index.d.ts +28 -0
  102. package/build/Components/DeviceType/icons/index.js +28 -0
  103. package/build/Components/DeviceType/icons/index.js.map +1 -0
  104. package/build/Components/InfoBox.d.ts +1 -1
  105. package/build/Components/InfoBox.js +1 -1
  106. package/build/Components/InfoBox.js.map +1 -1
  107. package/build/Components/SelectWithIcon.d.ts +0 -1
  108. package/build/Components/SelectWithIcon.js +3 -3
  109. package/build/Components/SelectWithIcon.js.map +1 -1
  110. package/build/Components/TextWithIcon.d.ts +0 -1
  111. package/build/Components/TextWithIcon.js +3 -3
  112. package/build/Components/TextWithIcon.js.map +1 -1
  113. package/build/Dialogs/TextInput.d.ts +1 -1
  114. package/build/icons/IconAdapter.d.ts +2 -2
  115. package/build/icons/IconAdapter.js +4 -2
  116. package/build/icons/IconAdapter.js.map +1 -1
  117. package/build/icons/IconAlias.d.ts +2 -2
  118. package/build/icons/IconAlias.js +4 -2
  119. package/build/icons/IconAlias.js.map +1 -1
  120. package/build/icons/IconButtonImage.d.ts +2 -2
  121. package/build/icons/IconButtonImage.js +6 -4
  122. package/build/icons/IconButtonImage.js.map +1 -1
  123. package/build/icons/IconChannel.d.ts +2 -2
  124. package/build/icons/IconChannel.js +8 -6
  125. package/build/icons/IconChannel.js.map +1 -1
  126. package/build/icons/IconClearFilter.d.ts +2 -2
  127. package/build/icons/IconClearFilter.js +4 -2
  128. package/build/icons/IconClearFilter.js.map +1 -1
  129. package/build/icons/IconClosed.d.ts +2 -2
  130. package/build/icons/IconClosed.js +4 -2
  131. package/build/icons/IconClosed.js.map +1 -1
  132. package/build/icons/IconCopy.d.ts +2 -2
  133. package/build/icons/IconCopy.js +4 -2
  134. package/build/icons/IconCopy.js.map +1 -1
  135. package/build/icons/IconDevice.d.ts +2 -2
  136. package/build/icons/IconDevice.js +14 -12
  137. package/build/icons/IconDevice.js.map +1 -1
  138. package/build/icons/IconDocument.d.ts +2 -2
  139. package/build/icons/IconDocument.js +4 -2
  140. package/build/icons/IconDocument.js.map +1 -1
  141. package/build/icons/IconDocumentReadOnly.d.ts +2 -2
  142. package/build/icons/IconDocumentReadOnly.js +5 -3
  143. package/build/icons/IconDocumentReadOnly.js.map +1 -1
  144. package/build/icons/IconExpert.d.ts +2 -2
  145. package/build/icons/IconExpert.js +5 -3
  146. package/build/icons/IconExpert.js.map +1 -1
  147. package/build/icons/IconFx.d.ts +2 -2
  148. package/build/icons/IconFx.js +4 -2
  149. package/build/icons/IconFx.js.map +1 -1
  150. package/build/icons/IconInstance.d.ts +2 -2
  151. package/build/icons/IconInstance.js +4 -2
  152. package/build/icons/IconInstance.js.map +1 -1
  153. package/build/icons/IconLogout.d.ts +2 -2
  154. package/build/icons/IconLogout.js +5 -3
  155. package/build/icons/IconLogout.js.map +1 -1
  156. package/build/icons/IconNoIcon.d.ts +2 -2
  157. package/build/icons/IconNoIcon.js +4 -2
  158. package/build/icons/IconNoIcon.js.map +1 -1
  159. package/build/icons/IconOpen.d.ts +2 -2
  160. package/build/icons/IconOpen.js +4 -2
  161. package/build/icons/IconOpen.js.map +1 -1
  162. package/build/icons/IconState.d.ts +2 -2
  163. package/build/icons/IconState.js +5 -3
  164. package/build/icons/IconState.js.map +1 -1
  165. package/build/icons/IconVacuum.d.ts +2 -2
  166. package/build/icons/IconVacuum.js +10 -8
  167. package/build/icons/IconVacuum.js.map +1 -1
  168. package/build/index.d.ts +6 -2
  169. package/build/index.js +4 -1
  170. package/build/index.js.map +1 -1
  171. package/package.json +8 -6
  172. package/build/Components/IconDeviceType.d.ts +0 -8
  173. package/build/Components/IconDeviceType.js +0 -212
  174. package/build/Components/IconDeviceType.js.map +0 -1
  175. package/build/icons/IconProps.d.ts +0 -15
  176. package/build/icons/IconProps.js +0 -2
  177. package/build/icons/IconProps.js.map +0 -1
@@ -0,0 +1,28 @@
1
+ export { Cleaner } from './Cleaner';
2
+ export { DoorClosed } from './DoorClosed';
3
+ export { DoorOpened } from './DoorOpened';
4
+ export { FireOff } from './FireOff';
5
+ export { FireOn } from './FireOn';
6
+ export { FloodOff } from './FloodOff';
7
+ export { FloodOn } from './FloodOn';
8
+ export { Gate } from './Gate';
9
+ export { HeatValve } from './HeatValve';
10
+ export { Home } from './Home';
11
+ export { Humidity } from './Humidity';
12
+ export { IconHome } from './IconHome';
13
+ export { Jalousie } from './Jalousie';
14
+ export { Material } from './Material';
15
+ export { MotionOff } from './MotionOff';
16
+ export { MotionOn } from './MotionOn';
17
+ export { PushButton } from './PushButton';
18
+ export { RepairExpert } from './RepairExpert';
19
+ export { RGB } from './RGB';
20
+ export { Socket } from './Socket';
21
+ export { Thermometer } from './Thermometer';
22
+ export { ThermometerSimple } from './ThermometerSimple';
23
+ export { Thermostat } from './Thermostat';
24
+ export { Valve } from './Valve';
25
+ export { WindowClosed } from './WindowClosed';
26
+ export { WindowOpened } from './WindowOpened';
27
+ export { WindowTilted } from './WindowTilted';
28
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"./src/","sources":["Components/DeviceType/icons/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAA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aner } from './Cleaner';\nexport { DoorClosed } from './DoorClosed';\nexport { DoorOpened } from './DoorOpened';\nexport { FireOff } from './FireOff';\nexport { FireOn } from './FireOn';\nexport { FloodOff } from './FloodOff';\nexport { FloodOn } from './FloodOn';\nexport { Gate } from './Gate';\nexport { HeatValve } from './HeatValve';\nexport { Home } from './Home';\nexport { Humidity } from './Humidity';\nexport { IconHome } from './IconHome';\nexport { Jalousie } from './Jalousie';\nexport { Material } from './Material';\nexport { MotionOff } from './MotionOff';\nexport { MotionOn } from './MotionOn';\nexport { PushButton } from './PushButton';\nexport { RepairExpert } from './RepairExpert';\nexport { RGB } from './RGB';\nexport { Socket } from './Socket';\nexport { Thermometer } from './Thermometer';\nexport { ThermometerSimple } from './ThermometerSimple';\nexport { Thermostat } from './Thermostat';\nexport { Valve } from './Valve';\nexport { WindowClosed } from './WindowClosed';\nexport { WindowOpened } from './WindowOpened';\nexport { WindowTilted } from './WindowTilted';\n"]}
@@ -23,7 +23,7 @@ interface InfoBoxState {
23
23
  /**
24
24
  * This component can be used to show important information or warnings to the user
25
25
  */
26
- export default class InfoBox extends React.Component<InfoBoxProps, InfoBoxState> {
26
+ export declare class InfoBox extends React.Component<InfoBoxProps, InfoBoxState> {
27
27
  private readonly refTypo;
28
28
  private height;
29
29
  private width;
@@ -4,7 +4,7 @@ import { Info, Warning, Close, Visibility, Check } from '@mui/icons-material';
4
4
  /**
5
5
  * This component can be used to show important information or warnings to the user
6
6
  */
7
- export default class InfoBox extends React.Component {
7
+ export class InfoBox extends React.Component {
8
8
  refTypo;
9
9
  height;
10
10
  width;
@@ -1 +1 @@
1
- {"version":3,"file":"InfoBox.js","sourceRoot":"./src/","sources":["Components/InfoBox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAA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AAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,6BAAK,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,GAAI,CAAC,CAAC,CAAC,IAAI;YAC3D,MAAM,CAAC,CAAC,CAAC,CACN,oBAAC,GAAG;YACA,mEAAmE;;gBAAnE,mEAAmE;gBACnE,SAAS,EAAC,KAAK,EACf,EAAE,EAAE,KAAK,CAAC,EAAE;oBACR,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC;oBACtF,OAAO;wBACH,UAAU,EAAE,mBAAmB,KAAK,UAAU,KAAK,WAAW,KAAK,UAAU;qBAChF,CAAC;gBACN,CAAC,EACD,KAAK,EAAE;oBACH,MAAM,EAAE,CAAC;oBACT,QAAQ,EAAE,UAAU;oBACpB,IAAI,EAAE,CAAC;oBACP,KAAK,EAAE,CAAC;oBACR,MAAM,EAAE,EAAE;iBACb,GACH,CACL,CAAC,CAAC,CAAC,IAAI,CACN,CACT,CAAC;IACN,CAAC;CACJ","sourcesContent":["import React from 'react';\nimport { Box, Typography } from '@mui/material';\nimport { Info, Warning, Close, Visibility, type SvgIconComponent, Check } from '@mui/icons-material';\n\ninterface InfoBoxProps {\n /** Text to display in the info box */\n children: string | (string | React.JSX.Element | null)[] | React.JSX.Element;\n /** The type determines the color and symbol */\n type: 'warning' | 'info' | 'error' | 'ok';\n /** If the Box is closeable */\n closeable?: boolean;\n /** Use together with `closeable: true`. You can specify in which variable in local storage the state of this info box could be stored */\n storeId?: string;\n /** Use together with `closeable: true`, listener called if close button clicked */\n onClose?: (desiredState: boolean) => void;\n /** Custom style */\n style?: React.CSSProperties;\n /** Icon position */\n iconPosition?: 'top' | 'middle';\n /** Use together with `closeable: true`. If the box is closed or not. In this case, it will be controlled from outside */\n closed?: boolean;\n}\n\ninterface InfoBoxState {\n closed: boolean;\n}\n/**\n * This component can be used to show important information or warnings to the user\n */\nexport default class InfoBox extends React.Component<InfoBoxProps, InfoBoxState> {\n private readonly refTypo: React.RefObject<HTMLDivElement>;\n private height: number;\n private width: number;\n\n constructor(props: InfoBoxProps) {\n super(props);\n this.state = {\n closed: this.props.storeId ? window.localStorage.getItem(this.props.storeId) === 'true' : false,\n };\n this.height = 0;\n this.width = 0;\n\n this.refTypo = React.createRef();\n }\n\n componentDidMount(): void {\n this.detectHeight();\n }\n\n onClick(): void {\n if (this.props.storeId && this.props.closed === undefined) {\n if (this.state.closed) {\n window.localStorage.removeItem(this.props.storeId);\n } else {\n window.localStorage.setItem(this.props.storeId, 'true');\n }\n }\n if (this.props.closed === undefined) {\n this.setState({ closed: !this.state.closed }, () => {\n // Inform about state change\n if (this.props.onClose) {\n this.props.onClose(this.state.closed);\n }\n });\n } else if (this.props.onClose) {\n this.props.onClose(!this.props.closed);\n }\n }\n\n detectHeight(): void {\n const closed = this.props.closed !== undefined ? this.props.closed : this.state.closed;\n // We must get the height of the element when it is open to make transition\n if (this.props.closeable && !closed && this.refTypo.current) {\n window.requestAnimationFrame(() => {\n const closed = this.props.closed !== undefined ? this.props.closed : this.state.closed;\n if (closed) {\n return;\n }\n if (this.refTypo.current && (!this.height || this.width !== this.refTypo.current.clientWidth)) {\n this.height = this.refTypo.current.clientHeight;\n this.width = this.refTypo.current.clientWidth;\n this.forceUpdate();\n }\n });\n }\n }\n\n componentDidUpdate(): void {\n this.detectHeight();\n }\n\n render(): React.ReactNode {\n const closed = this.props.closed !== undefined ? this.props.closed : this.state.closed;\n\n const Icon: SvgIconComponent = closed ? Visibility : Close;\n\n return (\n <Box\n className=\"iom-info-box\"\n style={{\n whiteSpace: 'preserve',\n display: 'flex',\n gap: 8,\n alignItems: closed || this.props.iconPosition === 'top' ? 'flex-start' : 'center',\n borderWidth: 1,\n borderStyle: 'solid',\n padding: 4,\n borderRadius: 5,\n marginBottom: 8,\n maxWidth: '100%',\n transition: 'height 0.5s',\n height: this.props.closeable ? (closed ? 30 : this.height || undefined) : undefined,\n overflow: this.props.closeable ? 'hidden' : undefined,\n position: 'relative',\n ...this.props.style,\n }}\n sx={{\n borderColor: theme =>\n this.props.type === 'ok' ? theme.palette.info.main : theme.palette[this.props.type].main,\n }}\n >\n {this.props.type === 'ok' ? (\n <Check style={{ color: '#0F0' }} />\n ) : this.props.type === 'info' ? (\n <Info color=\"primary\" />\n ) : (\n <Warning color={this.props.type} />\n )}\n <Typography ref={this.refTypo}>{this.props.children}</Typography>\n {this.props.closeable ? (\n <Icon\n sx={{\n color: theme => (theme.palette.mode === 'dark' ? 'lightgray' : 'gray'),\n // alignSelf: 'flex-start',\n cursor: 'pointer',\n position: 'absolute',\n top: 4,\n right: 4,\n }}\n onClick={() => this.onClick()}\n />\n ) : null}\n {/* Reserve place for button so it will not overlap the text */}\n {this.props.closeable ? <div style={{ width: 22 }} /> : null}\n {closed ? (\n <Box\n // This is a shadow box at the bottom of the InfoBox when it closed\n component=\"div\"\n sx={theme => {\n const color = theme.palette[this.props.type === 'ok' ? 'info' : this.props.type].main;\n return {\n background: `linear-gradient(${color}00 0%, ${color}10 60%, ${color}90 100%)`,\n };\n }}\n style={{\n bottom: 0,\n position: 'absolute',\n left: 0,\n right: 0,\n height: 10,\n }}\n />\n ) : null}\n </Box>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"InfoBox.js","sourceRoot":"./src/","sources":["Components/InfoBox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAyB,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAwBrG;;GAEG;AACH,MAAM,OAAO,OAAQ,SAAQ,KAAK,CAAC,SAAqC;IACnD,OAAO,CAAkC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CAAC,CAAC,CAAC,CACN,oBAAC,GAAG;YACA,mEAAmE;;gBAAnE,mEAAmE;gBACnE,SAAS,EAAC,KAAK,EACf,EAAE,EAAE,KAAK,CAAC,EAAE;oBACR,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC;oBACtF,OAAO;wBACH,UAAU,EAAE,mBAAmB,KAAK,UAAU,KAAK,WAAW,KAAK,UAAU;qBAChF,CAAC;gBACN,CAAC,EACD,KAAK,EAAE;oBACH,MAAM,EAAE,CAAC;oBACT,QAAQ,EAAE,UAAU;oBACpB,IAAI,EAAE,CAAC;oBACP,KAAK,EAAE,CAAC;oBACR,MAAM,EAAE,EAAE;iBACb,GACH,CACL,CAAC,CAAC,CAAC,IAAI,CACN,CACT,CAAC;IACN,CAAC;CACJ","sourcesContent":["import React from 'react';\nimport { Box, Typography } from '@mui/material';\nimport { Info, Warning, Close, Visibility, type SvgIconComponent, Check } from '@mui/icons-material';\n\ninterface InfoBoxProps {\n /** Text to display in the info box */\n children: string | (string | React.JSX.Element | null)[] | React.JSX.Element;\n /** The type determines the color and symbol */\n type: 'warning' | 'info' | 'error' | 'ok';\n /** If the Box is closeable */\n closeable?: boolean;\n /** Use together with `closeable: true`. You can specify in which variable in local storage the state of this info box could be stored */\n storeId?: string;\n /** Use together with `closeable: true`, listener called if close button clicked */\n onClose?: (desiredState: boolean) => void;\n /** Custom style */\n style?: React.CSSProperties;\n /** Icon position */\n iconPosition?: 'top' | 'middle';\n /** Use together with `closeable: true`. If the box is closed or not. In this case, it will be controlled from outside */\n closed?: boolean;\n}\n\ninterface InfoBoxState {\n closed: boolean;\n}\n/**\n * This component can be used to show important information or warnings to the user\n */\nexport class InfoBox extends React.Component<InfoBoxProps, InfoBoxState> {\n private readonly refTypo: React.RefObject<HTMLDivElement>;\n private height: number;\n private width: number;\n\n constructor(props: InfoBoxProps) {\n super(props);\n this.state = {\n closed: this.props.storeId ? window.localStorage.getItem(this.props.storeId) === 'true' : false,\n };\n this.height = 0;\n this.width = 0;\n\n this.refTypo = React.createRef();\n }\n\n componentDidMount(): void {\n this.detectHeight();\n }\n\n onClick(): void {\n if (this.props.storeId && this.props.closed === undefined) {\n if (this.state.closed) {\n window.localStorage.removeItem(this.props.storeId);\n } else {\n window.localStorage.setItem(this.props.storeId, 'true');\n }\n }\n if (this.props.closed === undefined) {\n this.setState({ closed: !this.state.closed }, () => {\n // Inform about state change\n if (this.props.onClose) {\n this.props.onClose(this.state.closed);\n }\n });\n } else if (this.props.onClose) {\n this.props.onClose(!this.props.closed);\n }\n }\n\n detectHeight(): void {\n const closed = this.props.closed !== undefined ? this.props.closed : this.state.closed;\n // We must get the height of the element when it is open to make transition\n if (this.props.closeable && !closed && this.refTypo.current) {\n window.requestAnimationFrame(() => {\n const closed = this.props.closed !== undefined ? this.props.closed : this.state.closed;\n if (closed) {\n return;\n }\n if (this.refTypo.current && (!this.height || this.width !== this.refTypo.current.clientWidth)) {\n this.height = this.refTypo.current.clientHeight;\n this.width = this.refTypo.current.clientWidth;\n this.forceUpdate();\n }\n });\n }\n }\n\n componentDidUpdate(): void {\n this.detectHeight();\n }\n\n render(): React.ReactNode {\n const closed = this.props.closed !== undefined ? this.props.closed : this.state.closed;\n\n const Icon: SvgIconComponent = closed ? Visibility : Close;\n\n return (\n <Box\n className=\"iom-info-box\"\n style={{\n whiteSpace: 'preserve',\n display: 'flex',\n gap: 8,\n alignItems: closed || this.props.iconPosition === 'top' ? 'flex-start' : 'center',\n borderWidth: 1,\n borderStyle: 'solid',\n padding: 4,\n borderRadius: 5,\n marginBottom: 8,\n maxWidth: '100%',\n transition: 'height 0.5s',\n height: this.props.closeable ? (closed ? 30 : this.height || undefined) : undefined,\n overflow: this.props.closeable ? 'hidden' : undefined,\n position: 'relative',\n ...this.props.style,\n }}\n sx={{\n borderColor: theme =>\n this.props.type === 'ok' ? theme.palette.info.main : theme.palette[this.props.type].main,\n }}\n >\n {this.props.type === 'ok' ? (\n <Check style={{ color: '#0F0' }} />\n ) : this.props.type === 'info' ? (\n <Info color=\"primary\" />\n ) : (\n <Warning color={this.props.type} />\n )}\n <Typography ref={this.refTypo}>{this.props.children}</Typography>\n {this.props.closeable ? (\n <Icon\n sx={{\n color: theme => (theme.palette.mode === 'dark' ? 'lightgray' : 'gray'),\n // alignSelf: 'flex-start',\n cursor: 'pointer',\n position: 'absolute',\n top: 4,\n right: 4,\n }}\n onClick={() => this.onClick()}\n />\n ) : null}\n {/* Reserve place for button so it will not overlap the text */}\n {this.props.closeable ? <div style={{ width: 22 }} /> : null}\n {closed ? (\n <Box\n // This is a shadow box at the bottom of the InfoBox when it closed\n component=\"div\"\n sx={theme => {\n const color = theme.palette[this.props.type === 'ok' ? 'info' : this.props.type].main;\n return {\n background: `linear-gradient(${color}00 0%, ${color}10 60%, ${color}90 100%)`,\n };\n }}\n style={{\n bottom: 0,\n position: 'absolute',\n left: 0,\n right: 0,\n height: 10,\n }}\n />\n ) : null}\n </Box>\n );\n }\n}\n"]}
@@ -9,7 +9,6 @@ interface SelectWithIconProps {
9
9
  onChange: (id: string) => void;
10
10
  disabled?: boolean;
11
11
  list?: ioBroker.Object[] | Record<string, ioBroker.Object>;
12
- options?: Record<string, any>;
13
12
  different?: string | boolean;
14
13
  label?: string;
15
14
  fullWidth?: boolean;
@@ -22,8 +22,8 @@ export class SelectWithIcon extends Component {
22
22
  this.wordDifferent = props.t('ra___different__');
23
23
  }
24
24
  let list;
25
- if (Array.isArray(props.list || props.options)) {
26
- list = (props.list || props.options).map(obj => ({
25
+ if (Array.isArray(props.list)) {
26
+ list = props.list.filter(obj => obj?._id && obj.common).map(obj => ({
27
27
  name: Utils.getObjectNameFromObj(obj, props.lang)
28
28
  .replace('system.group.', '')
29
29
  .replace('system.user.', '')
@@ -35,7 +35,7 @@ export class SelectWithIcon extends Component {
35
35
  }));
36
36
  }
37
37
  else {
38
- list = Object.values((props.list || props.options)).map(obj => ({
38
+ list = Object.values(props.list).filter(obj => obj?._id && obj.common).map(obj => ({
39
39
  name: Utils.getObjectNameFromObj(obj, props.lang)
40
40
  .replace('system.group.', '')
41
41
  .replace('system.user.', '')
@@ -1 +1 @@
1
- {"version":3,"file":"SelectWithIcon.js","sourceRoot":"./src/","sources":["Components/SelectWithIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzC,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAK1E,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,MAAM,MAAM,GAAwC;IAChD,SAAS,EAAE;QACP,OAAO,EAAE,GAAG;KACf;IACD,IAAI,EAAE;QACF,KAAK,EAAE,EAAE;QACT,MAAM,EAAE,EAAE;QACV,WAAW,EAAE,CAAC;KACjB;CACJ,CAAC;AAiCF,MAAM,OAAO,cAAe,SAAQ,SAAmD;IAClE,aAAa,CAAqB;IAE3C,OAAO,GAAyC,IAAI,CAAC;IAE7D,YAAY,KAA0B;QAClC,KAAK,CAAC,KAAK,CAAC,CAAC;QAEb,IAAI,KAAK,CAAC,SAAS,EAAE,CAAC;YAClB,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC;QACrD,CAAC;QAED,IAAI,IAAwB,CAAC;QAC7B,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC;YAC7C,IAAI,GAAI,CAAC,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,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,EAAE,CAAC,KAAK,IAAI,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC;iBAChF,EAEX,GAAG,EAAE,EAAE,CAAC,KAAK,EACb,KAAK,EAAE,EAAE,CAAC,KAAK;YAEd,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CACP,oBAAC,IAAI,IACD,GAAG,EAAE,EAAE,CAAC,IAAI,EACZ,KAAK,EAAE,MAAM,CAAC,IAAI,GACpB,CACL,CAAC,CAAC,CAAC,IAAI;YACP,EAAE,CAAC,IAAI,CACD,CACd,CAAC,CACG,CACZ,CAAC;QAEF,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;YACnB,OAAO,MAAM,CAAC;QAClB,CAAC;QAED,OAAO,CACH,oBAAC,WAAW,IACR,OAAO,EAAC,UAAU,EAClB,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,EACjC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS;YAE/B,oBAAC,UAAU,QAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAc;YAC1C,MAAM,CACG,CACjB,CAAC;IACN,CAAC;CACJ","sourcesContent":["import React, { Component } from 'react';\n\nimport { FormControl, InputLabel, MenuItem, Select } from '@mui/material';\nimport type { InputProps } from '@mui/material/Input';\n\nimport type { ThemeType, Translate } from '../types';\n\nimport { Icon } from './Icon';\nimport { Utils } from './Utils';\nimport { I18n } from '../i18n';\n\nconst styles: Record<string, React.CSSProperties> = {\n different: {\n opacity: 0.5,\n },\n icon: {\n width: 16,\n height: 16,\n marginRight: 8,\n },\n};\n\ninterface SelectWithIconProps {\n t: Translate;\n lang: ioBroker.Languages;\n themeType: ThemeType;\n value?: string;\n onChange: (id: string) => void;\n disabled?: boolean;\n list?: ioBroker.Object[] | Record<string, ioBroker.Object>; // one of \"list\"(Array) or \"options\"(object) is required\n options?: Record<string, any>; // one of \"list\"(Array) or \"options\"(object) is required\n different?: string | boolean;\n label?: string;\n fullWidth?: boolean;\n className?: string;\n style?: React.CSSProperties;\n removePrefix?: string;\n allowNone?: boolean;\n inputProps?: InputProps['inputProps'];\n dense?: boolean;\n}\n\ninterface TextWithIconItem {\n name: string;\n value: string;\n icon?: string;\n color?: string;\n}\n\ninterface SelectWithIconState {\n list: TextWithIconItem[];\n}\n\nexport class SelectWithIcon extends Component<SelectWithIconProps, SelectWithIconState> {\n private readonly wordDifferent: string | undefined;\n\n private timeout: ReturnType<typeof setTimeout> | null = null;\n\n constructor(props: SelectWithIconProps) {\n super(props);\n\n if (props.different) {\n this.wordDifferent = props.t('ra___different__');\n }\n\n let list: TextWithIconItem[];\n if (Array.isArray(props.list || props.options)) {\n list = ((props.list || props.options) as ioBroker.Object[]).map(obj => ({\n name: Utils.getObjectNameFromObj(obj, props.lang)\n .replace('system.group.', '')\n .replace('system.user.', '')\n .replace('enum.rooms.', '')\n .replace('enum.functions.', ''),\n value: obj._id,\n icon: obj.common?.icon,\n color: obj.common?.color,\n }));\n } else {\n list = Object.values((props.list || props.options) as Record<string, ioBroker.Object>).map(obj => ({\n name: Utils.getObjectNameFromObj(obj, props.lang)\n .replace('system.group.', '')\n .replace('system.user.', '')\n .replace('enum.rooms.', '')\n .replace('enum.functions.', ''),\n value: obj._id,\n icon: obj.common?.icon,\n color: obj.common?.color,\n }));\n }\n\n if (props.different && props.value === props.different) {\n list.unshift({ value: props.different, name: this.wordDifferent || '' });\n }\n\n if (props.allowNone) {\n list.unshift({ value: '', name: I18n.t('ra_none') });\n }\n\n this.state = {\n list,\n };\n }\n\n render(): React.JSX.Element {\n if (this.props.allowNone && !this.state.list.find(obj => obj.value === '')) {\n this.timeout =\n this.timeout ||\n setTimeout(() => {\n this.timeout = null;\n const list: TextWithIconItem[] = JSON.parse(JSON.stringify(this.state.list));\n list.unshift({ value: '', name: I18n.t('ra_none') });\n this.setState({ list });\n }, 100);\n } else if (!this.props.allowNone && this.state.list.find(obj => obj.value === '')) {\n this.timeout =\n this.timeout ||\n setTimeout(() => {\n this.timeout = null;\n const list: TextWithIconItem[] = JSON.parse(JSON.stringify(this.state.list));\n const i = this.state.list.findIndex(obj => obj.value === '');\n list.splice(i, 1);\n this.setState({ list });\n }, 100);\n }\n\n const item = this.state.list.find(\n it =>\n it.value === this.props.value ||\n (this.props.removePrefix && it.value.replace(this.props.removePrefix, '') === this.props.value),\n );\n\n const style =\n this.props.value === this.props.different\n ? {}\n : {\n color: item?.color || undefined,\n backgroundColor: Utils.getInvertedColor(item?.color || '', this.props.themeType),\n };\n\n if (this.props.dense && this.props.style) {\n Object.assign(style, this.props.style);\n }\n\n const select = (\n <Select\n variant=\"standard\"\n disabled={this.props.disabled}\n value={this.props.value}\n slotProps={{\n input: this.props.inputProps,\n }}\n renderValue={\n (/* value */) => (\n <span>\n {item?.icon ? (\n <Icon\n src={item?.icon}\n style={styles.icon}\n />\n ) : null}\n {item?.name}\n </span>\n )\n }\n sx={{\n '&.MuiSelect-root': this.props.value === this.props.different ? styles.different : {},\n }}\n classes={{\n root: this.props.dense ? this.props.className : '',\n }}\n style={style}\n onChange={el => {\n if (this.props.different && el.target.value !== this.props.different) {\n let pos = null;\n for (let i = 0; i < this.state.list.length; i++) {\n if (this.state.list[i].value === this.props.different) {\n pos = i;\n break;\n }\n }\n if (pos !== null) {\n const list: TextWithIconItem[] = Utils.clone(this.state.list) as TextWithIconItem[];\n list.splice(pos, 1);\n this.setState({ list }, () => this.props.onChange(el.target.value));\n return;\n }\n }\n\n this.props.onChange(\n this.props.removePrefix\n ? el.target.value.replace(this.props.removePrefix, '')\n : el.target.value,\n );\n }}\n >\n {this.state.list.map(el => (\n <MenuItem\n style={\n this.props.different && el.value === this.props.different\n ? styles.different\n : {\n color: el.color || undefined,\n backgroundColor: Utils.getInvertedColor(el.color || '', this.props.themeType),\n }\n }\n key={el.value}\n value={el.value}\n >\n {el.icon ? (\n <Icon\n src={el.icon}\n style={styles.icon}\n />\n ) : null}\n {el.name}\n </MenuItem>\n ))}\n </Select>\n );\n\n if (this.props.dense) {\n return select;\n }\n\n return (\n <FormControl\n variant=\"standard\"\n fullWidth={!!this.props.fullWidth}\n style={this.props.style}\n className={this.props.className}\n >\n <InputLabel>{this.props.label}</InputLabel>\n {select}\n </FormControl>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"SelectWithIcon.js","sourceRoot":"./src/","sources":["Components/SelectWithIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzC,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAK1E,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,MAAM,MAAM,GAAwC;IAChD,SAAS,EAAE;QACP,OAAO,EAAE,GAAG;KACf;IACD,IAAI,EAAE;QACF,KAAK,EAAE,EAAE;QACT,MAAM,EAAE,EAAE;QACV,WAAW,EAAE,CAAC;KACjB;CACJ,CAAC;AAgCF,MAAM,OAAO,cAAe,SAAQ,SAAmD;IAClE,aAAa,CAAqB;IAE3C,OAAO,GAAyC,IAAI,CAAC;IAE7D,YAAY,KAA0B;QAClC,KAAK,CAAC,KAAK,CAAC,CAAC;QAEb,IAAI,KAAK,CAAC,SAAS,EAAE,CAAC;YAClB,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC;QACrD,CAAC;QAED,IAAI,IAAwB,CAAC;QAC7B,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;YAC5B,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,GAA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K,EAAE,EAAE,CAAC,KAAK,IAAI,SAAS;oBAC5B,eAAe,EAAE,KAAK,CAAC,gBAAgB,CAAC,EAAE,CAAC,KAAK,IAAI,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC;iBAChF,EAEX,GAAG,EAAE,EAAE,CAAC,KAAK,EACb,KAAK,EAAE,EAAE,CAAC,KAAK;YAEd,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CACP,oBAAC,IAAI,IACD,GAAG,EAAE,EAAE,CAAC,IAAI,EACZ,KAAK,EAAE,MAAM,CAAC,IAAI,GACpB,CACL,CAAC,CAAC,CAAC,IAAI;YACP,EAAE,CAAC,IAAI,CACD,CACd,CAAC,CACG,CACZ,CAAC;QAEF,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;YACnB,OAAO,MAAM,CAAC;QAClB,CAAC;QAED,OAAO,CACH,oBAAC,WAAW,IACR,OAAO,EAAC,UAAU,EAClB,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,EACjC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS;YAE/B,oBAAC,UAAU,QAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAc;YAC1C,MAAM,CACG,CACjB,CAAC;IACN,CAAC;CACJ","sourcesContent":["import React, { Component } from 'react';\n\nimport { FormControl, InputLabel, MenuItem, Select } from '@mui/material';\nimport type { InputProps } from '@mui/material/Input';\n\nimport type { ThemeType, Translate } from '../types';\n\nimport { Icon } from './Icon';\nimport { Utils } from './Utils';\nimport { I18n } from '../i18n';\n\nconst styles: Record<string, React.CSSProperties> = {\n different: {\n opacity: 0.5,\n },\n icon: {\n width: 16,\n height: 16,\n marginRight: 8,\n },\n};\n\ninterface SelectWithIconProps {\n t: Translate;\n lang: ioBroker.Languages;\n themeType: ThemeType;\n value?: string;\n onChange: (id: string) => void;\n disabled?: boolean;\n list?: ioBroker.Object[] | Record<string, ioBroker.Object>; // one of \"list\"(Array) or \"options\"(object) is required\n different?: string | boolean;\n label?: string;\n fullWidth?: boolean;\n className?: string;\n style?: React.CSSProperties;\n removePrefix?: string;\n allowNone?: boolean;\n inputProps?: InputProps['inputProps'];\n dense?: boolean;\n}\n\ninterface TextWithIconItem {\n name: string;\n value: string;\n icon?: string;\n color?: string;\n}\n\ninterface SelectWithIconState {\n list: TextWithIconItem[];\n}\n\nexport class SelectWithIcon extends Component<SelectWithIconProps, SelectWithIconState> {\n private readonly wordDifferent: string | undefined;\n\n private timeout: ReturnType<typeof setTimeout> | null = null;\n\n constructor(props: SelectWithIconProps) {\n super(props);\n\n if (props.different) {\n this.wordDifferent = props.t('ra___different__');\n }\n\n let list: TextWithIconItem[];\n if (Array.isArray(props.list)) {\n list = props.list.filter(obj => obj?._id && obj.common).map(obj => ({\n name: Utils.getObjectNameFromObj(obj, props.lang)\n .replace('system.group.', '')\n .replace('system.user.', '')\n .replace('enum.rooms.', '')\n .replace('enum.functions.', ''),\n value: obj._id,\n icon: obj.common?.icon,\n color: obj.common?.color,\n }));\n } else {\n list = Object.values(props.list as Record<string, ioBroker.Object>).filter(obj => obj?._id && obj.common).map(obj => ({\n name: Utils.getObjectNameFromObj(obj, props.lang)\n .replace('system.group.', '')\n .replace('system.user.', '')\n .replace('enum.rooms.', '')\n .replace('enum.functions.', ''),\n value: obj._id,\n icon: obj.common?.icon,\n color: obj.common?.color,\n }));\n }\n\n if (props.different && props.value === props.different) {\n list.unshift({ value: props.different, name: this.wordDifferent || '' });\n }\n\n if (props.allowNone) {\n list.unshift({ value: '', name: I18n.t('ra_none') });\n }\n\n this.state = {\n list,\n };\n }\n\n render(): React.JSX.Element {\n if (this.props.allowNone && !this.state.list.find(obj => obj.value === '')) {\n this.timeout =\n this.timeout ||\n setTimeout(() => {\n this.timeout = null;\n const list: TextWithIconItem[] = JSON.parse(JSON.stringify(this.state.list));\n list.unshift({ value: '', name: I18n.t('ra_none') });\n this.setState({ list });\n }, 100);\n } else if (!this.props.allowNone && this.state.list.find(obj => obj.value === '')) {\n this.timeout =\n this.timeout ||\n setTimeout(() => {\n this.timeout = null;\n const list: TextWithIconItem[] = JSON.parse(JSON.stringify(this.state.list));\n const i = this.state.list.findIndex(obj => obj.value === '');\n list.splice(i, 1);\n this.setState({ list });\n }, 100);\n }\n\n const item = this.state.list.find(\n it =>\n it.value === this.props.value ||\n (this.props.removePrefix && it.value.replace(this.props.removePrefix, '') === this.props.value),\n );\n\n const style =\n this.props.value === this.props.different\n ? {}\n : {\n color: item?.color || undefined,\n backgroundColor: Utils.getInvertedColor(item?.color || '', this.props.themeType),\n };\n\n if (this.props.dense && this.props.style) {\n Object.assign(style, this.props.style);\n }\n\n const select = (\n <Select\n variant=\"standard\"\n disabled={this.props.disabled}\n value={this.props.value}\n slotProps={{\n input: this.props.inputProps,\n }}\n renderValue={\n (/* value */) => (\n <span>\n {item?.icon ? (\n <Icon\n src={item?.icon}\n style={styles.icon}\n />\n ) : null}\n {item?.name}\n </span>\n )\n }\n sx={{\n '&.MuiSelect-root': this.props.value === this.props.different ? styles.different : {},\n }}\n classes={{\n root: this.props.dense ? this.props.className : '',\n }}\n style={style}\n onChange={el => {\n if (this.props.different && el.target.value !== this.props.different) {\n let pos = null;\n for (let i = 0; i < this.state.list.length; i++) {\n if (this.state.list[i].value === this.props.different) {\n pos = i;\n break;\n }\n }\n if (pos !== null) {\n const list: TextWithIconItem[] = Utils.clone(this.state.list) as TextWithIconItem[];\n list.splice(pos, 1);\n this.setState({ list }, () => this.props.onChange(el.target.value));\n return;\n }\n }\n\n this.props.onChange(\n this.props.removePrefix\n ? el.target.value.replace(this.props.removePrefix, '')\n : el.target.value,\n );\n }}\n >\n {this.state.list.map(el => (\n <MenuItem\n style={\n this.props.different && el.value === this.props.different\n ? styles.different\n : {\n color: el.color || undefined,\n backgroundColor: Utils.getInvertedColor(el.color || '', this.props.themeType),\n }\n }\n key={el.value}\n value={el.value}\n >\n {el.icon ? (\n <Icon\n src={el.icon}\n style={styles.icon}\n />\n ) : null}\n {el.name}\n </MenuItem>\n ))}\n </Select>\n );\n\n if (this.props.dense) {\n return select;\n }\n\n return (\n <FormControl\n variant=\"standard\"\n fullWidth={!!this.props.fullWidth}\n style={this.props.style}\n className={this.props.className}\n >\n <InputLabel>{this.props.label}</InputLabel>\n {select}\n </FormControl>\n );\n }\n}\n"]}
@@ -5,7 +5,6 @@ interface TextWithIconProps {
5
5
  themeType?: ThemeType;
6
6
  value: string | Record<string, any>;
7
7
  list?: ioBroker.Object[] | Record<string, ioBroker.Object>;
8
- options?: Record<string, any>;
9
8
  className?: string;
10
9
  style?: React.CSSProperties;
11
10
  title?: string;
@@ -28,11 +28,11 @@ export function TextWithIcon(props) {
28
28
  let item;
29
29
  const prefix = props.removePrefix || '';
30
30
  if (typeof value === 'string') {
31
- const list = props.list || props.options;
31
+ const list = props.list;
32
32
  if (list) {
33
33
  // if a list is array, then it is list of ioBroker.Object
34
34
  if (Array.isArray(list)) {
35
- const _item = list.find((obj) => obj._id === prefix + value);
35
+ const _item = list.find((obj) => obj?._id === prefix + value);
36
36
  if (_item) {
37
37
  item = {
38
38
  name: Utils.getObjectNameFromObj(_item, props.lang).replace('system.group.', ''),
@@ -49,7 +49,7 @@ export function TextWithIcon(props) {
49
49
  }
50
50
  }
51
51
  else if (list[prefix + value]) {
52
- // List is object with key-value pairs: {'enum.rooms.1': {common: {name: 'Room 1'}}}
52
+ // List is the object with key-value pairs: {'enum.rooms.1': {common: {name: 'Room 1'}}}
53
53
  const obj = list[prefix + value];
54
54
  item = {
55
55
  name: Utils.getObjectNameFromObj(obj, props.lang).replace('system.group.', ''),
@@ -1 +1 @@
1
- {"version":3,"file":"TextWithIcon.js","sourceRoot":"./src/","sources":["Components/TextWithIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,C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E,GAAG,CAAC,KAAK,IAAI,SAAS,CAAC,EAAE,EAChF,SAAS,EAAE,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,WAAW,EAAE,IAAI,CAAC,EAC/D,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK;QAE/B,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CACV,oBAAC,IAAI,IACD,GAAG,EAAE,IAAI,EAAE,IAAI,EACf,SAAS,EAAE,KAAK,CAAC,WAAW,EAAE,IAAI,EAClC,KAAK,EAAE,MAAM,CAAC,IAAI,GACpB,CACL,CAAC,CAAC,CAAC,IAAI;QACR,6BACI,KAAK,EAAE,MAAM,CAAC,IAAI,EAClB,SAAS,EAAE,KAAK,CAAC,WAAW,EAAE,IAAI,IAEjC,IAAI,EAAE,IAAI,CACT,CACJ,CACT,CAAC;AACN,CAAC","sourcesContent":["import React from 'react';\n\nimport { Icon } from './Icon';\nimport { Utils } from './Utils';\nimport type { ThemeType } from '../types';\n\nconst styles: Record<string, React.CSSProperties> = {\n div: {\n borderRadius: 3,\n padding: '0 3px',\n lineHeight: '20px',\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n display: 'flex',\n alignItems: 'center',\n },\n icon: {\n width: 16,\n height: 16,\n marginRight: 8,\n verticalAlign: 'middle',\n },\n text: {\n display: 'inline-block',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n },\n};\n\ninterface TextWithIconProps {\n lang: ioBroker.Languages;\n themeType?: ThemeType;\n value: string | Record<string, any>;\n list?: ioBroker.Object[] | Record<string, ioBroker.Object>;\n options?: Record<string, any>;\n className?: string;\n style?: React.CSSProperties;\n title?: string;\n removePrefix?: string;\n moreClasses?: {\n root?: string;\n icon?: string;\n text?: string;\n };\n icon?: string;\n color?: string;\n}\n\ninterface TextWithIconItem {\n name: string;\n value: string;\n icon?: string;\n color?: string;\n}\n\nexport function TextWithIcon(props: TextWithIconProps): React.JSX.Element {\n const value = props.value;\n let item: TextWithIconItem;\n const prefix = props.removePrefix || '';\n\n if (typeof value === 'string') {\n const list = props.list || props.options;\n if (list) {\n // if a list is array, then it is list of ioBroker.Object\n if (Array.isArray(list)) {\n const _item: ioBroker.Object = list.find((obj: ioBroker.Object) => obj._id === prefix + value);\n if (_item) {\n item = {\n name: Utils.getObjectNameFromObj(_item, props.lang).replace('system.group.', ''),\n value: _item._id,\n icon: props.icon || _item.common?.icon,\n color: props.color || _item.common?.color,\n };\n } else {\n item = {\n name: value,\n value: prefix + value,\n };\n }\n } else if (list[prefix + value]) {\n // List is object with key-value pairs: {'enum.rooms.1': {common: {name: 'Room 1'}}}\n const obj: ioBroker.Object = list[prefix + value];\n item = {\n name: Utils.getObjectNameFromObj(obj, props.lang).replace('system.group.', ''),\n value: obj._id,\n icon: props.icon || obj.common?.icon,\n color: props.color || obj.common?.color,\n };\n } else {\n // value is a string, ignore list\n item = {\n name: value,\n value: prefix + value,\n icon: props.icon,\n color: props.color,\n };\n }\n } else {\n item = {\n name: value,\n value: prefix + value,\n icon: props.icon,\n color: props.color,\n };\n }\n } else if (!value || typeof value !== 'object') {\n item = {\n name: '',\n value: '',\n icon: props.icon,\n color: props.color,\n };\n } else {\n // Item is an ioBroker.Object\n const obj: ioBroker.Object = value as ioBroker.Object;\n item = {\n name: Utils.getObjectNameFromObj(obj, props.lang)\n .replace('system.group.', '')\n .replace('system.user.', '')\n .replace('enum.rooms.', '')\n .replace('enum.functions.', ''),\n value: obj._id,\n icon: props.icon || obj.common?.icon,\n color: props.color || obj.common?.color,\n };\n }\n\n const style = item?.color\n ? {\n border: `1px solid ${Utils.invertColor(item?.color)}`,\n color: Utils.getInvertedColor(item?.color, props.themeType || 'light', true) || undefined,\n backgroundColor: item?.color,\n }\n : {};\n\n return (\n <div\n style={{ ...(props.style || undefined), ...styles.div, ...(style || undefined) }}\n className={Utils.clsx(props.className, props.moreClasses?.root)}\n title={props.title || item.value}\n >\n {item?.icon ? (\n <Icon\n src={item?.icon}\n className={props.moreClasses?.icon}\n style={styles.icon}\n />\n ) : null}\n <div\n style={styles.text}\n className={props.moreClasses?.text}\n >\n {item?.name}\n </div>\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"TextWithIcon.js","sourceRoot":"./src/","sources":["Components/TextWithIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAGhC,MAAM,MAAM,GAAwC;IAChD,GAAG,EAAE;QACD,YAAY,EAAE,CAAC;QACf,OAAO,EAAE,OAAO;QAChB,UAAU,EAAE,MAAM;QAClB,UAAU,EAAE,QAAQ;QACpB,QAAQ,EAAE,QAAQ;QAClB,OAAO,EAAE,MAAM;QACf,UAAU,EAAE,QAAQ;KACvB;IACD,IAAI,EAAE;QACF,KAAK,EAAE,EAAE;QACT,MAAM,EAAE,EAAE;QACV,WAAW,EAAE,CAAC;QACd,aAAa,EAAE,QAAQ;KAC1B;IACD,IAAI,EAAE;QACF,OAAO,EAAE,cAAc;QACvB,QAAQ,EAAE,QAAQ;QAClB,YAAY,EAAE,UAAU;KAC3B;CACJ,CAAC;AA2BF,MAAM,UAAU,YAAY,CAAC,KAAwB;IACjD,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;IAC1B,IAAI,IAAsB,CAAC;IAC3B,MAAM,MAAM,GAAG,KAAK,CAAC,YAAY,IAAI,EAAE,CAAC;IAExC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC5B,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;QACxB,IAAI,IAAI,EAAE,CAAC;YACP,yDAAyD;YACzD,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;gBACtB,MAAM,KAAK,GAAoB,IAAI,CAAC,IAAI,CAAC,CAAC,GAAoB,EAA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K,EAAE,KAAK,CAAC,SAAS,IAAI,OAAO,EAAE,IAAI,CAAC,IAAI,SAAS;YACzF,eAAe,EAAE,IAAI,EAAE,KAAK;SAC/B;QACH,CAAC,CAAC,EAAE,CAAC;IAET,OAAO,CACH,6BACI,KAAK,EAAE,EAAE,GAAG,CAAC,KAAK,CAAC,KAAK,IAAI,SAAS,CAAC,EAAE,GAAG,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,KAAK,IAAI,SAAS,CAAC,EAAE,EAChF,SAAS,EAAE,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,WAAW,EAAE,IAAI,CAAC,EAC/D,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK;QAE/B,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CACV,oBAAC,IAAI,IACD,GAAG,EAAE,IAAI,EAAE,IAAI,EACf,SAAS,EAAE,KAAK,CAAC,WAAW,EAAE,IAAI,EAClC,KAAK,EAAE,MAAM,CAAC,IAAI,GACpB,CACL,CAAC,CAAC,CAAC,IAAI;QACR,6BACI,KAAK,EAAE,MAAM,CAAC,IAAI,EAClB,SAAS,EAAE,KAAK,CAAC,WAAW,EAAE,IAAI,IAEjC,IAAI,EAAE,IAAI,CACT,CACJ,CACT,CAAC;AACN,CAAC","sourcesContent":["import React from 'react';\n\nimport { Icon } from './Icon';\nimport { Utils } from './Utils';\nimport type { ThemeType } from '../types';\n\nconst styles: Record<string, React.CSSProperties> = {\n div: {\n borderRadius: 3,\n padding: '0 3px',\n lineHeight: '20px',\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n display: 'flex',\n alignItems: 'center',\n },\n icon: {\n width: 16,\n height: 16,\n marginRight: 8,\n verticalAlign: 'middle',\n },\n text: {\n display: 'inline-block',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n },\n};\n\ninterface TextWithIconProps {\n lang: ioBroker.Languages;\n themeType?: ThemeType;\n value: string | Record<string, any>;\n list?: ioBroker.Object[] | Record<string, ioBroker.Object>;\n className?: string;\n style?: React.CSSProperties;\n title?: string;\n removePrefix?: string;\n moreClasses?: {\n root?: string;\n icon?: string;\n text?: string;\n };\n icon?: string;\n color?: string;\n}\n\ninterface TextWithIconItem {\n name: string;\n value: string;\n icon?: string;\n color?: string;\n}\n\nexport function TextWithIcon(props: TextWithIconProps): React.JSX.Element {\n const value = props.value;\n let item: TextWithIconItem;\n const prefix = props.removePrefix || '';\n\n if (typeof value === 'string') {\n const list = props.list;\n if (list) {\n // if a list is array, then it is list of ioBroker.Object\n if (Array.isArray(list)) {\n const _item: ioBroker.Object = list.find((obj: ioBroker.Object) => obj?._id === prefix + value);\n if (_item) {\n item = {\n name: Utils.getObjectNameFromObj(_item, props.lang).replace('system.group.', ''),\n value: _item._id,\n icon: props.icon || _item.common?.icon,\n color: props.color || _item.common?.color,\n };\n } else {\n item = {\n name: value,\n value: prefix + value,\n };\n }\n } else if (list[prefix + value]) {\n // List is the object with key-value pairs: {'enum.rooms.1': {common: {name: 'Room 1'}}}\n const obj: ioBroker.Object = list[prefix + value];\n item = {\n name: Utils.getObjectNameFromObj(obj, props.lang).replace('system.group.', ''),\n value: obj._id,\n icon: props.icon || obj.common?.icon,\n color: props.color || obj.common?.color,\n };\n } else {\n // value is a string, ignore list\n item = {\n name: value,\n value: prefix + value,\n icon: props.icon,\n color: props.color,\n };\n }\n } else {\n item = {\n name: value,\n value: prefix + value,\n icon: props.icon,\n color: props.color,\n };\n }\n } else if (!value || typeof value !== 'object') {\n item = {\n name: '',\n value: '',\n icon: props.icon,\n color: props.color,\n };\n } else {\n // Item is an ioBroker.Object\n const obj: ioBroker.Object = value as ioBroker.Object;\n item = {\n name: Utils.getObjectNameFromObj(obj, props.lang)\n .replace('system.group.', '')\n .replace('system.user.', '')\n .replace('enum.rooms.', '')\n .replace('enum.functions.', ''),\n value: obj._id,\n icon: props.icon || obj.common?.icon,\n color: props.color || obj.common?.color,\n };\n }\n\n const style = item?.color\n ? {\n border: `1px solid ${Utils.invertColor(item?.color)}`,\n color: Utils.getInvertedColor(item?.color, props.themeType || 'light', true) || undefined,\n backgroundColor: item?.color,\n }\n : {};\n\n return (\n <div\n style={{ ...(props.style || undefined), ...styles.div, ...(style || undefined) }}\n className={Utils.clsx(props.className, props.moreClasses?.root)}\n title={props.title || item.value}\n >\n {item?.icon ? (\n <Icon\n src={item?.icon}\n className={props.moreClasses?.icon}\n style={styles.icon}\n />\n ) : null}\n <div\n style={styles.text}\n className={props.moreClasses?.text}\n >\n {item?.name}\n </div>\n </div>\n );\n}\n"]}
@@ -1,2 +1,2 @@
1
1
  import { type JSX } from 'react';
2
- export declare const DialogTextInput: (props: Record<string, any>) => JSX.Element /** The text replacement callback */;
2
+ export declare const DialogTextInput: (props: Record<string, any>) => JSX.Element;
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
- import { type IconProps } from './IconProps';
3
- export declare const IconAdapter: (props: IconProps) => React.JSX.Element;
2
+ import { type IconsIconProps } from './types';
3
+ export declare function IconAdapter(props: IconsIconProps): React.JSX.Element;
@@ -1,5 +1,7 @@
1
1
  import React from 'react';
2
2
  // Icon copied from https://github.com/FortAwesome/Font-Awesome/blob/0d1f27efb836eb2ab994ba37221849ed64a73e5c/svgs/regular/
3
- export const IconAdapter = (props) => (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", onClick: e => props.onClick && props.onClick(e), viewBox: "0 0 512 512", width: props.width || (props.fontSize === 'small' ? 16 : 20), height: props.height || props.width || (props.fontSize === 'small' ? 16 : 20), className: props.className, style: props.style },
4
- React.createElement("path", { fill: "currentColor", d: "M448 0L320 96v62.06l-83.03 83.03c6.79 4.25 13.27 9.06 19.07 14.87 5.8 5.8 10.62 12.28 14.87 19.07L353.94 192H416l96-128-64-64zM128 278.59L10.92 395.67c-14.55 14.55-14.55 38.15 0 52.71l52.7 52.7c14.56 14.56 38.15 14.56 52.71 0L233.41 384c29.11-29.11 29.11-76.3 0-105.41s-76.3-29.11-105.41 0z" })));
3
+ export function IconAdapter(props) {
4
+ return (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", onClick: e => props.onClick && props.onClick(e), viewBox: "0 0 512 512", width: props.width || (props.fontSize === 'small' ? 16 : 20), height: props.height || props.width || (props.fontSize === 'small' ? 16 : 20), className: props.className, style: props.style },
5
+ React.createElement("path", { fill: "currentColor", d: "M448 0L320 96v62.06l-83.03 83.03c6.79 4.25 13.27 9.06 19.07 14.87 5.8 5.8 10.62 12.28 14.87 19.07L353.94 192H416l96-128-64-64zM128 278.59L10.92 395.67c-14.55 14.55-14.55 38.15 0 52.71l52.7 52.7c14.56 14.56 38.15 14.56 52.71 0L233.41 384c29.11-29.11 29.11-76.3 0-105.41s-76.3-29.11-105.41 0z" })));
6
+ }
5
7
  //# sourceMappingURL=IconAdapter.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"IconAdapter.js","sourceRoot":"./src/","sources":["icons/IconAdapter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,2HAA2H;AAC3H,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAgB,EAAqB,EAAE,CAAC,CAChE,6BACI,KAAK,EAAC,4BAA4B,EAClC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAC/C,OAAO,EAAC,aAAa,EACrB,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAC5D,MAAM,EAAE,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAC7E,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,KAAK,EAAE,KAAK,CAAC,KAAK;IAElB,8BACI,IAAI,EAAC,cAAc,EACnB,CAAC,EAAC,oSAAoS,GACxS,CACA,CACT,CAAC","sourcesContent":["import React from 'react';\nimport { type IconProps } from './IconProps';\n\n// Icon copied from https://github.com/FortAwesome/Font-Awesome/blob/0d1f27efb836eb2ab994ba37221849ed64a73e5c/svgs/regular/\nexport const IconAdapter = (props: IconProps): React.JSX.Element => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n onClick={e => props.onClick && props.onClick(e)}\n viewBox=\"0 0 512 512\"\n width={props.width || (props.fontSize === 'small' ? 16 : 20)}\n height={props.height || props.width || (props.fontSize === 'small' ? 16 : 20)}\n className={props.className}\n style={props.style}\n >\n <path\n fill=\"currentColor\"\n d=\"M448 0L320 96v62.06l-83.03 83.03c6.79 4.25 13.27 9.06 19.07 14.87 5.8 5.8 10.62 12.28 14.87 19.07L353.94 192H416l96-128-64-64zM128 278.59L10.92 395.67c-14.55 14.55-14.55 38.15 0 52.71l52.7 52.7c14.56 14.56 38.15 14.56 52.71 0L233.41 384c29.11-29.11 29.11-76.3 0-105.41s-76.3-29.11-105.41 0z\"\n />\n </svg>\n);\n"]}
1
+ {"version":3,"file":"IconAdapter.js","sourceRoot":"./src/","sources":["icons/IconAdapter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,2HAA2H;AAC3H,MAAM,UAAU,WAAW,CAAC,KAAqB;IAC7C,OAAO,CACH,6BACI,KAAK,EAAC,4BAA4B,EAClC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAC/C,OAAO,EAAC,aAAa,EACrB,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAC5D,MAAM,EAAE,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAC7E,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,KAAK,EAAE,KAAK,CAAC,KAAK;QAElB,8BACI,IAAI,EAAC,cAAc,EACnB,CAAC,EAAC,oSAAoS,GACxS,CACA,CACT,CAAC;AACN,CAAC","sourcesContent":["import React from 'react';\nimport { type IconsIconProps } from './types';\n\n// Icon copied from https://github.com/FortAwesome/Font-Awesome/blob/0d1f27efb836eb2ab994ba37221849ed64a73e5c/svgs/regular/\nexport function IconAdapter(props: IconsIconProps): React.JSX.Element {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n onClick={e => props.onClick && props.onClick(e)}\n viewBox=\"0 0 512 512\"\n width={props.width || (props.fontSize === 'small' ? 16 : 20)}\n height={props.height || props.width || (props.fontSize === 'small' ? 16 : 20)}\n className={props.className}\n style={props.style}\n >\n <path\n fill=\"currentColor\"\n d=\"M448 0L320 96v62.06l-83.03 83.03c6.79 4.25 13.27 9.06 19.07 14.87 5.8 5.8 10.62 12.28 14.87 19.07L353.94 192H416l96-128-64-64zM128 278.59L10.92 395.67c-14.55 14.55-14.55 38.15 0 52.71l52.7 52.7c14.56 14.56 38.15 14.56 52.71 0L233.41 384c29.11-29.11 29.11-76.3 0-105.41s-76.3-29.11-105.41 0z\"\n />\n </svg>\n );\n}\n"]}
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
- import { type IconProps } from './IconProps';
3
- export declare const IconAlias: (props: IconProps) => React.JSX.Element;
2
+ import { type IconsIconProps } from './types';
3
+ export declare function IconAlias(props: IconsIconProps): React.JSX.Element;
@@ -1,5 +1,7 @@
1
1
  import React from 'react';
2
2
  // Icon copied from https://github.com/FortAwesome/Font-Awesome/blob/0d1f27efb836eb2ab994ba37221849ed64a73e5c/svgs/regular/
3
- export const IconAlias = (props) => (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", onClick: e => props.onClick && props.onClick(e), viewBox: "0 0 512 512", width: props.width || (props.fontSize === 'small' ? 16 : 20), height: props.height || props.width || (props.fontSize === 'small' ? 16 : 20), className: props.className, style: props.style },
4
- React.createElement("path", { fill: "currentColor", d: "M96.06 454.35c.01 6.29 1.87 12.45 5.36 17.69l17.09 25.69a31.99 31.99 0 0 0 26.64 14.28h61.71a31.99 31.99 0 0 0 26.64-14.28l17.09-25.69a31.989 31.989 0 0 0 5.36-17.69l.04-38.35H96.01l.05 38.35zM0 176c0 44.37 16.45 84.85 43.56 115.78 16.52 18.85 42.36 58.23 52.21 91.45.04.26.07.52.11.78h160.24c.04-.26.07-.51.11-.78 9.85-33.22 35.69-72.6 52.21-91.45C335.55 260.85 352 220.37 352 176 352 78.61 272.91-.3 175.45 0 73.44.31 0 82.97 0 176zm176-80c-44.11 0-80 35.89-80 80 0 8.84-7.16 16-16 16s-16-7.16-16-16c0-61.76 50.24-112 112-112 8.84 0 16 7.16 16 16s-7.16 16-16 16z" })));
3
+ export function IconAlias(props) {
4
+ return (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", onClick: e => props.onClick && props.onClick(e), viewBox: "0 0 512 512", width: props.width || (props.fontSize === 'small' ? 16 : 20), height: props.height || props.width || (props.fontSize === 'small' ? 16 : 20), className: props.className, style: props.style },
5
+ React.createElement("path", { fill: "currentColor", d: "M96.06 454.35c.01 6.29 1.87 12.45 5.36 17.69l17.09 25.69a31.99 31.99 0 0 0 26.64 14.28h61.71a31.99 31.99 0 0 0 26.64-14.28l17.09-25.69a31.989 31.989 0 0 0 5.36-17.69l.04-38.35H96.01l.05 38.35zM0 176c0 44.37 16.45 84.85 43.56 115.78 16.52 18.85 42.36 58.23 52.21 91.45.04.26.07.52.11.78h160.24c.04-.26.07-.51.11-.78 9.85-33.22 35.69-72.6 52.21-91.45C335.55 260.85 352 220.37 352 176 352 78.61 272.91-.3 175.45 0 73.44.31 0 82.97 0 176zm176-80c-44.11 0-80 35.89-80 80 0 8.84-7.16 16-16 16s-16-7.16-16-16c0-61.76 50.24-112 112-112 8.84 0 16 7.16 16 16s-7.16 16-16 16z" })));
6
+ }
5
7
  //# sourceMappingURL=IconAlias.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"IconAlias.js","sourceRoot":"./src/","sources":["icons/IconAlias.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,2HAA2H;AAC3H,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,KAAgB,EAAqB,EAAE,CAAC,CAC9D,6BACI,KAAK,EAAC,4BAA4B,EAClC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAC/C,OAAO,EAAC,aAAa,EACrB,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAC5D,MAAM,EAAE,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAC7E,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,KAAK,EAAE,KAAK,CAAC,KAAK;IAElB,8BACI,IAAI,EAAC,cAAc,EACnB,CAAC,EAAC,sjBAAsjB,GAC1jB,CACA,CACT,CAAC","sourcesContent":["import React from 'react';\nimport { type IconProps } from './IconProps';\n\n// Icon copied from https://github.com/FortAwesome/Font-Awesome/blob/0d1f27efb836eb2ab994ba37221849ed64a73e5c/svgs/regular/\nexport const IconAlias = (props: IconProps): React.JSX.Element => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n onClick={e => props.onClick && props.onClick(e)}\n viewBox=\"0 0 512 512\"\n width={props.width || (props.fontSize === 'small' ? 16 : 20)}\n height={props.height || props.width || (props.fontSize === 'small' ? 16 : 20)}\n className={props.className}\n style={props.style}\n >\n <path\n fill=\"currentColor\"\n d=\"M96.06 454.35c.01 6.29 1.87 12.45 5.36 17.69l17.09 25.69a31.99 31.99 0 0 0 26.64 14.28h61.71a31.99 31.99 0 0 0 26.64-14.28l17.09-25.69a31.989 31.989 0 0 0 5.36-17.69l.04-38.35H96.01l.05 38.35zM0 176c0 44.37 16.45 84.85 43.56 115.78 16.52 18.85 42.36 58.23 52.21 91.45.04.26.07.52.11.78h160.24c.04-.26.07-.51.11-.78 9.85-33.22 35.69-72.6 52.21-91.45C335.55 260.85 352 220.37 352 176 352 78.61 272.91-.3 175.45 0 73.44.31 0 82.97 0 176zm176-80c-44.11 0-80 35.89-80 80 0 8.84-7.16 16-16 16s-16-7.16-16-16c0-61.76 50.24-112 112-112 8.84 0 16 7.16 16 16s-7.16 16-16 16z\"\n />\n </svg>\n);\n"]}
1
+ {"version":3,"file":"IconAlias.js","sourceRoot":"./src/","sources":["icons/IconAlias.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,2HAA2H;AAC3H,MAAM,UAAU,SAAS,CAAC,KAAqB;IAC3C,OAAO,CACH,6BACI,KAAK,EAAC,4BAA4B,EAClC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAC/C,OAAO,EAAC,aAAa,EACrB,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAC5D,MAAM,EAAE,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAC7E,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,KAAK,EAAE,KAAK,CAAC,KAAK;QAElB,8BACI,IAAI,EAAC,cAAc,EACnB,CAAC,EAAC,sjBAAsjB,GAC1jB,CACA,CACT,CAAC;AACN,CAAC","sourcesContent":["import React from 'react';\nimport { type IconsIconProps } from './types';\n\n// Icon copied from https://github.com/FortAwesome/Font-Awesome/blob/0d1f27efb836eb2ab994ba37221849ed64a73e5c/svgs/regular/\nexport function IconAlias(props: IconsIconProps): React.JSX.Element {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n onClick={e => props.onClick && props.onClick(e)}\n viewBox=\"0 0 512 512\"\n width={props.width || (props.fontSize === 'small' ? 16 : 20)}\n height={props.height || props.width || (props.fontSize === 'small' ? 16 : 20)}\n className={props.className}\n style={props.style}\n >\n <path\n fill=\"currentColor\"\n d=\"M96.06 454.35c.01 6.29 1.87 12.45 5.36 17.69l17.09 25.69a31.99 31.99 0 0 0 26.64 14.28h61.71a31.99 31.99 0 0 0 26.64-14.28l17.09-25.69a31.989 31.989 0 0 0 5.36-17.69l.04-38.35H96.01l.05 38.35zM0 176c0 44.37 16.45 84.85 43.56 115.78 16.52 18.85 42.36 58.23 52.21 91.45.04.26.07.52.11.78h160.24c.04-.26.07-.51.11-.78 9.85-33.22 35.69-72.6 52.21-91.45C335.55 260.85 352 220.37 352 176 352 78.61 272.91-.3 175.45 0 73.44.31 0 82.97 0 176zm176-80c-44.11 0-80 35.89-80 80 0 8.84-7.16 16-16 16s-16-7.16-16-16c0-61.76 50.24-112 112-112 8.84 0 16 7.16 16 16s-7.16 16-16 16z\"\n />\n </svg>\n );\n}\n"]}
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
- import { type IconProps } from './IconProps';
3
- export declare const IconButtonImage: (props: IconProps) => React.JSX.Element;
2
+ import { type IconsIconProps } from './types';
3
+ export declare function IconButtonImage(props: IconsIconProps): React.JSX.Element;
@@ -1,7 +1,9 @@
1
1
  import React from 'react';
2
2
  // Copyright Bluefox
3
- export const IconButtonImage = (props) => (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", onClick: e => props.onClick && props.onClick(e), viewBox: "0 0 436 436", width: props.width || (props.fontSize === 'small' ? 16 : 20), height: props.height || props.width || (props.fontSize === 'small' ? 16 : 20), className: props.className, style: props.style },
4
- React.createElement("g", { fill: "currentColor" },
5
- React.createElement("path", { d: "m195.23077,24.30769c-36,3 -67,12 -96,26c-49,24 -82,61 -93,104l-3,11l-1,50c0,46 0,49 2,59l5,20c21,58 84,103 165,116c16,3 53,4 70,2c60,-6 111,-28 147,-64c21,-21 36,-49 40,-74a866,866 0 0 0 1,-104c-3,-18 -6,-28 -13,-43c-26,-52 -87,-90 -162,-101c-16,-2 -48,-3 -63,-2l1,0zm60,23c36,5 70,18 95,35c31,20 51,47 59,77c2,7 2,11 2,25c1,15 0,18 -2,26c-19,69 -104,117 -200,114c-47,-2 -90,-15 -124,-38c-31,-20 -51,-47 -59,-77c-3,-11 -4,-32 -2,-43c8,-42 41,-78 91,-101a260,260 0 0 1 140,-19l0,1zm-221,222c21,26 57,49 95,62c81,27 174,14 239,-32c14,-10 31,-27 41,-41c2,-2 2,-2 2,7c-1,23 -16,50 -38,72c-78,74 -233,74 -311,-1a121,121 0 0 1 -39,-76l0,-6l3,4l8,11z" }),
6
- React.createElement("path", { d: "m201.23077,47.30769c-40,3 -79,19 -104,44c-55,55 -38,133 37,171c52,26 122,24 172,-5c30,-17 51,-42 58,-71c3,-11 3,-34 0,-45c-6,-23 -21,-44 -40,-60l-27,-16a184,184 0 0 0 -96,-18zm30,21c56,5 100,35 112,75c4,11 4,30 0,41c-8,25 -26,45 -54,59a166,166 0 0 1 -160,-8a98,98 0 0 1 -41,-53c-5,-18 -2,-39 8,-57c23,-39 79,-62 135,-57z" }))));
3
+ export function IconButtonImage(props) {
4
+ return (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", onClick: e => props.onClick && props.onClick(e), viewBox: "0 0 436 436", width: props.width || (props.fontSize === 'small' ? 16 : 20), height: props.height || props.width || (props.fontSize === 'small' ? 16 : 20), className: props.className, style: props.style },
5
+ React.createElement("g", { fill: "currentColor" },
6
+ React.createElement("path", { d: "m195.23077,24.30769c-36,3 -67,12 -96,26c-49,24 -82,61 -93,104l-3,11l-1,50c0,46 0,49 2,59l5,20c21,58 84,103 165,116c16,3 53,4 70,2c60,-6 111,-28 147,-64c21,-21 36,-49 40,-74a866,866 0 0 0 1,-104c-3,-18 -6,-28 -13,-43c-26,-52 -87,-90 -162,-101c-16,-2 -48,-3 -63,-2l1,0zm60,23c36,5 70,18 95,35c31,20 51,47 59,77c2,7 2,11 2,25c1,15 0,18 -2,26c-19,69 -104,117 -200,114c-47,-2 -90,-15 -124,-38c-31,-20 -51,-47 -59,-77c-3,-11 -4,-32 -2,-43c8,-42 41,-78 91,-101a260,260 0 0 1 140,-19l0,1zm-221,222c21,26 57,49 95,62c81,27 174,14 239,-32c14,-10 31,-27 41,-41c2,-2 2,-2 2,7c-1,23 -16,50 -38,72c-78,74 -233,74 -311,-1a121,121 0 0 1 -39,-76l0,-6l3,4l8,11z" }),
7
+ React.createElement("path", { d: "m201.23077,47.30769c-40,3 -79,19 -104,44c-55,55 -38,133 37,171c52,26 122,24 172,-5c30,-17 51,-42 58,-71c3,-11 3,-34 0,-45c-6,-23 -21,-44 -40,-60l-27,-16a184,184 0 0 0 -96,-18zm30,21c56,5 100,35 112,75c4,11 4,30 0,41c-8,25 -26,45 -54,59a166,166 0 0 1 -160,-8a98,98 0 0 1 -41,-53c-5,-18 -2,-39 8,-57c23,-39 79,-62 135,-57z" }))));
8
+ }
7
9
  //# sourceMappingURL=IconButtonImage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"IconButtonImage.js","sourceRoot":"./src/","sources":["icons/IconButtonImage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,oBAAoB;AACpB,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,KAAgB,EAAqB,EAAE,CAAC,CACpE,6BACI,KAAK,EAAC,4BAA4B,EAClC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAC/C,OAAO,EAAC,aAAa,EACrB,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAC5D,MAAM,EAAE,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAC7E,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,KAAK,EAAE,KAAK,CAAC,KAAK;IAElB,2BAAG,IAAI,EAAC,cAAc;QAClB,8BAAM,CAAC,EAAC,qoBAAqoB,GAAG;QAChpB,8BAAM,CAAC,EAAC,kUAAkU,GAAG,CAC7U,CACF,CACT,CAAC","sourcesContent":["import React from 'react';\nimport { type IconProps } from './IconProps';\n\n// Copyright Bluefox\nexport const IconButtonImage = (props: IconProps): React.JSX.Element => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n onClick={e => props.onClick && props.onClick(e)}\n viewBox=\"0 0 436 436\"\n width={props.width || (props.fontSize === 'small' ? 16 : 20)}\n height={props.height || props.width || (props.fontSize === 'small' ? 16 : 20)}\n className={props.className}\n style={props.style}\n >\n <g fill=\"currentColor\">\n <path d=\"m195.23077,24.30769c-36,3 -67,12 -96,26c-49,24 -82,61 -93,104l-3,11l-1,50c0,46 0,49 2,59l5,20c21,58 84,103 165,116c16,3 53,4 70,2c60,-6 111,-28 147,-64c21,-21 36,-49 40,-74a866,866 0 0 0 1,-104c-3,-18 -6,-28 -13,-43c-26,-52 -87,-90 -162,-101c-16,-2 -48,-3 -63,-2l1,0zm60,23c36,5 70,18 95,35c31,20 51,47 59,77c2,7 2,11 2,25c1,15 0,18 -2,26c-19,69 -104,117 -200,114c-47,-2 -90,-15 -124,-38c-31,-20 -51,-47 -59,-77c-3,-11 -4,-32 -2,-43c8,-42 41,-78 91,-101a260,260 0 0 1 140,-19l0,1zm-221,222c21,26 57,49 95,62c81,27 174,14 239,-32c14,-10 31,-27 41,-41c2,-2 2,-2 2,7c-1,23 -16,50 -38,72c-78,74 -233,74 -311,-1a121,121 0 0 1 -39,-76l0,-6l3,4l8,11z\" />\n <path d=\"m201.23077,47.30769c-40,3 -79,19 -104,44c-55,55 -38,133 37,171c52,26 122,24 172,-5c30,-17 51,-42 58,-71c3,-11 3,-34 0,-45c-6,-23 -21,-44 -40,-60l-27,-16a184,184 0 0 0 -96,-18zm30,21c56,5 100,35 112,75c4,11 4,30 0,41c-8,25 -26,45 -54,59a166,166 0 0 1 -160,-8a98,98 0 0 1 -41,-53c-5,-18 -2,-39 8,-57c23,-39 79,-62 135,-57z\" />\n </g>\n </svg>\n);\n"]}
1
+ {"version":3,"file":"IconButtonImage.js","sourceRoot":"./src/","sources":["icons/IconButtonImage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,oBAAoB;AACpB,MAAM,UAAU,eAAe,CAAC,KAAqB;IACjD,OAAO,CACH,6BACI,KAAK,EAAC,4BAA4B,EAClC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAC/C,OAAO,EAAC,aAAa,EACrB,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAC5D,MAAM,EAAE,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAC7E,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,KAAK,EAAE,KAAK,CAAC,KAAK;QAElB,2BAAG,IAAI,EAAC,cAAc;YAClB,8BAAM,CAAC,EAAC,qoBAAqoB,GAAG;YAChpB,8BAAM,CAAC,EAAC,kUAAkU,GAAG,CAC7U,CACF,CACT,CAAC;AACN,CAAC","sourcesContent":["import React from 'react';\nimport { type IconsIconProps } from './types';\n\n// Copyright Bluefox\nexport function IconButtonImage(props: IconsIconProps): React.JSX.Element {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n onClick={e => props.onClick && props.onClick(e)}\n viewBox=\"0 0 436 436\"\n width={props.width || (props.fontSize === 'small' ? 16 : 20)}\n height={props.height || props.width || (props.fontSize === 'small' ? 16 : 20)}\n className={props.className}\n style={props.style}\n >\n <g fill=\"currentColor\">\n <path d=\"m195.23077,24.30769c-36,3 -67,12 -96,26c-49,24 -82,61 -93,104l-3,11l-1,50c0,46 0,49 2,59l5,20c21,58 84,103 165,116c16,3 53,4 70,2c60,-6 111,-28 147,-64c21,-21 36,-49 40,-74a866,866 0 0 0 1,-104c-3,-18 -6,-28 -13,-43c-26,-52 -87,-90 -162,-101c-16,-2 -48,-3 -63,-2l1,0zm60,23c36,5 70,18 95,35c31,20 51,47 59,77c2,7 2,11 2,25c1,15 0,18 -2,26c-19,69 -104,117 -200,114c-47,-2 -90,-15 -124,-38c-31,-20 -51,-47 -59,-77c-3,-11 -4,-32 -2,-43c8,-42 41,-78 91,-101a260,260 0 0 1 140,-19l0,1zm-221,222c21,26 57,49 95,62c81,27 174,14 239,-32c14,-10 31,-27 41,-41c2,-2 2,-2 2,7c-1,23 -16,50 -38,72c-78,74 -233,74 -311,-1a121,121 0 0 1 -39,-76l0,-6l3,4l8,11z\" />\n <path d=\"m201.23077,47.30769c-40,3 -79,19 -104,44c-55,55 -38,133 37,171c52,26 122,24 172,-5c30,-17 51,-42 58,-71c3,-11 3,-34 0,-45c-6,-23 -21,-44 -40,-60l-27,-16a184,184 0 0 0 -96,-18zm30,21c56,5 100,35 112,75c4,11 4,30 0,41c-8,25 -26,45 -54,59a166,166 0 0 1 -160,-8a98,98 0 0 1 -41,-53c-5,-18 -2,-39 8,-57c23,-39 79,-62 135,-57z\" />\n </g>\n </svg>\n );\n}\n"]}
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
- import { type IconProps } from './IconProps';
3
- export declare const IconChannel: (props: IconProps) => React.JSX.Element;
2
+ import { type IconsIconProps } from './types';
3
+ export declare function IconChannel(props: IconsIconProps): React.JSX.Element;
@@ -1,8 +1,10 @@
1
1
  import React from 'react';
2
- export const IconChannel = (props) => (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", onClick: e => props.onClick && props.onClick(e), viewBox: "0 0 320 320", width: props.width || (props.fontSize === 'small' ? 16 : 20), height: props.height || props.width || (props.fontSize === 'small' ? 16 : 20), className: props.className, style: props.style },
3
- React.createElement("g", { fill: "currentColor" },
4
- React.createElement("rect", { rx: "32", height: "272", width: "267", y: "25", x: "25", strokeWidth: "15", stroke: "currentColor", fill: "none" }),
5
- React.createElement("ellipse", { stroke: "currentColor", ry: "26", rx: "26", cy: "248", cx: "160", fill: "none", strokeWidth: "15" }),
6
- React.createElement("line", { y2: "201.94531", x2: "159.5", y1: "46.94531", x1: "159.5", fillOpacity: "null", strokeOpacity: "null", strokeWidth: "15", stroke: "currentColor", fill: "none" }),
7
- React.createElement("rect", { height: "27", width: "50", y: "79.7979", x: "133.5", fillOpacity: "null", strokeOpacity: "null", strokeWidth: "15", stroke: "currentColor", fill: "#fff" }))));
2
+ export function IconChannel(props) {
3
+ return (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", onClick: e => props.onClick && props.onClick(e), viewBox: "0 0 320 320", width: props.width || (props.fontSize === 'small' ? 16 : 20), height: props.height || props.width || (props.fontSize === 'small' ? 16 : 20), className: props.className, style: props.style },
4
+ React.createElement("g", { fill: "currentColor" },
5
+ React.createElement("rect", { rx: "32", height: "272", width: "267", y: "25", x: "25", strokeWidth: "15", stroke: "currentColor", fill: "none" }),
6
+ React.createElement("ellipse", { stroke: "currentColor", ry: "26", rx: "26", cy: "248", cx: "160", fill: "none", strokeWidth: "15" }),
7
+ React.createElement("line", { y2: "201.94531", x2: "159.5", y1: "46.94531", x1: "159.5", fillOpacity: "null", strokeOpacity: "null", strokeWidth: "15", stroke: "currentColor", fill: "none" }),
8
+ React.createElement("rect", { height: "27", width: "50", y: "79.7979", x: "133.5", fillOpacity: "null", strokeOpacity: "null", strokeWidth: "15", stroke: "currentColor", fill: "#fff" }))));
9
+ }
8
10
  //# sourceMappingURL=IconChannel.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"IconChannel.js","sourceRoot":"./src/","sources":["icons/IconChannel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAgB,EAAqB,EAAE,CAAC,CAChE,6BACI,KAAK,EAAC,4BAA4B,EAClC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAC/C,OAAO,EAAC,aAAa,EACrB,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAC5D,MAAM,EAAE,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAC7E,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,KAAK,EAAE,KAAK,CAAC,KAAK;IAElB,2BAAG,IAAI,EAAC,cAAc;QAClB,8BACI,EAAE,EAAC,IAAI,EACP,MAAM,EAAC,KAAK,EACZ,KAAK,EAAC,KAAK,EACX,CAAC,EAAC,IAAI,EACN,CAAC,EAAC,IAAI,EACN,WAAW,EAAC,IAAI,EAChB,MAAM,EAAC,cAAc,EACrB,IAAI,EAAC,MAAM,GACb;QACF,iCACI,MAAM,EAAC,cAAc,EACrB,EAAE,EAAC,IAAI,EACP,EAAE,EAAC,IAAI,EACP,EAAE,EAAC,KAAK,EACR,EAAE,EAAC,KAAK,EACR,IAAI,EAAC,MAAM,EACX,WAAW,EAAC,IAAI,GAClB;QACF,8BACI,EAAE,EAAC,WAAW,EACd,EAAE,EAAC,OAAO,EACV,EAAE,EAAC,UAAU,EACb,EAAE,EAAC,OAAO,EACV,WAAW,EAAC,MAAM,EAClB,aAAa,EAAC,MAAM,EACpB,WAAW,EAAC,IAAI,EAChB,MAAM,EAAC,cAAc,EACrB,IAAI,EAAC,MAAM,GACb;QACF,8BACI,MAAM,EAAC,IAAI,EACX,KAAK,EAAC,IAAI,EACV,CAAC,EAAC,SAAS,EACX,CAAC,EAAC,OAAO,EACT,WAAW,EAAC,MAAM,EAClB,aAAa,EAAC,MAAM,EACpB,WAAW,EAAC,IAAI,EAChB,MAAM,EAAC,cAAc,EACrB,IAAI,EAAC,MAAM,GACb,CACF,CACF,CACT,CAAC","sourcesContent":["import React from 'react';\nimport { type IconProps } from './IconProps';\n\nexport const IconChannel = (props: IconProps): React.JSX.Element => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n onClick={e => props.onClick && props.onClick(e)}\n viewBox=\"0 0 320 320\"\n width={props.width || (props.fontSize === 'small' ? 16 : 20)}\n height={props.height || props.width || (props.fontSize === 'small' ? 16 : 20)}\n className={props.className}\n style={props.style}\n >\n <g fill=\"currentColor\">\n <rect\n rx=\"32\"\n height=\"272\"\n width=\"267\"\n y=\"25\"\n x=\"25\"\n strokeWidth=\"15\"\n stroke=\"currentColor\"\n fill=\"none\"\n />\n <ellipse\n stroke=\"currentColor\"\n ry=\"26\"\n rx=\"26\"\n cy=\"248\"\n cx=\"160\"\n fill=\"none\"\n strokeWidth=\"15\"\n />\n <line\n y2=\"201.94531\"\n x2=\"159.5\"\n y1=\"46.94531\"\n x1=\"159.5\"\n fillOpacity=\"null\"\n strokeOpacity=\"null\"\n strokeWidth=\"15\"\n stroke=\"currentColor\"\n fill=\"none\"\n />\n <rect\n height=\"27\"\n width=\"50\"\n y=\"79.7979\"\n x=\"133.5\"\n fillOpacity=\"null\"\n strokeOpacity=\"null\"\n strokeWidth=\"15\"\n stroke=\"currentColor\"\n fill=\"#fff\"\n />\n </g>\n </svg>\n);\n"]}
1
+ {"version":3,"file":"IconChannel.js","sourceRoot":"./src/","sources":["icons/IconChannel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,UAAU,WAAW,CAAC,KAAqB;IAC7C,OAAO,CACH,6BACI,KAAK,EAAC,4BAA4B,EAClC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAC/C,OAAO,EAAC,aAAa,EACrB,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAC5D,MAAM,EAAE,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAC7E,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,KAAK,EAAE,KAAK,CAAC,KAAK;QAElB,2BAAG,IAAI,EAAC,cAAc;YAClB,8BACI,EAAE,EAAC,IAAI,EACP,MAAM,EAAC,KAAK,EACZ,KAAK,EAAC,KAAK,EACX,CAAC,EAAC,IAAI,EACN,CAAC,EAAC,IAAI,EACN,WAAW,EAAC,IAAI,EAChB,MAAM,EAAC,cAAc,EACrB,IAAI,EAAC,MAAM,GACb;YACF,iCACI,MAAM,EAAC,cAAc,EACrB,EAAE,EAAC,IAAI,EACP,EAAE,EAAC,IAAI,EACP,EAAE,EAAC,KAAK,EACR,EAAE,EAAC,KAAK,EACR,IAAI,EAAC,MAAM,EACX,WAAW,EAAC,IAAI,GAClB;YACF,8BACI,EAAE,EAAC,WAAW,EACd,EAAE,EAAC,OAAO,EACV,EAAE,EAAC,UAAU,EACb,EAAE,EAAC,OAAO,EACV,WAAW,EAAC,MAAM,EAClB,aAAa,EAAC,MAAM,EACpB,WAAW,EAAC,IAAI,EAChB,MAAM,EAAC,cAAc,EACrB,IAAI,EAAC,MAAM,GACb;YACF,8BACI,MAAM,EAAC,IAAI,EACX,KAAK,EAAC,IAAI,EACV,CAAC,EAAC,SAAS,EACX,CAAC,EAAC,OAAO,EACT,WAAW,EAAC,MAAM,EAClB,aAAa,EAAC,MAAM,EACpB,WAAW,EAAC,IAAI,EAChB,MAAM,EAAC,cAAc,EACrB,IAAI,EAAC,MAAM,GACb,CACF,CACF,CACT,CAAC;AACN,CAAC","sourcesContent":["import React from 'react';\nimport { type IconsIconProps } from './types';\n\nexport function IconChannel(props: IconsIconProps): React.JSX.Element {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n onClick={e => props.onClick && props.onClick(e)}\n viewBox=\"0 0 320 320\"\n width={props.width || (props.fontSize === 'small' ? 16 : 20)}\n height={props.height || props.width || (props.fontSize === 'small' ? 16 : 20)}\n className={props.className}\n style={props.style}\n >\n <g fill=\"currentColor\">\n <rect\n rx=\"32\"\n height=\"272\"\n width=\"267\"\n y=\"25\"\n x=\"25\"\n strokeWidth=\"15\"\n stroke=\"currentColor\"\n fill=\"none\"\n />\n <ellipse\n stroke=\"currentColor\"\n ry=\"26\"\n rx=\"26\"\n cy=\"248\"\n cx=\"160\"\n fill=\"none\"\n strokeWidth=\"15\"\n />\n <line\n y2=\"201.94531\"\n x2=\"159.5\"\n y1=\"46.94531\"\n x1=\"159.5\"\n fillOpacity=\"null\"\n strokeOpacity=\"null\"\n strokeWidth=\"15\"\n stroke=\"currentColor\"\n fill=\"none\"\n />\n <rect\n height=\"27\"\n width=\"50\"\n y=\"79.7979\"\n x=\"133.5\"\n fillOpacity=\"null\"\n strokeOpacity=\"null\"\n strokeWidth=\"15\"\n stroke=\"currentColor\"\n fill=\"#fff\"\n />\n </g>\n </svg>\n );\n}\n"]}
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
- import { type IconProps } from './IconProps';
3
- export declare const IconClearFilter: (props: IconProps) => React.JSX.Element;
2
+ import { type IconsIconProps } from './types';
3
+ export declare function IconClearFilter(props: IconsIconProps): React.JSX.Element;
@@ -1,6 +1,8 @@
1
1
  import React from 'react';
2
2
  // Copyright Apache 2.0 https://raw.githubusercontent.com/material-icons/material-icons/master/svg/filter_alt/baseline.svg
3
3
  // https://github.com/material-icons/material-icons/blob/master/LICENSE
4
- export const IconClearFilter = (props) => (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", onClick: e => props.onClick && props.onClick(e), viewBox: "0 0 24 24", width: props.width || (props.fontSize === 'small' ? 16 : 20), height: props.height || props.width || (props.fontSize === 'small' ? 16 : 20), className: props.className, style: props.style },
5
- React.createElement("path", { fill: "currentColor", stroke: "currentColor", d: "M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39A.998.998 0 0 0 18.95 4H5.04c-.83 0-1.3.95-.79 1.61z" })));
4
+ export function IconClearFilter(props) {
5
+ return (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", onClick: e => props.onClick && props.onClick(e), viewBox: "0 0 24 24", width: props.width || (props.fontSize === 'small' ? 16 : 20), height: props.height || props.width || (props.fontSize === 'small' ? 16 : 20), className: props.className, style: props.style },
6
+ React.createElement("path", { fill: "currentColor", stroke: "currentColor", d: "M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39A.998.998 0 0 0 18.95 4H5.04c-.83 0-1.3.95-.79 1.61z" })));
7
+ }
6
8
  //# sourceMappingURL=IconClearFilter.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"IconClearFilter.js","sourceRoot":"./src/","sources":["icons/IconClearFilter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,0HAA0H;AAC1H,uEAAuE;AACvE,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,KAAgB,EAAqB,EAAE,CAAC,CACpE,6BACI,KAAK,EAAC,4BAA4B,EAClC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAC/C,OAAO,EAAC,WAAW,EACnB,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAC5D,MAAM,EAAE,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAC7E,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,KAAK,EAAE,KAAK,CAAC,KAAK;IAElB,8BACI,IAAI,EAAC,cAAc,EACnB,MAAM,EAAC,cAAc,EACrB,CAAC,EAAC,8IAA8I,GAClJ,CACA,CACT,CAAC","sourcesContent":["import React from 'react';\nimport { type IconProps } from './IconProps';\n\n// Copyright Apache 2.0 https://raw.githubusercontent.com/material-icons/material-icons/master/svg/filter_alt/baseline.svg\n// https://github.com/material-icons/material-icons/blob/master/LICENSE\nexport const IconClearFilter = (props: IconProps): React.JSX.Element => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n onClick={e => props.onClick && props.onClick(e)}\n viewBox=\"0 0 24 24\"\n width={props.width || (props.fontSize === 'small' ? 16 : 20)}\n height={props.height || props.width || (props.fontSize === 'small' ? 16 : 20)}\n className={props.className}\n style={props.style}\n >\n <path\n fill=\"currentColor\"\n stroke=\"currentColor\"\n d=\"M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39A.998.998 0 0 0 18.95 4H5.04c-.83 0-1.3.95-.79 1.61z\"\n />\n </svg>\n);\n"]}
1
+ {"version":3,"file":"IconClearFilter.js","sourceRoot":"./src/","sources":["icons/IconClearFilter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,0HAA0H;AAC1H,uEAAuE;AACvE,MAAM,UAAU,eAAe,CAAC,KAAqB;IACjD,OAAO,CACH,6BACI,KAAK,EAAC,4BAA4B,EAClC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAC/C,OAAO,EAAC,WAAW,EACnB,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAC5D,MAAM,EAAE,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAC7E,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,KAAK,EAAE,KAAK,CAAC,KAAK;QAElB,8BACI,IAAI,EAAC,cAAc,EACnB,MAAM,EAAC,cAAc,EACrB,CAAC,EAAC,8IAA8I,GAClJ,CACA,CACT,CAAC;AACN,CAAC","sourcesContent":["import React from 'react';\nimport { type IconsIconProps } from './types';\n\n// Copyright Apache 2.0 https://raw.githubusercontent.com/material-icons/material-icons/master/svg/filter_alt/baseline.svg\n// https://github.com/material-icons/material-icons/blob/master/LICENSE\nexport function IconClearFilter(props: IconsIconProps): React.JSX.Element {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n onClick={e => props.onClick && props.onClick(e)}\n viewBox=\"0 0 24 24\"\n width={props.width || (props.fontSize === 'small' ? 16 : 20)}\n height={props.height || props.width || (props.fontSize === 'small' ? 16 : 20)}\n className={props.className}\n style={props.style}\n >\n <path\n fill=\"currentColor\"\n stroke=\"currentColor\"\n d=\"M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39A.998.998 0 0 0 18.95 4H5.04c-.83 0-1.3.95-.79 1.61z\"\n />\n </svg>\n );\n}\n"]}
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
- import { type IconProps } from './IconProps';
3
- export declare const IconClosed: (props: IconProps) => React.JSX.Element;
2
+ import { type IconsIconProps } from './types';
3
+ export declare function IconClosed(props: IconsIconProps): React.JSX.Element;
@@ -1,5 +1,7 @@
1
1
  import React from 'react';
2
2
  // Icon copied from https://github.com/FortAwesome/Font-Awesome/blob/0d1f27efb836eb2ab994ba37221849ed64a73e5c/svgs/regular/
3
- export const IconClosed = (props) => (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", onClick: e => props.onClick && props.onClick(e), viewBox: "0 0 650 512", width: props.width || (props.fontSize === 'small' ? 16 : 20), height: props.height || props.width || (props.fontSize === 'small' ? 16 : 20), className: props.className, style: props.style },
4
- React.createElement("path", { fill: "currentColor", d: "m524,128l-192,0l-64,-64l-160,0c-26.51,0 -48,21.49 -48,48l0,288c0,26.51 21.49,48 48,48l416,0c26.51,0 48,-21.49 48,-48l0,-224c0,-26.51 -21.49,-48 -48,-48z" })));
3
+ export function IconClosed(props) {
4
+ return (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", onClick: e => props.onClick && props.onClick(e), viewBox: "0 0 650 512", width: props.width || (props.fontSize === 'small' ? 16 : 20), height: props.height || props.width || (props.fontSize === 'small' ? 16 : 20), className: props.className, style: props.style },
5
+ React.createElement("path", { fill: "currentColor", d: "m524,128l-192,0l-64,-64l-160,0c-26.51,0 -48,21.49 -48,48l0,288c0,26.51 21.49,48 48,48l416,0c26.51,0 48,-21.49 48,-48l0,-224c0,-26.51 -21.49,-48 -48,-48z" })));
6
+ }
5
7
  //# sourceMappingURL=IconClosed.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"IconClosed.js","sourceRoot":"./src/","sources":["icons/IconClosed.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,2HAA2H;AAC3H,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,KAAgB,EAAqB,EAAE,CAAC,CAC/D,6BACI,KAAK,EAAC,4BAA4B,EAClC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAC/C,OAAO,EAAC,aAAa,EACrB,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAC5D,MAAM,EAAE,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAC7E,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,KAAK,EAAE,KAAK,CAAC,KAAK;IAElB,8BACI,IAAI,EAAC,cAAc,EACnB,CAAC,EAAC,0JAA0J,GAC9J,CACA,CACT,CAAC","sourcesContent":["import React from 'react';\nimport { type IconProps } from './IconProps';\n\n// Icon copied from https://github.com/FortAwesome/Font-Awesome/blob/0d1f27efb836eb2ab994ba37221849ed64a73e5c/svgs/regular/\nexport const IconClosed = (props: IconProps): React.JSX.Element => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n onClick={e => props.onClick && props.onClick(e)}\n viewBox=\"0 0 650 512\"\n width={props.width || (props.fontSize === 'small' ? 16 : 20)}\n height={props.height || props.width || (props.fontSize === 'small' ? 16 : 20)}\n className={props.className}\n style={props.style}\n >\n <path\n fill=\"currentColor\"\n d=\"m524,128l-192,0l-64,-64l-160,0c-26.51,0 -48,21.49 -48,48l0,288c0,26.51 21.49,48 48,48l416,0c26.51,0 48,-21.49 48,-48l0,-224c0,-26.51 -21.49,-48 -48,-48z\"\n />\n </svg>\n);\n"]}
1
+ {"version":3,"file":"IconClosed.js","sourceRoot":"./src/","sources":["icons/IconClosed.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,2HAA2H;AAC3H,MAAM,UAAU,UAAU,CAAC,KAAqB;IAC5C,OAAO,CACH,6BACI,KAAK,EAAC,4BAA4B,EAClC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAC/C,OAAO,EAAC,aAAa,EACrB,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAC5D,MAAM,EAAE,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAC7E,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,KAAK,EAAE,KAAK,CAAC,KAAK;QAElB,8BACI,IAAI,EAAC,cAAc,EACnB,CAAC,EAAC,0JAA0J,GAC9J,CACA,CACT,CAAC;AACN,CAAC","sourcesContent":["import React from 'react';\nimport { type IconsIconProps } from './types';\n\n// Icon copied from https://github.com/FortAwesome/Font-Awesome/blob/0d1f27efb836eb2ab994ba37221849ed64a73e5c/svgs/regular/\nexport function IconClosed(props: IconsIconProps): React.JSX.Element {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n onClick={e => props.onClick && props.onClick(e)}\n viewBox=\"0 0 650 512\"\n width={props.width || (props.fontSize === 'small' ? 16 : 20)}\n height={props.height || props.width || (props.fontSize === 'small' ? 16 : 20)}\n className={props.className}\n style={props.style}\n >\n <path\n fill=\"currentColor\"\n d=\"m524,128l-192,0l-64,-64l-160,0c-26.51,0 -48,21.49 -48,48l0,288c0,26.51 21.49,48 48,48l416,0c26.51,0 48,-21.49 48,-48l0,-224c0,-26.51 -21.49,-48 -48,-48z\"\n />\n </svg>\n );\n}\n"]}
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
- import { type IconProps } from './IconProps';
3
- export declare const IconCopy: (props: IconProps) => React.JSX.Element;
2
+ import { type IconsIconProps } from './types';
3
+ export declare function IconCopy(props: IconsIconProps): React.JSX.Element;