@skodaflow/web-library 8.2.0 → 8.3.0

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 (121) hide show
  1. package/cjs/components/advancedTable/agGridSkodaTheme.js +1 -1
  2. package/cjs/components/advancedTable/agGridSkodaTheme.js.map +1 -1
  3. package/cjs/components/carousel/Autoplay.d.ts +7 -2
  4. package/cjs/components/carousel/Autoplay.js +1 -1
  5. package/cjs/components/carousel/Autoplay.js.map +1 -1
  6. package/cjs/components/carousel/hooks.js +1 -1
  7. package/cjs/components/carousel/hooks.js.map +1 -1
  8. package/cjs/components/icon/filled/CarChargingFilledIcon.d.ts +6 -0
  9. package/cjs/components/icon/filled/CarChargingFilledIcon.js +2 -0
  10. package/cjs/components/icon/filled/CarChargingFilledIcon.js.map +1 -0
  11. package/cjs/components/icon/filled/EmissionLabelFilledIcon.d.ts +6 -0
  12. package/cjs/components/icon/filled/EmissionLabelFilledIcon.js +2 -0
  13. package/cjs/components/icon/filled/EmissionLabelFilledIcon.js.map +1 -0
  14. package/cjs/components/icon/filled/PictureErrorFilledIcon.d.ts +6 -0
  15. package/cjs/components/icon/filled/PictureErrorFilledIcon.js +2 -0
  16. package/cjs/components/icon/filled/PictureErrorFilledIcon.js.map +1 -0
  17. package/cjs/components/icon/filled/PowerpassFilledIcon.d.ts +6 -0
  18. package/cjs/components/icon/filled/PowerpassFilledIcon.js +2 -0
  19. package/cjs/components/icon/filled/PowerpassFilledIcon.js.map +1 -0
  20. package/cjs/components/icon/filled/index.d.ts +4 -0
  21. package/cjs/components/icon/icon.definitions.js +1 -1
  22. package/cjs/components/icon/icon.definitions.js.map +1 -1
  23. package/cjs/components/icon/stroke/CarChargingIcon.d.ts +6 -0
  24. package/cjs/components/icon/stroke/CarChargingIcon.js +2 -0
  25. package/cjs/components/icon/stroke/CarChargingIcon.js.map +1 -0
  26. package/cjs/components/icon/stroke/EmissionLabelIcon.d.ts +6 -0
  27. package/cjs/components/icon/stroke/EmissionLabelIcon.js +2 -0
  28. package/cjs/components/icon/stroke/EmissionLabelIcon.js.map +1 -0
  29. package/cjs/components/icon/stroke/PictureErrorIcon.d.ts +6 -0
  30. package/cjs/components/icon/stroke/PictureErrorIcon.js +2 -0
  31. package/cjs/components/icon/stroke/PictureErrorIcon.js.map +1 -0
  32. package/cjs/components/icon/stroke/PowerpassIcon.d.ts +6 -0
  33. package/cjs/components/icon/stroke/PowerpassIcon.js +2 -0
  34. package/cjs/components/icon/stroke/PowerpassIcon.js.map +1 -0
  35. package/cjs/components/icon/stroke/index.d.ts +4 -0
  36. package/cjs/components/promptBar/PromptSubmitIconButton.js +1 -1
  37. package/cjs/components/promptBar/PromptSubmitIconButton.js.map +1 -1
  38. package/cjs/index.js +1 -1
  39. package/cjs/materialui/autocomplete/autocomplete.theme.js +1 -1
  40. package/cjs/materialui/autocomplete/autocomplete.theme.js.map +1 -1
  41. package/cjs/materialui/card/Card.js +1 -1
  42. package/cjs/materialui/card/Card.js.map +1 -1
  43. package/cjs/materialui/card/card.theme.js +1 -1
  44. package/cjs/materialui/card/card.theme.js.map +1 -1
  45. package/cjs/materialui/datepicker/datecalendar.theme.d.ts +1178 -1178
  46. package/cjs/materialui/datepicker/digitalclock.theme.d.ts +1176 -1176
  47. package/cjs/materialui/switch/switch.theme.js +1 -1
  48. package/cjs/materialui/switch/switch.theme.js.map +1 -1
  49. package/cjs/materialui/table/tablePagination.theme.js +1 -1
  50. package/cjs/materialui/table/tablePagination.theme.js.map +1 -1
  51. package/cjs/materialui/textfield/inputLabel.theme.js +1 -1
  52. package/cjs/materialui/textfield/inputLabel.theme.js.map +1 -1
  53. package/cjs/materialui/theme/paletteDark.theme.js +1 -1
  54. package/cjs/materialui/theme/paletteDark.theme.js.map +1 -1
  55. package/cjs/materialui/theme/theme.extensions.d.ts +10 -0
  56. package/cjs/materialui/themeProvider/baseline.theme.js +1 -1
  57. package/cjs/materialui/themeProvider/baseline.theme.js.map +1 -1
  58. package/cjs/materialui/typography/typography.theme.d.ts +4 -0
  59. package/cjs/materialui/typography/typography.theme.js +1 -1
  60. package/cjs/materialui/typography/typography.theme.js.map +1 -1
  61. package/components/advancedTable/agGridSkodaTheme.js +1 -1
  62. package/components/advancedTable/agGridSkodaTheme.js.map +1 -1
  63. package/components/carousel/Autoplay.d.ts +7 -2
  64. package/components/carousel/Autoplay.js +1 -1
  65. package/components/carousel/Autoplay.js.map +1 -1
  66. package/components/carousel/hooks.js +1 -1
  67. package/components/carousel/hooks.js.map +1 -1
  68. package/components/icon/filled/CarChargingFilledIcon.d.ts +6 -0
  69. package/components/icon/filled/CarChargingFilledIcon.js +2 -0
  70. package/components/icon/filled/CarChargingFilledIcon.js.map +1 -0
  71. package/components/icon/filled/EmissionLabelFilledIcon.d.ts +6 -0
  72. package/components/icon/filled/EmissionLabelFilledIcon.js +2 -0
  73. package/components/icon/filled/EmissionLabelFilledIcon.js.map +1 -0
  74. package/components/icon/filled/PictureErrorFilledIcon.d.ts +6 -0
  75. package/components/icon/filled/PictureErrorFilledIcon.js +2 -0
  76. package/components/icon/filled/PictureErrorFilledIcon.js.map +1 -0
  77. package/components/icon/filled/PowerpassFilledIcon.d.ts +6 -0
  78. package/components/icon/filled/PowerpassFilledIcon.js +2 -0
  79. package/components/icon/filled/PowerpassFilledIcon.js.map +1 -0
  80. package/components/icon/filled/index.d.ts +4 -0
  81. package/components/icon/icon.definitions.js +1 -1
  82. package/components/icon/icon.definitions.js.map +1 -1
  83. package/components/icon/stroke/CarChargingIcon.d.ts +6 -0
  84. package/components/icon/stroke/CarChargingIcon.js +2 -0
  85. package/components/icon/stroke/CarChargingIcon.js.map +1 -0
  86. package/components/icon/stroke/EmissionLabelIcon.d.ts +6 -0
  87. package/components/icon/stroke/EmissionLabelIcon.js +2 -0
  88. package/components/icon/stroke/EmissionLabelIcon.js.map +1 -0
  89. package/components/icon/stroke/PictureErrorIcon.d.ts +6 -0
  90. package/components/icon/stroke/PictureErrorIcon.js +2 -0
  91. package/components/icon/stroke/PictureErrorIcon.js.map +1 -0
  92. package/components/icon/stroke/PowerpassIcon.d.ts +6 -0
  93. package/components/icon/stroke/PowerpassIcon.js +2 -0
  94. package/components/icon/stroke/PowerpassIcon.js.map +1 -0
  95. package/components/icon/stroke/index.d.ts +4 -0
  96. package/components/promptBar/PromptSubmitIconButton.js +1 -1
  97. package/components/promptBar/PromptSubmitIconButton.js.map +1 -1
  98. package/index.js +1 -1
  99. package/materialui/autocomplete/autocomplete.theme.js +1 -1
  100. package/materialui/autocomplete/autocomplete.theme.js.map +1 -1
  101. package/materialui/card/Card.js +1 -1
  102. package/materialui/card/Card.js.map +1 -1
  103. package/materialui/card/card.theme.js +1 -1
  104. package/materialui/card/card.theme.js.map +1 -1
  105. package/materialui/datepicker/datecalendar.theme.d.ts +1178 -1178
  106. package/materialui/datepicker/digitalclock.theme.d.ts +1176 -1176
  107. package/materialui/switch/switch.theme.js +1 -1
  108. package/materialui/switch/switch.theme.js.map +1 -1
  109. package/materialui/table/tablePagination.theme.js +1 -1
  110. package/materialui/table/tablePagination.theme.js.map +1 -1
  111. package/materialui/textfield/inputLabel.theme.js +1 -1
  112. package/materialui/textfield/inputLabel.theme.js.map +1 -1
  113. package/materialui/theme/paletteDark.theme.js +1 -1
  114. package/materialui/theme/paletteDark.theme.js.map +1 -1
  115. package/materialui/theme/theme.extensions.d.ts +10 -0
  116. package/materialui/themeProvider/baseline.theme.js +1 -1
  117. package/materialui/themeProvider/baseline.theme.js.map +1 -1
  118. package/materialui/typography/typography.theme.d.ts +4 -0
  119. package/materialui/typography/typography.theme.js +1 -1
  120. package/materialui/typography/typography.theme.js.map +1 -1
  121. package/package.json +1 -1
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { SvgIconProps } from '@mui/material';
3
+ /**
4
+ * Flow brand exclusive icon
5
+ */
6
+ export declare const EmissionLabelIcon: React.FC<SvgIconProps>;
@@ -0,0 +1,2 @@
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("react"),L=require("@mui/material");const i=r.forwardRef((r,i)=>e.jsx(L.SvgIcon,{viewBox:"2 2 20 20",ref:i,...r,children:e.jsx("path",{fillRule:"evenodd",d:"M12.374 2.2832L16.1084 6.82227L16.5195 7.32227L16.1016 7.81641L13.4443 10.9609H16.6191L16.8516 11.2402L20.5859 15.7207L21 16.2178L20.5859 16.7148L16.8516 21.1953L16.6191 21.4746H3V2H12.1416L12.374 2.2832ZM4.55273 19.9219H15.8906L18.9775 16.2178L15.8906 12.5137H4.55273V19.9219ZM4.55273 10.9561H11.4141L14.4961 7.30762L11.4082 3.55273H4.55273V10.9561Z"})}));exports.EmissionLabelIcon=i;
2
+ //# sourceMappingURL=EmissionLabelIcon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EmissionLabelIcon.js","sources":["../../../../../../src/components/icon/stroke/EmissionLabelIcon.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\n/**\n * Flow brand exclusive icon\n */\nexport const EmissionLabelIcon: React.FC<SvgIconProps> = forwardRef((props, ref) => {\n return (\n <SvgIcon viewBox=\"2 2 20 20\" ref={ref} {...props}>\n <path fillRule=\"evenodd\" d=\"M12.374 2.2832L16.1084 6.82227L16.5195 7.32227L16.1016 7.81641L13.4443 10.9609H16.6191L16.8516 11.2402L20.5859 15.7207L21 16.2178L20.5859 16.7148L16.8516 21.1953L16.6191 21.4746H3V2H12.1416L12.374 2.2832ZM4.55273 19.9219H15.8906L18.9775 16.2178L15.8906 12.5137H4.55273V19.9219ZM4.55273 10.9561H11.4141L14.4961 7.30762L11.4082 3.55273H4.55273V10.9561Z\" />\n </SvgIcon>\n );\n});\n"],"names":["EmissionLabelIcon","forwardRef","props","ref","_jsx","SvgIcon","viewBox","children","fillRule","d"],"mappings":"8FAMO,MAAMA,EAA4CC,EAAAA,WAAW,CAACC,EAAOC,IAExEC,EAAAA,IAACC,EAAAA,QAAO,CAACC,QAAQ,YAAYH,IAAKA,KAASD,EAAKK,SAC9CH,EAAAA,IAAA,OAAA,CAAMI,SAAS,UAAUC,EAAE"}
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { SvgIconProps } from '@mui/material';
3
+ /**
4
+ * Flow brand exclusive icon
5
+ */
6
+ export declare const PictureErrorIcon: React.FC<SvgIconProps>;
@@ -0,0 +1,2 @@
1
+ "use strict";var r=require("react/jsx-runtime"),e=require("react"),i=require("@mui/material");const t=e.forwardRef((e,t)=>r.jsx(i.SvgIcon,{viewBox:"2 2 20 20",ref:t,...e,children:r.jsx("path",{d:"M22.0459 3.03418L2.9707 22.1094L1.69727 20.8369L4.12012 18.4141V4.0791H18.4551L20.7725 1.76172L22.0459 3.03418ZM19.8799 19.8389H7.78711L9.42676 18.1992H18.2402V9.38574L19.8799 7.74609V19.8389ZM5.75977 16.7744L16.8154 5.71875H5.75977V16.7744ZM17.7803 16.4395H11.1865L14.6338 12.9912L17.7803 16.4395ZM9.28027 7.81934C10.0201 7.81942 10.6599 8.43894 10.6602 9.17871C10.6602 9.91866 10.0202 10.539 9.28027 10.5391C8.54027 10.5391 7.90039 9.91871 7.90039 9.17871C7.90062 8.43888 8.5404 7.81934 9.28027 7.81934Z"})}));exports.PictureErrorIcon=t;
2
+ //# sourceMappingURL=PictureErrorIcon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PictureErrorIcon.js","sources":["../../../../../../src/components/icon/stroke/PictureErrorIcon.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\n/**\n * Flow brand exclusive icon\n */\nexport const PictureErrorIcon: React.FC<SvgIconProps> = forwardRef((props, ref) => {\n return (\n <SvgIcon viewBox=\"2 2 20 20\" ref={ref} {...props}>\n <path d=\"M22.0459 3.03418L2.9707 22.1094L1.69727 20.8369L4.12012 18.4141V4.0791H18.4551L20.7725 1.76172L22.0459 3.03418ZM19.8799 19.8389H7.78711L9.42676 18.1992H18.2402V9.38574L19.8799 7.74609V19.8389ZM5.75977 16.7744L16.8154 5.71875H5.75977V16.7744ZM17.7803 16.4395H11.1865L14.6338 12.9912L17.7803 16.4395ZM9.28027 7.81934C10.0201 7.81942 10.6599 8.43894 10.6602 9.17871C10.6602 9.91866 10.0202 10.539 9.28027 10.5391C8.54027 10.5391 7.90039 9.91871 7.90039 9.17871C7.90062 8.43888 8.5404 7.81934 9.28027 7.81934Z\" />\n </SvgIcon>\n );\n});\n"],"names":["PictureErrorIcon","forwardRef","props","ref","_jsx","SvgIcon","viewBox","d"],"mappings":"8FAMO,MAAMA,EAA2CC,EAAAA,WAAW,CAACC,EAAOC,IAEvEC,EAAAA,IAACC,EAAAA,QAAO,CAACC,QAAQ,YAAYH,IAAKA,KAASD,WACzCE,EAAAA,IAAA,OAAA,CAAMG,EAAE"}
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { SvgIconProps } from '@mui/material';
3
+ /**
4
+ * Flow brand exclusive icon
5
+ */
6
+ export declare const PowerpassIcon: React.FC<SvgIconProps>;
@@ -0,0 +1,2 @@
1
+ "use strict";var r=require("react/jsx-runtime"),e=require("react"),i=require("@mui/material");const s=e.forwardRef((e,s)=>r.jsx(i.SvgIcon,{viewBox:"2 2 20 20",ref:s,...e,children:r.jsx("path",{d:"M11.6046 6.75L17.25 12.3449L11.6035 17.9914H6.75L12.0906 12.6507L12.3992 12.3421L12.0893 12.0349L6.7567 6.75H11.6046Z"})}));exports.PowerpassIcon=s;
2
+ //# sourceMappingURL=PowerpassIcon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PowerpassIcon.js","sources":["../../../../../../src/components/icon/stroke/PowerpassIcon.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport { SvgIcon, SvgIconProps } from '@mui/material';\n\n/**\n * Flow brand exclusive icon\n */\nexport const PowerpassIcon: React.FC<SvgIconProps> = forwardRef((props, ref) => {\n return (\n <SvgIcon viewBox=\"2 2 20 20\" ref={ref} {...props}>\n <path d=\"M11.6046 6.75L17.25 12.3449L11.6035 17.9914H6.75L12.0906 12.6507L12.3992 12.3421L12.0893 12.0349L6.7567 6.75H11.6046Z\" />\n </SvgIcon>\n );\n});\n"],"names":["PowerpassIcon","forwardRef","props","ref","_jsx","SvgIcon","viewBox","d"],"mappings":"8FAMO,MAAMA,EAAwCC,EAAAA,WAAW,CAACC,EAAOC,IAEpEC,EAAAA,IAACC,EAAAA,QAAO,CAACC,QAAQ,YAAYH,IAAKA,KAASD,WACzCE,EAAAA,IAAA,OAAA,CAAMG,EAAE"}
@@ -82,6 +82,7 @@ export * from './CameraIcon';
82
82
  export * from './CampingIcon';
