@elliemae/ds-dropzone 3.80.0-next.72 → 3.80.0-next.76

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 (38) hide show
  1. package/dist/cjs/DSDropzone.js +12 -4
  2. package/dist/cjs/DSDropzone.js.map +2 -2
  3. package/dist/cjs/config/useDSDropzone.js +3 -2
  4. package/dist/cjs/config/useDSDropzone.js.map +2 -2
  5. package/dist/cjs/parts/DSActivezone/DSActivezone.js +16 -3
  6. package/dist/cjs/parts/DSActivezone/DSActivezone.js.map +3 -3
  7. package/dist/cjs/parts/DSActivezone/config/useActivezone.js +1 -8
  8. package/dist/cjs/parts/DSActivezone/config/useActivezone.js.map +2 -2
  9. package/dist/cjs/parts/DSActivezone/react-desc-prop-types.js +8 -0
  10. package/dist/cjs/parts/DSActivezone/react-desc-prop-types.js.map +2 -2
  11. package/dist/cjs/react-desc-prop-types.js +7 -4
  12. package/dist/cjs/react-desc-prop-types.js.map +2 -2
  13. package/dist/cjs/styled.js +3 -7
  14. package/dist/cjs/styled.js.map +2 -2
  15. package/dist/cjs/typescript-testing/slot-props.js +52 -0
  16. package/dist/cjs/typescript-testing/slot-props.js.map +7 -0
  17. package/dist/esm/DSDropzone.js +14 -6
  18. package/dist/esm/DSDropzone.js.map +2 -2
  19. package/dist/esm/config/useDSDropzone.js +3 -2
  20. package/dist/esm/config/useDSDropzone.js.map +2 -2
  21. package/dist/esm/parts/DSActivezone/DSActivezone.js +16 -3
  22. package/dist/esm/parts/DSActivezone/DSActivezone.js.map +3 -3
  23. package/dist/esm/parts/DSActivezone/config/useActivezone.js +1 -8
  24. package/dist/esm/parts/DSActivezone/config/useActivezone.js.map +2 -2
  25. package/dist/esm/parts/DSActivezone/react-desc-prop-types.js +14 -1
  26. package/dist/esm/parts/DSActivezone/react-desc-prop-types.js.map +2 -2
  27. package/dist/esm/react-desc-prop-types.js +13 -5
  28. package/dist/esm/react-desc-prop-types.js.map +2 -2
  29. package/dist/esm/styled.js +4 -8
  30. package/dist/esm/styled.js.map +2 -2
  31. package/dist/esm/typescript-testing/slot-props.js +29 -0
  32. package/dist/esm/typescript-testing/slot-props.js.map +7 -0
  33. package/dist/types/config/useDSDropzone.d.ts +3 -3
  34. package/dist/types/parts/DSActivezone/config/useActivezone.d.ts +3 -3
  35. package/dist/types/parts/DSActivezone/react-desc-prop-types.d.ts +13 -1
  36. package/dist/types/react-desc-prop-types.d.ts +11 -1
  37. package/dist/types/styled.d.ts +4 -2
  38. package/package.json +9 -8
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/config/useDSDropzone.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { useGetGlobalAttributes, useGetXstyledProps, useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { uid } from 'uid';\nimport type { DSGridT } from '@elliemae/ds-grid';\nimport { type DSDropzoneT, DSDropzonePropTypes, defaultProps } from '../react-desc-prop-types.js';\nimport { useValidateProps } from './useValidateProps.js';\n\nexport interface DropzoneCTX {\n propsWithDefault: DSDropzoneT.InternalProps;\n globalProps: ReturnType<typeof useGetGlobalAttributes>;\n xstyledProps: ReturnType<typeof useGetXstyledProps>;\n instanceUid: string;\n}\n\nexport const useDSDropzone = (propsFromUser: DSDropzoneT.Props) => {\n // =============================================================================\n // MERGE WITH DEFAULT AND VALIDATE PROPS\n // =============================================================================\n const propsWithDefault = useMemoMergePropsWithDefault<DSDropzoneT.InternalProps>(propsFromUser, defaultProps);\n useValidateProps(propsWithDefault, DSDropzonePropTypes);\n // =============================================================================\n // GLOBAL ATTRIBUTES & XSTYLED PROPS\n // =============================================================================\n const globalProps = useGetGlobalAttributes<DSDropzoneT.InternalProps, HTMLDivElement, DSGridT.Props>(\n propsWithDefault,\n );\n const xstyledProps = useGetXstyledProps(propsWithDefault);\n // =============================================================================\n // AD HOC PER COMPONENT LOGIC\n // =============================================================================\n // custom code goes here, this is an example\n const { id, disabled, onDrop } = propsWithDefault;\n const instanceUid = React.useMemo(() => id || uid(5), [id]);\n // =============================================================================\n // HELPERS HOOKS CONFIGS\n // =============================================================================\n const [isDragInside, setIsDragInside] = React.useState(false);\n\n const onBodyDragDropEvent = React.useCallback((e: Event) => {\n e.preventDefault();\n }, []);\n\n /**\n * Prevent default open file in browser\n */\n React.useEffect(() => {\n document.body.addEventListener('drop', onBodyDragDropEvent);\n return () => {\n document.body.removeEventListener('drop', onBodyDragDropEvent);\n };\n }, [onBodyDragDropEvent]);\n\n const onDragEnterHandler: React.DragEventHandler<HTMLDivElement> = React.useCallback(\n (e) => {\n e.preventDefault();\n e.stopPropagation();\n if (!disabled) setIsDragInside(true);\n },\n [disabled],\n );\n const onDragOverHandler: React.DragEventHandler<HTMLDivElement> = React.useCallback((e) => {\n e.preventDefault();\n e.stopPropagation();\n }, []);\n const onDragLeaveHandler: React.DragEventHandler<HTMLDivElement> = React.useCallback((e) => {\n if (e.relatedTarget !== e.currentTarget && !e.currentTarget.contains(e.relatedTarget as Node)) {\n e.preventDefault();\n e.stopPropagation();\n setIsDragInside(false);\n }\n }, []);\n const onDropHandler: React.DragEventHandler<HTMLDivElement> = React.useCallback(\n (e) => {\n e.preventDefault();\n e.stopPropagation();\n setIsDragInside(false);\n const filesArray = Array.from(e.dataTransfer?.files ?? []);\n onDrop?.(filesArray, e);\n },\n [onDrop],\n );\n\n return React.useMemo(\n () => ({\n propsWithDefault,\n globalProps,\n xstyledProps,\n instanceUid,\n isDragInside,\n onDragEnterHandler,\n onDragOverHandler,\n onDragLeaveHandler,\n onDropHandler,\n // ...eventHandlers,\n }),\n [\n propsWithDefault,\n globalProps,\n xstyledProps,\n instanceUid,\n isDragInside,\n onDragEnterHandler,\n onDragOverHandler,\n onDragLeaveHandler,\n onDropHandler,\n // eventHandlers,\n ],\n );\n};\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAvB,OAAOA,YAAW;AAClB,SAAS,wBAAwB,oBAAoB,oCAAoC;AACzF,SAAS,WAAW;AAEpB,SAA2B,qBAAqB,oBAAoB;AACpE,SAAS,wBAAwB;AAS1B,MAAM,gBAAgB,CAAC,kBAAqC;AAIjE,QAAM,mBAAmB,6BAAwD,eAAe,YAAY;AAC5G,mBAAiB,kBAAkB,mBAAmB;AAItD,QAAM,cAAc;AAAA,IAClB;AAAA,EACF;AACA,QAAM,eAAe,mBAAmB,gBAAgB;AAKxD,QAAM,EAAE,IAAI,UAAU,OAAO,IAAI;AACjC,QAAM,cAAcA,OAAM,QAAQ,MAAM,MAAM,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;AAI1D,QAAM,CAAC,cAAc,eAAe,IAAIA,OAAM,SAAS,KAAK;AAE5D,QAAM,sBAAsBA,OAAM,YAAY,CAAC,MAAa;AAC1D,MAAE,eAAe;AAAA,EACnB,GAAG,CAAC,CAAC;AAKL,EAAAA,OAAM,UAAU,MAAM;AACpB,aAAS,KAAK,iBAAiB,QAAQ,mBAAmB;AAC1D,WAAO,MAAM;AACX,eAAS,KAAK,oBAAoB,QAAQ,mBAAmB;AAAA,IAC/D;AAAA,EACF,GAAG,CAAC,mBAAmB,CAAC;AAExB,QAAM,qBAA6DA,OAAM;AAAA,IACvE,CAAC,MAAM;AACL,QAAE,eAAe;AACjB,QAAE,gBAAgB;AAClB,UAAI,CAAC,SAAU,iBAAgB,IAAI;AAAA,IACrC;AAAA,IACA,CAAC,QAAQ;AAAA,EACX;AACA,QAAM,oBAA4DA,OAAM,YAAY,CAAC,MAAM;AACzF,MAAE,eAAe;AACjB,MAAE,gBAAgB;AAAA,EACpB,GAAG,CAAC,CAAC;AACL,QAAM,qBAA6DA,OAAM,YAAY,CAAC,MAAM;AAC1F,QAAI,EAAE,kBAAkB,EAAE,iBAAiB,CAAC,EAAE,cAAc,SAAS,EAAE,aAAqB,GAAG;AAC7F,QAAE,eAAe;AACjB,QAAE,gBAAgB;AAClB,sBAAgB,KAAK;AAAA,IACvB;AAAA,EACF,GAAG,CAAC,CAAC;AACL,QAAM,gBAAwDA,OAAM;AAAA,IAClE,CAAC,MAAM;AACL,QAAE,eAAe;AACjB,QAAE,gBAAgB;AAClB,sBAAgB,KAAK;AACrB,YAAM,aAAa,MAAM,KAAK,EAAE,cAAc,SAAS,CAAC,CAAC;AACzD,eAAS,YAAY,CAAC;AAAA,IACxB;AAAA,IACA,CAAC,MAAM;AAAA,EACT;AAEA,SAAOA,OAAM;AAAA,IACX,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEF;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEF;AAAA,EACF;AACF;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { useGetGlobalAttributes, useGetXstyledProps, useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { uid } from 'uid';\nimport type { DSGridT } from '@elliemae/ds-grid';\nimport { type DSDropzoneT, DSDropzonePropTypes, defaultProps } from '../react-desc-prop-types.js';\nimport { useValidateProps } from './useValidateProps.js';\n\nexport interface DropzoneCTX {\n propsWithDefault: DSDropzoneT.InternalProps;\n globalProps: ReturnType<typeof useGetGlobalAttributes>;\n xstyledProps: ReturnType<typeof useGetXstyledProps>;\n instanceUid: string;\n}\n\nexport const useDSDropzone = (propsFromUser: DSDropzoneT.Props) => {\n // =============================================================================\n // MERGE WITH DEFAULT AND VALIDATE PROPS\n // =============================================================================\n const propsWithDefault = useMemoMergePropsWithDefault<DSDropzoneT.InternalProps>(propsFromUser, defaultProps);\n useValidateProps(propsWithDefault, DSDropzonePropTypes);\n // =============================================================================\n // GLOBAL ATTRIBUTES & XSTYLED PROPS\n // =============================================================================\n const globalProps = useGetGlobalAttributes<DSDropzoneT.InternalProps, HTMLDivElement, DSGridT.Props>(\n propsWithDefault,\n );\n const xstyledProps = useGetXstyledProps(propsWithDefault);\n // =============================================================================\n // AD HOC PER COMPONENT LOGIC\n // =============================================================================\n const { id, disabled, onDrop } = propsWithDefault;\n const instanceUid = React.useMemo(() => id || uid(5), [id]);\n // =============================================================================\n // HELPERS HOOKS CONFIGS\n // =============================================================================\n const [isDragInside, setIsDragInside] = React.useState(false);\n\n const onBodyDragDropEvent = React.useCallback((e: Event) => {\n e.preventDefault();\n }, []);\n\n /**\n * Prevent default open file in browser\n */\n React.useEffect(() => {\n document.body.addEventListener('drop', onBodyDragDropEvent);\n return () => {\n document.body.removeEventListener('drop', onBodyDragDropEvent);\n };\n }, [onBodyDragDropEvent]);\n\n // disabled: the default of drag enter, over and drop is still cancelled (the browser opens no dropped file); the zone\n // only refuses to light up and never calls the consumer onDrop\n const onDragEnterHandler: React.DragEventHandler<HTMLDivElement> = React.useCallback(\n (e) => {\n // the default is always cancelled: otherwise a file dropped on a disabled zone would be opened by the browser.\n // A disabled zone only refuses to light up.\n e.preventDefault();\n e.stopPropagation();\n if (!disabled) setIsDragInside(true);\n },\n [disabled],\n );\n const onDragOverHandler: React.DragEventHandler<HTMLDivElement> = React.useCallback((e) => {\n e.preventDefault();\n e.stopPropagation();\n }, []);\n const onDragLeaveHandler: React.DragEventHandler<HTMLDivElement> = React.useCallback((e) => {\n if (e.relatedTarget !== e.currentTarget && !e.currentTarget.contains(e.relatedTarget as Node)) {\n e.preventDefault();\n e.stopPropagation();\n setIsDragInside(false);\n }\n }, []);\n const onDropHandler: React.DragEventHandler<HTMLDivElement> = React.useCallback(\n (e) => {\n // the state reset and the default cancel always run: the activezone can never be left visible and the browser never\n // opens a dropped file; the consumer is not called when disabled\n setIsDragInside(false);\n e.preventDefault();\n e.stopPropagation();\n if (disabled) return;\n const filesArray = Array.from(e.dataTransfer?.files ?? []);\n onDrop?.(filesArray, e);\n },\n [disabled, onDrop],\n );\n\n return React.useMemo(\n () => ({\n propsWithDefault,\n globalProps,\n xstyledProps,\n instanceUid,\n isDragInside,\n onDragEnterHandler,\n onDragOverHandler,\n onDragLeaveHandler,\n onDropHandler,\n // ...eventHandlers,\n }),\n [\n propsWithDefault,\n globalProps,\n xstyledProps,\n instanceUid,\n isDragInside,\n onDragEnterHandler,\n onDragOverHandler,\n onDragLeaveHandler,\n onDropHandler,\n // eventHandlers,\n ],\n );\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,OAAOA,YAAW;AAClB,SAAS,wBAAwB,oBAAoB,oCAAoC;AACzF,SAAS,WAAW;AAEpB,SAA2B,qBAAqB,oBAAoB;AACpE,SAAS,wBAAwB;AAS1B,MAAM,gBAAgB,CAAC,kBAAqC;AAIjE,QAAM,mBAAmB,6BAAwD,eAAe,YAAY;AAC5G,mBAAiB,kBAAkB,mBAAmB;AAItD,QAAM,cAAc;AAAA,IAClB;AAAA,EACF;AACA,QAAM,eAAe,mBAAmB,gBAAgB;AAIxD,QAAM,EAAE,IAAI,UAAU,OAAO,IAAI;AACjC,QAAM,cAAcA,OAAM,QAAQ,MAAM,MAAM,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;AAI1D,QAAM,CAAC,cAAc,eAAe,IAAIA,OAAM,SAAS,KAAK;AAE5D,QAAM,sBAAsBA,OAAM,YAAY,CAAC,MAAa;AAC1D,MAAE,eAAe;AAAA,EACnB,GAAG,CAAC,CAAC;AAKL,EAAAA,OAAM,UAAU,MAAM;AACpB,aAAS,KAAK,iBAAiB,QAAQ,mBAAmB;AAC1D,WAAO,MAAM;AACX,eAAS,KAAK,oBAAoB,QAAQ,mBAAmB;AAAA,IAC/D;AAAA,EACF,GAAG,CAAC,mBAAmB,CAAC;AAIxB,QAAM,qBAA6DA,OAAM;AAAA,IACvE,CAAC,MAAM;AAGL,QAAE,eAAe;AACjB,QAAE,gBAAgB;AAClB,UAAI,CAAC,SAAU,iBAAgB,IAAI;AAAA,IACrC;AAAA,IACA,CAAC,QAAQ;AAAA,EACX;AACA,QAAM,oBAA4DA,OAAM,YAAY,CAAC,MAAM;AACzF,MAAE,eAAe;AACjB,MAAE,gBAAgB;AAAA,EACpB,GAAG,CAAC,CAAC;AACL,QAAM,qBAA6DA,OAAM,YAAY,CAAC,MAAM;AAC1F,QAAI,EAAE,kBAAkB,EAAE,iBAAiB,CAAC,EAAE,cAAc,SAAS,EAAE,aAAqB,GAAG;AAC7F,QAAE,eAAe;AACjB,QAAE,gBAAgB;AAClB,sBAAgB,KAAK;AAAA,IACvB;AAAA,EACF,GAAG,CAAC,CAAC;AACL,QAAM,gBAAwDA,OAAM;AAAA,IAClE,CAAC,MAAM;AAGL,sBAAgB,KAAK;AACrB,QAAE,eAAe;AACjB,QAAE,gBAAgB;AAClB,UAAI,SAAU;AACd,YAAM,aAAa,MAAM,KAAK,EAAE,cAAc,SAAS,CAAC,CAAC;AACzD,eAAS,YAAY,CAAC;AAAA,IACxB;AAAA,IACA,CAAC,UAAU,MAAM;AAAA,EACnB;AAEA,SAAOA,OAAM;AAAA,IACX,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEF;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEF;AAAA,EACF;AACF;",
6
6
  "names": ["React"]
7
7
  }
@@ -1,5 +1,6 @@
1
1
  import * as React from "react";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
+ import React2 from "react";
3
4
  import { describe } from "@elliemae/ds-props-helpers";
4
5
  import { useFontsizeMedia } from "@elliemae/ds-hooks-fontsize-media";
5
6
  import { styled } from "@elliemae/ds-system";
@@ -30,6 +31,8 @@ const DSActivezone = (props) => {
30
31
  const { propsWithDefault, globalProps, xstyledProps } = useActivezone(props);
31
32
  const { Icon, label } = propsWithDefault;
32
33
  const mainContentCols = useFontsizeMedia(colsDef);
34
+ const getOwnerProps = React2.useCallback(() => propsWithDefault, [propsWithDefault]);
35
+ const getOwnerPropsArguments = React2.useCallback(() => ({}), []);
33
36
  return /* @__PURE__ */ jsxs(
34
37
  StyledWrapper,
35
38
  {
@@ -39,12 +42,22 @@ const DSActivezone = (props) => {
39
42
  bg: "brand-600",
40
43
  gutter: "xxs",
41
44
  cols: mainContentCols,
42
- getOwnerProps: () => propsWithDefault,
45
+ getOwnerProps,
46
+ getOwnerPropsArguments,
43
47
  ...globalProps,
44
48
  ...xstyledProps,
45
49
  children: [
46
- /* @__PURE__ */ jsx(StyledIcon, { justifyContent: "center", children: /* @__PURE__ */ jsx(Icon, { size: "l", color: ["neutral", "0"] }) }),
47
- /* @__PURE__ */ jsx(StyledLabel, { variant: "b2", color: "neutral-000", children: label })
50
+ /* @__PURE__ */ jsx(StyledIcon, { justifyContent: "center", getOwnerProps, getOwnerPropsArguments, children: /* @__PURE__ */ jsx(Icon, { size: "l", color: ["neutral", "0"] }) }),
51
+ /* @__PURE__ */ jsx(
52
+ StyledLabel,
53
+ {
54
+ variant: "b2",
55
+ color: "neutral-000",
56
+ getOwnerProps,
57
+ getOwnerPropsArguments,
58
+ children: label
59
+ }
60
+ )
48
61
  ]
49
62
  }
50
63
  );
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/DSActivezone/DSActivezone.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { useFontsizeMedia } from '@elliemae/ds-hooks-fontsize-media';\nimport { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSTypography } from '@elliemae/ds-typography';\nimport { type DSActivezoneT, DSActivezonePropTypesSchema } from './react-desc-prop-types.js';\nimport { useActivezone } from './config/useActivezone.js';\nimport { DROPZONE_SLOTS, DROP_ZONE_CONSTANTS, DSDropzoneName } from '../../constants/index.js';\n\nconst StyledWrapper = styled(Grid, { name: DSDropzoneName, slot: DROPZONE_SLOTS.ACTIVEZONE_WRAPPER })`\n cursor: grabbing;\n position: absolute;\n border-radius: ${DROP_ZONE_CONSTANTS.BORDER_RADIUS}px;\n padding: ${(props) => props.theme.space.xxxs} 1.8461538461538463rem;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n`;\nconst StyledLabel = styled(DSTypography, { name: DSDropzoneName, slot: DROPZONE_SLOTS.ACTIVEZONE_LABEL })``;\nconst StyledIcon = styled(Grid, { name: DSDropzoneName, slot: DROPZONE_SLOTS.ACTIVEZONE_ICON })``;\n\nconst colsDef = {\n largeFont: ['auto'],\n mediumFont: ['auto', 'auto'],\n smallFont: ['auto', 'auto'],\n};\n\nconst DSActivezone: React.ComponentType<DSActivezoneT.Props> = (props) => {\n const { propsWithDefault, globalProps, xstyledProps } = useActivezone(props);\n const { Icon, label } = propsWithDefault;\n const mainContentCols = useFontsizeMedia(colsDef);\n return (\n <StyledWrapper\n rows={['auto']}\n justifyContent=\"center\"\n alignItems=\"center\"\n bg=\"brand-600\"\n gutter=\"xxs\"\n cols={mainContentCols}\n getOwnerProps={() => propsWithDefault}\n {...globalProps}\n {...xstyledProps}\n >\n <StyledIcon justifyContent=\"center\">\n <Icon size=\"l\" color={['neutral', '0']} />\n </StyledIcon>\n <StyledLabel variant=\"b2\" color=\"neutral-000\">\n {label}\n </StyledLabel>\n </StyledWrapper>\n );\n};\n\nDSActivezone.displayName = 'DSActivezone';\nconst DSActivezoneWithSchema = describe(DSActivezone);\nDSActivezoneWithSchema.propTypes = DSActivezonePropTypesSchema;\n\nexport { DSActivezone, DSActivezoneWithSchema };\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACmCnB,SAYI,KAZJ;AAlCJ,SAAS,gBAAgB;AACzB,SAAS,wBAAwB;AACjC,SAAS,cAAc;AACvB,SAAS,YAAY;AACrB,SAAS,oBAAoB;AAC7B,SAA6B,mCAAmC;AAChE,SAAS,qBAAqB;AAC9B,SAAS,gBAAgB,qBAAqB,sBAAsB;AAEpE,MAAM,gBAAgB,OAAO,MAAM,EAAE,MAAM,gBAAgB,MAAM,eAAe,mBAAmB,CAAC;AAAA;AAAA;AAAA,mBAGjF,oBAAoB,aAAa;AAAA,aACvC,CAAC,UAAU,MAAM,MAAM,MAAM,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAO9C,MAAM,cAAc,OAAO,cAAc,EAAE,MAAM,gBAAgB,MAAM,eAAe,iBAAiB,CAAC;AACxG,MAAM,aAAa,OAAO,MAAM,EAAE,MAAM,gBAAgB,MAAM,eAAe,gBAAgB,CAAC;AAE9F,MAAM,UAAU;AAAA,EACd,WAAW,CAAC,MAAM;AAAA,EAClB,YAAY,CAAC,QAAQ,MAAM;AAAA,EAC3B,WAAW,CAAC,QAAQ,MAAM;AAC5B;AAEA,MAAM,eAAyD,CAAC,UAAU;AACxE,QAAM,EAAE,kBAAkB,aAAa,aAAa,IAAI,cAAc,KAAK;AAC3E,QAAM,EAAE,MAAM,MAAM,IAAI;AACxB,QAAM,kBAAkB,iBAAiB,OAAO;AAChD,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM,CAAC,MAAM;AAAA,MACb,gBAAe;AAAA,MACf,YAAW;AAAA,MACX,IAAG;AAAA,MACH,QAAO;AAAA,MACP,MAAM;AAAA,MACN,eAAe,MAAM;AAAA,MACpB,GAAG;AAAA,MACH,GAAG;AAAA,MAEJ;AAAA,4BAAC,cAAW,gBAAe,UACzB,8BAAC,QAAK,MAAK,KAAI,OAAO,CAAC,WAAW,GAAG,GAAG,GAC1C;AAAA,QACA,oBAAC,eAAY,SAAQ,MAAK,OAAM,eAC7B,iBACH;AAAA;AAAA;AAAA,EACF;AAEJ;AAEA,aAAa,cAAc;AAC3B,MAAM,yBAAyB,SAAS,YAAY;AACpD,uBAAuB,YAAY;",
6
- "names": []
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { useFontsizeMedia } from '@elliemae/ds-hooks-fontsize-media';\nimport { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSTypography } from '@elliemae/ds-typography';\nimport { type DSActivezoneT, DSActivezonePropTypesSchema } from './react-desc-prop-types.js';\nimport { useActivezone } from './config/useActivezone.js';\nimport { DROPZONE_SLOTS, DROP_ZONE_CONSTANTS, DSDropzoneName } from '../../constants/index.js';\n\nconst StyledWrapper = styled(Grid, { name: DSDropzoneName, slot: DROPZONE_SLOTS.ACTIVEZONE_WRAPPER })`\n cursor: grabbing;\n position: absolute;\n border-radius: ${DROP_ZONE_CONSTANTS.BORDER_RADIUS}px;\n padding: ${(props) => props.theme.space.xxxs} 1.8461538461538463rem;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n`;\nconst StyledLabel = styled(DSTypography, { name: DSDropzoneName, slot: DROPZONE_SLOTS.ACTIVEZONE_LABEL })``;\nconst StyledIcon = styled(Grid, { name: DSDropzoneName, slot: DROPZONE_SLOTS.ACTIVEZONE_ICON })``;\n\nconst colsDef = {\n largeFont: ['auto'],\n mediumFont: ['auto', 'auto'],\n smallFont: ['auto', 'auto'],\n};\n\nconst DSActivezone: React.ComponentType<DSActivezoneT.Props> = (props) => {\n const { propsWithDefault, globalProps, xstyledProps } = useActivezone(props);\n const { Icon, label } = propsWithDefault;\n const mainContentCols = useFontsizeMedia(colsDef);\n const getOwnerProps = React.useCallback(() => propsWithDefault, [propsWithDefault]);\n const getOwnerPropsArguments = React.useCallback(() => ({}), []);\n return (\n <StyledWrapper\n rows={['auto']}\n justifyContent=\"center\"\n alignItems=\"center\"\n bg=\"brand-600\"\n gutter=\"xxs\"\n cols={mainContentCols}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n {...globalProps}\n {...xstyledProps}\n >\n <StyledIcon justifyContent=\"center\" getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\n <Icon size=\"l\" color={['neutral', '0']} />\n </StyledIcon>\n <StyledLabel\n variant=\"b2\"\n color=\"neutral-000\"\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {label}\n </StyledLabel>\n </StyledWrapper>\n );\n};\n\nDSActivezone.displayName = 'DSActivezone';\nconst DSActivezoneWithSchema = describe(DSActivezone);\nDSActivezoneWithSchema.propTypes = DSActivezonePropTypesSchema;\n\nexport { DSActivezone, DSActivezoneWithSchema };\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACqCnB,SAaI,KAbJ;AArCJ,OAAOA,YAAW;AAClB,SAAS,gBAAgB;AACzB,SAAS,wBAAwB;AACjC,SAAS,cAAc;AACvB,SAAS,YAAY;AACrB,SAAS,oBAAoB;AAC7B,SAA6B,mCAAmC;AAChE,SAAS,qBAAqB;AAC9B,SAAS,gBAAgB,qBAAqB,sBAAsB;AAEpE,MAAM,gBAAgB,OAAO,MAAM,EAAE,MAAM,gBAAgB,MAAM,eAAe,mBAAmB,CAAC;AAAA;AAAA;AAAA,mBAGjF,oBAAoB,aAAa;AAAA,aACvC,CAAC,UAAU,MAAM,MAAM,MAAM,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAO9C,MAAM,cAAc,OAAO,cAAc,EAAE,MAAM,gBAAgB,MAAM,eAAe,iBAAiB,CAAC;AACxG,MAAM,aAAa,OAAO,MAAM,EAAE,MAAM,gBAAgB,MAAM,eAAe,gBAAgB,CAAC;AAE9F,MAAM,UAAU;AAAA,EACd,WAAW,CAAC,MAAM;AAAA,EAClB,YAAY,CAAC,QAAQ,MAAM;AAAA,EAC3B,WAAW,CAAC,QAAQ,MAAM;AAC5B;AAEA,MAAM,eAAyD,CAAC,UAAU;AACxE,QAAM,EAAE,kBAAkB,aAAa,aAAa,IAAI,cAAc,KAAK;AAC3E,QAAM,EAAE,MAAM,MAAM,IAAI;AACxB,QAAM,kBAAkB,iBAAiB,OAAO;AAChD,QAAM,gBAAgBA,OAAM,YAAY,MAAM,kBAAkB,CAAC,gBAAgB,CAAC;AAClF,QAAM,yBAAyBA,OAAM,YAAY,OAAO,CAAC,IAAI,CAAC,CAAC;AAC/D,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM,CAAC,MAAM;AAAA,MACb,gBAAe;AAAA,MACf,YAAW;AAAA,MACX,IAAG;AAAA,MACH,QAAO;AAAA,MACP,MAAM;AAAA,MACN;AAAA,MACA;AAAA,MACC,GAAG;AAAA,MACH,GAAG;AAAA,MAEJ;AAAA,4BAAC,cAAW,gBAAe,UAAS,eAA8B,wBAChE,8BAAC,QAAK,MAAK,KAAI,OAAO,CAAC,WAAW,GAAG,GAAG,GAC1C;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,SAAQ;AAAA,YACR,OAAM;AAAA,YACN;AAAA,YACA;AAAA,YAEC;AAAA;AAAA,QACH;AAAA;AAAA;AAAA,EACF;AAEJ;AAEA,aAAa,cAAc;AAC3B,MAAM,yBAAyB,SAAS,YAAY;AACpD,uBAAuB,YAAY;",
6
+ "names": ["React"]
7
7
  }
@@ -19,15 +19,8 @@ const useActivezone = (propsFromUser) => {
19
19
  globalProps,
20
20
  xstyledProps,
21
21
  instanceUid
22
- // ...eventHandlers,
23
22
  }),
24
- [
25
- propsWithDefault,
26
- globalProps,
27
- xstyledProps,
28
- instanceUid
29
- // eventHandlers,
30
- ]
23
+ [propsWithDefault, globalProps, xstyledProps, instanceUid]
31
24
  );
32
25
  };
33
26
  export {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/parts/DSActivezone/config/useActivezone.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { useGetGlobalAttributes, useGetXstyledProps, useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { uid } from 'uid';\nimport type { DSGridT } from '@elliemae/ds-grid';\nimport { type DSActivezoneT, DSActivezonePropTypes, defaultProps } from '../react-desc-prop-types.js';\nimport { useValidateProps } from './useValidateProps.js';\n\nexport const useActivezone = (propsFromUser: DSActivezoneT.Props) => {\n // =============================================================================\n // MERGE WITH DEFAULT AND VALIDATE PROPS\n // =============================================================================\n const propsWithDefault = useMemoMergePropsWithDefault<DSActivezoneT.InternalProps>(propsFromUser, defaultProps);\n useValidateProps(propsWithDefault, DSActivezonePropTypes);\n // =============================================================================\n // GLOBAL ATTRIBUTES & XSTYLED PROPS\n // =============================================================================\n const globalProps = useGetGlobalAttributes<DSActivezoneT.InternalProps, HTMLDivElement, DSGridT.Props>(\n propsWithDefault,\n );\n const xstyledProps = useGetXstyledProps(propsWithDefault);\n // =============================================================================\n // AD HOC PER COMPONENT LOGIC\n // =============================================================================\n // custom code goes here, this is an example\n const { id } = propsWithDefault;\n const instanceUid = React.useMemo(() => id || uid(5), [id]);\n\n // =============================================================================\n // HELPERS HOOKS CONFIGS\n // =============================================================================\n // const eventHandlers = useEventHandlers({ propsWithDefault, instanceUid }); // <-- complex logic should be made atomics this way\n\n return React.useMemo(\n () => ({\n propsWithDefault,\n globalProps,\n xstyledProps,\n instanceUid,\n // ...eventHandlers,\n }),\n [\n propsWithDefault,\n globalProps,\n xstyledProps,\n instanceUid,\n // eventHandlers,\n ],\n );\n};\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACAvB,OAAOA,YAAW;AAClB,SAAS,wBAAwB,oBAAoB,oCAAoC;AACzF,SAAS,WAAW;AAEpB,SAA6B,uBAAuB,oBAAoB;AACxE,SAAS,wBAAwB;AAE1B,MAAM,gBAAgB,CAAC,kBAAuC;AAInE,QAAM,mBAAmB,6BAA0D,eAAe,YAAY;AAC9G,mBAAiB,kBAAkB,qBAAqB;AAIxD,QAAM,cAAc;AAAA,IAClB;AAAA,EACF;AACA,QAAM,eAAe,mBAAmB,gBAAgB;AAKxD,QAAM,EAAE,GAAG,IAAI;AACf,QAAM,cAAcA,OAAM,QAAQ,MAAM,MAAM,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;AAO1D,SAAOA,OAAM;AAAA,IACX,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEF;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEF;AAAA,EACF;AACF;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { useGetGlobalAttributes, useGetXstyledProps, useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { uid } from 'uid';\nimport type { DSGridT } from '@elliemae/ds-grid';\nimport { type DSActivezoneT, DSActivezonePropTypes, defaultProps } from '../react-desc-prop-types.js';\nimport { useValidateProps } from './useValidateProps.js';\n\nexport const useActivezone = (propsFromUser: DSActivezoneT.Props) => {\n // =============================================================================\n // MERGE WITH DEFAULT AND VALIDATE PROPS\n // =============================================================================\n const propsWithDefault = useMemoMergePropsWithDefault<DSActivezoneT.InternalProps>(propsFromUser, defaultProps);\n useValidateProps(propsWithDefault, DSActivezonePropTypes);\n // =============================================================================\n // GLOBAL ATTRIBUTES & XSTYLED PROPS\n // =============================================================================\n const globalProps = useGetGlobalAttributes<DSActivezoneT.InternalProps, HTMLDivElement, DSGridT.Props>(\n propsWithDefault,\n );\n const xstyledProps = useGetXstyledProps(propsWithDefault);\n // =============================================================================\n // AD HOC PER COMPONENT LOGIC\n // =============================================================================\n const { id } = propsWithDefault;\n const instanceUid = React.useMemo(() => id || uid(5), [id]);\n\n // =============================================================================\n // HELPERS HOOKS CONFIGS\n // =============================================================================\n\n return React.useMemo(\n () => ({\n propsWithDefault,\n globalProps,\n xstyledProps,\n instanceUid,\n }),\n [propsWithDefault, globalProps, xstyledProps, instanceUid],\n );\n};\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,OAAOA,YAAW;AAClB,SAAS,wBAAwB,oBAAoB,oCAAoC;AACzF,SAAS,WAAW;AAEpB,SAA6B,uBAAuB,oBAAoB;AACxE,SAAS,wBAAwB;AAE1B,MAAM,gBAAgB,CAAC,kBAAuC;AAInE,QAAM,mBAAmB,6BAA0D,eAAe,YAAY;AAC9G,mBAAiB,kBAAkB,qBAAqB;AAIxD,QAAM,cAAc;AAAA,IAClB;AAAA,EACF;AACA,QAAM,eAAe,mBAAmB,gBAAgB;AAIxD,QAAM,EAAE,GAAG,IAAI;AACf,QAAM,cAAcA,OAAM,QAAQ,MAAM,MAAM,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;AAM1D,SAAOA,OAAM;AAAA,IACX,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,CAAC,kBAAkB,aAAa,cAAc,WAAW;AAAA,EAC3D;AACF;",
6
6
  "names": ["React"]
7
7
  }
@@ -1,11 +1,23 @@
1
1
  import * as React from "react";
2
- import { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from "@elliemae/ds-props-helpers";
2
+ import {
3
+ PropTypes,
4
+ getPropsPerSlotPropTypes,
5
+ globalAttributesPropTypes,
6
+ xstyledPropTypes
7
+ } from "@elliemae/ds-props-helpers";
3
8
  import { UploadFile } from "@elliemae/ds-icons";
9
+ import { DSDropzoneName, DROPZONE_SLOTS } from "../../constants/index.js";
10
+ const ACTIVEZONE_SLOTS = {
11
+ ACTIVEZONE_LABEL: DROPZONE_SLOTS.ACTIVEZONE_LABEL,
12
+ ACTIVEZONE_ICON: DROPZONE_SLOTS.ACTIVEZONE_ICON,
13
+ ACTIVEZONE_WRAPPER: DROPZONE_SLOTS.ACTIVEZONE_WRAPPER
14
+ };
4
15
  const defaultProps = {
5
16
  Icon: UploadFile,
6
17
  label: "DROP FILES HERE"
7
18
  };
8
19
  const DSActivezonePropTypes = {
20
+ ...getPropsPerSlotPropTypes(DSDropzoneName, ACTIVEZONE_SLOTS),
9
21
  ...globalAttributesPropTypes,
10
22
  ...xstyledPropTypes,
11
23
  Icon: PropTypes.func.description("Custom Icon").defaultValue("UploadFile"),
@@ -13,6 +25,7 @@ const DSActivezonePropTypes = {
13
25
  };
14
26
  const DSActivezonePropTypesSchema = DSActivezonePropTypes;
15
27
  export {
28
+ ACTIVEZONE_SLOTS,
16
29
  DSActivezonePropTypes,
17
30
  DSActivezonePropTypesSchema,
18
31
  defaultProps
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/DSActivezone/react-desc-prop-types.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-redundant-type-constituents */\nimport type { GlobalAttributesT, XstyledProps, DSPropTypesSchema } from '@elliemae/ds-props-helpers';\nimport { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\nimport type { SvgIconT } from '@elliemae/ds-icons';\nimport { UploadFile } from '@elliemae/ds-icons';\nimport type { WeakValidationMap } from 'react';\n\nexport declare namespace DSActivezoneT {\n export interface RequiredProps {}\n\n export interface DefaultProps {\n Icon: React.ComponentType<SvgIconT.Props>;\n label: string;\n }\n\n export interface OptionalProps {}\n\n export interface Props\n extends\n Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof XstyledProps>,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends\n DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof XstyledProps>,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const defaultProps: DSActivezoneT.DefaultProps = {\n Icon: UploadFile,\n label: 'DROP FILES HERE',\n};\n\nexport const DSActivezonePropTypes: DSPropTypesSchema<DSActivezoneT.Props> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n Icon: PropTypes.func.description('Custom Icon').defaultValue('UploadFile'),\n label: PropTypes.string.description('Active zone label').defaultValue(defaultProps.label),\n};\n\nexport const DSActivezonePropTypesSchema = DSActivezonePropTypes as unknown as WeakValidationMap<DSActivezoneT.Props>;\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACEvB,SAAS,WAAW,2BAA2B,wBAAwB;AAEvE,SAAS,kBAAkB;AA8BpB,MAAM,eAA2C;AAAA,EACtD,MAAM;AAAA,EACN,OAAO;AACT;AAEO,MAAM,wBAAgE;AAAA,EAC3E,GAAG;AAAA,EACH,GAAG;AAAA,EACH,MAAM,UAAU,KAAK,YAAY,aAAa,EAAE,aAAa,YAAY;AAAA,EACzE,OAAO,UAAU,OAAO,YAAY,mBAAmB,EAAE,aAAa,aAAa,KAAK;AAC1F;AAEO,MAAM,8BAA8B;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-redundant-type-constituents */\nimport type { GlobalAttributesT, XstyledProps, DSPropTypesSchema } from '@elliemae/ds-props-helpers';\nimport {\n PropTypes,\n getPropsPerSlotPropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport type { TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport type { SvgIconT } from '@elliemae/ds-icons';\nimport { UploadFile } from '@elliemae/ds-icons';\nimport type { WeakValidationMap } from 'react';\nimport { DSDropzoneName, DROPZONE_SLOTS } from '../../constants/index.js';\n\n// the slots that live in the activezone (they only exist while a file is dragged over the dropzone)\nexport const ACTIVEZONE_SLOTS = {\n ACTIVEZONE_LABEL: DROPZONE_SLOTS.ACTIVEZONE_LABEL,\n ACTIVEZONE_ICON: DROPZONE_SLOTS.ACTIVEZONE_ICON,\n ACTIVEZONE_WRAPPER: DROPZONE_SLOTS.ACTIVEZONE_WRAPPER,\n} as const;\n\nexport declare namespace DSActivezoneT {\n export interface RequiredProps {}\n\n export interface DefaultProps {\n Icon: React.ComponentType<SvgIconT.Props>;\n label: string;\n }\n\n export type SlotFunctionArguments = {\n dsDropzoneActivezoneWrapper: () => object;\n dsDropzoneActivezoneIcon: () => object;\n dsDropzoneActivezoneLabel: () => object;\n };\n\n export interface OptionalProps extends TypescriptHelpersT.PropsForGlobalOnSlots<\n typeof DSDropzoneName,\n typeof ACTIVEZONE_SLOTS\n > {}\n\n export interface Props\n extends\n Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof XstyledProps>,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends\n DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof XstyledProps>,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const defaultProps: DSActivezoneT.DefaultProps = {\n Icon: UploadFile,\n label: 'DROP FILES HERE',\n};\n\nexport const DSActivezonePropTypes: DSPropTypesSchema<DSActivezoneT.Props> = {\n ...getPropsPerSlotPropTypes(DSDropzoneName, ACTIVEZONE_SLOTS),\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n Icon: PropTypes.func.description('Custom Icon').defaultValue('UploadFile'),\n label: PropTypes.string.description('Active zone label').defaultValue(defaultProps.label),\n};\n\nexport const DSActivezonePropTypesSchema = DSActivezonePropTypes as unknown as WeakValidationMap<DSActivezoneT.Props>;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACEvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAGP,SAAS,kBAAkB;AAE3B,SAAS,gBAAgB,sBAAsB;AAGxC,MAAM,mBAAmB;AAAA,EAC9B,kBAAkB,eAAe;AAAA,EACjC,iBAAiB,eAAe;AAAA,EAChC,oBAAoB,eAAe;AACrC;AAsCO,MAAM,eAA2C;AAAA,EACtD,MAAM;AAAA,EACN,OAAO;AACT;AAEO,MAAM,wBAAgE;AAAA,EAC3E,GAAG,yBAAyB,gBAAgB,gBAAgB;AAAA,EAC5D,GAAG;AAAA,EACH,GAAG;AAAA,EACH,MAAM,UAAU,KAAK,YAAY,aAAa,EAAE,aAAa,YAAY;AAAA,EACzE,OAAO,UAAU,OAAO,YAAY,mBAAmB,EAAE,aAAa,aAAa,KAAK;AAC1F;AAEO,MAAM,8BAA8B;",
6
6
  "names": []
7
7
  }
@@ -1,13 +1,21 @@
1
1
  import * as React from "react";
2
- import { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from "@elliemae/ds-props-helpers";
3
- const defaultProps = {
4
- dropConfig: {}
5
- };
2
+ import {
3
+ PropTypes,
4
+ getPropsPerSlotPropTypes,
5
+ globalAttributesPropTypes,
6
+ xstyledPropTypes
7
+ } from "@elliemae/ds-props-helpers";
8
+ import { DSDropzoneName, DROPZONE_SLOTS } from "./constants/index.js";
9
+ const defaultProps = {};
10
+ const slotPropTypes = getPropsPerSlotPropTypes(DSDropzoneName, DROPZONE_SLOTS);
6
11
  const DSDropzonePropTypes = {
12
+ ...slotPropTypes,
7
13
  ...globalAttributesPropTypes,
8
14
  ...xstyledPropTypes,
9
15
  children: PropTypes.any,
10
- disabled: PropTypes.bool.description("Enable/disable the dropzone"),
16
+ disabled: PropTypes.bool.description(
17
+ "Hard lock. A disabled dropzone ignores the consumer handlers for its actions and never calls onDrop; it still cancels the browser drag and drop defaults, so a dropped file is not opened."
18
+ ),
11
19
  hasError: PropTypes.bool.description("Show error border color"),
12
20
  onDrop: PropTypes.func.description(
13
21
  `
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/react-desc-prop-types.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { GlobalAttributesT, XstyledProps, DSPropTypesSchema } from '@elliemae/ds-props-helpers';\nimport { PropTypes, globalAttributesPropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\nimport type { WeakValidationMap } from 'react';\n\nexport declare namespace DSDropzoneT {\n export interface RequiredProps {}\n\n export interface DefaultProps {}\n\n export interface OptionalProps {\n onDrop?: (files: File[], event: React.DragEvent<HTMLDivElement>) => void;\n hasError?: boolean;\n }\n\n export interface Props\n extends\n Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof OptionalProps | keyof XstyledProps>,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends\n DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof OptionalProps | keyof XstyledProps>,\n XstyledProps,\n RequiredProps {}\n\n export type ExampleState = '0' | '1';\n}\n\nexport const defaultProps: DSDropzoneT.DefaultProps = {\n dropConfig: {},\n};\n\nexport const DSDropzonePropTypes: DSPropTypesSchema<DSDropzoneT.Props> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n children: PropTypes.any,\n disabled: PropTypes.bool.description('Enable/disable the dropzone'),\n hasError: PropTypes.bool.description('Show error border color'),\n onDrop: PropTypes.func\n .description(\n `\n Cb for when the drop event occurs.\n onDrop will provide you with an array of [File](https://developer.mozilla.org/en-US/docs/Web/API/File) objects which you can then process and send to a server.\n @param {File[]} files\n @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)\n `,\n )\n .signature('(( file: File[], event: React.DragEvent ) => void )'),\n};\n\nexport const DSDropzonePropTypesSchema = DSDropzonePropTypes as unknown as WeakValidationMap<DSDropzoneT.Props>;\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,WAAW,2BAA2B,wBAAwB;AAgChE,MAAM,eAAyC;AAAA,EACpD,YAAY,CAAC;AACf;AAEO,MAAM,sBAA4D;AAAA,EACvE,GAAG;AAAA,EACH,GAAG;AAAA,EACH,UAAU,UAAU;AAAA,EACpB,UAAU,UAAU,KAAK,YAAY,6BAA6B;AAAA,EAClE,UAAU,UAAU,KAAK,YAAY,yBAAyB;AAAA,EAC9D,QAAQ,UAAU,KACf;AAAA,IACC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMF,EACC,UAAU,qDAAqD;AACpE;AAEO,MAAM,4BAA4B;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { GlobalAttributesT, XstyledProps, DSPropTypesSchema } from '@elliemae/ds-props-helpers';\nimport {\n PropTypes,\n getPropsPerSlotPropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport type { TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport type { WeakValidationMap } from 'react';\nimport { DSDropzoneName, DROPZONE_SLOTS } from './constants/index.js';\n\nexport declare namespace DSDropzoneT {\n export interface RequiredProps {}\n\n export interface DefaultProps {}\n\n // the slots of the dropzone repeat for no instance (one wrapper, one holder, one activezone): the function form\n // receives an empty object of arguments\n export type SlotFunctionArguments = {\n dsDropzoneWrapper_holder: () => object;\n dsDropzoneWrapper: () => object;\n dsDropzoneActivezoneWrapper: () => object;\n dsDropzoneActivezoneIcon: () => object;\n dsDropzoneActivezoneLabel: () => object;\n };\n\n // the slot WRAPPER_HOLDER is published as 'wrapper_holder' (snake case, a name the theme styleOverrides and the\n // data-dimsum-slot already depend on), so the prop name at runtime is dsDropzoneWrapper_holder, while the helper type\n // would derive dsDropzoneWrapperHolder. The helper types every other slot; the holder is typed by hand.\n // Tracked in KNOWN_INTENTIONAL_DEVIATIONS.md\n export interface OptionalProps extends TypescriptHelpersT.PropsForGlobalOnSlots<\n typeof DSDropzoneName,\n Omit<typeof DROPZONE_SLOTS, 'WRAPPER_HOLDER'>\n > {\n dsDropzoneWrapper_holder?: object | ((args: object) => object);\n onDrop?: (files: File[], event: React.DragEvent<HTMLDivElement>) => void;\n hasError?: boolean;\n }\n\n export interface Props\n extends\n Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof OptionalProps | keyof XstyledProps>,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends\n DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLButtonElement>, keyof OptionalProps | keyof XstyledProps>,\n XstyledProps,\n RequiredProps {}\n\n export type ExampleState = '0' | '1';\n}\n\nexport const defaultProps: DSDropzoneT.DefaultProps = {};\n\n// the generator builds the right keys at runtime (dsDropzoneWrapper_holder), but its return type derives\n// dsDropzoneWrapperHolder from the snake case slot: the cast restores the keys of the props (see KNOWN_INTENTIONAL_DEVIATIONS.md)\nconst slotPropTypes = getPropsPerSlotPropTypes(DSDropzoneName, DROPZONE_SLOTS) as unknown as Pick<\n DSPropTypesSchema<DSDropzoneT.Props>,\n | 'dsDropzoneWrapper_holder'\n | 'dsDropzoneWrapper'\n | 'dsDropzoneActivezoneWrapper'\n | 'dsDropzoneActivezoneIcon'\n | 'dsDropzoneActivezoneLabel'\n>;\n\nexport const DSDropzonePropTypes: DSPropTypesSchema<DSDropzoneT.Props> = {\n ...slotPropTypes,\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n children: PropTypes.any,\n disabled: PropTypes.bool.description(\n 'Hard lock. A disabled dropzone ignores the consumer handlers for its actions and never calls onDrop; it still cancels the browser drag and drop defaults, so a dropped file is not opened.',\n ),\n hasError: PropTypes.bool.description('Show error border color'),\n onDrop: PropTypes.func\n .description(\n `\n Cb for when the drop event occurs.\n onDrop will provide you with an array of [File](https://developer.mozilla.org/en-US/docs/Web/API/File) objects which you can then process and send to a server.\n @param {File[]} files\n @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)\n `,\n )\n .signature('(( file: File[], event: React.DragEvent ) => void )'),\n};\n\nexport const DSDropzonePropTypesSchema = DSDropzonePropTypes as unknown as WeakValidationMap<DSDropzoneT.Props>;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACCvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAGP,SAAS,gBAAgB,sBAAsB;AAiDxC,MAAM,eAAyC,CAAC;AAIvD,MAAM,gBAAgB,yBAAyB,gBAAgB,cAAc;AAStE,MAAM,sBAA4D;AAAA,EACvE,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,UAAU,UAAU;AAAA,EACpB,UAAU,UAAU,KAAK;AAAA,IACvB;AAAA,EACF;AAAA,EACA,UAAU,UAAU,KAAK,YAAY,yBAAyB;AAAA,EAC9D,QAAQ,UAAU,KACf;AAAA,IACC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMF,EACC,UAAU,qDAAqD;AACpE;AAEO,MAAM,4BAA4B;",
6
6
  "names": []
7
7
  }
@@ -1,23 +1,19 @@
1
1
  import * as React from "react";
2
- import { styled, css } from "@elliemae/ds-system";
2
+ import { styled, lockedStateInteractionCss } from "@elliemae/ds-system";
3
3
  import { Grid } from "@elliemae/ds-grid";
4
4
  import { DROPZONE_SLOTS, DROP_ZONE_CONSTANTS, DSDropzoneName } from "./constants/index.js";
5
- const disabledStyles = css`
6
- pointer-events: none;
7
- `;
8
5
  const borderImage = (color) => `url("data:image/svg+xml,%3csvg aria-hidden='true' width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' rx='${DROP_ZONE_CONSTANTS.BORDER_RADIUS}' ry='${DROP_ZONE_CONSTANTS.BORDER_RADIUS}' stroke='${encodeURIComponent(color)}' stroke-width='${DROP_ZONE_CONSTANTS.BORDER_WIDTH}' stroke-dasharray='4 6' stroke-dashoffset='0' stroke-linecap='round'/%3e%3c/svg%3e")`;
9
6
  const StyledDropZoneHolder = styled(Grid, {
10
7
  name: DSDropzoneName,
11
8
  slot: DROPZONE_SLOTS.WRAPPER_HOLDER
12
9
  })`
13
10
  position: relative;
14
- ${(props) => props.disabled && "cursor: not-allowed;"}
15
11
  `;
16
12
  const StyledDropZone = styled(Grid, { name: DSDropzoneName, slot: DROPZONE_SLOTS.WRAPPER })`
17
13
  border-radius: ${DROP_ZONE_CONSTANTS.BORDER_RADIUS}px;
18
14
  background-color: ${(props) => props.theme.colors.neutral["000"]};
19
15
  background-image: ${(props) => {
20
- if (props.disabled) {
16
+ if (props.$disabled) {
21
17
  return borderImage(props.theme.colors.neutral[400]);
22
18
  }
23
19
  if (props.isDragActive) {
@@ -31,7 +27,7 @@ const StyledDropZone = styled(Grid, { name: DSDropzoneName, slot: DROPZONE_SLOTS
31
27
  padding: ${(props) => props.theme.space.xs} 1.8461538461538463rem;
32
28
  &:hover {
33
29
  background-image: ${(props) => {
34
- if (props.disabled) {
30
+ if (props.$disabled) {
35
31
  return borderImage(props.theme.colors.neutral[400]);
36
32
  }
37
33
  if (props.isDragActive) {
@@ -44,7 +40,7 @@ const StyledDropZone = styled(Grid, { name: DSDropzoneName, slot: DROPZONE_SLOTS
44
40
  }};
45
41
  }
46
42
  cursor: ${(props) => props.isDragActive ? "grabbing" : "default"};
47
- ${(props) => props.disabled && disabledStyles}
43
+ ${lockedStateInteractionCss}
48
44
  `;
49
45
  export {
50
46
  StyledDropZone,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/styled.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type {} from '@elliemae/ds-system';\nimport { styled, css } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DROPZONE_SLOTS, DROP_ZONE_CONSTANTS, DSDropzoneName } from './constants/index.js';\n\n// const borderImageCreator = (color: any, stroke: number) =>\n// encodeURIComponent(\n// `<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"100%\" height=\"100%\"><rect width=\"100%\" height=\"100%\" fill=\"none\" rx=\"8\" ry=\"8\" stroke=\"${color}\" stroke-width=\"${stroke}\" stroke-dasharray=\"6, 14\" stroke-dashoffset=\"0\" stroke-linecap=\"square\"/></svg>`,\n// );\n\n// const handleBorder = (props: StyledProps<DSDropzoneT.InternalProps>): string => {\n// const { isDragAccept, isDragReject, isFocused } = props;\n// console.log(props);\n// if (isDragAccept) return borderImageCreator(props.theme.colors.brand[600], 2);\n// if (isDragReject) return borderImageCreator(props.theme.colors.danger[900], 2);\n// return borderImageCreator(props.theme.colors.neutral[400], 2);\n// };\n\nconst disabledStyles = css`\n pointer-events: none;\n`;\n\nconst borderImage = (color: string) =>\n `url(\"data:image/svg+xml,%3csvg aria-hidden='true' width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' rx='${\n DROP_ZONE_CONSTANTS.BORDER_RADIUS\n }' ry='${DROP_ZONE_CONSTANTS.BORDER_RADIUS}' stroke='${encodeURIComponent(color)}' stroke-width='${\n DROP_ZONE_CONSTANTS.BORDER_WIDTH\n }' stroke-dasharray='4 6' stroke-dashoffset='0' stroke-linecap='round'/%3e%3c/svg%3e\")`;\n\ninterface DropzoneStyledProps {\n isDragActive: boolean;\n disabled: boolean;\n hasError: boolean;\n getOwnerProps: () => object;\n getOwnerPropsArguments: () => object;\n}\nexport const StyledDropZoneHolder = styled(Grid, {\n name: DSDropzoneName,\n slot: DROPZONE_SLOTS.WRAPPER_HOLDER,\n})`\n position: relative;\n ${(props) => props.disabled && 'cursor: not-allowed;'}\n`;\nexport const StyledDropZone = styled(Grid, { name: DSDropzoneName, slot: DROPZONE_SLOTS.WRAPPER })<DropzoneStyledProps>`\n border-radius: ${DROP_ZONE_CONSTANTS.BORDER_RADIUS}px;\n background-color: ${(props) => props.theme.colors.neutral['000']};\n background-image: ${(props) => {\n if (props.disabled) {\n return borderImage(props.theme.colors.neutral[400]);\n }\n if (props.isDragActive) {\n return borderImage(props.theme.colors.brand[600]);\n }\n if (props.hasError) {\n return borderImage(props.theme.colors.danger[900]);\n }\n return borderImage(props.theme.colors.neutral[400]);\n }};\n padding: ${(props) => props.theme.space.xs} 1.8461538461538463rem;\n &:hover {\n background-image: ${(props) => {\n if (props.disabled) {\n return borderImage(props.theme.colors.neutral[400]);\n }\n if (props.isDragActive) {\n return borderImage(props.theme.colors.brand[600]);\n }\n if (props.hasError) {\n return borderImage(props.theme.colors.danger[900]);\n }\n return borderImage(props.theme.colors.brand[600]);\n }};\n }\n cursor: ${(props) => (props.isDragActive ? 'grabbing' : 'default')};\n ${(props) => props.disabled && disabledStyles}\n`;\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,QAAQ,WAAW;AAC5B,SAAS,YAAY;AACrB,SAAS,gBAAgB,qBAAqB,sBAAsB;AAepE,MAAM,iBAAiB;AAAA;AAAA;AAIvB,MAAM,cAAc,CAAC,UACnB,gLACE,oBAAoB,aACtB,SAAS,oBAAoB,aAAa,aAAa,mBAAmB,KAAK,CAAC,mBAC9E,oBAAoB,YACtB;AASK,MAAM,uBAAuB,OAAO,MAAM;AAAA,EAC/C,MAAM;AAAA,EACN,MAAM,eAAe;AACvB,CAAC;AAAA;AAAA,IAEG,CAAC,UAAU,MAAM,YAAY,sBAAsB;AAAA;AAEhD,MAAM,iBAAiB,OAAO,MAAM,EAAE,MAAM,gBAAgB,MAAM,eAAe,QAAQ,CAAC;AAAA,mBAC9E,oBAAoB,aAAa;AAAA,sBAC9B,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA,sBAC5C,CAAC,UAAU;AAC7B,MAAI,MAAM,UAAU;AAClB,WAAO,YAAY,MAAM,MAAM,OAAO,QAAQ,GAAG,CAAC;AAAA,EACpD;AACA,MAAI,MAAM,cAAc;AACtB,WAAO,YAAY,MAAM,MAAM,OAAO,MAAM,GAAG,CAAC;AAAA,EAClD;AACA,MAAI,MAAM,UAAU;AAClB,WAAO,YAAY,MAAM,MAAM,OAAO,OAAO,GAAG,CAAC;AAAA,EACnD;AACA,SAAO,YAAY,MAAM,MAAM,OAAO,QAAQ,GAAG,CAAC;AACpD,CAAC;AAAA,aACU,CAAC,UAAU,MAAM,MAAM,MAAM,EAAE;AAAA;AAAA,wBAEpB,CAAC,UAAU;AAC7B,MAAI,MAAM,UAAU;AAClB,WAAO,YAAY,MAAM,MAAM,OAAO,QAAQ,GAAG,CAAC;AAAA,EACpD;AACA,MAAI,MAAM,cAAc;AACtB,WAAO,YAAY,MAAM,MAAM,OAAO,MAAM,GAAG,CAAC;AAAA,EAClD;AACA,MAAI,MAAM,UAAU;AAClB,WAAO,YAAY,MAAM,MAAM,OAAO,OAAO,GAAG,CAAC;AAAA,EACnD;AACA,SAAO,YAAY,MAAM,MAAM,OAAO,MAAM,GAAG,CAAC;AAClD,CAAC;AAAA;AAAA,YAEO,CAAC,UAAW,MAAM,eAAe,aAAa,SAAU;AAAA,IAChE,CAAC,UAAU,MAAM,YAAY,cAAc;AAAA;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type {} from '@elliemae/ds-system';\nimport { styled, lockedStateInteractionCss } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DROPZONE_SLOTS, DROP_ZONE_CONSTANTS, DSDropzoneName } from './constants/index.js';\n\nconst borderImage = (color: string) =>\n `url(\"data:image/svg+xml,%3csvg aria-hidden='true' width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' rx='${\n DROP_ZONE_CONSTANTS.BORDER_RADIUS\n }' ry='${DROP_ZONE_CONSTANTS.BORDER_RADIUS}' stroke='${encodeURIComponent(color)}' stroke-width='${\n DROP_ZONE_CONSTANTS.BORDER_WIDTH\n }' stroke-dasharray='4 6' stroke-dashoffset='0' stroke-linecap='round'/%3e%3c/svg%3e\")`;\n\ninterface DropzoneStyledProps {\n isDragActive: boolean;\n $disabled: boolean;\n hasError: boolean;\n getOwnerProps: () => object;\n getOwnerPropsArguments: () => object;\n}\nexport const StyledDropZoneHolder = styled(Grid, {\n name: DSDropzoneName,\n slot: DROPZONE_SLOTS.WRAPPER_HOLDER,\n})<{ $disabled?: boolean }>`\n position: relative;\n`;\nexport const StyledDropZone = styled(Grid, { name: DSDropzoneName, slot: DROPZONE_SLOTS.WRAPPER })<DropzoneStyledProps>`\n border-radius: ${DROP_ZONE_CONSTANTS.BORDER_RADIUS}px;\n background-color: ${(props) => props.theme.colors.neutral['000']};\n background-image: ${(props) => {\n if (props.$disabled) {\n return borderImage(props.theme.colors.neutral[400]);\n }\n if (props.isDragActive) {\n return borderImage(props.theme.colors.brand[600]);\n }\n if (props.hasError) {\n return borderImage(props.theme.colors.danger[900]);\n }\n return borderImage(props.theme.colors.neutral[400]);\n }};\n padding: ${(props) => props.theme.space.xs} 1.8461538461538463rem;\n &:hover {\n background-image: ${(props) => {\n if (props.$disabled) {\n return borderImage(props.theme.colors.neutral[400]);\n }\n if (props.isDragActive) {\n return borderImage(props.theme.colors.brand[600]);\n }\n if (props.hasError) {\n return borderImage(props.theme.colors.danger[900]);\n }\n return borderImage(props.theme.colors.brand[600]);\n }};\n }\n cursor: ${(props) => (props.isDragActive ? 'grabbing' : 'default')};\n ${lockedStateInteractionCss}\n`;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,QAAQ,iCAAiC;AAClD,SAAS,YAAY;AACrB,SAAS,gBAAgB,qBAAqB,sBAAsB;AAEpE,MAAM,cAAc,CAAC,UACnB,gLACE,oBAAoB,aACtB,SAAS,oBAAoB,aAAa,aAAa,mBAAmB,KAAK,CAAC,mBAC9E,oBAAoB,YACtB;AASK,MAAM,uBAAuB,OAAO,MAAM;AAAA,EAC/C,MAAM;AAAA,EACN,MAAM,eAAe;AACvB,CAAC;AAAA;AAAA;AAGM,MAAM,iBAAiB,OAAO,MAAM,EAAE,MAAM,gBAAgB,MAAM,eAAe,QAAQ,CAAC;AAAA,mBAC9E,oBAAoB,aAAa;AAAA,sBAC9B,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA,sBAC5C,CAAC,UAAU;AAC7B,MAAI,MAAM,WAAW;AACnB,WAAO,YAAY,MAAM,MAAM,OAAO,QAAQ,GAAG,CAAC;AAAA,EACpD;AACA,MAAI,MAAM,cAAc;AACtB,WAAO,YAAY,MAAM,MAAM,OAAO,MAAM,GAAG,CAAC;AAAA,EAClD;AACA,MAAI,MAAM,UAAU;AAClB,WAAO,YAAY,MAAM,MAAM,OAAO,OAAO,GAAG,CAAC;AAAA,EACnD;AACA,SAAO,YAAY,MAAM,MAAM,OAAO,QAAQ,GAAG,CAAC;AACpD,CAAC;AAAA,aACU,CAAC,UAAU,MAAM,MAAM,MAAM,EAAE;AAAA;AAAA,wBAEpB,CAAC,UAAU;AAC7B,MAAI,MAAM,WAAW;AACnB,WAAO,YAAY,MAAM,MAAM,OAAO,QAAQ,GAAG,CAAC;AAAA,EACpD;AACA,MAAI,MAAM,cAAc;AACtB,WAAO,YAAY,MAAM,MAAM,OAAO,MAAM,GAAG,CAAC;AAAA,EAClD;AACA,MAAI,MAAM,UAAU;AAClB,WAAO,YAAY,MAAM,MAAM,OAAO,OAAO,GAAG,CAAC;AAAA,EACnD;AACA,SAAO,YAAY,MAAM,MAAM,OAAO,MAAM,GAAG,CAAC;AAClD,CAAC;AAAA;AAAA,YAEO,CAAC,UAAW,MAAM,eAAe,aAAa,SAAU;AAAA,IAChE,yBAAyB;AAAA;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,29 @@
1
+ import * as React from "react";
2
+ const SlotPropsAsObj = {
3
+ dsDropzoneWrapper_holder: { "aria-label": "just a typescript test" },
4
+ dsDropzoneWrapper: { "aria-label": "just a typescript test" },
5
+ dsDropzoneActivezoneWrapper: { "aria-label": "just a typescript test" },
6
+ dsDropzoneActivezoneIcon: { "aria-label": "just a typescript test" },
7
+ dsDropzoneActivezoneLabel: { "aria-label": "just a typescript test" }
8
+ };
9
+ const SlotPropsAsFunctions = {
10
+ dsDropzoneWrapper_holder: () => ({ "aria-label": "just a typescript test" }),
11
+ dsDropzoneWrapper: () => ({ "aria-label": "just a typescript test" }),
12
+ dsDropzoneActivezoneWrapper: () => ({ "aria-label": "just a typescript test" }),
13
+ dsDropzoneActivezoneIcon: () => ({ "aria-label": "just a typescript test" }),
14
+ dsDropzoneActivezoneLabel: () => ({ "aria-label": "just a typescript test" })
15
+ };
16
+ const EnsureAllSlotsExistInSlotFunctionArguments = SlotPropsAsFunctions;
17
+ const EnsureHolderSlotExistsInSlotFunctionArguments = SlotPropsAsFunctions;
18
+ const ActivezoneSlotPropsAsObj = {
19
+ dsDropzoneActivezoneWrapper: { "aria-label": "just a typescript test" },
20
+ dsDropzoneActivezoneIcon: { "aria-label": "just a typescript test" },
21
+ dsDropzoneActivezoneLabel: { "aria-label": "just a typescript test" }
22
+ };
23
+ const ActivezoneSlotPropsAsFunctions = {
24
+ dsDropzoneActivezoneWrapper: () => ({ "aria-label": "just a typescript test" }),
25
+ dsDropzoneActivezoneIcon: () => ({ "aria-label": "just a typescript test" }),
26
+ dsDropzoneActivezoneLabel: () => ({ "aria-label": "just a typescript test" })
27
+ };
28
+ const EnsureAllActivezoneSlotsExistInSlotFunctionArguments = ActivezoneSlotPropsAsFunctions;
29
+ //# sourceMappingURL=slot-props.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/slot-props.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\n\nimport type { TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport type { DSDropzoneName, DROPZONE_SLOTS } from '../constants/index.js';\nimport type { DSDropzoneT } from '../react-desc-prop-types.js';\nimport type { ACTIVEZONE_SLOTS, DSActivezoneT } from '../parts/DSActivezone/react-desc-prop-types.js';\n\nconst SlotPropsAsObj: Partial<DSDropzoneT.Props> = {\n dsDropzoneWrapper_holder: { 'aria-label': 'just a typescript test' },\n dsDropzoneWrapper: { 'aria-label': 'just a typescript test' },\n dsDropzoneActivezoneWrapper: { 'aria-label': 'just a typescript test' },\n dsDropzoneActivezoneIcon: { 'aria-label': 'just a typescript test' },\n dsDropzoneActivezoneLabel: { 'aria-label': 'just a typescript test' },\n};\n\nconst SlotPropsAsFunctions: DSDropzoneT.SlotFunctionArguments = {\n dsDropzoneWrapper_holder: () => ({ 'aria-label': 'just a typescript test' }),\n dsDropzoneWrapper: () => ({ 'aria-label': 'just a typescript test' }),\n dsDropzoneActivezoneWrapper: () => ({ 'aria-label': 'just a typescript test' }),\n dsDropzoneActivezoneIcon: () => ({ 'aria-label': 'just a typescript test' }),\n dsDropzoneActivezoneLabel: () => ({ 'aria-label': 'just a typescript test' }),\n};\n\n// Exhaustiveness check \u2014 fails compilation if a slot is missing from SlotFunctionArguments\n// The helper derives `dsDropzoneWrapperHolder` from the snake case slot 'wrapper_holder', but the prop of that slot\n// is `dsDropzoneWrapper_holder` (see KNOWN_INTENTIONAL_DEVIATIONS.md): it is checked by hand through its explicit entry\n// above, and the helper checks all the other slots.\nconst EnsureAllSlotsExistInSlotFunctionArguments: Required<\n TypescriptHelpersT.PropsForSlots<typeof DSDropzoneName, Omit<typeof DROPZONE_SLOTS, 'WRAPPER_HOLDER'>>\n> = SlotPropsAsFunctions;\nconst EnsureHolderSlotExistsInSlotFunctionArguments: Required<\n Pick<DSDropzoneT.SlotFunctionArguments, 'dsDropzoneWrapper_holder'>\n> = SlotPropsAsFunctions;\n\n// The activezone part (DSActivezone) owns three of the slots, and it can be composed on its own\nconst ActivezoneSlotPropsAsObj: Partial<DSActivezoneT.Props> = {\n dsDropzoneActivezoneWrapper: { 'aria-label': 'just a typescript test' },\n dsDropzoneActivezoneIcon: { 'aria-label': 'just a typescript test' },\n dsDropzoneActivezoneLabel: { 'aria-label': 'just a typescript test' },\n};\n\nconst ActivezoneSlotPropsAsFunctions: DSActivezoneT.SlotFunctionArguments = {\n dsDropzoneActivezoneWrapper: () => ({ 'aria-label': 'just a typescript test' }),\n dsDropzoneActivezoneIcon: () => ({ 'aria-label': 'just a typescript test' }),\n dsDropzoneActivezoneLabel: () => ({ 'aria-label': 'just a typescript test' }),\n};\n\nconst EnsureAllActivezoneSlotsExistInSlotFunctionArguments: Required<\n TypescriptHelpersT.PropsForSlots<typeof DSDropzoneName, typeof ACTIVEZONE_SLOTS>\n> = ActivezoneSlotPropsAsFunctions;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACOvB,MAAM,iBAA6C;AAAA,EACjD,0BAA0B,EAAE,cAAc,yBAAyB;AAAA,EACnE,mBAAmB,EAAE,cAAc,yBAAyB;AAAA,EAC5D,6BAA6B,EAAE,cAAc,yBAAyB;AAAA,EACtE,0BAA0B,EAAE,cAAc,yBAAyB;AAAA,EACnE,2BAA2B,EAAE,cAAc,yBAAyB;AACtE;AAEA,MAAM,uBAA0D;AAAA,EAC9D,0BAA0B,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAC1E,mBAAmB,OAAO,EAAE,cAAc,yBAAyB;AAAA,EACnE,6BAA6B,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAC7E,0BAA0B,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAC1E,2BAA2B,OAAO,EAAE,cAAc,yBAAyB;AAC7E;AAMA,MAAM,6CAEF;AACJ,MAAM,gDAEF;AAGJ,MAAM,2BAAyD;AAAA,EAC7D,6BAA6B,EAAE,cAAc,yBAAyB;AAAA,EACtE,0BAA0B,EAAE,cAAc,yBAAyB;AAAA,EACnE,2BAA2B,EAAE,cAAc,yBAAyB;AACtE;AAEA,MAAM,iCAAsE;AAAA,EAC1E,6BAA6B,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAC7E,0BAA0B,OAAO,EAAE,cAAc,yBAAyB;AAAA,EAC1E,2BAA2B,OAAO,EAAE,cAAc,yBAAyB;AAC7E;AAEA,MAAM,uDAEF;",
6
+ "names": []
7
+ }
@@ -10,7 +10,9 @@ export interface DropzoneCTX {
10
10
  }
11
11
  export declare const useDSDropzone: (propsFromUser: DSDropzoneT.Props) => {
12
12
  propsWithDefault: DSDropzoneT.InternalProps;
13
- globalProps: Partial<Pick<DSGridT.Props, "form" | "list" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "async" | "autoComplete" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "cite" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "data" | "dateTime" | "default" | "defer" | "disabled" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "label" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "name" | "noValidate" | "open" | "optimum" | "pattern" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "size" | "sizes" | "span" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "summary" | "target" | "type" | "useMap" | "value" | "width" | "wmode" | "wrap"> & Omit<{
13
+ globalProps: Partial<Pick<DSGridT.Props, "label" | "onDrop" | "form" | "list" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "async" | "autoComplete" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "cite" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "data" | "dateTime" | "default" | "defer" | "disabled" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "name" | "noValidate" | "open" | "optimum" | "pattern" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "size" | "sizes" | "span" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "summary" | "target" | "type" | "useMap" | "value" | "width" | "wmode" | "wrap"> & Omit<{
14
+ label?: string | undefined | undefined;
15
+ onDrop?: React.DragEventHandler<HTMLDivElement> | undefined;
14
16
  form?: string | undefined | undefined;
15
17
  list?: string | undefined | undefined;
16
18
  "aria-activedescendant"?: string | undefined | undefined;
@@ -171,7 +173,6 @@ export declare const useDSDropzone: (propsFromUser: DSDropzoneT.Props) => {
171
173
  onDragOverCapture?: React.DragEventHandler<HTMLDivElement> | undefined;
172
174
  onDragStart?: React.DragEventHandler<HTMLDivElement> | undefined;
173
175
  onDragStartCapture?: React.DragEventHandler<HTMLDivElement> | undefined;
174
- onDrop?: React.DragEventHandler<HTMLDivElement> | undefined;
175
176
  onDropCapture?: React.DragEventHandler<HTMLDivElement> | undefined;
176
177
  onMouseDown?: React.MouseEventHandler<HTMLDivElement> | undefined;
177
178
  onMouseDownCapture?: React.MouseEventHandler<HTMLDivElement> | undefined;
@@ -322,7 +323,6 @@ export declare const useDSDropzone: (propsFromUser: DSDropzoneT.Props) => {
322
323
  keyParams?: string | undefined | undefined;
323
324
  keyType?: string | undefined | undefined;
324
325
  kind?: string | undefined | undefined;
325
- label?: string | undefined | undefined;
326
326
  loop?: boolean | undefined | undefined;
327
327
  low?: number | undefined | undefined;
328
328
  manifest?: string | undefined | undefined;
@@ -3,7 +3,9 @@ import type { DSGridT } from '@elliemae/ds-grid';
3
3
  import { type DSActivezoneT } from '../react-desc-prop-types.js';
4
4
  export declare const useActivezone: (propsFromUser: DSActivezoneT.Props) => {
5
5
  propsWithDefault: DSActivezoneT.InternalProps;
6
- globalProps: Partial<Pick<DSGridT.Props, "form" | "list" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "async" | "autoComplete" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "cite" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "data" | "dateTime" | "default" | "defer" | "disabled" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "label" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "name" | "noValidate" | "open" | "optimum" | "pattern" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "size" | "sizes" | "span" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "summary" | "target" | "type" | "useMap" | "value" | "width" | "wmode" | "wrap"> & Omit<{
6
+ globalProps: Partial<Pick<DSGridT.Props, "label" | "onDrop" | "form" | "list" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "async" | "autoComplete" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "cite" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "data" | "dateTime" | "default" | "defer" | "disabled" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "name" | "noValidate" | "open" | "optimum" | "pattern" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "size" | "sizes" | "span" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "summary" | "target" | "type" | "useMap" | "value" | "width" | "wmode" | "wrap"> & Omit<{
7
+ label?: string | undefined | undefined;
8
+ onDrop?: React.DragEventHandler<HTMLDivElement> | undefined;
7
9
  form?: string | undefined | undefined;
8
10
  list?: string | undefined | undefined;
9
11
  "aria-activedescendant"?: string | undefined | undefined;
@@ -164,7 +166,6 @@ export declare const useActivezone: (propsFromUser: DSActivezoneT.Props) => {
164
166
  onDragOverCapture?: React.DragEventHandler<HTMLDivElement> | undefined;
165
167
  onDragStart?: React.DragEventHandler<HTMLDivElement> | undefined;
166
168
  onDragStartCapture?: React.DragEventHandler<HTMLDivElement> | undefined;
167
- onDrop?: React.DragEventHandler<HTMLDivElement> | undefined;
168
169
  onDropCapture?: React.DragEventHandler<HTMLDivElement> | undefined;
169
170
  onMouseDown?: React.MouseEventHandler<HTMLDivElement> | undefined;
170
171
  onMouseDownCapture?: React.MouseEventHandler<HTMLDivElement> | undefined;
@@ -315,7 +316,6 @@ export declare const useActivezone: (propsFromUser: DSActivezoneT.Props) => {
315
316
  keyParams?: string | undefined | undefined;
316
317
  keyType?: string | undefined | undefined;
317
318
  kind?: string | undefined | undefined;
318
- label?: string | undefined | undefined;
319
319
  loop?: boolean | undefined | undefined;
320
320
  low?: number | undefined | undefined;
321
321
  manifest?: string | undefined | undefined;
@@ -1,6 +1,13 @@
1
1
  import type { GlobalAttributesT, XstyledProps, DSPropTypesSchema } from '@elliemae/ds-props-helpers';
2
+ import type { TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';
2
3
  import type { SvgIconT } from '@elliemae/ds-icons';
3
4
  import type { WeakValidationMap } from 'react';
5
+ import { DSDropzoneName } from '../../constants/index.js';
6
+ export declare const ACTIVEZONE_SLOTS: {
7
+ readonly ACTIVEZONE_LABEL: "activezone-label";
8
+ readonly ACTIVEZONE_ICON: "activezone-icon";
9
+ readonly ACTIVEZONE_WRAPPER: "activezone-wrapper";
10
+ };
4
11
  export declare namespace DSActivezoneT {
5
12
  interface RequiredProps {
6
13
  }
@@ -8,7 +15,12 @@ export declare namespace DSActivezoneT {
8
15
  Icon: React.ComponentType<SvgIconT.Props>;
9
16
  label: string;
10
17
  }
11
- interface OptionalProps {
18
+ type SlotFunctionArguments = {
19
+ dsDropzoneActivezoneWrapper: () => object;
20
+ dsDropzoneActivezoneIcon: () => object;
21
+ dsDropzoneActivezoneLabel: () => object;
22
+ };
23
+ interface OptionalProps extends TypescriptHelpersT.PropsForGlobalOnSlots<typeof DSDropzoneName, typeof ACTIVEZONE_SLOTS> {
12
24
  }
13
25
  interface Props extends Partial<DefaultProps>, OptionalProps, Omit<GlobalAttributesT<HTMLButtonElement>, keyof DefaultProps | keyof OptionalProps | keyof XstyledProps>, XstyledProps, RequiredProps {
14
26
  }
@@ -1,11 +1,21 @@
1
1
  import type { GlobalAttributesT, XstyledProps, DSPropTypesSchema } from '@elliemae/ds-props-helpers';
2
+ import type { TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';
2
3
  import type { WeakValidationMap } from 'react';
4
+ import { DSDropzoneName, DROPZONE_SLOTS } from './constants/index.js';
3
5
  export declare namespace DSDropzoneT {
4
6
  interface RequiredProps {
5
7
  }
6
8
  interface DefaultProps {
7
9
  }
8
- interface OptionalProps {
10
+ type SlotFunctionArguments = {
11
+ dsDropzoneWrapper_holder: () => object;
12
+ dsDropzoneWrapper: () => object;
13
+ dsDropzoneActivezoneWrapper: () => object;
14
+ dsDropzoneActivezoneIcon: () => object;
15
+ dsDropzoneActivezoneLabel: () => object;
16
+ };
17
+ interface OptionalProps extends TypescriptHelpersT.PropsForGlobalOnSlots<typeof DSDropzoneName, Omit<typeof DROPZONE_SLOTS, 'WRAPPER_HOLDER'>> {
18
+ dsDropzoneWrapper_holder?: object | ((args: object) => object);
9
19
  onDrop?: (files: File[], event: React.DragEvent<HTMLDivElement>) => void;
10
20
  hasError?: boolean;
11
21
  }
@@ -1,10 +1,12 @@
1
1
  interface DropzoneStyledProps {
2
2
  isDragActive: boolean;
3
- disabled: boolean;
3
+ $disabled: boolean;
4
4
  hasError: boolean;
5
5
  getOwnerProps: () => object;
6
6
  getOwnerPropsArguments: () => object;
7
7
  }
8
- export declare const StyledDropZoneHolder: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>, import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>>, never>;
8
+ export declare const StyledDropZoneHolder: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>, import("@elliemae/ds-system").Theme, {
9
+ $disabled?: boolean;
10
+ } & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>>, never>;
9
11
  export declare const StyledDropZone: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>, import("@elliemae/ds-system").Theme, DropzoneStyledProps & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>>, never>;
10
12
  export {};