@veeqo/ui 12.4.0-beta-3 → 12.4.0-beta-5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/dist/components/SelectDropdown/SelectDropdown.cjs +8 -9
  2. package/dist/components/SelectDropdown/SelectDropdown.cjs.map +1 -1
  3. package/dist/components/SelectDropdown/SelectDropdown.d.ts +1 -1
  4. package/dist/components/SelectDropdown/SelectDropdown.js +8 -9
  5. package/dist/components/SelectDropdown/SelectDropdown.js.map +1 -1
  6. package/dist/components/SelectDropdown/SelectDropdown.module.scss.cjs +2 -2
  7. package/dist/components/SelectDropdown/SelectDropdown.module.scss.cjs.map +1 -1
  8. package/dist/components/SelectDropdown/SelectDropdown.module.scss.js +2 -2
  9. package/dist/components/SelectDropdown/SelectDropdown.module.scss.js.map +1 -1
  10. package/dist/components/SelectDropdown/components/ListItem/ListItem.js +2 -2
  11. package/dist/components/SelectDropdown/components/ListItem/ListItem.js.map +1 -1
  12. package/dist/components/SelectDropdown/components/SelectDropdownState.cjs +3 -11
  13. package/dist/components/SelectDropdown/components/SelectDropdownState.cjs.map +1 -1
  14. package/dist/components/SelectDropdown/components/SelectDropdownState.js +3 -11
  15. package/dist/components/SelectDropdown/components/SelectDropdownState.js.map +1 -1
  16. package/dist/components/SelectDropdown/components/item.module.scss.cjs +3 -3
  17. package/dist/components/SelectDropdown/components/item.module.scss.cjs.map +1 -1
  18. package/dist/components/SelectDropdown/components/item.module.scss.js +3 -3
  19. package/dist/components/SelectDropdown/components/item.module.scss.js.map +1 -1
  20. package/dist/components/SelectDropdown/types.d.ts +1 -3
  21. package/dist/components/UploadFile/UploadFile.cjs +63 -82
  22. package/dist/components/UploadFile/UploadFile.cjs.map +1 -1
  23. package/dist/components/UploadFile/UploadFile.js +66 -85
  24. package/dist/components/UploadFile/UploadFile.js.map +1 -1
  25. package/dist/components/UploadFile/components/DropCopy/DropCopy.cjs +28 -0
  26. package/dist/components/UploadFile/components/DropCopy/DropCopy.cjs.map +1 -0
  27. package/dist/components/UploadFile/components/DropCopy/DropCopy.d.ts +2 -0
  28. package/dist/components/UploadFile/components/DropCopy/DropCopy.js +22 -0
  29. package/dist/components/UploadFile/components/DropCopy/DropCopy.js.map +1 -0
  30. package/dist/components/UploadFile/components/UploadCopy/UploadCopy.cjs +6 -6
  31. package/dist/components/UploadFile/components/UploadCopy/UploadCopy.cjs.map +1 -1
  32. package/dist/components/UploadFile/components/UploadCopy/UploadCopy.js +6 -6
  33. package/dist/components/UploadFile/components/UploadCopy/UploadCopy.js.map +1 -1
  34. package/dist/components/UploadFile/components/UploadedFile/UploadedFile.cjs +52 -5
  35. package/dist/components/UploadFile/components/UploadedFile/UploadedFile.cjs.map +1 -1
  36. package/dist/components/UploadFile/components/UploadedFile/UploadedFile.d.ts +7 -3
  37. package/dist/components/UploadFile/components/UploadedFile/UploadedFile.js +52 -5
  38. package/dist/components/UploadFile/components/UploadedFile/UploadedFile.js.map +1 -1
  39. package/dist/components/UploadFile/components/UploadedFile/UploadedFile.module.scss.cjs +9 -0
  40. package/dist/components/UploadFile/components/UploadedFile/UploadedFile.module.scss.cjs.map +1 -0
  41. package/dist/components/UploadFile/components/UploadedFile/UploadedFile.module.scss.js +7 -0
  42. package/dist/components/UploadFile/components/UploadedFile/UploadedFile.module.scss.js.map +1 -0
  43. package/dist/components/UploadFile/constants.cjs +64 -8
  44. package/dist/components/UploadFile/constants.cjs.map +1 -1
  45. package/dist/components/UploadFile/constants.d.ts +52 -5
  46. package/dist/components/UploadFile/constants.js +63 -9
  47. package/dist/components/UploadFile/constants.js.map +1 -1
  48. package/dist/components/UploadFile/hooks/useFileErrorMessages/index.d.ts +1 -0
  49. package/dist/components/UploadFile/hooks/useFileErrorMessages/useFileErrorMessages.cjs +39 -0
  50. package/dist/components/UploadFile/hooks/useFileErrorMessages/useFileErrorMessages.cjs.map +1 -0
  51. package/dist/components/UploadFile/hooks/useFileErrorMessages/useFileErrorMessages.d.ts +13 -0
  52. package/dist/components/UploadFile/hooks/useFileErrorMessages/useFileErrorMessages.js +37 -0
  53. package/dist/components/UploadFile/hooks/useFileErrorMessages/useFileErrorMessages.js.map +1 -0
  54. package/dist/components/UploadFile/hooks/usePreviewImage/index.d.ts +1 -0
  55. package/dist/components/UploadFile/hooks/usePreviewImage/usePreviewImage.cjs +36 -0
  56. package/dist/components/UploadFile/hooks/usePreviewImage/usePreviewImage.cjs.map +1 -0
  57. package/dist/components/UploadFile/hooks/usePreviewImage/usePreviewImage.d.ts +8 -0
  58. package/dist/components/UploadFile/hooks/usePreviewImage/usePreviewImage.js +34 -0
  59. package/dist/components/UploadFile/hooks/usePreviewImage/usePreviewImage.js.map +1 -0
  60. package/dist/components/UploadFile/hooks/useUploadFile/index.d.ts +1 -0
  61. package/dist/components/UploadFile/hooks/useUploadFile/useUploadFile.cjs +65 -0
  62. package/dist/components/UploadFile/hooks/useUploadFile/useUploadFile.cjs.map +1 -0
  63. package/dist/components/UploadFile/hooks/useUploadFile/useUploadFile.d.ts +9 -0
  64. package/dist/components/UploadFile/hooks/useUploadFile/useUploadFile.js +63 -0
  65. package/dist/components/UploadFile/hooks/useUploadFile/useUploadFile.js.map +1 -0
  66. package/dist/components/UploadFile/hooks/useValidateInput/index.d.ts +1 -0
  67. package/dist/components/UploadFile/hooks/useValidateInput/useValidateInput.cjs +69 -0
  68. package/dist/components/UploadFile/hooks/useValidateInput/useValidateInput.cjs.map +1 -0
  69. package/dist/components/UploadFile/hooks/useValidateInput/useValidateInput.d.ts +11 -0
  70. package/dist/components/UploadFile/hooks/useValidateInput/useValidateInput.js +67 -0
  71. package/dist/components/UploadFile/hooks/useValidateInput/useValidateInput.js.map +1 -0
  72. package/dist/components/UploadFile/mocks/files.d.ts +2 -0
  73. package/dist/components/UploadFile/mocks/mockUseUploadFile.d.ts +14 -0
  74. package/dist/components/UploadFile/mocks/utils.d.ts +1 -2
  75. package/dist/components/UploadFile/styled.cjs +41 -1
  76. package/dist/components/UploadFile/styled.cjs.map +1 -1
  77. package/dist/components/UploadFile/styled.d.ts +5 -1
  78. package/dist/components/UploadFile/styled.js +41 -1
  79. package/dist/components/UploadFile/styled.js.map +1 -1
  80. package/dist/components/UploadFile/types.d.ts +15 -1
  81. package/dist/components/UploadFile/utils/convertFileTypeToAcceptedFileExtension/convertFileTypeToAcceptedFileExtension.d.ts +1 -0
  82. package/dist/components/UploadFile/utils/convertFileTypeToAcceptedFileExtension/convertFileTypeToAcceptedFileType.cjs +17 -0
  83. package/dist/components/UploadFile/utils/convertFileTypeToAcceptedFileExtension/convertFileTypeToAcceptedFileType.cjs.map +1 -0
  84. package/dist/components/UploadFile/utils/convertFileTypeToAcceptedFileExtension/convertFileTypeToAcceptedFileType.d.ts +1 -0
  85. package/dist/components/UploadFile/utils/convertFileTypeToAcceptedFileExtension/convertFileTypeToAcceptedFileType.js +15 -0
  86. package/dist/components/UploadFile/utils/convertFileTypeToAcceptedFileExtension/convertFileTypeToAcceptedFileType.js.map +1 -0
  87. package/dist/components/UploadFile/utils/convertFileTypeToAcceptedFileExtension/index.d.ts +1 -0
  88. package/dist/components/UploadFile/utils/getFileSizeString/getFileSizeString.cjs +14 -11
  89. package/dist/components/UploadFile/utils/getFileSizeString/getFileSizeString.cjs.map +1 -1
  90. package/dist/components/UploadFile/utils/getFileSizeString/getFileSizeString.d.ts +10 -7
  91. package/dist/components/UploadFile/utils/getFileSizeString/getFileSizeString.js +14 -11
  92. package/dist/components/UploadFile/utils/getFileSizeString/getFileSizeString.js.map +1 -1
  93. package/dist/components/UploadFile/utils/getValidTypesString/getValidTypesString.cjs +16 -30
  94. package/dist/components/UploadFile/utils/getValidTypesString/getValidTypesString.cjs.map +1 -1
  95. package/dist/components/UploadFile/utils/getValidTypesString/getValidTypesString.js +16 -30
  96. package/dist/components/UploadFile/utils/getValidTypesString/getValidTypesString.js.map +1 -1
  97. package/dist/components/UploadFile/utils/index.d.ts +0 -1
  98. package/dist/components/UploadFile/utils/isImageType/index.d.ts +1 -0
  99. package/dist/components/UploadFile/utils/isImageType/isImageType.cjs +14 -0
  100. package/dist/components/UploadFile/utils/isImageType/isImageType.cjs.map +1 -0
  101. package/dist/components/UploadFile/utils/isImageType/isImageType.d.ts +1 -0
  102. package/dist/components/UploadFile/utils/isImageType/isImageType.js +12 -0
  103. package/dist/components/UploadFile/utils/isImageType/isImageType.js.map +1 -0
  104. package/package.json +1 -1
  105. package/dist/components/SelectDropdown/components/GridItem/GridItem.cjs +0 -37
  106. package/dist/components/SelectDropdown/components/GridItem/GridItem.cjs.map +0 -1
  107. package/dist/components/SelectDropdown/components/GridItem/GridItem.js +0 -31
  108. package/dist/components/SelectDropdown/components/GridItem/GridItem.js.map +0 -1
  109. package/dist/components/SelectDropdown/components/GridItem/GridItem.module.scss.cjs +0 -9
  110. package/dist/components/SelectDropdown/components/GridItem/GridItem.module.scss.cjs.map +0 -1
  111. package/dist/components/SelectDropdown/components/GridItem/GridItem.module.scss.js +0 -7
  112. package/dist/components/SelectDropdown/components/GridItem/GridItem.module.scss.js.map +0 -1
  113. package/dist/components/SelectDropdown/components/OptionsContainers/GridList.cjs +0 -18
  114. package/dist/components/SelectDropdown/components/OptionsContainers/GridList.cjs.map +0 -1
  115. package/dist/components/SelectDropdown/components/OptionsContainers/GridList.d.ts +0 -3
  116. package/dist/components/SelectDropdown/components/OptionsContainers/GridList.js +0 -12
  117. package/dist/components/SelectDropdown/components/OptionsContainers/GridList.js.map +0 -1
  118. package/dist/components/SelectDropdown/components/OptionsContainers/ListBox.cjs +0 -19
  119. package/dist/components/SelectDropdown/components/OptionsContainers/ListBox.cjs.map +0 -1
  120. package/dist/components/SelectDropdown/components/OptionsContainers/ListBox.d.ts +0 -3
  121. package/dist/components/SelectDropdown/components/OptionsContainers/ListBox.js +0 -13
  122. package/dist/components/SelectDropdown/components/OptionsContainers/ListBox.js.map +0 -1
  123. package/dist/components/SelectDropdown/components/OptionsContainers/OptionsContainer.module.scss.cjs +0 -9
  124. package/dist/components/SelectDropdown/components/OptionsContainers/OptionsContainer.module.scss.cjs.map +0 -1
  125. package/dist/components/SelectDropdown/components/OptionsContainers/OptionsContainer.module.scss.js +0 -7
  126. package/dist/components/SelectDropdown/components/OptionsContainers/OptionsContainer.module.scss.js.map +0 -1
  127. package/dist/components/SelectDropdown/components/OptionsContainers/types.d.ts +0 -25
  128. package/dist/components/UploadFile/UploadGraphic.cjs +0 -14
  129. package/dist/components/UploadFile/UploadGraphic.cjs.map +0 -1
  130. package/dist/components/UploadFile/UploadGraphic.d.ts +0 -2
  131. package/dist/components/UploadFile/UploadGraphic.js +0 -8
  132. package/dist/components/UploadFile/UploadGraphic.js.map +0 -1
  133. package/dist/components/UploadFile/components/UploadFileErrors/UploadFileErrors.cjs +0 -31
  134. package/dist/components/UploadFile/components/UploadFileErrors/UploadFileErrors.cjs.map +0 -1
  135. package/dist/components/UploadFile/components/UploadFileErrors/UploadFileErrors.d.ts +0 -7
  136. package/dist/components/UploadFile/components/UploadFileErrors/UploadFileErrors.js +0 -25
  137. package/dist/components/UploadFile/components/UploadFileErrors/UploadFileErrors.js.map +0 -1
  138. package/dist/components/UploadFile/components/UploadedFile/styled.cjs +0 -20
  139. package/dist/components/UploadFile/components/UploadedFile/styled.cjs.map +0 -1
  140. package/dist/components/UploadFile/components/UploadedFile/styled.d.ts +0 -2
  141. package/dist/components/UploadFile/components/UploadedFile/styled.js +0 -13
  142. package/dist/components/UploadFile/components/UploadedFile/styled.js.map +0 -1
  143. package/dist/components/UploadFile/utils/setInputElFile/setInputElFile.cjs +0 -18
  144. package/dist/components/UploadFile/utils/setInputElFile/setInputElFile.cjs.map +0 -1
  145. package/dist/components/UploadFile/utils/setInputElFile/setInputElFile.d.ts +0 -13
  146. package/dist/components/UploadFile/utils/setInputElFile/setInputElFile.js +0 -16
  147. package/dist/components/UploadFile/utils/setInputElFile/setInputElFile.js.map +0 -1