83
83
  export * from './CarAccidentIcon';
84
84
  export * from './CarBackIcon';
85
+ export * from './CarChargingIcon';
85
86
  export * from './CarComparisonIcon';
86
87
  export * from './CarHandIcon';
87
88
  export * from './CarInfoIcon';
@@ -159,6 +160,7 @@ export * from './DraghandleIcon';
159
160
  export * from './EditIcon';
160
161
  export * from './ElectricChargerIcon';
161
162
  export * from './ElectricChargerOffIcon';
163
+ export * from './EmissionLabelIcon';
162
164
  export * from './EmptystateIcon';
163
165
  export * from './EngineIcon';
164
166
  export * from './EngineOilIcon';
@@ -242,6 +244,7 @@ export * from './PasteIcon';
242
244
  export * from './PercentageIcon';
243
245
  export * from './PetIcon';
244
246
  export * from './PhoneIcon';
247
+ export * from './PictureErrorIcon';
245
248
  export * from './PictureIcon';
246
249
  export * from './PiggybankIcon';
247
250
  export * from './PlugCCSType1Icon';
@@ -251,6 +254,7 @@ export * from './PlugType1Icon';
251
254
  export * from './PlugType2Icon';
252
255
  export * from './PlugIcon';
253
256
  export * from './PlusIcon';
257
+ export * from './PowerpassIcon';
254
258
  export * from './PremiumLIcon';
255
259
  export * from './PremiumMIcon';
256
260
  export * from './PremiumSIcon';
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("react"),n=require("@mui/material"),o=require("../icon/stroke/SendIcon.js"),a=require("../icon/stroke/SoundwaveIcon.js"),i=require("../icon/filled/ShapeSquareFilledIcon.js"),s=require("../../utils/sxOverride/sxOverride.js");const t=r.forwardRef(({value:t,setValue:l,attachments:c,processing:u,recording:m,label:d,disableVoice:f,SendIconComponent:p,VoiceIconComponent:b,ProcessingIconComponent:g,RecordingIconComponent:I,sx:S,disabled:v,...h},w)=>{const x=b||a.SoundwaveIcon,q=p||o.SendIcon,j=I||a.SoundwaveIcon,y=g||i.ShapeSquareFilledIcon,Y=r.useMemo(()=>u?"processing":m?"recording":f||t||c?.length?"submit":"voice",[u,m,t,f,c?.length]),k=r.useMemo(()=>d?n.Button:n.IconButton,[d]),C=r.useMemo(()=>{switch(Y){case"processing":return y;case"recording":return j;case"submit":return q;default:return x}},[Y,y,j,q,x]);return e.jsx(k,{ref:w,color:"primary",size:"small",disabled:v,...d?{variant:"contained",startIcon:e.jsx(C,{})}:{variant:"filled"},..."voice"===Y&&{"aria-label":"Voice input",color:"surface"},..."submit"===Y&&{"aria-label":"Submit",...f&&!t&&!c?.length&&{disabled:!0}},..."recording"===Y&&{"aria-label":"Stop recording"},..."processing"===Y&&{"aria-label":"Stop"},...h,sx:s.sxOverride({..."recording"===Y&&!I&&{"@keyframes flow-soundbar-small":{"0%":{transform:"scaleY(1)"},"25%":{transform:"scaleY(3.15)"},"50%, 100%":{transform:"scaleY(1)"}},"@keyframes flow-soundbar-large":{"0%":{transform:"scaleY(0.35)"},"25%":{transform:"scaleY(1)"},"50%, 100%":{transform:"scaleY(0.35)"}},"& .MuiSvgIcon-root":{path:{transformOrigin:"center 60%",transition:"transform 0.3s ease-out","&:nth-of-type(1)":{animation:"1.2s linear infinite flow-soundbar-small"},"&:nth-of-type(2)":{transform:"scaleY(0.35)",animation:"1.2s linear infinite flow-soundbar-large",animationDelay:"0.2s"},"&:nth-of-type(3)":{animation:"1.2s linear infinite flow-soundbar-small",animationDelay:"0.4s"}}}}},S),children:d||e.jsx(C,{})},Y)});exports.PromptSubmitIconButton=t;
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("react"),n=require("@mui/material"),o=require("../icon/stroke/SendIcon.js"),a=require("../icon/stroke/SoundwaveIcon.js"),i=require("../icon/filled/ShapeSquareFilledIcon.js"),s=require("../../utils/sxOverride/sxOverride.js");const t=r.forwardRef(({value:t,setValue:l,attachments:c,processing:u,recording:m,label:d,disableVoice:f,SendIconComponent:p,VoiceIconComponent:b,ProcessingIconComponent:g,RecordingIconComponent:I,sx:S,disabled:v,...h},w)=>{const x=b??a.SoundwaveIcon,q=p??o.SendIcon,j=I??a.SoundwaveIcon,y=g??i.ShapeSquareFilledIcon,Y=r.useMemo(()=>u?"processing":m?"recording":f||t||c?.length?"submit":"voice",[u,m,t,f,c?.length]),k=r.useMemo(()=>d?n.Button:n.IconButton,[d]),C=r.useMemo(()=>{switch(Y){case"processing":return y;case"recording":return j;case"submit":return q;default:return x}},[Y,y,j,q,x]);return e.jsx(k,{ref:w,color:"primary",size:"small",disabled:v,...d?{variant:"contained",startIcon:e.jsx(C,{})}:{variant:"filled"},..."voice"===Y&&{"aria-label":"Voice input",color:"surface"},..."submit"===Y&&{"aria-label":"Submit",...void 0===v&&f&&!t&&!c?.length&&{disabled:!0}},..."recording"===Y&&{"aria-label":"Stop recording"},..."processing"===Y&&{"aria-label":"Stop"},...h,sx:s.sxOverride({..."recording"===Y&&!I&&{"@keyframes flow-soundbar-small":{"0%":{transform:"scaleY(1)"},"25%":{transform:"scaleY(3.15)"},"50%, 100%":{transform:"scaleY(1)"}},"@keyframes flow-soundbar-large":{"0%":{transform:"scaleY(0.35)"},"25%":{transform:"scaleY(1)"},"50%, 100%":{transform:"scaleY(0.35)"}},"& .MuiSvgIcon-root":{path:{transformOrigin:"center 60%",transition:"transform 0.3s ease-out","&:nth-of-type(1)":{animation:"1.2s linear infinite flow-soundbar-small"},"&:nth-of-type(2)":{transform:"scaleY(0.35)",animation:"1.2s linear infinite flow-soundbar-large",animationDelay:"0.2s"},"&:nth-of-type(3)":{animation:"1.2s linear infinite flow-soundbar-small",animationDelay:"0.4s"}}}}},S),children:d??e.jsx(C,{})},Y)});exports.PromptSubmitIconButton=t;
2
2
  //# sourceMappingURL=PromptSubmitIconButton.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PromptSubmitIconButton.js","sources":["../../../../../src/components/promptBar/PromptSubmitIconButton.tsx"],"sourcesContent":["import { FC, ComponentType, forwardRef, useMemo, ReactNode } from 'react';\nimport { Button, ButtonBaseProps, IconButton, IconButtonProps, SvgIconProps } from '@mui/material';\nimport { SendIcon } from '@/src/components/icon/stroke/SendIcon';\nimport { SoundwaveIcon } from '@/src/components/icon/stroke/SoundwaveIcon';\nimport { ShapeSquareFilledIcon } from '@/src/components/icon/filled/ShapeSquareFilledIcon';\nimport { sxOverride } from '@/src/utils/sxOverride';\nimport { PromptAttachment } from '@/src';\n\nexport interface PromptSubmitIconButtonProps extends Omit<IconButtonProps, 'value'> {\n /**\n * Current input value. Switches the button from voice to submit variant.\n */\n value?: string;\n /**\n * Setter for the input value.\n */\n setValue?: (value: string) => void;\n /**\n * List of attachments displayed above the text input.\n */\n attachments?: PromptAttachment[];\n /**\n * Indicates that a request is being processed. Shows the processing (stop) icon.\n */\n processing?: boolean;\n /**\n * Indicates that voice recording is in progress.\n */\n recording?: boolean;\n /**\n * Label that changes IconButton to Button.\n */\n label?: ReactNode;\n /**\n * Do not show voice button. Use when speech input is unavailable or unsupported.\n */\n disableVoice?: boolean;\n /**\n * Custom component for the send icon, shown in submit state.\n */\n SendIconComponent?: ComponentType<SvgIconProps>;\n /**\n * Custom component for the voice icon, shown when input is empty and not recording.\n */\n VoiceIconComponent?: ComponentType<SvgIconProps>;\n /**\n * Custom component for the processing icon, shown while a request is processing.\n */\n ProcessingIconComponent?: ComponentType<SvgIconProps>;\n /**\n * Custom component for the recording icon, shown as startIcon on the recording stop button.\n */\n RecordingIconComponent?: ComponentType<SvgIconProps>;\n}\n\n/**\n * Submit button for the PromptBar. Switches between voice and submit variants\n * depending on the current state.\n */\nexport const PromptSubmitIconButton: FC<PromptSubmitIconButtonProps> = forwardRef(\n (\n {\n value,\n setValue,\n attachments,\n processing,\n recording,\n label,\n disableVoice,\n SendIconComponent,\n VoiceIconComponent,\n ProcessingIconComponent,\n RecordingIconComponent,\n sx,\n disabled,\n ...rest\n },\n ref,\n ) => {\n const VoiceIcon = VoiceIconComponent || SoundwaveIcon;\n const SubmitIcon = SendIconComponent || SendIcon;\n const RecordingIcon = RecordingIconComponent || SoundwaveIcon;\n const ProcessingIcon = ProcessingIconComponent || ShapeSquareFilledIcon;\n\n const state = useMemo<'voice' | 'recording' | 'submit' | 'processing'>(() => {\n if (processing) return 'processing';\n if (recording) return 'recording';\n if (disableVoice || value || attachments?.length) return 'submit';\n return 'voice';\n }, [processing, recording, value, disableVoice, attachments?.length]);\n\n const Component = useMemo<ComponentType<ButtonBaseProps>>(() => {\n if (label) {\n return Button;\n }\n return IconButton;\n }, [label]);\n\n const Icon = useMemo(() => {\n switch (state) {\n case 'processing':\n return ProcessingIcon;\n case 'recording':\n return RecordingIcon;\n case 'submit':\n return SubmitIcon;\n case 'voice':\n default:\n return VoiceIcon;\n }\n }, [state, ProcessingIcon, RecordingIcon, SubmitIcon, VoiceIcon]);\n\n return (\n <Component\n ref={ref}\n key={state}\n color=\"primary\"\n size=\"small\"\n disabled={disabled}\n {...(label ? { variant: 'contained', startIcon: <Icon /> } : { variant: 'filled' })}\n {...(state === 'voice' && { 'aria-label': 'Voice input', color: 'surface' })}\n {...(state === 'submit' && {\n 'aria-label': 'Submit',\n ...(disableVoice && !value && !attachments?.length && { disabled: true }),\n })}\n {...(state === 'recording' && { 'aria-label': 'Stop recording' })}\n {...(state === 'processing' && { 'aria-label': 'Stop' })}\n {...rest}\n sx={sxOverride(\n {\n // soundwave animation during voice recordin\n ...(state === 'recording' &&\n !RecordingIconComponent && {\n '@keyframes flow-soundbar-small': {\n '0%': { transform: 'scaleY(1)' },\n '25%': { transform: 'scaleY(3.15)' },\n '50%, 100%': { transform: 'scaleY(1)' },\n },\n '@keyframes flow-soundbar-large': {\n '0%': { transform: 'scaleY(0.35)' },\n '25%': { transform: 'scaleY(1)' },\n '50%, 100%': { transform: 'scaleY(0.35)' },\n },\n '& .MuiSvgIcon-root': {\n path: {\n transformOrigin: 'center 60%',\n transition: 'transform 0.3s ease-out',\n '&:nth-of-type(1)': { animation: '1.2s linear infinite flow-soundbar-small' },\n '&:nth-of-type(2)': {\n transform: 'scaleY(0.35)',\n animation: '1.2s linear infinite flow-soundbar-large',\n animationDelay: '0.2s',\n },\n '&:nth-of-type(3)': {\n animation: '1.2s linear infinite flow-soundbar-small',\n animationDelay: '0.4s',\n },\n },\n },\n }),\n },\n sx,\n )}\n >\n {label ? label : <Icon />}\n </Component>\n );\n },\n);\n"],"names":["PromptSubmitIconButton","forwardRef","value","setValue","attachments","processing","recording","label","disableVoice","SendIconComponent","VoiceIconComponent","ProcessingIconComponent","RecordingIconComponent","sx","disabled","rest","ref","VoiceIcon","SoundwaveIcon","SubmitIcon","SendIcon","RecordingIcon","ProcessingIcon","ShapeSquareFilledIcon","state","useMemo","length","Component","Button","IconButton","Icon","_jsx","color","size","variant","startIcon","sxOverride","transform","path","transformOrigin","transition","animation","animationDelay","children"],"mappings":"0RA2DO,MAAMA,EAA0DC,EAAAA,WACrE,EAEIC,QACAC,WACAC,cACAC,aACAC,YACAC,QACAC,eACAC,oBACAC,qBACAC,0BACAC,yBACAC,KACAC,cACGC,GAELC,KAEA,MAAMC,EAAYP,GAAsBQ,EAAAA,cAClCC,EAAaV,GAAqBW,EAAAA,SAClCC,EAAgBT,GAA0BM,EAAAA,cAC1CI,EAAiBX,GAA2BY,EAAAA,sBAE5CC,EAAQC,EAAAA,QAAyD,IACjEpB,EAAmB,aACnBC,EAAkB,YAClBE,GAAgBN,GAASE,GAAasB,OAAe,SAClD,QACN,CAACrB,EAAYC,EAAWJ,EAAOM,EAAcJ,GAAasB,SAEvDC,EAAYF,EAAAA,QAAwC,IACpDlB,EACKqB,EAAAA,OAEFC,EAAAA,WACN,CAACtB,IAEEuB,EAAOL,EAAAA,QAAQ,KACnB,OAAQD,GACN,IAAK,aACH,OAAOF,EACT,IAAK,YACH,OAAOD,EACT,IAAK,SACH,OAAOF,EAET,QACE,OAAOF,IAEV,CAACO,EAAOF,EAAgBD,EAAeF,EAAYF,IAEtD,OACEc,EAAAA,IAACJ,EAAS,CACRX,IAAKA,EAELgB,MAAM,UACNC,KAAK,QACLnB,SAAUA,KACLP,EAAQ,CAAE2B,QAAS,YAAaC,UAAWJ,EAAAA,IAACD,EAAI,CAAA,IAAQ,CAAEI,QAAS,aACzD,UAAVV,GAAqB,CAAE,aAAc,cAAeQ,MAAO,cACjD,WAAVR,GAAsB,CACzB,aAAc,YACVhB,IAAiBN,IAAUE,GAAasB,QAAU,CAAEZ,UAAU,OAErD,cAAVU,GAAyB,CAAE,aAAc,qBAC/B,eAAVA,GAA0B,CAAE,aAAc,WAC3CT,EACJF,GAAIuB,aACF,IAEgB,cAAVZ,IACDZ,GAA0B,CACzB,iCAAkC,CAChC,KAAM,CAAEyB,UAAW,aACnB,MAAO,CAAEA,UAAW,gBACpB,YAAa,CAAEA,UAAW,cAE5B,iCAAkC,CAChC,KAAM,CAAEA,UAAW,gBACnB,MAAO,CAAEA,UAAW,aACpB,YAAa,CAAEA,UAAW,iBAE5B,qBAAsB,CACpBC,KAAM,CACJC,gBAAiB,aACjBC,WAAY,0BACZ,mBAAoB,CAAEC,UAAW,4CACjC,mBAAoB,CAClBJ,UAAW,eACXI,UAAW,2CACXC,eAAgB,QAElB,mBAAoB,CAClBD,UAAW,2CACXC,eAAgB,YAM5B7B,GACD8B,SAEApC,GAAgBwB,EAAAA,IAACD,EAAI,CAAA,IAjDjBN"}