@@ -0,0 +1,12 @@
1
+ const isImageType = (file) => {
2
+ if (!file)
3
+ return false;
4
+ const fileType = file.type.split('/');
5
+ if (fileType[0] === 'image') {
6
+ return true;
7
+ }
8
+ return false;
9
+ };
10
+
11
+ export { isImageType };
12
+ //# sourceMappingURL=isImageType.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isImageType.js","sources":["../../../../../src/components/UploadFile/utils/isImageType/isImageType.ts"],"sourcesContent":["export const isImageType = (file?: File | null) => {\n if (!file) return false;\n\n const fileType = file.type.split('/');\n\n if (fileType[0] === 'image') {\n return true;\n }\n\n return false;\n};\n"],"names":[],"mappings":"AAAa,MAAA,WAAW,GAAG,CAAC,IAAkB,KAAI;AAChD,IAAA,IAAI,CAAC,IAAI;AAAE,QAAA,OAAO,KAAK;IAEvB,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC;AAErC,IAAA,IAAI,QAAQ,CAAC,CAAC,CAAC,KAAK,OAAO,EAAE;AAC3B,QAAA,OAAO,IAAI;AACZ;AAED,IAAA,OAAO,KAAK;AACd;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veeqo/ui",
3
- "version": "12.4.0-beta-3",
3
+ "version": "12.4.0-beta-5",
4
4
  "description": "New optimised component library for Veeqo.",
5
5
  "author": "Robert Wealthall",
6
6
  "license": "ISC",