1
+ {"version":3,"file":"PromptSubmitIconButton.js","sources":["../../../../../src/components/promptBar/PromptSubmitIconButton.tsx"],"sourcesContent":["import { FC, ComponentType, forwardRef, useMemo, ReactNode } from 'react';\nimport { Button, ButtonBaseProps, IconButton, IconButtonProps, SvgIconProps } from '@mui/material';\nimport { SendIcon } from '@/src/components/icon/stroke/SendIcon';\nimport { SoundwaveIcon } from '@/src/components/icon/stroke/SoundwaveIcon';\nimport { ShapeSquareFilledIcon } from '@/src/components/icon/filled/ShapeSquareFilledIcon';\nimport { sxOverride } from '@/src/utils/sxOverride';\nimport { PromptAttachment } from '@/src';\n\nexport interface PromptSubmitIconButtonProps extends Omit<IconButtonProps, 'value'> {\n /**\n * Current input value. Switches the button from voice to submit variant.\n */\n value?: string;\n /**\n * Setter for the input value.\n */\n setValue?: (value: string) => void;\n /**\n * List of attachments displayed above the text input.\n */\n attachments?: PromptAttachment[];\n /**\n * Indicates that a request is being processed. Shows the processing (stop) icon.\n */\n processing?: boolean;\n /**\n * Indicates that voice recording is in progress.\n */\n recording?: boolean;\n /**\n * Label that changes IconButton to Button.\n */\n label?: ReactNode;\n /**\n * Do not show voice button. Use when speech input is unavailable or unsupported.\n */\n disableVoice?: boolean;\n /**\n * Custom component for the send icon, shown in submit state.\n */\n SendIconComponent?: ComponentType<SvgIconProps>;\n /**\n * Custom component for the voice icon, shown when input is empty and not recording.\n */\n VoiceIconComponent?: ComponentType<SvgIconProps>;\n /**\n * Custom component for the processing icon, shown while a request is processing.\n */\n ProcessingIconComponent?: ComponentType<SvgIconProps>;\n /**\n * Custom component for the recording icon, shown as startIcon on the recording stop button.\n */\n RecordingIconComponent?: ComponentType<SvgIconProps>;\n}\n\n/**\n * Submit button for the PromptBar. Switches between voice and submit variants\n * depending on the current state.\n */\nexport const PromptSubmitIconButton: FC<PromptSubmitIconButtonProps> = forwardRef(\n (\n {\n value,\n setValue,\n attachments,\n processing,\n recording,\n label,\n disableVoice,\n SendIconComponent,\n VoiceIconComponent,\n ProcessingIconComponent,\n RecordingIconComponent,\n sx,\n disabled,\n ...rest\n },\n ref,\n ) => {\n const VoiceIcon = VoiceIconComponent ?? SoundwaveIcon;\n const SubmitIcon = SendIconComponent ?? SendIcon;\n const RecordingIcon = RecordingIconComponent ?? SoundwaveIcon;\n const ProcessingIcon = ProcessingIconComponent ?? ShapeSquareFilledIcon;\n\n const state = useMemo<'voice' | 'recording' | 'submit' | 'processing'>(() => {\n if (processing) return 'processing';\n if (recording) return 'recording';\n if (disableVoice || value || attachments?.length) return 'submit';\n return 'voice';\n }, [processing, recording, value, disableVoice, attachments?.length]);\n\n const Component = useMemo<ComponentType<ButtonBaseProps>>(() => {\n if (label) {\n return Button;\n }\n return IconButton;\n }, [label]);\n\n const Icon = useMemo(() => {\n switch (state) {\n case 'processing':\n return ProcessingIcon;\n case 'recording':\n return RecordingIcon;\n case 'submit':\n return SubmitIcon;\n case 'voice':\n default:\n return VoiceIcon;\n }\n }, [state, ProcessingIcon, RecordingIcon, SubmitIcon, VoiceIcon]);\n\n return (\n <Component\n ref={ref}\n key={state}\n color=\"primary\"\n size=\"small\"\n disabled={disabled}\n {...(label ? { variant: 'contained', startIcon: <Icon /> } : { variant: 'filled' })}\n {...(state === 'voice' && { 'aria-label': 'Voice input', color: 'surface' })}\n {...(state === 'submit' && {\n 'aria-label': 'Submit',\n ...(disabled === undefined && disableVoice && !value && !attachments?.length && { disabled: true }),\n })}\n {...(state === 'recording' && { 'aria-label': 'Stop recording' })}\n {...(state === 'processing' && { 'aria-label': 'Stop' })}\n {...rest}\n sx={sxOverride(\n {\n // soundwave animation during voice recordin\n ...(state === 'recording' &&\n !RecordingIconComponent && {\n '@keyframes flow-soundbar-small': {\n '0%': { transform: 'scaleY(1)' },\n '25%': { transform: 'scaleY(3.15)' },\n '50%, 100%': { transform: 'scaleY(1)' },\n },\n '@keyframes flow-soundbar-large': {\n '0%': { transform: 'scaleY(0.35)' },\n '25%': { transform: 'scaleY(1)' },\n '50%, 100%': { transform: 'scaleY(0.35)' },\n },\n '& .MuiSvgIcon-root': {\n path: {\n transformOrigin: 'center 60%',\n transition: 'transform 0.3s ease-out',\n '&:nth-of-type(1)': { animation: '1.2s linear infinite flow-soundbar-small' },\n '&:nth-of-type(2)': {\n transform: 'scaleY(0.35)',\n animation: '1.2s linear infinite flow-soundbar-large',\n animationDelay: '0.2s',\n },\n '&:nth-of-type(3)': {\n animation: '1.2s linear infinite flow-soundbar-small',\n animationDelay: '0.4s',\n },\n },\n },\n }),\n },\n sx,\n )}\n >\n {label ?? <Icon />}\n </Component>\n );\n },\n);\n"],"names":["PromptSubmitIconButton","forwardRef","value","setValue","attachments","processing","recording","label","disableVoice","SendIconComponent","VoiceIconComponent","ProcessingIconComponent","RecordingIconComponent","sx","disabled","rest","ref","VoiceIcon","SoundwaveIcon","SubmitIcon","SendIcon","RecordingIcon","ProcessingIcon","ShapeSquareFilledIcon","state","useMemo","length","Component","Button","IconButton","Icon","_jsx","color","size","variant","startIcon","undefined","sxOverride","transform","path","transformOrigin","transition","animation","animationDelay","children"],"mappings":"0RA2DO,MAAMA,EAA0DC,EAAAA,WACrE,EAEIC,QACAC,WACAC,cACAC,aACAC,YACAC,QACAC,eACAC,oBACAC,qBACAC,0BACAC,yBACAC,KACAC,cACGC,GAELC,KAEA,MAAMC,EAAYP,GAAsBQ,EAAAA,cAClCC,EAAaV,GAAqBW,EAAAA,SAClCC,EAAgBT,GAA0BM,EAAAA,cAC1CI,EAAiBX,GAA2BY,EAAAA,sBAE5CC,EAAQC,EAAAA,QAAyD,IACjEpB,EAAmB,aACnBC,EAAkB,YAClBE,GAAgBN,GAASE,GAAasB,OAAe,SAClD,QACN,CAACrB,EAAYC,EAAWJ,EAAOM,EAAcJ,GAAasB,SAEvDC,EAAYF,EAAAA,QAAwC,IACpDlB,EACKqB,EAAAA,OAEFC,EAAAA,WACN,CAACtB,IAEEuB,EAAOL,EAAAA,QAAQ,KACnB,OAAQD,GACN,IAAK,aACH,OAAOF,EACT,IAAK,YACH,OAAOD,EACT,IAAK,SACH,OAAOF,EAET,QACE,OAAOF,IAEV,CAACO,EAAOF,EAAgBD,EAAeF,EAAYF,IAEtD,OACEc,EAAAA,IAACJ,EAAS,CACRX,IAAKA,EAELgB,MAAM,UACNC,KAAK,QACLnB,SAAUA,KACLP,EAAQ,CAAE2B,QAAS,YAAaC,UAAWJ,EAAAA,IAACD,EAAI,CAAA,IAAQ,CAAEI,QAAS,aACzD,UAAVV,GAAqB,CAAE,aAAc,cAAeQ,MAAO,cACjD,WAAVR,GAAsB,CACzB,aAAc,iBACGY,IAAbtB,GAA0BN,IAAiBN,IAAUE,GAAasB,QAAU,CAAEZ,UAAU,OAE/E,cAAVU,GAAyB,CAAE,aAAc,qBAC/B,eAAVA,GAA0B,CAAE,aAAc,WAC3CT,EACJF,GAAIwB,aACF,IAEgB,cAAVb,IACDZ,GAA0B,CACzB,iCAAkC,CAChC,KAAM,CAAE0B,UAAW,aACnB,MAAO,CAAEA,UAAW,gBACpB,YAAa,CAAEA,UAAW,cAE5B,iCAAkC,CAChC,KAAM,CAAEA,UAAW,gBACnB,MAAO,CAAEA,UAAW,aACpB,YAAa,CAAEA,UAAW,iBAE5B,qBAAsB,CACpBC,KAAM,CACJC,gBAAiB,aACjBC,WAAY,0BACZ,mBAAoB,CAAEC,UAAW,4CACjC,mBAAoB,CAClBJ,UAAW,eACXI,UAAW,2CACXC,eAAgB,QAElB,mBAAoB,CAClBD,UAAW,2CACXC,eAAgB,YAM5B9B,GACD+B,SAEArC,GAASwB,EAAAA,IAACD,EAAI,CAAA,IAjDVN"}