@@ -1,37 +0,0 @@
1
- 'use strict';
2
-
3
- var React = require('react');
4
- var reactAriaComponents = require('react-aria-components');
5
- var FlexRow = require('../../../Flex/FlexRow/FlexRow.cjs');
6
- var Button = require('../../../Button/Button.cjs');
7
- var ArrowRightIcon = require('../../../../icons/design-system/components/ArrowRightIcon.cjs');
8
- var ItemContent = require('../ItemContent/ItemContent.cjs');
9
- var buildClassnames = require('../../../../utils/buildClassnames.cjs');
10
- require('uid/secure');
11
- require('../../../../hooks/useFocusVisible.cjs');
12
- var useId = require('../../../../hooks/useId.cjs');
13
- require('lodash.throttle');
14
- var item_module = require('../item.module.scss.cjs');
15
- var GridItem_module = require('./GridItem.module.scss.cjs');
16
-
17
- function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
18
-
19
- var React__default = /*#__PURE__*/_interopDefaultCompat(React);
20
-
21
- function GridItem({ id, label, href, appearance = 'primary', className, onClickRowAction, rowActionAriaLabel, isRowActionDisabled = false, ...props }) {
22
- const idComputed = useId.useId({ id, prefix: 'grid-item' });
23
- return (React__default.default.createElement(reactAriaComponents.GridListItem, { id: idComputed, textValue: label, href: href, className: buildClassnames.buildClassnames([
24
- item_module.item,
25
- item_module[`appearance-${appearance}`],
26
- className,
27
- ]), ...props }, ({ selectionMode, allowsDragging, isSelected }) => (React__default.default.createElement(FlexRow.FlexRow, { flexWrap: "nowrap", justifyContent: "space-between" },
28
- React__default.default.createElement(ItemContent.ItemContent, { selectionMode: selectionMode, allowsDragging: allowsDragging, isSelected: isSelected, label: label, isLink: Boolean(href), appearance: appearance, itemType: "grid", ...props }),
29
- onClickRowAction && (
30
- /** onPointerDown event prevents click events from bubbling up to the GridListItem.
31
- * onKeyDown event prevents keyboard events from bubbling up to the GridListItem.
32
- */
33
- React__default.default.createElement(Button.Button, { onClick: onClickRowAction, disabled: isRowActionDisabled, onPointerDown: (event) => event.stopPropagation(), onKeyDown: (event) => event.stopPropagation(), variant: "flat", iconSlot: React__default.default.createElement(ArrowRightIcon.ReactComponent, null), "aria-label": rowActionAriaLabel || `${label} row action`, className: GridItem_module.actionButton }))))));
34
- }
35
-
36
- exports.GridItem = GridItem;
37
- //# sourceMappingURL=GridItem.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GridItem.cjs","sources":["../../../../../src/components/SelectDropdown/components/GridItem/GridItem.tsx"],"sourcesContent":["import React from 'react';\nimport { GridListItem, GridListItemRenderProps } from 'react-aria-components';\nimport { FlexRow } from '../../../Flex/FlexRow';\nimport { Button } from '../../../Button';\nimport { ArrowRightIcon } from '../../../../icons';\nimport { ItemContent } from '../ItemContent';\nimport { GridItemProps } from './types';\nimport { buildClassnames } from '../../../../utils';\nimport { useId } from '../../../../hooks';\n\nimport itemStyles from '../item.module.scss';\nimport styles from './GridItem.module.scss';\n\nexport function GridItem({\n id,\n label,\n href,\n appearance = 'primary',\n className,\n onClickRowAction,\n rowActionAriaLabel,\n isRowActionDisabled = false,\n ...props\n}: GridItemProps) {\n const idComputed = useId({ id, prefix: 'grid-item' });\n\n return (\n <GridListItem\n id={idComputed}\n textValue={label}\n href={href}\n className={buildClassnames([\n itemStyles.item,\n itemStyles[`appearance-${appearance}`],\n className,\n ])}\n {...props}\n >\n {/* use react aria's render props to add more such as isHovered */}\n {({ selectionMode, allowsDragging, isSelected }: GridListItemRenderProps) => (\n <FlexRow flexWrap=\"nowrap\" justifyContent=\"space-between\">\n <ItemContent\n selectionMode={selectionMode}\n allowsDragging={allowsDragging}\n isSelected={isSelected}\n label={label}\n isLink={Boolean(href)}\n appearance={appearance}\n itemType=\"grid\"\n {...props}\n />\n {onClickRowAction && (\n /** onPointerDown event prevents click events from bubbling up to the GridListItem.\n * onKeyDown event prevents keyboard events from bubbling up to the GridListItem.\n */\n <Button\n onClick={onClickRowAction}\n disabled={isRowActionDisabled}\n onPointerDown={(event) => event.stopPropagation()}\n onKeyDown={(event) => event.stopPropagation()}\n variant=\"flat\"\n iconSlot={<ArrowRightIcon />}\n aria-label={rowActionAriaLabel || `${label} row action`}\n className={styles.actionButton}\n />\n )}\n </FlexRow>\n )}\n </GridListItem>\n );\n}\n"],"names":["useId","React","GridListItem","buildClassnames","itemStyles","FlexRow","ItemContent","Button","ArrowRightIcon","styles"],"mappings":";;;;;;;;;;;;;;;;;;;;AAaM,SAAU,QAAQ,CAAC,EACvB,EAAE,EACF,KAAK,EACL,IAAI,EACJ,UAAU,GAAG,SAAS,EACtB,SAAS,EACT,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,GAAG,KAAK,EAC3B,GAAG,KAAK,EACM,EAAA;AACd,IAAA,MAAM,UAAU,GAAGA,WAAK,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC;AAErD,IAAA,QACEC,sBAAC,CAAA,aAAA,CAAAC,gCAAY,IACX,EAAE,EAAE,UAAU,EACd,SAAS,EAAE,KAAK,EAChB,IAAI,EAAE,IAAI,EACV,SAAS,EAAEC,+BAAe,CAAC;AACzB,YAAAC,WAAU,CAAC,IAAI;AACf,YAAAA,WAAU,CAAC,CAAA,WAAA,EAAc,UAAU,CAAA,CAAE,CAAC;YACtC,SAAS;SACV,CAAC,EAAA,GACE,KAAK,EAAA,EAGR,CAAC,EAAE,aAAa,EAAE,cAAc,EAAE,UAAU,EAA2B,MACtEH,sBAAC,CAAA,aAAA,CAAAI,eAAO,EAAC,EAAA,QAAQ,EAAC,QAAQ,EAAC,cAAc,EAAC,eAAe,EAAA;AACvD,QAAAJ,sBAAA,CAAA,aAAA,CAACK,uBAAW,EAAA,EACV,aAAa,EAAE,aAAa,EAC5B,cAAc,EAAE,cAAc,EAC9B,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,EACrB,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAC,MAAM,EAAA,GACX,KAAK,EACT,CAAA;AACD,QAAA,gBAAgB;AACf;;AAEG;AACH,QAAAL,sBAAA,CAAA,aAAA,CAACM,aAAM,EAAA,EACL,OAAO,EAAE,gBAAgB,EACzB,QAAQ,EAAE,mBAAmB,EAC7B,aAAa,EAAE,CAAC,KAAK,KAAK,KAAK,CAAC,eAAe,EAAE,EACjD,SAAS,EAAE,CAAC,KAAK,KAAK,KAAK,CAAC,eAAe,EAAE,EAC7C,OAAO,EAAC,MAAM,EACd,QAAQ,EAAEN,sBAAC,CAAA,aAAA,CAAAO,6BAAc,EAAG,IAAA,CAAA,EAAA,YAAA,EAChB,kBAAkB,IAAI,CAAG,EAAA,KAAK,CAAa,WAAA,CAAA,EACvD,SAAS,EAAEC,eAAM,CAAC,YAAY,EAAA,CAC9B,CACH,CACO,CACX,CACY;AAEnB;;;;"}
@@ -1,31 +0,0 @@
1
- import React__default from 'react';
2
- import { GridListItem } from 'react-aria-components';
3
- import { FlexRow } from '../../../Flex/FlexRow/FlexRow.js';
4
- import { Button } from '../../../Button/Button.js';
5
- import { ReactComponent as ArrowRightIcon } from '../../../../icons/design-system/components/ArrowRightIcon.js';
6
- import { ItemContent } from '../ItemContent/ItemContent.js';
7
- import { buildClassnames } from '../../../../utils/buildClassnames.js';
8
- import 'uid/secure';
9
- import '../../../../hooks/useFocusVisible.js';
10
- import { useId } from '../../../../hooks/useId.js';
11
- import 'lodash.throttle';
12
- import itemStyles from '../item.module.scss.js';
13
- import styles from './GridItem.module.scss.js';
14
-
15
- function GridItem({ id, label, href, appearance = 'primary', className, onClickRowAction, rowActionAriaLabel, isRowActionDisabled = false, ...props }) {
16
- const idComputed = useId({ id, prefix: 'grid-item' });
17
- return (React__default.createElement(GridListItem, { id: idComputed, textValue: label, href: href, className: buildClassnames([
18
- itemStyles.item,
19
- itemStyles[`appearance-${appearance}`],
20
- className,
21
- ]), ...props }, ({ selectionMode, allowsDragging, isSelected }) => (React__default.createElement(FlexRow, { flexWrap: "nowrap", justifyContent: "space-between" },
22
- React__default.createElement(ItemContent, { selectionMode: selectionMode, allowsDragging: allowsDragging, isSelected: isSelected, label: label, isLink: Boolean(href), appearance: appearance, itemType: "grid", ...props }),
23
- onClickRowAction && (
24
- /** onPointerDown event prevents click events from bubbling up to the GridListItem.
25
- * onKeyDown event prevents keyboard events from bubbling up to the GridListItem.
26
- */
27
- React__default.createElement(Button, { onClick: onClickRowAction, disabled: isRowActionDisabled, onPointerDown: (event) => event.stopPropagation(), onKeyDown: (event) => event.stopPropagation(), variant: "flat", iconSlot: React__default.createElement(ArrowRightIcon, null), "aria-label": rowActionAriaLabel || `${label} row action`, className: styles.actionButton }))))));
28
- }
29
-
30
- export { GridItem };
31
- //# sourceMappingURL=GridItem.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GridItem.js","sources":["../../../../../src/components/SelectDropdown/components/GridItem/GridItem.tsx"],"sourcesContent":["import React from 'react';\nimport { GridListItem, GridListItemRenderProps } from 'react-aria-components';\nimport { FlexRow } from '../../../Flex/FlexRow';\nimport { Button } from '../../../Button';\nimport { ArrowRightIcon } from '../../../../icons';\nimport { ItemContent } from '../ItemContent';\nimport { GridItemProps } from './types';\nimport { buildClassnames } from '../../../../utils';\nimport { useId } from '../../../../hooks';\n\nimport itemStyles from '../item.module.scss';\nimport styles from './GridItem.module.scss';\n\nexport function GridItem({\n id,\n label,\n href,\n appearance = 'primary',\n className,\n onClickRowAction,\n rowActionAriaLabel,\n isRowActionDisabled = false,\n ...props\n}: GridItemProps) {\n const idComputed = useId({ id, prefix: 'grid-item' });\n\n return (\n <GridListItem\n id={idComputed}\n textValue={label}\n href={href}\n className={buildClassnames([\n itemStyles.item,\n itemStyles[`appearance-${appearance}`],\n className,\n ])}\n {...props}\n >\n {/* use react aria's render props to add more such as isHovered */}\n {({ selectionMode, allowsDragging, isSelected }: GridListItemRenderProps) => (\n <FlexRow flexWrap=\"nowrap\" justifyContent=\"space-between\">\n <ItemContent\n selectionMode={selectionMode}\n allowsDragging={allowsDragging}\n isSelected={isSelected}\n label={label}\n isLink={Boolean(href)}\n appearance={appearance}\n itemType=\"grid\"\n {...props}\n />\n {onClickRowAction && (\n /** onPointerDown event prevents click events from bubbling up to the GridListItem.\n * onKeyDown event prevents keyboard events from bubbling up to the GridListItem.\n */\n <Button\n onClick={onClickRowAction}\n disabled={isRowActionDisabled}\n onPointerDown={(event) => event.stopPropagation()}\n onKeyDown={(event) => event.stopPropagation()}\n variant=\"flat\"\n iconSlot={<ArrowRightIcon />}\n aria-label={rowActionAriaLabel || `${label} row action`}\n className={styles.actionButton}\n />\n )}\n </FlexRow>\n )}\n </GridListItem>\n );\n}\n"],"names":["React"],"mappings":";;;;;;;;;;;;;;AAaM,SAAU,QAAQ,CAAC,EACvB,EAAE,EACF,KAAK,EACL,IAAI,EACJ,UAAU,GAAG,SAAS,EACtB,SAAS,EACT,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,GAAG,KAAK,EAC3B,GAAG,KAAK,EACM,EAAA;AACd,IAAA,MAAM,UAAU,GAAG,KAAK,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC;AAErD,IAAA,QACEA,cAAC,CAAA,aAAA,CAAA,YAAY,IACX,EAAE,EAAE,UAAU,EACd,SAAS,EAAE,KAAK,EAChB,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,eAAe,CAAC;AACzB,YAAA,UAAU,CAAC,IAAI;AACf,YAAA,UAAU,CAAC,CAAA,WAAA,EAAc,UAAU,CAAA,CAAE,CAAC;YACtC,SAAS;SACV,CAAC,EAAA,GACE,KAAK,EAAA,EAGR,CAAC,EAAE,aAAa,EAAE,cAAc,EAAE,UAAU,EAA2B,MACtEA,cAAC,CAAA,aAAA,CAAA,OAAO,EAAC,EAAA,QAAQ,EAAC,QAAQ,EAAC,cAAc,EAAC,eAAe,EAAA;AACvD,QAAAA,cAAA,CAAA,aAAA,CAAC,WAAW,EAAA,EACV,aAAa,EAAE,aAAa,EAC5B,cAAc,EAAE,cAAc,EAC9B,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,EACrB,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAC,MAAM,EAAA,GACX,KAAK,EACT,CAAA;AACD,QAAA,gBAAgB;AACf;;AAEG;AACH,QAAAA,cAAA,CAAA,aAAA,CAAC,MAAM,EAAA,EACL,OAAO,EAAE,gBAAgB,EACzB,QAAQ,EAAE,mBAAmB,EAC7B,aAAa,EAAE,CAAC,KAAK,KAAK,KAAK,CAAC,eAAe,EAAE,EACjD,SAAS,EAAE,CAAC,KAAK,KAAK,KAAK,CAAC,eAAe,EAAE,EAC7C,OAAO,EAAC,MAAM,EACd,QAAQ,EAAEA,cAAC,CAAA,aAAA,CAAA,cAAc,EAAG,IAAA,CAAA,EAAA,YAAA,EAChB,kBAAkB,IAAI,CAAG,EAAA,KAAK,CAAa,WAAA,CAAA,EACvD,SAAS,EAAE,MAAM,CAAC,YAAY,EAAA,CAC9B,CACH,CACO,CACX,CACY;AAEnB;;;;"}
@@ -1,9 +0,0 @@
1
- 'use strict';
2
-
3
- var ___$insertStyle = require('../../../../_virtual/____insertStyle.cjs');
4
-
5
- ___$insertStyle("._actionButton_bip91_1:hover {\n outline: solid var(--sizes-xs) var(--colors-secondary-blue-light);\n}");
6
- var styles = {"actionButton":"_actionButton_bip91_1"};
7
-
8
- module.exports = styles;
9
- //# sourceMappingURL=GridItem.module.scss.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GridItem.module.scss.cjs","sources":["../../../../../src/components/SelectDropdown/components/GridItem/GridItem.module.scss"],"sourcesContent":[".actionButton {\n &:hover {\n outline: solid var(--sizes-xs) var(--colors-secondary-blue-light);\n }\n}\n"],"names":[],"mappings":";;;;AAEI,eAAA,CAAA,yGAAA;;;;;"}
@@ -1,7 +0,0 @@
1
- import insertStyle from '../../../../_virtual/____insertStyle.js';
2
-
3
- insertStyle("._actionButton_bip91_1:hover {\n outline: solid var(--sizes-xs) var(--colors-secondary-blue-light);\n}");
4
- var styles = {"actionButton":"_actionButton_bip91_1"};
5
-
6
- export { styles as default };
7
- //# sourceMappingURL=GridItem.module.scss.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GridItem.module.scss.js","sources":["../../../../../src/components/SelectDropdown/components/GridItem/GridItem.module.scss"],"sourcesContent":[".actionButton {\n &:hover {\n outline: solid var(--sizes-xs) var(--colors-secondary-blue-light);\n }\n}\n"],"names":["___$insertStyle"],"mappings":";;AAEIA,WAAA,CAAA,yGAAA;;;;;"}
@@ -1,18 +0,0 @@
1
- 'use strict';
2
-
3
- var reactAriaComponents = require('react-aria-components');
4
- var React = require('react');
5
- var GridItem = require('../GridItem/GridItem.cjs');
6
- var buildClassnames = require('../../../../utils/buildClassnames.cjs');
7
- require('uid/secure');
8
- var OptionsContainer_module = require('./OptionsContainer.module.scss.cjs');
9
- var SelectDropdownState = require('../SelectDropdownState.cjs');
10
-
11
- function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
12
-
13
- var React__default = /*#__PURE__*/_interopDefaultCompat(React);
14
-
15
- const GridList = ({ id, className, options, onSelectionChange, selectedValues, selectionMode, emptyStateSlot, isLoading = false, ariaDescribedBy, ariaLabelledBy, ...otherProps }) => (React__default.default.createElement(reactAriaComponents.GridList, { className: buildClassnames.buildClassnames([className, OptionsContainer_module.container]), selectionMode: selectionMode, items: options, onSelectionChange: onSelectionChange, selectedKeys: selectedValues.map((selectedValue) => selectedValue.id), renderEmptyState: () => (React__default.default.createElement(SelectDropdownState.SelectDropdownState, { isLoading: isLoading, emptyStateSlot: emptyStateSlot })), "aria-labelledby": ariaLabelledBy !== null && ariaLabelledBy !== undefined ? ariaLabelledBy : `${id}-label`, "aria-describedby": ariaDescribedBy !== null && ariaDescribedBy !== undefined ? ariaDescribedBy : `${id}-hint`, ...otherProps }, (item) => React__default.default.createElement(GridItem.GridItem, { ...item })));
16
-
17
- exports.GridList = GridList;
18
- //# sourceMappingURL=GridList.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GridList.cjs","sources":["../../../../../src/components/SelectDropdown/components/OptionsContainers/GridList.tsx"],"sourcesContent":["import { GridList as AriaGridList, Key } from 'react-aria-components';\nimport React from 'react';\nimport { GridItem } from '../GridItem';\nimport { GridListProps } from './types';\nimport { buildClassnames } from '../../../../utils';\n\nimport styles from './OptionsContainer.module.scss';\nimport { SelectDropdownState } from '../SelectDropdownState';\n\nexport const GridList = ({\n id,\n className,\n options,\n onSelectionChange,\n selectedValues,\n selectionMode,\n emptyStateSlot,\n isLoading = false,\n ariaDescribedBy,\n ariaLabelledBy,\n ...otherProps\n}: GridListProps) => (\n <AriaGridList\n className={buildClassnames([className, styles.container])}\n selectionMode={selectionMode}\n items={options}\n onSelectionChange={onSelectionChange}\n selectedKeys={selectedValues.map((selectedValue) => selectedValue.id) as Key[]}\n renderEmptyState={() => (\n <SelectDropdownState isLoading={isLoading} emptyStateSlot={emptyStateSlot} />\n )}\n aria-labelledby={ariaLabelledBy ?? `${id}-label`}\n aria-describedby={ariaDescribedBy ?? `${id}-hint`}\n {...otherProps}\n >\n {(item) => <GridItem {...item} />}\n </AriaGridList>\n);\n"],"names":["React","AriaGridList","buildClassnames","styles","SelectDropdownState","GridItem"],"mappings":";;;;;;;;;;;;;;AASO,MAAM,QAAQ,GAAG,CAAC,EACvB,EAAE,EACF,SAAS,EACT,OAAO,EACP,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,cAAc,EACd,SAAS,GAAG,KAAK,EACjB,eAAe,EACf,cAAc,EACd,GAAG,UAAU,EACC,MACdA,sBAAA,CAAA,aAAA,CAACC,4BAAY,EAAA,EACX,SAAS,EAAEC,+BAAe,CAAC,CAAC,SAAS,EAAEC,uBAAM,CAAC,SAAS,CAAC,CAAC,EACzD,aAAa,EAAE,aAAa,EAC5B,KAAK,EAAE,OAAO,EACd,iBAAiB,EAAE,iBAAiB,EACpC,YAAY,EAAE,cAAc,CAAC,GAAG,CAAC,CAAC,aAAa,KAAK,aAAa,CAAC,EAAE,CAAU,EAC9E,gBAAgB,EAAE,OAChBH,sBAAC,CAAA,aAAA,CAAAI,uCAAmB,EAAC,EAAA,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE,cAAc,EAAI,CAAA,CAC9E,qBACgB,cAAc,KAAA,IAAA,IAAd,cAAc,KAAA,SAAA,GAAd,cAAc,GAAI,CAAG,EAAA,EAAE,CAAQ,MAAA,CAAA,EAAA,kBAAA,EAC9B,eAAe,KAAA,IAAA,IAAf,eAAe,KAAA,SAAA,GAAf,eAAe,GAAI,GAAG,EAAE,CAAA,KAAA,CAAO,EAC7C,GAAA,UAAU,EAEb,EAAA,CAAC,IAAI,KAAKJ,sBAAC,CAAA,aAAA,CAAAK,iBAAQ,EAAK,EAAA,GAAA,IAAI,EAAI,CAAA,CACpB;;;;"}
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- import { GridListProps } from './types';
3
- export declare const GridList: ({ id, className, options, onSelectionChange, selectedValues, selectionMode, emptyStateSlot, isLoading, ariaDescribedBy, ariaLabelledBy, ...otherProps }: GridListProps) => React.JSX.Element;
@@ -1,12 +0,0 @@
1
- import { GridList as GridList$1 } from 'react-aria-components';
2
- import React__default from 'react';
3
- import { GridItem } from '../GridItem/GridItem.js';
4
- import { buildClassnames } from '../../../../utils/buildClassnames.js';
5
- import 'uid/secure';
6
- import styles from './OptionsContainer.module.scss.js';
7
- import { SelectDropdownState } from '../SelectDropdownState.js';
8
-
9
- const GridList = ({ id, className, options, onSelectionChange, selectedValues, selectionMode, emptyStateSlot, isLoading = false, ariaDescribedBy, ariaLabelledBy, ...otherProps }) => (React__default.createElement(GridList$1, { className: buildClassnames([className, styles.container]), selectionMode: selectionMode, items: options, onSelectionChange: onSelectionChange, selectedKeys: selectedValues.map((selectedValue) => selectedValue.id), renderEmptyState: () => (React__default.createElement(SelectDropdownState, { isLoading: isLoading, emptyStateSlot: emptyStateSlot })), "aria-labelledby": ariaLabelledBy !== null && ariaLabelledBy !== undefined ? ariaLabelledBy : `${id}-label`, "aria-describedby": ariaDescribedBy !== null && ariaDescribedBy !== undefined ? ariaDescribedBy : `${id}-hint`, ...otherProps }, (item) => React__default.createElement(GridItem, { ...item })));
10
-
11
- export { GridList };
12
- //# sourceMappingURL=GridList.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GridList.js","sources":["../../../../../src/components/SelectDropdown/components/OptionsContainers/GridList.tsx"],"sourcesContent":["import { GridList as AriaGridList, Key } from 'react-aria-components';\nimport React from 'react';\nimport { GridItem } from '../GridItem';\nimport { GridListProps } from './types';\nimport { buildClassnames } from '../../../../utils';\n\nimport styles from './OptionsContainer.module.scss';\nimport { SelectDropdownState } from '../SelectDropdownState';\n\nexport const GridList = ({\n id,\n className,\n options,\n onSelectionChange,\n selectedValues,\n selectionMode,\n emptyStateSlot,\n isLoading = false,\n ariaDescribedBy,\n ariaLabelledBy,\n ...otherProps\n}: GridListProps) => (\n <AriaGridList\n className={buildClassnames([className, styles.container])}\n selectionMode={selectionMode}\n items={options}\n onSelectionChange={onSelectionChange}\n selectedKeys={selectedValues.map((selectedValue) => selectedValue.id) as Key[]}\n renderEmptyState={() => (\n <SelectDropdownState isLoading={isLoading} emptyStateSlot={emptyStateSlot} />\n )}\n aria-labelledby={ariaLabelledBy ?? `${id}-label`}\n aria-describedby={ariaDescribedBy ?? `${id}-hint`}\n {...otherProps}\n >\n {(item) => <GridItem {...item} />}\n </AriaGridList>\n);\n"],"names":["React","AriaGridList"],"mappings":";;;;;;;;AASO,MAAM,QAAQ,GAAG,CAAC,EACvB,EAAE,EACF,SAAS,EACT,OAAO,EACP,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,cAAc,EACd,SAAS,GAAG,KAAK,EACjB,eAAe,EACf,cAAc,EACd,GAAG,UAAU,EACC,MACdA,cAAA,CAAA,aAAA,CAACC,UAAY,EAAA,EACX,SAAS,EAAE,eAAe,CAAC,CAAC,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC,EACzD,aAAa,EAAE,aAAa,EAC5B,KAAK,EAAE,OAAO,EACd,iBAAiB,EAAE,iBAAiB,EACpC,YAAY,EAAE,cAAc,CAAC,GAAG,CAAC,CAAC,aAAa,KAAK,aAAa,CAAC,EAAE,CAAU,EAC9E,gBAAgB,EAAE,OAChBD,cAAC,CAAA,aAAA,CAAA,mBAAmB,EAAC,EAAA,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE,cAAc,EAAI,CAAA,CAC9E,qBACgB,cAAc,KAAA,IAAA,IAAd,cAAc,KAAA,SAAA,GAAd,cAAc,GAAI,CAAG,EAAA,EAAE,CAAQ,MAAA,CAAA,EAAA,kBAAA,EAC9B,eAAe,KAAA,IAAA,IAAf,eAAe,KAAA,SAAA,GAAf,eAAe,GAAI,GAAG,EAAE,CAAA,KAAA,CAAO,EAC7C,GAAA,UAAU,EAEb,EAAA,CAAC,IAAI,KAAKA,cAAC,CAAA,aAAA,CAAA,QAAQ,EAAK,EAAA,GAAA,IAAI,EAAI,CAAA,CACpB;;;;"}
@@ -1,19 +0,0 @@
1
- 'use strict';
2
-
3
- var React = require('react');
4
- var reactAriaComponents = require('react-aria-components');
5
- var buildClassnames = require('../../../../utils/buildClassnames.cjs');
6
- require('uid/secure');
7
- var OptionsContainer_module = require('./OptionsContainer.module.scss.cjs');
8
- var SelectDropdownState = require('../SelectDropdownState.cjs');
9
- var ListItemSection = require('../ListItemSection/ListItemSection.cjs');
10
- var ListItem = require('../ListItem/ListItem.cjs');
11
-
12
- function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
13
-
14
- var React__default = /*#__PURE__*/_interopDefaultCompat(React);
15
-
16
- const ListBox = ({ id, className, ariaLabelledBy, ariaDescribedBy, selectionMode, options, onSelectionChange, selectedValues, isLoading = false, emptyStateSlot, hasSection, ...otherProps }) => (React__default.default.createElement(reactAriaComponents.ListBox, { className: buildClassnames.buildClassnames([className, OptionsContainer_module.container]), selectionMode: selectionMode, items: options, onSelectionChange: onSelectionChange, selectedKeys: selectedValues.map((selectedValue) => selectedValue.id), renderEmptyState: () => (React__default.default.createElement(SelectDropdownState.SelectDropdownState, { isLoading: isLoading, emptyStateSlot: emptyStateSlot })), "aria-labelledby": ariaLabelledBy !== null && ariaLabelledBy !== undefined ? ariaLabelledBy : `${id}-label`, "aria-describedby": ariaDescribedBy !== null && ariaDescribedBy !== undefined ? ariaDescribedBy : `${id}-hint`, ...otherProps }, (item) => hasSection ? (React__default.default.createElement(ListItemSection.ListItemSection, { ...item })) : (React__default.default.createElement(ListItem.ListItem, { ...item }))));
17
-
18
- exports.ListBox = ListBox;
19
- //# sourceMappingURL=ListBox.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ListBox.cjs","sources":["../../../../../src/components/SelectDropdown/components/OptionsContainers/ListBox.tsx"],"sourcesContent":["import React from 'react';\nimport { ListBox as AriaListBox, Key } from 'react-aria-components';\nimport { buildClassnames } from '../../../../utils';\n\nimport styles from './OptionsContainer.module.scss';\nimport { SelectDropdownState } from '../SelectDropdownState';\nimport { ListItemSection } from '../ListItemSection';\nimport { ListItem } from '../ListItem';\nimport { ListItemProps } from '../ListItem/types';\nimport { ListItemSectionProps } from '../ListItemSection/ListItemSection';\nimport { ListBoxProps } from './types';\n\nexport const ListBox = ({\n id,\n className,\n ariaLabelledBy,\n ariaDescribedBy,\n selectionMode,\n options,\n onSelectionChange,\n selectedValues,\n isLoading = false,\n emptyStateSlot,\n hasSection,\n ...otherProps\n}: ListBoxProps) => (\n <AriaListBox\n className={buildClassnames([className, styles.container])}\n selectionMode={selectionMode}\n items={options}\n onSelectionChange={onSelectionChange}\n selectedKeys={selectedValues.map((selectedValue) => selectedValue.id) as Key[]}\n renderEmptyState={() => (\n <SelectDropdownState isLoading={isLoading} emptyStateSlot={emptyStateSlot} />\n )}\n aria-labelledby={ariaLabelledBy ?? `${id}-label`}\n aria-describedby={ariaDescribedBy ?? `${id}-hint`}\n {...otherProps}\n >\n {(item) =>\n hasSection ? (\n <ListItemSection {...(item as ListItemSectionProps)} />\n ) : (\n <ListItem {...(item as ListItemProps)} />\n )\n }\n </AriaListBox>\n);\n"],"names":["React","AriaListBox","buildClassnames","styles","SelectDropdownState","ListItemSection","ListItem"],"mappings":";;;;;;;;;;;;;;;AAYO,MAAM,OAAO,GAAG,CAAC,EACtB,EAAE,EACF,SAAS,EACT,cAAc,EACd,eAAe,EACf,aAAa,EACb,OAAO,EACP,iBAAiB,EACjB,cAAc,EACd,SAAS,GAAG,KAAK,EACjB,cAAc,EACd,UAAU,EACV,GAAG,UAAU,EACA,MACbA,sBAAA,CAAA,aAAA,CAACC,2BAAW,EAAA,EACV,SAAS,EAAEC,+BAAe,CAAC,CAAC,SAAS,EAAEC,uBAAM,CAAC,SAAS,CAAC,CAAC,EACzD,aAAa,EAAE,aAAa,EAC5B,KAAK,EAAE,OAAO,EACd,iBAAiB,EAAE,iBAAiB,EACpC,YAAY,EAAE,cAAc,CAAC,GAAG,CAAC,CAAC,aAAa,KAAK,aAAa,CAAC,EAAE,CAAU,EAC9E,gBAAgB,EAAE,OAChBH,sBAAC,CAAA,aAAA,CAAAI,uCAAmB,EAAC,EAAA,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE,cAAc,EAAA,CAAI,CAC9E,EAAA,iBAAA,EACgB,cAAc,KAAd,IAAA,IAAA,cAAc,KAAd,SAAA,GAAA,cAAc,GAAI,CAAG,EAAA,EAAE,CAAQ,MAAA,CAAA,EAAA,kBAAA,EAC9B,eAAe,KAAf,IAAA,IAAA,eAAe,KAAf,SAAA,GAAA,eAAe,GAAI,CAAA,EAAG,EAAE,CAAA,KAAA,CAAO,KAC7C,UAAU,EAAA,EAEb,CAAC,IAAI,KACJ,UAAU,IACRJ,sBAAC,CAAA,aAAA,CAAAK,+BAAe,OAAM,IAA6B,EAAA,CAAI,KAEvDL,sBAAC,CAAA,aAAA,CAAAM,iBAAQ,OAAM,IAAsB,EAAA,CAAI,CAC1C,CAES;;;;"}
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- import { ListBoxProps } from './types';
3
- export declare const ListBox: ({ id, className, ariaLabelledBy, ariaDescribedBy, selectionMode, options, onSelectionChange, selectedValues, isLoading, emptyStateSlot, hasSection, ...otherProps }: ListBoxProps) => React.JSX.Element;
@@ -1,13 +0,0 @@
1
- import React__default from 'react';
2
- import { ListBox as ListBox$1 } from 'react-aria-components';
3
- import { buildClassnames } from '../../../../utils/buildClassnames.js';
4
- import 'uid/secure';
5
- import styles from './OptionsContainer.module.scss.js';
6
- import { SelectDropdownState } from '../SelectDropdownState.js';
7
- import { ListItemSection } from '../ListItemSection/ListItemSection.js';
8
- import { ListItem } from '../ListItem/ListItem.js';
9
-
10
- const ListBox = ({ id, className, ariaLabelledBy, ariaDescribedBy, selectionMode, options, onSelectionChange, selectedValues, isLoading = false, emptyStateSlot, hasSection, ...otherProps }) => (React__default.createElement(ListBox$1, { className: buildClassnames([className, styles.container]), selectionMode: selectionMode, items: options, onSelectionChange: onSelectionChange, selectedKeys: selectedValues.map((selectedValue) => selectedValue.id), renderEmptyState: () => (React__default.createElement(SelectDropdownState, { isLoading: isLoading, emptyStateSlot: emptyStateSlot })), "aria-labelledby": ariaLabelledBy !== null && ariaLabelledBy !== undefined ? ariaLabelledBy : `${id}-label`, "aria-describedby": ariaDescribedBy !== null && ariaDescribedBy !== undefined ? ariaDescribedBy : `${id}-hint`, ...otherProps }, (item) => hasSection ? (React__default.createElement(ListItemSection, { ...item })) : (React__default.createElement(ListItem, { ...item }))));
11
-
12
- export { ListBox };
13
- //# sourceMappingURL=ListBox.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ListBox.js","sources":["../../../../../src/components/SelectDropdown/components/OptionsContainers/ListBox.tsx"],"sourcesContent":["import React from 'react';\nimport { ListBox as AriaListBox, Key } from 'react-aria-components';\nimport { buildClassnames } from '../../../../utils';\n\nimport styles from './OptionsContainer.module.scss';\nimport { SelectDropdownState } from '../SelectDropdownState';\nimport { ListItemSection } from '../ListItemSection';\nimport { ListItem } from '../ListItem';\nimport { ListItemProps } from '../ListItem/types';\nimport { ListItemSectionProps } from '../ListItemSection/ListItemSection';\nimport { ListBoxProps } from './types';\n\nexport const ListBox = ({\n id,\n className,\n ariaLabelledBy,\n ariaDescribedBy,\n selectionMode,\n options,\n onSelectionChange,\n selectedValues,\n isLoading = false,\n emptyStateSlot,\n hasSection,\n ...otherProps\n}: ListBoxProps) => (\n <AriaListBox\n className={buildClassnames([className, styles.container])}\n selectionMode={selectionMode}\n items={options}\n onSelectionChange={onSelectionChange}\n selectedKeys={selectedValues.map((selectedValue) => selectedValue.id) as Key[]}\n renderEmptyState={() => (\n <SelectDropdownState isLoading={isLoading} emptyStateSlot={emptyStateSlot} />\n )}\n aria-labelledby={ariaLabelledBy ?? `${id}-label`}\n aria-describedby={ariaDescribedBy ?? `${id}-hint`}\n {...otherProps}\n >\n {(item) =>\n hasSection ? (\n <ListItemSection {...(item as ListItemSectionProps)} />\n ) : (\n <ListItem {...(item as ListItemProps)} />\n )\n }\n </AriaListBox>\n);\n"],"names":["React","AriaListBox"],"mappings":";;;;;;;;;AAYO,MAAM,OAAO,GAAG,CAAC,EACtB,EAAE,EACF,SAAS,EACT,cAAc,EACd,eAAe,EACf,aAAa,EACb,OAAO,EACP,iBAAiB,EACjB,cAAc,EACd,SAAS,GAAG,KAAK,EACjB,cAAc,EACd,UAAU,EACV,GAAG,UAAU,EACA,MACbA,cAAA,CAAA,aAAA,CAACC,SAAW,EAAA,EACV,SAAS,EAAE,eAAe,CAAC,CAAC,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC,EACzD,aAAa,EAAE,aAAa,EAC5B,KAAK,EAAE,OAAO,EACd,iBAAiB,EAAE,iBAAiB,EACpC,YAAY,EAAE,cAAc,CAAC,GAAG,CAAC,CAAC,aAAa,KAAK,aAAa,CAAC,EAAE,CAAU,EAC9E,gBAAgB,EAAE,OAChBD,cAAC,CAAA,aAAA,CAAA,mBAAmB,EAAC,EAAA,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE,cAAc,EAAA,CAAI,CAC9E,EAAA,iBAAA,EACgB,cAAc,KAAd,IAAA,IAAA,cAAc,KAAd,SAAA,GAAA,cAAc,GAAI,CAAG,EAAA,EAAE,CAAQ,MAAA,CAAA,EAAA,kBAAA,EAC9B,eAAe,KAAf,IAAA,IAAA,eAAe,KAAf,SAAA,GAAA,eAAe,GAAI,CAAA,EAAG,EAAE,CAAA,KAAA,CAAO,KAC7C,UAAU,EAAA,EAEb,CAAC,IAAI,KACJ,UAAU,IACRA,cAAC,CAAA,aAAA,CAAA,eAAe,OAAM,IAA6B,EAAA,CAAI,KAEvDA,cAAC,CAAA,aAAA,CAAA,QAAQ,OAAM,IAAsB,EAAA,CAAI,CAC1C,CAES;;;;"}
@@ -1,9 +0,0 @@
1
- 'use strict';
2
-
3
- var ___$insertStyle = require('../../../../_virtual/____insertStyle.cjs');
4
-
5
- ___$insertStyle("._container_jvp9b_1 {\n overflow-y: scroll;\n max-height: 300px;\n padding: var(--sizes-sm);\n scroll-padding: var(--sizes-xs) 0;\n}\n._container_jvp9b_1[data-empty] {\n display: flex;\n align-items: center;\n justify-content: center;\n}");
6
- var styles = {"container":"_container_jvp9b_1"};
7
-
8
- module.exports = styles;
9
- //# sourceMappingURL=OptionsContainer.module.scss.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OptionsContainer.module.scss.cjs","sources":["../../../../../src/components/SelectDropdown/components/OptionsContainers/OptionsContainer.module.scss"],"sourcesContent":[".container {\n overflow-y: scroll;\n max-height: 300px;\n padding: var(--sizes-sm);\n scroll-padding: var(--sizes-xs) 0;\n\n &[data-empty] {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n}\n"],"names":[],"mappings":";;;;AACE,eAAA,CAAA,sPAAA;AACA,aAAA,CAAA,WAAA,CAAA,oBAAA;;;;"}
@@ -1,7 +0,0 @@
1
- import insertStyle from '../../../../_virtual/____insertStyle.js';
2
-
3
- insertStyle("._container_jvp9b_1 {\n overflow-y: scroll;\n max-height: 300px;\n padding: var(--sizes-sm);\n scroll-padding: var(--sizes-xs) 0;\n}\n._container_jvp9b_1[data-empty] {\n display: flex;\n align-items: center;\n justify-content: center;\n}");
4
- var styles = {"container":"_container_jvp9b_1"};
5
-
6
- export { styles as default };
7
- //# sourceMappingURL=OptionsContainer.module.scss.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OptionsContainer.module.scss.js","sources":["../../../../../src/components/SelectDropdown/components/OptionsContainers/OptionsContainer.module.scss"],"sourcesContent":[".container {\n overflow-y: scroll;\n max-height: 300px;\n padding: var(--sizes-sm);\n scroll-padding: var(--sizes-xs) 0;\n\n &[data-empty] {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n}\n"],"names":["___$insertStyle"],"mappings":";;AACEA,WAAA,CAAA,sPAAA;AACA,aAAA,CAAA,WAAA,CAAA,oBAAA;;;;"}
@@ -1,25 +0,0 @@
1
- import { ReactElement } from 'react';
2
- import { Selection, GridListProps as AriaGridListProps, ListBoxProps as AriaListBoxProps } from 'react-aria-components';
3
- import { ListItemSectionProps } from '../ListItemSection/ListItemSection';
4
- import { GridItemProps } from '../GridItem/types';
5
- import { ListItemProps } from '../ListItem/types';
6
- type ListProps = {
7
- id?: string;
8
- className?: string;
9
- selectionMode: 'single' | 'multiple';
10
- emptyStateSlot?: ReactElement;
11
- isLoading?: boolean;
12
- onSelectionChange: (keys: Selection) => void;
13
- ariaLabelledBy?: string;
14
- ariaDescribedBy?: string;
15
- };
16
- export type GridListProps = ListProps & Omit<AriaGridListProps<GridItemProps>, 'items' | 'selectedValues'> & {
17
- options: GridItemProps[];
18
- selectedValues: GridItemProps[];
19
- };
20
- export type ListBoxProps = ListProps & Omit<AriaListBoxProps<ListItemProps | ListItemSectionProps>, 'items' | 'selectedValues'> & {
21
- options: (ListItemProps | ListItemSectionProps)[];
22
- selectedValues: (ListItemProps | ListItemSectionProps)[];
23
- hasSection?: boolean;
24
- };
25
- export {};
@@ -1,14 +0,0 @@
1
- 'use strict';
2
-
3
- var React = require('react');
4
-
5
- function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
6
-
7
- var React__default = /*#__PURE__*/_interopDefaultCompat(React);
8
-
9
- const UploadGraphic = () => (React__default.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "56", height: "56", fill: "none", role: "presentation" },
10
- React__default.default.createElement("path", { fill: "#fff", d: "M0 28C0 12.536 12.536 0 28 0s28 12.536 28 28-12.536 28-28 28S0 43.464 0 28" }),
11
- React__default.default.createElement("path", { fill: "#37424D", d: "M22.5 36c-1.517 0-2.812-.525-3.887-1.575-1.075-1.05-1.613-2.333-1.613-3.85 0-1.3.392-2.458 1.175-3.475s1.808-1.667 3.075-1.95c.417-1.533 1.25-2.775 2.5-3.725C25 20.475 26.417 20 28 20c1.95 0 3.604.68 4.962 2.038C34.322 23.396 35 25.05 35 27c1.15.133 2.104.63 2.862 1.488A4.407 4.407 0 0 1 39 31.5c0 1.25-.437 2.313-1.312 3.188C36.812 35.562 35.75 36 34.5 36H29c-.55 0-1.02-.196-1.413-.587A1.926 1.926 0 0 1 27 34v-5.15l-1.6 1.55L24 29l4-4 4 4-1.4 1.4-1.6-1.55V34h5.5c.7 0 1.292-.242 1.775-.725.483-.483.725-1.075.725-1.775s-.242-1.292-.725-1.775C35.792 29.242 35.2 29 34.5 29H33v-2c0-1.383-.487-2.562-1.462-3.538C30.562 22.489 29.383 22 28 22s-2.562.488-3.538 1.462C23.489 24.438 23 25.618 23 27h-.5c-.967 0-1.792.342-2.475 1.025A3.372 3.372 0 0 0 19 30.5c0 .967.342 1.792 1.025 2.475A3.372 3.372 0 0 0 22.5 34H25v2z" })));
12
-
13
- exports.UploadGraphic = UploadGraphic;
14
- //# sourceMappingURL=UploadGraphic.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"UploadGraphic.cjs","sources":["../../../src/components/UploadFile/UploadGraphic.tsx"],"sourcesContent":["import React from 'react';\n\nexport const UploadGraphic = () => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"56\" height=\"56\" fill=\"none\" role=\"presentation\">\n <path\n fill=\"#fff\"\n d=\"M0 28C0 12.536 12.536 0 28 0s28 12.536 28 28-12.536 28-28 28S0 43.464 0 28\"\n />\n <path\n fill=\"#37424D\"\n d=\"M22.5 36c-1.517 0-2.812-.525-3.887-1.575-1.075-1.05-1.613-2.333-1.613-3.85 0-1.3.392-2.458 1.175-3.475s1.808-1.667 3.075-1.95c.417-1.533 1.25-2.775 2.5-3.725C25 20.475 26.417 20 28 20c1.95 0 3.604.68 4.962 2.038C34.322 23.396 35 25.05 35 27c1.15.133 2.104.63 2.862 1.488A4.407 4.407 0 0 1 39 31.5c0 1.25-.437 2.313-1.312 3.188C36.812 35.562 35.75 36 34.5 36H29c-.55 0-1.02-.196-1.413-.587A1.926 1.926 0 0 1 27 34v-5.15l-1.6 1.55L24 29l4-4 4 4-1.4 1.4-1.6-1.55V34h5.5c.7 0 1.292-.242 1.775-.725.483-.483.725-1.075.725-1.775s-.242-1.292-.725-1.775C35.792 29.242 35.2 29 34.5 29H33v-2c0-1.383-.487-2.562-1.462-3.538C30.562 22.489 29.383 22 28 22s-2.562.488-3.538 1.462C23.489 24.438 23 25.618 23 27h-.5c-.967 0-1.792.342-2.475 1.025A3.372 3.372 0 0 0 19 30.5c0 .967.342 1.792 1.025 2.475A3.372 3.372 0 0 0 22.5 34H25v2z\"\n />\n </svg>\n);\n"],"names":["React"],"mappings":";;;;;;;;AAEa,MAAA,aAAa,GAAG,OAC3BA,sBAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,KAAK,EAAC,4BAA4B,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,cAAc,EAAA;AAC5F,IAAAA,sBAAA,CAAA,aAAA,CAAA,MAAA,EAAA,EACE,IAAI,EAAC,MAAM,EACX,CAAC,EAAC,4EAA4E,EAC9E,CAAA;IACFA,sBACE,CAAA,aAAA,CAAA,MAAA,EAAA,EAAA,IAAI,EAAC,SAAS,EACd,CAAC,EAAC,kzBAAkzB,EAAA,CACpzB,CACE;;;;"}
@@ -1,2 +0,0 @@
1
- import React from 'react';
2
- export declare const UploadGraphic: () => React.JSX.Element;
@@ -1,8 +0,0 @@
1
- import React__default from 'react';
2
-
3
- const UploadGraphic = () => (React__default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "56", height: "56", fill: "none", role: "presentation" },
4
- React__default.createElement("path", { fill: "#fff", d: "M0 28C0 12.536 12.536 0 28 0s28 12.536 28 28-12.536 28-28 28S0 43.464 0 28" }),
5
- React__default.createElement("path", { fill: "#37424D", d: "M22.5 36c-1.517 0-2.812-.525-3.887-1.575-1.075-1.05-1.613-2.333-1.613-3.85 0-1.3.392-2.458 1.175-3.475s1.808-1.667 3.075-1.95c.417-1.533 1.25-2.775 2.5-3.725C25 20.475 26.417 20 28 20c1.95 0 3.604.68 4.962 2.038C34.322 23.396 35 25.05 35 27c1.15.133 2.104.63 2.862 1.488A4.407 4.407 0 0 1 39 31.5c0 1.25-.437 2.313-1.312 3.188C36.812 35.562 35.75 36 34.5 36H29c-.55 0-1.02-.196-1.413-.587A1.926 1.926 0 0 1 27 34v-5.15l-1.6 1.55L24 29l4-4 4 4-1.4 1.4-1.6-1.55V34h5.5c.7 0 1.292-.242 1.775-.725.483-.483.725-1.075.725-1.775s-.242-1.292-.725-1.775C35.792 29.242 35.2 29 34.5 29H33v-2c0-1.383-.487-2.562-1.462-3.538C30.562 22.489 29.383 22 28 22s-2.562.488-3.538 1.462C23.489 24.438 23 25.618 23 27h-.5c-.967 0-1.792.342-2.475 1.025A3.372 3.372 0 0 0 19 30.5c0 .967.342 1.792 1.025 2.475A3.372 3.372 0 0 0 22.5 34H25v2z" })));
6
-
7
- export { UploadGraphic };
8
- //# sourceMappingURL=UploadGraphic.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"UploadGraphic.js","sources":["../../../src/components/UploadFile/UploadGraphic.tsx"],"sourcesContent":["import React from 'react';\n\nexport const UploadGraphic = () => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"56\" height=\"56\" fill=\"none\" role=\"presentation\">\n <path\n fill=\"#fff\"\n d=\"M0 28C0 12.536 12.536 0 28 0s28 12.536 28 28-12.536 28-28 28S0 43.464 0 28\"\n />\n <path\n fill=\"#37424D\"\n d=\"M22.5 36c-1.517 0-2.812-.525-3.887-1.575-1.075-1.05-1.613-2.333-1.613-3.85 0-1.3.392-2.458 1.175-3.475s1.808-1.667 3.075-1.95c.417-1.533 1.25-2.775 2.5-3.725C25 20.475 26.417 20 28 20c1.95 0 3.604.68 4.962 2.038C34.322 23.396 35 25.05 35 27c1.15.133 2.104.63 2.862 1.488A4.407 4.407 0 0 1 39 31.5c0 1.25-.437 2.313-1.312 3.188C36.812 35.562 35.75 36 34.5 36H29c-.55 0-1.02-.196-1.413-.587A1.926 1.926 0 0 1 27 34v-5.15l-1.6 1.55L24 29l4-4 4 4-1.4 1.4-1.6-1.55V34h5.5c.7 0 1.292-.242 1.775-.725.483-.483.725-1.075.725-1.775s-.242-1.292-.725-1.775C35.792 29.242 35.2 29 34.5 29H33v-2c0-1.383-.487-2.562-1.462-3.538C30.562 22.489 29.383 22 28 22s-2.562.488-3.538 1.462C23.489 24.438 23 25.618 23 27h-.5c-.967 0-1.792.342-2.475 1.025A3.372 3.372 0 0 0 19 30.5c0 .967.342 1.792 1.025 2.475A3.372 3.372 0 0 0 22.5 34H25v2z\"\n />\n </svg>\n);\n"],"names":["React"],"mappings":";;AAEa,MAAA,aAAa,GAAG,OAC3BA,cAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,KAAK,EAAC,4BAA4B,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,cAAc,EAAA;AAC5F,IAAAA,cAAA,CAAA,aAAA,CAAA,MAAA,EAAA,EACE,IAAI,EAAC,MAAM,EACX,CAAC,EAAC,4EAA4E,EAC9E,CAAA;IACFA,cACE,CAAA,aAAA,CAAA,MAAA,EAAA,EAAA,IAAI,EAAC,SAAS,EACd,CAAC,EAAC,kzBAAkzB,EAAA,CACpzB,CACE;;;;"}
@@ -1,31 +0,0 @@
1
- 'use strict';
2
-
3
- var React = require('react');
4
- var styled = require('../../../../hoc/withLabels/styled.cjs');
5
- var CriticalIcon = require('../../../../icons/design-system/components/CriticalIcon.cjs');
6
- var index = require('../../../../theme/index.cjs');
7
- var FlexRow = require('../../../Flex/FlexRow/FlexRow.cjs');
8
- var FlexCol = require('../../../Flex/FlexCol/FlexCol.cjs');
9
-
10
- function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
11
-
12
- var React__default = /*#__PURE__*/_interopDefaultCompat(React);
13
-
14
- const UploadFileErrors = ({ acceptedTypesCopy, maxSizeCopy }) => {
15
- if (!acceptedTypesCopy && !maxSizeCopy)
16
- return null;
17
- return (React__default.default.createElement(FlexRow.FlexRow, { alignItems: "baseline" },
18
- React__default.default.createElement(CriticalIcon.ReactComponent, { width: 16, height: 16, color: index.theme.colors.secondary.red.base }),
19
- React__default.default.createElement(FlexCol.FlexCol, null,
20
- acceptedTypesCopy && React__default.default.createElement(styled.Error, null,
21
- "Invalid format (",
22
- acceptedTypesCopy,
23
- ")"),
24
- maxSizeCopy && React__default.default.createElement(styled.Error, null,
25
- "File is too big (",
26
- maxSizeCopy,
27
- ")"))));
28
- };
29
-
30
- exports.UploadFileErrors = UploadFileErrors;
31
- //# sourceMappingURL=UploadFileErrors.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"UploadFileErrors.cjs","sources":["../../../../../src/components/UploadFile/components/UploadFileErrors/UploadFileErrors.tsx"],"sourcesContent":["import React from 'react';\nimport { Error } from '../../../../hoc/withLabels/styled';\nimport { CriticalIcon } from '../../../../icons';\nimport { theme } from '../../../../theme';\nimport { FlexRow } from '../../../Flex/FlexRow';\nimport { FlexCol } from '../../../Flex/FlexCol';\n\ntype UploadFileErrorsProps = {\n acceptedTypesCopy?: string;\n maxSizeCopy?: string;\n};\n\nexport const UploadFileErrors = ({ acceptedTypesCopy, maxSizeCopy }: UploadFileErrorsProps) => {\n if (!acceptedTypesCopy && !maxSizeCopy) return null;\n\n return (\n <FlexRow alignItems=\"baseline\">\n <CriticalIcon width={16} height={16} color={theme.colors.secondary.red.base} />\n <FlexCol>\n {acceptedTypesCopy && <Error>Invalid format ({acceptedTypesCopy})</Error>}\n {maxSizeCopy && <Error>File is too big ({maxSizeCopy})</Error>}\n </FlexCol>\n </FlexRow>\n );\n};\n"],"names":["React","FlexRow","CriticalIcon","theme","FlexCol","Error"],"mappings":";;;;;;;;;;;;;AAYa,MAAA,gBAAgB,GAAG,CAAC,EAAE,iBAAiB,EAAE,WAAW,EAAyB,KAAI;AAC5F,IAAA,IAAI,CAAC,iBAAiB,IAAI,CAAC,WAAW;AAAE,QAAA,OAAO,IAAI;AAEnD,IAAA,QACEA,sBAAC,CAAA,aAAA,CAAAC,eAAO,EAAC,EAAA,UAAU,EAAC,UAAU,EAAA;QAC5BD,sBAAC,CAAA,aAAA,CAAAE,2BAAY,IAAC,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,EAAEC,WAAK,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,EAAI,CAAA;AAC/E,QAAAH,sBAAA,CAAA,aAAA,CAACI,eAAO,EAAA,IAAA;YACL,iBAAiB,IAAIJ,qCAACK,YAAK,EAAA,IAAA;;gBAAkB,iBAAiB;AAAU,gBAAA,GAAA,CAAA;YACxE,WAAW,IAAIL,qCAACK,YAAK,EAAA,IAAA;;gBAAmB,WAAW;oBAAU,CACtD,CACF;AAEd;;;;"}
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- type UploadFileErrorsProps = {
3
- acceptedTypesCopy?: string;
4
- maxSizeCopy?: string;
5
- };
6
- export declare const UploadFileErrors: ({ acceptedTypesCopy, maxSizeCopy }: UploadFileErrorsProps) => React.JSX.Element | null;
7
- export {};
@@ -1,25 +0,0 @@
1
- import React__default from 'react';
2
- import { Error } from '../../../../hoc/withLabels/styled.js';
3
- import { ReactComponent as CriticalIcon } from '../../../../icons/design-system/components/CriticalIcon.js';
4
- import { theme } from '../../../../theme/index.js';
5
- import { FlexRow } from '../../../Flex/FlexRow/FlexRow.js';
6
- import { FlexCol } from '../../../Flex/FlexCol/FlexCol.js';
7
-
8
- const UploadFileErrors = ({ acceptedTypesCopy, maxSizeCopy }) => {
9
- if (!acceptedTypesCopy && !maxSizeCopy)
10
- return null;
11
- return (React__default.createElement(FlexRow, { alignItems: "baseline" },
12
- React__default.createElement(CriticalIcon, { width: 16, height: 16, color: theme.colors.secondary.red.base }),
13
- React__default.createElement(FlexCol, null,
14
- acceptedTypesCopy && React__default.createElement(Error, null,
15
- "Invalid format (",
16
- acceptedTypesCopy,
17
- ")"),
18
- maxSizeCopy && React__default.createElement(Error, null,
19
- "File is too big (",
20
- maxSizeCopy,
21
- ")"))));
22
- };
23
-
24
- export { UploadFileErrors };
25
- //# sourceMappingURL=UploadFileErrors.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"UploadFileErrors.js","sources":["../../../../../src/components/UploadFile/components/UploadFileErrors/UploadFileErrors.tsx"],"sourcesContent":["import React from 'react';\nimport { Error } from '../../../../hoc/withLabels/styled';\nimport { CriticalIcon } from '../../../../icons';\nimport { theme } from '../../../../theme';\nimport { FlexRow } from '../../../Flex/FlexRow';\nimport { FlexCol } from '../../../Flex/FlexCol';\n\ntype UploadFileErrorsProps = {\n acceptedTypesCopy?: string;\n maxSizeCopy?: string;\n};\n\nexport const UploadFileErrors = ({ acceptedTypesCopy, maxSizeCopy }: UploadFileErrorsProps) => {\n if (!acceptedTypesCopy && !maxSizeCopy) return null;\n\n return (\n <FlexRow alignItems=\"baseline\">\n <CriticalIcon width={16} height={16} color={theme.colors.secondary.red.base} />\n <FlexCol>\n {acceptedTypesCopy && <Error>Invalid format ({acceptedTypesCopy})</Error>}\n {maxSizeCopy && <Error>File is too big ({maxSizeCopy})</Error>}\n </FlexCol>\n </FlexRow>\n );\n};\n"],"names":["React"],"mappings":";;;;;;;AAYa,MAAA,gBAAgB,GAAG,CAAC,EAAE,iBAAiB,EAAE,WAAW,EAAyB,KAAI;AAC5F,IAAA,IAAI,CAAC,iBAAiB,IAAI,CAAC,WAAW;AAAE,QAAA,OAAO,IAAI;AAEnD,IAAA,QACEA,cAAC,CAAA,aAAA,CAAA,OAAO,EAAC,EAAA,UAAU,EAAC,UAAU,EAAA;QAC5BA,cAAC,CAAA,aAAA,CAAA,YAAY,IAAC,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,EAAI,CAAA;AAC/E,QAAAA,cAAA,CAAA,aAAA,CAAC,OAAO,EAAA,IAAA;YACL,iBAAiB,IAAIA,6BAAC,KAAK,EAAA,IAAA;;gBAAkB,iBAAiB;AAAU,gBAAA,GAAA,CAAA;YACxE,WAAW,IAAIA,6BAAC,KAAK,EAAA,IAAA;;gBAAmB,WAAW;oBAAU,CACtD,CACF;AAEd;;;;"}
@@ -1,20 +0,0 @@
1
- 'use strict';
2
-
3
- var styled = require('styled-components');
4
- var Text = require('../../../Text/Text.cjs');
5
- var colors = require('../../../../theme/modules/colors.cjs');
6
- var radius = require('../../../../theme/modules/radius.cjs');
7
- var sizes = require('../../../../theme/modules/sizes.cjs');
8
- var Stack = require('../../../Stack/Stack.cjs');
9
- require('../../../Stack/types.cjs');
10
-
11
- function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
12
-
13
- var styled__default = /*#__PURE__*/_interopDefaultCompat(styled);
14
-
15
- const SingleLineText = styled__default.default(Text.Text).withConfig({ displayName: "vui--SingleLineText", componentId: "vui--1aguyhc" }) `display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;overflow:hidden;`;
16
- const UploadedFilesListStack = styled__default.default(Stack.Stack).withConfig({ displayName: "vui--UploadedFilesListStack", componentId: "vui--1g0ca18" }) `border:1px solid ${colors.colors.neutral.ink.lightest};border-radius:${radius.radius.base};padding:${sizes.sizes.xs};${Text.Text}{padding-left:${sizes.sizes.xs};}`;
17
-
18
- exports.SingleLineText = SingleLineText;
19
- exports.UploadedFilesListStack = UploadedFilesListStack;
20
- //# sourceMappingURL=styled.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"styled.cjs","sources":["../../../../../src/components/UploadFile/components/UploadedFile/styled.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { Text } from '../../../Text';\nimport { colors } from '../../../../theme/modules/colors';\nimport { radius } from '../../../../theme/modules/radius';\nimport { sizes } from '../../../../theme/modules/sizes';\nimport { Stack } from '../../../Stack';\n\nexport const SingleLineText = styled(Text)`\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 1;\n overflow: hidden;\n`;\n\nexport const UploadedFilesListStack = styled(Stack)`\n border: 1px solid ${colors.neutral.ink.lightest};\n border-radius: ${radius.base};\n padding: ${sizes.xs};\n\n ${Text} {\n padding-left: ${sizes.xs};\n }\n`;\n"],"names":["styled","Text","Stack","colors","radius","sizes"],"mappings":";;;;;;;;;;;;;;MAOa,cAAc,GAAGA,uBAAM,CAACC,SAAI,CAAC,CAAA,UAAA,CAAA,EAAA,WAAA,EAAA,qBAAA,EAAA,WAAA,EAAA,cAAA,EAAA,CAAA,CAAA,CAAA,qFAAA;AAOnC,MAAM,sBAAsB,GAAGD,uBAAM,CAACE,WAAK,CAAC,CAC7B,UAAA,CAAA,EAAA,WAAA,EAAA,6BAAA,EAAA,WAAA,EAAA,cAAA,EAAA,CAAA,CAAA,CAAA,iBAAA,EAAAC,aAAM,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAA,eAAA,EAC9BC,aAAM,CAAC,IAAI,CAAA,SAAA,EACjBC,WAAK,CAAC,EAAE,CAEjB,CAAA,EAAAJ,SAAI,CACY,cAAA,EAAAI,WAAK,CAAC,EAAE;;;;;"}
@@ -1,2 +0,0 @@
1
- export declare const SingleLineText: import("styled-components").StyledComponent<"span", any, {} & import("../../../Text/types").TextProps, never>;
2
- export declare const UploadedFilesListStack: import("styled-components").StyledComponent<"div", any, import("../../../Stack").StackProps, never>;
@@ -1,13 +0,0 @@
1
- import styled from 'styled-components';
2
- import { Text } from '../../../Text/Text.js';
3
- import { colors } from '../../../../theme/modules/colors.js';
4
- import { radius } from '../../../../theme/modules/radius.js';
5
- import { sizes } from '../../../../theme/modules/sizes.js';
6
- import { Stack } from '../../../Stack/Stack.js';
7
- import '../../../Stack/types.js';
8
-
9
- const SingleLineText = styled(Text).withConfig({ displayName: "vui--SingleLineText", componentId: "vui--1aguyhc" }) `display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;overflow:hidden;`;
10
- const UploadedFilesListStack = styled(Stack).withConfig({ displayName: "vui--UploadedFilesListStack", componentId: "vui--1g0ca18" }) `border:1px solid ${colors.neutral.ink.lightest};border-radius:${radius.base};padding:${sizes.xs};${Text}{padding-left:${sizes.xs};}`;
11
-
12
- export { SingleLineText, UploadedFilesListStack };
13
- //# sourceMappingURL=styled.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"styled.js","sources":["../../../../../src/components/UploadFile/components/UploadedFile/styled.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { Text } from '../../../Text';\nimport { colors } from '../../../../theme/modules/colors';\nimport { radius } from '../../../../theme/modules/radius';\nimport { sizes } from '../../../../theme/modules/sizes';\nimport { Stack } from '../../../Stack';\n\nexport const SingleLineText = styled(Text)`\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 1;\n overflow: hidden;\n`;\n\nexport const UploadedFilesListStack = styled(Stack)`\n border: 1px solid ${colors.neutral.ink.lightest};\n border-radius: ${radius.base};\n padding: ${sizes.xs};\n\n ${Text} {\n padding-left: ${sizes.xs};\n }\n`;\n"],"names":[],"mappings":";;;;;;;;MAOa,cAAc,GAAG,MAAM,CAAC,IAAI,CAAC,CAAA,UAAA,CAAA,EAAA,WAAA,EAAA,qBAAA,EAAA,WAAA,EAAA,cAAA,EAAA,CAAA,CAAA,CAAA,qFAAA;AAOnC,MAAM,sBAAsB,GAAG,MAAM,CAAC,KAAK,CAAC,CAC7B,UAAA,CAAA,EAAA,WAAA,EAAA,6BAAA,EAAA,WAAA,EAAA,cAAA,EAAA,CAAA,CAAA,CAAA,iBAAA,EAAA,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAA,eAAA,EAC9B,MAAM,CAAC,IAAI,CAAA,SAAA,EACjB,KAAK,CAAC,EAAE,CAEjB,CAAA,EAAA,IAAI,CACY,cAAA,EAAA,KAAK,CAAC,EAAE;;;;"}
@@ -1,18 +0,0 @@
1
- 'use strict';
2
-
3
- /**
4
- * Updates the value of the files attribute held within an input elment. Used during DnD operations where
5
- * the input element's files need to kept in sync and updated.
6
- *
7
- * @param fileList - A list of files, typically extracted from the "files" attribute of an input element
8
- * @param elementId - The ID of the input element
9
- */
10
- const setInputElFile = ({ fileList, elementId }) => {
11
- const inputEl = document.getElementById(elementId);
12
- if (fileList.length) {
13
- inputEl.files = fileList;
14
- }
15
- };
16
-
17
- exports.setInputElFile = setInputElFile;
18
- //# sourceMappingURL=setInputElFile.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"setInputElFile.cjs","sources":["../../../../../src/components/UploadFile/utils/setInputElFile/setInputElFile.ts"],"sourcesContent":["type SetInputElFileProps = {\n fileList: FileList;\n elementId: string;\n};\n\n/**\n * Updates the value of the files attribute held within an input elment. Used during DnD operations where\n * the input element's files need to kept in sync and updated.\n *\n * @param fileList - A list of files, typically extracted from the \"files\" attribute of an input element\n * @param elementId - The ID of the input element\n */\nexport const setInputElFile = ({ fileList, elementId }: SetInputElFileProps) => {\n const inputEl = document.getElementById(elementId) as HTMLInputElement;\n if (fileList.length) {\n inputEl.files = fileList;\n }\n};\n"],"names":[],"mappings":";;AAKA;;;;;;AAMG;AACU,MAAA,cAAc,GAAG,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAuB,KAAI;IAC7E,MAAM,OAAO,GAAG,QAAQ,CAAC,cAAc,CAAC,SAAS,CAAqB;IACtE,IAAI,QAAQ,CAAC,MAAM,EAAE;AACnB,QAAA,OAAO,CAAC,KAAK,GAAG,QAAQ;AACzB;AACH;;;;"}
@@ -1,13 +0,0 @@
1
- type SetInputElFileProps = {
2
- fileList: FileList;
3
- elementId: string;
4
- };
5
- /**
6
- * Updates the value of the files attribute held within an input elment. Used during DnD operations where
7
- * the input element's files need to kept in sync and updated.
8
- *
9
- * @param fileList - A list of files, typically extracted from the "files" attribute of an input element
10
- * @param elementId - The ID of the input element
11
- */
12
- export declare const setInputElFile: ({ fileList, elementId }: SetInputElFileProps) => void;
13
- export {};
@@ -1,16 +0,0 @@
1
- /**
2
- * Updates the value of the files attribute held within an input elment. Used during DnD operations where
3
- * the input element's files need to kept in sync and updated.
4
- *
5
- * @param fileList - A list of files, typically extracted from the "files" attribute of an input element
6
- * @param elementId - The ID of the input element
7
- */
8
- const setInputElFile = ({ fileList, elementId }) => {
9
- const inputEl = document.getElementById(elementId);
10
- if (fileList.length) {
11
- inputEl.files = fileList;
12
- }
13
- };
14
-
15
- export { setInputElFile };
16
- //# sourceMappingURL=setInputElFile.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"setInputElFile.js","sources":["../../../../../src/components/UploadFile/utils/setInputElFile/setInputElFile.ts"],"sourcesContent":["type SetInputElFileProps = {\n fileList: FileList;\n elementId: string;\n};\n\n/**\n * Updates the value of the files attribute held within an input elment. Used during DnD operations where\n * the input element's files need to kept in sync and updated.\n *\n * @param fileList - A list of files, typically extracted from the \"files\" attribute of an input element\n * @param elementId - The ID of the input element\n */\nexport const setInputElFile = ({ fileList, elementId }: SetInputElFileProps) => {\n const inputEl = document.getElementById(elementId) as HTMLInputElement;\n if (fileList.length) {\n inputEl.files = fileList;\n }\n};\n"],"names":[],"mappings":"AAKA;;;;;;AAMG;AACU,MAAA,cAAc,GAAG,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAuB,KAAI;IAC7E,MAAM,OAAO,GAAG,QAAQ,CAAC,cAAc,CAAC,SAAS,CAAqB;IACtE,IAAI,QAAQ,CAAC,MAAM,EAAE;AACnB,QAAA,OAAO,CAAC,KAAK,GAAG,QAAQ;AACzB;AACH;;;;"}