@kubed/components 0.0.54 → 0.0.56

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 (63) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/cjs/Dropzone/Dropzone.context.js +2 -0
  3. package/cjs/Dropzone/Dropzone.context.js.map +1 -0
  4. package/cjs/Dropzone/Dropzone.js +2 -0
  5. package/cjs/Dropzone/Dropzone.js.map +1 -0
  6. package/cjs/Dropzone/Dropzone.styles.js +14 -0
  7. package/cjs/Dropzone/Dropzone.styles.js.map +1 -0
  8. package/cjs/Dropzone/DropzoneStatus.js +2 -0
  9. package/cjs/Dropzone/DropzoneStatus.js.map +1 -0
  10. package/cjs/Popover/Popover.js.map +1 -1
  11. package/cjs/Tooltip/Tooltip.js.map +1 -1
  12. package/cjs/index.js +1 -1
  13. package/cjs/index.js.map +1 -1
  14. package/cjs/utils/createSafeContext.js +2 -0
  15. package/cjs/utils/createSafeContext.js.map +1 -0
  16. package/cjs/utils/isElement.js +2 -0
  17. package/cjs/utils/isElement.js.map +1 -0
  18. package/cjs/utils/upperFirst.js +2 -0
  19. package/cjs/utils/upperFirst.js.map +1 -0
  20. package/esm/Dropzone/Dropzone.context.js +2 -0
  21. package/esm/Dropzone/Dropzone.context.js.map +1 -0
  22. package/esm/Dropzone/Dropzone.js +2 -0
  23. package/esm/Dropzone/Dropzone.js.map +1 -0
  24. package/esm/Dropzone/Dropzone.styles.js +14 -0
  25. package/esm/Dropzone/Dropzone.styles.js.map +1 -0
  26. package/esm/Dropzone/DropzoneStatus.js +2 -0
  27. package/esm/Dropzone/DropzoneStatus.js.map +1 -0
  28. package/esm/Popover/Popover.js.map +1 -1
  29. package/esm/Tooltip/Tooltip.js.map +1 -1
  30. package/esm/index.js +1 -1
  31. package/esm/index.js.map +1 -1
  32. package/esm/utils/createSafeContext.js +2 -0
  33. package/esm/utils/createSafeContext.js.map +1 -0
  34. package/esm/utils/isElement.js +2 -0
  35. package/esm/utils/isElement.js.map +1 -0
  36. package/esm/utils/upperFirst.js +2 -0
  37. package/esm/utils/upperFirst.js.map +1 -0
  38. package/lib/src/Dropzone/Dropzone.context.d.ts +11 -0
  39. package/lib/src/Dropzone/Dropzone.context.d.ts.map +1 -0
  40. package/lib/src/Dropzone/Dropzone.d.ts +85 -0
  41. package/lib/src/Dropzone/Dropzone.d.ts.map +1 -0
  42. package/lib/src/Dropzone/Dropzone.styles.d.ts +3 -0
  43. package/lib/src/Dropzone/Dropzone.styles.d.ts.map +1 -0
  44. package/lib/src/Dropzone/DropzoneStatus.d.ts +20 -0
  45. package/lib/src/Dropzone/DropzoneStatus.d.ts.map +1 -0
  46. package/lib/src/Popover/Popover.d.ts +3 -1
  47. package/lib/src/Popover/Popover.d.ts.map +1 -1
  48. package/lib/src/Tooltip/Tooltip.d.ts +3 -1
  49. package/lib/src/Tooltip/Tooltip.d.ts.map +1 -1
  50. package/lib/src/index.d.ts +1 -0
  51. package/lib/src/index.d.ts.map +1 -1
  52. package/lib/src/utils/ForwardRefWithStaticComponents.d.ts +5 -0
  53. package/lib/src/utils/ForwardRefWithStaticComponents.d.ts.map +1 -0
  54. package/lib/src/utils/assignRef.d.ts +3 -0
  55. package/lib/src/utils/assignRef.d.ts.map +1 -0
  56. package/lib/src/utils/createSafeContext.d.ts +6 -0
  57. package/lib/src/utils/createSafeContext.d.ts.map +1 -0
  58. package/lib/src/utils/isElement.d.ts +3 -0
  59. package/lib/src/utils/isElement.d.ts.map +1 -0
  60. package/lib/src/utils/upperFirst.d.ts +2 -0
  61. package/lib/src/utils/upperFirst.d.ts.map +1 -0
  62. package/lib/tsconfig.tsbuildinfo +1 -1
  63. package/package.json +5 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @kubed/components
2
2
 
3
+ ## 0.0.56
4
+
5
+ ### Patch Changes
6
+
7
+ - [`dcefa97`](https://github.com/kubesphere/kube-design/commit/dcefa97af67af1fc84bebb7f1628ebf625ce1555) Thanks [@chenz24](https://github.com/chenz24)! - 1. Add Dropzone component.
8
+
9
+ * [`144f3bd`](https://github.com/kubesphere/kube-design/commit/144f3bd5039a5e737f93ca3ff44f0fd673c2e5f5) Thanks [@chenz24](https://github.com/chenz24)! - feat: Add Dropzone component
10
+
11
+ ## 0.0.55
12
+
13
+ ### Patch Changes
14
+
15
+ - [`d12bdca`](https://github.com/kubesphere/kube-design/commit/d12bdcade70d7b8bac20731e4cf1f3a58c183763) Thanks [@donniean](https://github.com/donniean)! - feat: add useHover; add Instance type in Tooltip and Popover
16
+
17
+ - Updated dependencies [[`d12bdca`](https://github.com/kubesphere/kube-design/commit/d12bdcade70d7b8bac20731e4cf1f3a58c183763)]:
18
+ - @kubed/hooks@0.0.11
19
+
3
20
  ## 0.0.54
4
21
 
5
22
  ### Patch Changes
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var createSafeContext=require("../utils/createSafeContext.js");const[DropzoneProvider,useDropzoneContext]=createSafeContext.createSafeContext("Dropzone component was not found in tree");exports.DropzoneProvider=DropzoneProvider,exports.useDropzoneContext=useDropzoneContext;
2
+ //# sourceMappingURL=Dropzone.context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dropzone.context.js","sources":["../../src/Dropzone/Dropzone.context.ts"],"sourcesContent":["import { createSafeContext } from '../utils/createSafeContext';\n\nexport interface DropzoneContextValue {\n idle: boolean;\n accept: boolean;\n reject: boolean;\n}\n\nexport const [DropzoneProvider, useDropzoneContext] = createSafeContext<DropzoneContextValue>(\n 'Dropzone component was not found in tree'\n);\n"],"names":["createSafeContext"],"mappings":";;;;;;AACY,MAAC,CAAC,gBAAgB,EAAE,kBAAkB,CAAC,GAAGA,mCAAiB,CAAC,0CAA0C;;;;;"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),reactDropzone=require("react-dropzone"),hooks=require("@kubed/hooks"),LoadingOverlay=require("../LoadingOverlay/LoadingOverlay.js"),Dropzone_context=require("./Dropzone.context.js"),DropzoneStatus=require("./DropzoneStatus.js"),Dropzone_styles=require("./Dropzone.styles.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e.default:e}var React__default=_interopDefaultLegacy(React),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,r,a)=>r in e?__defProp(e,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[r]=a,__spreadValues=(e,r)=>{for(var a in r||(r={}))__hasOwnProp.call(r,a)&&__defNormalProp(e,a,r[a]);if(__getOwnPropSymbols)for(var a of __getOwnPropSymbols(r))__propIsEnum.call(r,a)&&__defNormalProp(e,a,r[a]);return e},__spreadProps=(e,r)=>__defProps(e,__getOwnPropDescs(r)),__objRest=(e,r)=>{var a={};for(var o in e)__hasOwnProp.call(e,o)&&r.indexOf(o)<0&&(a[o]=e[o]);if(e!=null&&__getOwnPropSymbols)for(var o of __getOwnPropSymbols(e))r.indexOf(o)<0&&__propIsEnum.call(e,o)&&(a[o]=e[o]);return a};function _Dropzone(e){const r=e,{className:a,padding:o,radius:B,disabled:c,classNames:K,styles:M,loading:t=!1,multiple:d=!0,maxSize:u=1/0,accept:n,children:v,onDropAny:D,onDrop:g,onReject:f,openRef:O,name:_,maxFiles:m,autoFocus:y,activateOnClick:z=!0,activateOnDrag:b=!0,dragEventsBubbling:j=!0,activateOnKeyboard:P=!0,onDragEnter:E,onDragLeave:F,onDragOver:R,onFileDialogCancel:A,onFileDialogOpen:x,preventDropOnDocument:I,useFsAccessApi:h=!0,getFilesFromEvent:p,validator:q}=r,w=__objRest(r,["className","padding","radius","disabled","classNames","styles","loading","multiple","maxSize","accept","children","onDropAny","onDrop","onReject","openRef","name","maxFiles","autoFocus","activateOnClick","activateOnDrag","dragEventsBubbling","activateOnKeyboard","onDragEnter","onDragLeave","onDragOver","onFileDialogCancel","onFileDialogOpen","preventDropOnDocument","useFsAccessApi","getFilesFromEvent","validator"]),{getRootProps:L,getInputProps:N,isDragAccept:i,isDragReject:l,open:S}=reactDropzone.useDropzone(__spreadValues({onDrop:D,onDropAccepted:g,onDropRejected:f,disabled:c||t,accept:Array.isArray(n)?n.reduce((C,k)=>__spreadProps(__spreadValues({},C),{[k]:[]}),{}):n,multiple:d,maxSize:u,maxFiles:m,autoFocus:y,noClick:!z,noDrag:!b,noDragEventsBubbling:!j,noKeyboard:!P,onDragEnter:E,onDragLeave:F,onDragOver:R,onFileDialogCancel:A,onFileDialogOpen:x,preventDropOnDocument:I,useFsAccessApi:h,validator:q},p?{getFilesFromEvent:p}:null));hooks.assignRef(O,S);const s=!i&&!l;return React__default.createElement(Dropzone_context.DropzoneProvider,{value:{accept:i,reject:l,idle:s}},React__default.createElement(Dropzone_styles.DropzoneWrapper,__spreadProps(__spreadValues(__spreadValues({},w),L()),{"data-accept":i||void 0,"data-reject":l||void 0,"data-idle":s||void 0,"data-loading":t||void 0,className:a}),React__default.createElement(LoadingOverlay.LoadingOverlay,{visible:t}),React__default.createElement("input",__spreadProps(__spreadValues({},N()),{name:_})),React__default.createElement(Dropzone_styles.DropzoneInner,null,v)))}_Dropzone.displayName="@mantine/dropzone/Dropzone",_Dropzone.Accept=DropzoneStatus.DropzoneAccept,_Dropzone.Reject=DropzoneStatus.DropzoneReject,_Dropzone.Idle=DropzoneStatus.DropzoneIdle;const Dropzone=_Dropzone;exports.Dropzone=Dropzone,exports._Dropzone=_Dropzone;
2
+ //# sourceMappingURL=Dropzone.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dropzone.js","sources":["../../src/Dropzone/Dropzone.tsx"],"sourcesContent":["import React from 'react';\nimport {\n useDropzone,\n FileRejection,\n Accept,\n FileWithPath,\n DropEvent,\n FileError,\n} from 'react-dropzone';\nimport { assignRef } from '@kubed/hooks';\n\nimport { ForwardRefWithStaticComponents } from '../utils/ForwardRefWithStaticComponents';\nimport { LoadingOverlay } from '../LoadingOverlay/LoadingOverlay';\nimport { DefaultProps, KubedNumberSize } from '../theme';\nimport { DropzoneProvider } from './Dropzone.context';\nimport { DropzoneAccept, DropzoneIdle, DropzoneReject } from './DropzoneStatus';\n\nimport { DropzoneWrapper, DropzoneInner } from './Dropzone.styles';\n\nexport interface DropzoneProps\n extends DefaultProps,\n Omit<React.ComponentPropsWithRef<'div'>, 'onDrop'> {\n /** Padding from theme.spacing, or number to set padding in px */\n padding?: KubedNumberSize;\n\n /** Border radius from theme.radius or number to set border-radius in px */\n radius?: KubedNumberSize;\n\n /** Dropzone statues */\n children: React.ReactNode;\n\n /** Disable files capturing */\n disabled?: boolean;\n\n /** Called when any files are dropped into dropzone */\n onDropAny?(files: FileWithPath[], fileRejections: FileRejection[]): void;\n\n /** Called when valid files are dropped into dropzone */\n onDrop(files: FileWithPath[]): void;\n\n /** Called when selected files don't meet file restrictions */\n onReject?(fileRejections: FileRejection[]): void;\n\n /** Display loading overlay over dropzone */\n loading?: boolean;\n\n /** File types to accept */\n accept?: Accept | string[];\n\n /** Get open function as ref */\n openRef?: React.ForwardedRef<() => void | undefined>;\n\n /** Allow selection of multiple files */\n multiple?: boolean;\n\n /** Set maximum file size in bytes */\n maxSize?: number;\n\n /** Name of the form control. Submitted with the form as part of a name/value pair. */\n name?: string;\n\n /** Number of files that user can pick */\n maxFiles?: number;\n\n /** Set to true to autofocus the root element */\n autoFocus?: boolean;\n\n /** If false, disables click to open the native file selection dialog */\n activateOnClick?: boolean;\n\n /** If false, disables drag 'n' drop */\n activateOnDrag?: boolean;\n\n /** If false, disables Space/Enter to open the native file selection dialog. Note that it also stops tracking the focus state. */\n activateOnKeyboard?: boolean;\n\n /** If false, stops drag event propagation to parents */\n dragEventsBubbling?: boolean;\n\n /** Called when the `dragenter` event occurs */\n onDragEnter?(event: React.DragEvent<HTMLElement>): void;\n\n /** Called when the `dragleave` event occurs */\n onDragLeave?(event: React.DragEvent<HTMLElement>): void;\n\n /** Called when the `dragover` event occurs */\n onDragOver?(event: React.DragEvent<HTMLElement>): void;\n\n /** Called when user closes the file selection dialog with no selection */\n onFileDialogCancel?(): void;\n\n /** Called when user opens the file selection dialog */\n onFileDialogOpen?(): void;\n\n /** If false, allow dropped items to take over the current browser window */\n preventDropOnDocument?: boolean;\n\n /** Set to true to use the File System Access API to open the file picker instead of using an <input type=\"file\"> click event, defaults to true */\n useFsAccessApi?: boolean;\n\n /** Use this to provide a custom file aggregator */\n getFilesFromEvent?: (event: DropEvent) => Promise<Array<File | DataTransferItem>>;\n\n /** Custom validation function. It must return null if there's no errors. */\n validator?: <T extends File>(file: T) => FileError | FileError[] | null;\n}\n\nexport function _Dropzone(props: DropzoneProps) {\n const {\n className,\n padding,\n radius,\n disabled,\n classNames,\n styles,\n loading = false,\n multiple = true,\n maxSize = Infinity,\n accept,\n children,\n onDropAny,\n onDrop,\n onReject,\n openRef,\n name,\n // unstyled,\n maxFiles,\n autoFocus,\n activateOnClick = true,\n activateOnDrag = true,\n dragEventsBubbling = true,\n activateOnKeyboard = true,\n onDragEnter,\n onDragLeave,\n onDragOver,\n onFileDialogCancel,\n onFileDialogOpen,\n preventDropOnDocument,\n useFsAccessApi = true,\n getFilesFromEvent,\n validator,\n ...others\n } = props;\n\n const { getRootProps, getInputProps, isDragAccept, isDragReject, open } = useDropzone({\n onDrop: onDropAny,\n onDropAccepted: onDrop,\n onDropRejected: onReject,\n disabled: disabled || loading,\n accept: Array.isArray(accept) ? accept.reduce((r, key) => ({ ...r, [key]: [] }), {}) : accept,\n multiple,\n maxSize,\n maxFiles,\n autoFocus,\n noClick: !activateOnClick,\n noDrag: !activateOnDrag,\n noDragEventsBubbling: !dragEventsBubbling,\n noKeyboard: !activateOnKeyboard,\n onDragEnter,\n onDragLeave,\n onDragOver,\n onFileDialogCancel,\n onFileDialogOpen,\n preventDropOnDocument,\n useFsAccessApi,\n validator,\n ...(getFilesFromEvent ? { getFilesFromEvent } : null),\n });\n\n assignRef(openRef, open);\n const isIdle = !isDragAccept && !isDragReject;\n\n return (\n <DropzoneProvider value={{ accept: isDragAccept, reject: isDragReject, idle: isIdle }}>\n <DropzoneWrapper\n {...others}\n {...getRootProps()}\n data-accept={isDragAccept || undefined}\n data-reject={isDragReject || undefined}\n data-idle={isIdle || undefined}\n data-loading={loading || undefined}\n className={className}\n >\n <LoadingOverlay visible={loading} />\n <input {...getInputProps()} name={name} />\n <DropzoneInner>{children}</DropzoneInner>\n </DropzoneWrapper>\n </DropzoneProvider>\n );\n}\n\n_Dropzone.displayName = '@mantine/dropzone/Dropzone';\n_Dropzone.Accept = DropzoneAccept;\n_Dropzone.Reject = DropzoneReject;\n_Dropzone.Idle = DropzoneIdle;\n\nexport const Dropzone: ForwardRefWithStaticComponents<\n DropzoneProps,\n {\n Accept: typeof DropzoneAccept;\n Reject: typeof DropzoneReject;\n Idle: typeof DropzoneIdle;\n }\n> = _Dropzone as any;\n"],"names":["useDropzone","assignRef","React","DropzoneProvider","DropzoneWrapper","LoadingOverlay","DropzoneInner","DropzoneAccept","DropzoneReject","DropzoneIdle"],"mappings":";;;;;;;;;;;;;;;;AAAA,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC;AACtC,IAAI,UAAU,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACzC,IAAI,iBAAiB,GAAG,MAAM,CAAC,yBAAyB,CAAC;AACzD,IAAI,mBAAmB,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACvD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC;AACnD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC;AACzD,IAAI,eAAe,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,KAAK,GAAG,IAAI,GAAG,GAAG,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,UAAU,EAA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AAG,4BAA4B,CAAC;AACrD,SAAS,CAAC,MAAM,GAAGC,6BAAc,CAAC;AAClC,SAAS,CAAC,MAAM,GAAGC,6BAAc,CAAC;AAClC,SAAS,CAAC,IAAI,GAAGC,2BAAY,CAAC;AAClB,MAAC,QAAQ,GAAG;;;;;"}
@@ -0,0 +1,14 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var styled=require("styled-components");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e.default:e}var styled__default=_interopDefaultLegacy(styled);const DropzoneWrapper=styled__default.div`
2
+ box-sizing: border-box;
3
+ cursor: pointer;
4
+ user-select: none;
5
+ position: relative;
6
+ transition: background-color 150ms ease;
7
+ border: 2px dashed ${({theme:e})=>e.palette.border};
8
+ border-radius: 4px;
9
+ padding: 16px;
10
+ `,DropzoneInner=styled__default.div`
11
+ pointer-events: none;
12
+ user-select: none;
13
+ `;exports.DropzoneInner=DropzoneInner,exports.DropzoneWrapper=DropzoneWrapper;
14
+ //# sourceMappingURL=Dropzone.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dropzone.styles.js","sources":["../../src/Dropzone/Dropzone.styles.ts"],"sourcesContent":["import styled from 'styled-components';\n\nexport const DropzoneWrapper = styled.div`\n box-sizing: border-box;\n cursor: pointer;\n user-select: none;\n position: relative;\n transition: background-color 150ms ease;\n border: 2px dashed ${({ theme }) => theme.palette.border};\n border-radius: 4px;\n padding: 16px;\n`;\n\nexport const DropzoneInner = styled.div`\n pointer-events: none;\n user-select: none;\n`;\n"],"names":["styled"],"mappings":";;;;;;;;;;AACY,MAAC,eAAe,GAAGA,eAAM,CAAC,GAAG,CAAC;AAC1C;AACA;AACA;AACA;AACA;AACA,qBAAqB,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;AAC3D;AACA;AACA,EAAE;AACU,MAAC,aAAa,GAAGA,eAAM,CAAC,GAAG,CAAC;AACxC;AACA;AACA;;;;;"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),isElement=require("../utils/isElement.js"),upperFirst=require("../utils/upperFirst.js"),Dropzone_context=require("./Dropzone.context.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e.default:e}var React__default=_interopDefaultLegacy(React),__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__objRest=(e,r)=>{var n={};for(var t in e)__hasOwnProp.call(e,t)&&r.indexOf(t)<0&&(n[t]=e[t]);if(e!=null&&__getOwnPropSymbols)for(var t of __getOwnPropSymbols(e))r.indexOf(t)<0&&__propIsEnum.call(e,t)&&(n[t]=e[t]);return n};function createDropzoneStatus(e){const r=n=>{const t=n,{children:o}=t,p=__objRest(t,["children"]),a=Dropzone_context.useDropzoneContext(),c=isElement.isElement(o)?o:React__default.createElement("span",null,o);return a[e]?React.cloneElement(c,p):null};return r.displayName=`@kubed/components/Dropzone/${upperFirst.upperFirst(e)}`,r}const DropzoneAccept=createDropzoneStatus("accept"),DropzoneReject=createDropzoneStatus("reject"),DropzoneIdle=createDropzoneStatus("idle");exports.DropzoneAccept=DropzoneAccept,exports.DropzoneIdle=DropzoneIdle,exports.DropzoneReject=DropzoneReject;
2
+ //# sourceMappingURL=DropzoneStatus.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DropzoneStatus.js","sources":["../../src/Dropzone/DropzoneStatus.tsx"],"sourcesContent":["import React, { cloneElement } from 'react';\nimport { isElement } from '../utils/isElement';\nimport { upperFirst } from '../utils/upperFirst';\nimport { DropzoneContextValue, useDropzoneContext } from './Dropzone.context';\n\nexport interface DropzoneStatusProps {\n // eslint-disable-next-line react/no-unused-prop-types\n children: React.ReactNode;\n}\n\nfunction createDropzoneStatus(status: keyof DropzoneContextValue) {\n const Component = (props: DropzoneStatusProps): JSX.Element => {\n const { children, ...others } = props;\n\n const ctx = useDropzoneContext();\n const _children = isElement(children) ? children : <span>{children}</span>;\n\n if (ctx[status]) {\n return cloneElement(_children, others);\n }\n\n return null;\n };\n\n Component.displayName = `@kubed/components/Dropzone/${upperFirst(status)}`;\n\n return Component;\n}\n\nexport const DropzoneAccept = createDropzoneStatus('accept');\nexport const DropzoneReject = createDropzoneStatus('reject');\nexport const DropzoneIdle = createDropzoneStatus('idle');\n\nexport type DropzoneAcceptProps = DropzoneStatusProps;\nexport type DropzoneRejectProps = DropzoneStatusProps;\nexport type DropzoneIdleProps = DropzoneStatusProps;\n"],"names":["useDropzoneContext","isElement","React","cloneElement","upperFirst"],"mappings":";;;;;;;;;;;;;AAAA,IAAI,mBAAmB,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACvD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC;AACnD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC;AACzD,IAAI,SAAS,GAAG,CAAC,MAAM,EAAE,OAAO,KAAK;AACrC,EAAE,IAAI,MAAM,GAAG,EAAE,CAAC;AAClB,EAAE,KAAK,IAAI,IAAI,IAAI,MAAM;AACzB,IAAI,IAAI,YAAY,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC;AACpE,MAAM,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;AAClC,EAAE,IAAI,MAAM,IAAI,IAAI,IAAI,mBAAmB;AAC3C,IAAI,KAAK,IAAI,IAAI,IAAI,mBAAmB,CAAC,MAAM,CAAC,EAAE;AAClD,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,YAAY,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC;AACtE,QAAQ,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;AACpC,KAAK;AACL,EAAE,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAKF,SAAS,oBAAoB,CAAC,MAAM,EAAE;AACtC,EAAE,MAAM,SAAS,GAAG,CAAC,KAAK,KAAK;AAC/B,IAAI,MAAM,EAAE,GAAG,KAAK,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,EAAE,MAAM,GAAG,SAAS,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;AAC9E,IAAI,MAAM,GAAG,GAAGA,mCAAkB,EAAE,CAAC;AACrC,IAAI,MAAM,SAAS,GAAGC,mBAAS,CAAC,QAAQ,CAAC,GAAG,QAAQ,mBAAmBC,cAAK,CAAC,aAAa,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;AACnH,IAAI,IAAI,GAAG,CAAC,MAAM,CAAC,EAAE;AACrB,MAAM,OAAOC,kBAAY,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;AAC7C,KAAK;AACL,IAAI,OAAO,IAAI,CAAC;AAChB,GAAG,CAAC;AACJ,EAAE,SAAS,CAAC,WAAW,GAAG,CAAC,2BAA2B,EAAEC,qBAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AAC7E,EAAE,OAAO,SAAS,CAAC;AACnB,CAAC;AACW,MAAC,cAAc,GAAG,oBAAoB,CAAC,QAAQ,EAAE;AACjD,MAAC,cAAc,GAAG,oBAAoB,CAAC,QAAQ,EAAE;AACjD,MAAC,YAAY,GAAG,oBAAoB,CAAC,MAAM;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Popover.js","sources":["../../src/Popover/Popover.tsx"],"sourcesContent":["import React from 'react';\nimport styled from 'styled-components';\nimport { Tooltip, TooltipProps } from '../Tooltip/Tooltip';\nimport { addColorAlpha } from '../utils/color';\n\ninterface WrapperProps {\n $width?: number;\n}\n\nconst PopoverWrapper = styled('div')<WrapperProps>`\n display: flex;\n flex-direction: column;\n ${({ $width }) => ($width ? `width: ${$width}px` : null)};\n`;\n\nconst PopoverTitle = styled.div`\n font-weight: 600;\n font-size: ${({ theme }) => theme.font.fontSizeBase};\n`;\n\nconst PopoverContent = styled.div`\n color: ${({ theme }) => addColorAlpha(theme.palette.background, 0.7)};\n`;\n\nexport interface PopoverProps extends TooltipProps {\n title?: string;\n width?: number;\n contentClassName?: string;\n}\n\nexport function Popover({\n title,\n children,\n maxWidth = '264px',\n width,\n interactive = true,\n content,\n contentClassName,\n ...rest\n}: PopoverProps) {\n const popContent = (\n <PopoverWrapper $width={width} className={contentClassName}>\n {title && <PopoverTitle>{title}</PopoverTitle>}\n <PopoverContent>{content}</PopoverContent>\n </PopoverWrapper>\n );\n\n return (\n <Tooltip {...rest} content={popContent} interactive={interactive} maxWidth={maxWidth}>\n {children}\n </Tooltip>\n );\n}\n\nPopover.displayName = '@kubed/components/Popover';\n"],"names":["styled","addColorAlpha","React","Tooltip"],"mappings":";;;;;;;;;;;;;;AAAA,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC;AACtC,IAAI,UAAU,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACzC,IAAI,iBAAiB,GAAG,MAAM,CAAC,yBAAyB,CAAC;AACzD,IAAI,mBAAmB,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACvD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC;AACnD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC;AACzD,IAAI,eAAe,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,KAAK,GAAG,IAAI,GAAG,GAAG,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAChK,IAAI,cAAc,GAAG,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ACjB,IAAI,SAAS,EAAE,gBAAgB;AAC/B,GAAG,EAAE,KAAK,oBAAoBA,cAAK,CAAC,aAAa,CAAC,YAAY,EAAE,IAAI,EAAE,KAAK,CAAC,kBAAkBA,cAAK,CAAC,aAAa,CAAC,cAAc,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;AAClJ,EAAE,uBAAuBA,cAAK,CAAC,aAAa,CAACC,eAAO,EAAE,aAAa,CAAC,cAAc,CAAC,EAAE,EAAE,IAAI,CAAC,EAAE;AAC9F,IAAI,OAAO,EAAE,UAAU;AACvB,IAAI,WAAW;AACf,IAAI,QAAQ;AACZ,GAAG,CAAC,EAAE,QAAQ,CAAC,CAAC;AAChB,CAAC;AACD,OAAO,CAAC,WAAW,GAAG,2BAA2B;;;;"}
1
+ {"version":3,"file":"Popover.js","sources":["../../src/Popover/Popover.tsx"],"sourcesContent":["import React from 'react';\nimport styled from 'styled-components';\nimport type { Props } from 'tippy.js';\nimport type { TooltipProps, TooltipInstance } from '../Tooltip/Tooltip';\nimport { Tooltip } from '../Tooltip/Tooltip';\nimport { addColorAlpha } from '../utils/color';\n\ninterface WrapperProps {\n $width?: number;\n}\n\nconst PopoverWrapper = styled('div')<WrapperProps>`\n display: flex;\n flex-direction: column;\n ${({ $width }) => ($width ? `width: ${$width}px` : null)};\n`;\n\nconst PopoverTitle = styled.div`\n font-weight: 600;\n font-size: ${({ theme }) => theme.font.fontSizeBase};\n`;\n\nconst PopoverContent = styled.div`\n color: ${({ theme }) => addColorAlpha(theme.palette.background, 0.7)};\n`;\n\nexport interface PopoverProps extends TooltipProps {\n title?: string;\n width?: number;\n contentClassName?: string;\n}\n\nexport type PopoverInstance<T = Props> = TooltipInstance<T>;\n\nexport function Popover({\n title,\n children,\n maxWidth = '264px',\n width,\n interactive = true,\n content,\n contentClassName,\n ...rest\n}: PopoverProps) {\n const popContent = (\n <PopoverWrapper $width={width} className={contentClassName}>\n {title && <PopoverTitle>{title}</PopoverTitle>}\n <PopoverContent>{content}</PopoverContent>\n </PopoverWrapper>\n );\n\n return (\n <Tooltip {...rest} content={popContent} interactive={interactive} maxWidth={maxWidth}>\n {children}\n </Tooltip>\n );\n}\n\nPopover.displayName = '@kubed/components/Popover';\n"],"names":["styled","addColorAlpha","React","Tooltip"],"mappings":";;;;;;;;;;;;;;AAAA,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC;AACtC,IAAI,UAAU,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACzC,IAAI,iBAAiB,GAAG,MAAM,CAAC,yBAAyB,CAAC;AACzD,IAAI,mBAAmB,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACvD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC;AACnD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC;AACzD,IAAI,eAAe,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,KAAK,GAAG,IAAI,GAAG,GAAG,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAChK,IAAI,cAAc,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK;AAC/B,EAAE,KAAK,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;AAChC,IAAI,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC;AAClC,MAAM,eAAe,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;AACxC,EAAE,IAAI,mBAAmB;AACzB,IAAI,KAAK,IAAI,IAAI,IAAI,mBAAmB,CAAC,CAAC,CAAC,EAAE;AAC7C,MAAM,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI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AE,QAAQ,CAAC,CAAC;AAChB,CAAC;AACD,OAAO,CAAC,WAAW,GAAG,2BAA2B;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.js","sources":["../../src/Tooltip/Tooltip.tsx"],"sourcesContent":["import React from 'react';\nimport { TippyProps } from '@tippyjs/react';\nimport { StyledTippy } from './Tooltip.styles';\n\nexport type BasePlacement = 'top' | 'left' | 'right' | 'bottom';\nexport type AutoPlacement = 'auto' | 'auto-start' | 'auto-end';\nexport type VariationPlacement =\n | 'top-start'\n | 'top-end'\n | 'bottom-start'\n | 'bottom-end'\n | 'right-start'\n | 'right-end'\n | 'left-start'\n | 'left-end';\n\nexport interface TooltipProps extends TippyProps {\n /** The element to append the tooltip to */\n appendTo?: 'parent' | Element | ((ref: Element) => Element);\n\n /** The react component to use as the trigger for the tooltip */\n children: React.ReactElement;\n\n /** Tooltip content */\n content?: React.ReactNode;\n\n /** Tooltip show or not (in controlled mode) */\n visible?: boolean;\n\n /** True to disable tooltip */\n disabled?: boolean;\n\n /** Delay in ms once a trigger event is fired before a Tooltip shows or hides */\n delay?: number | [number | null, number | null];\n\n /** Duration in ms of the transition animation */\n duration?: number | [number | null, number | null];\n\n /** Determines if the tooltip hides upon clicking the reference or outside of the tooltip */\n hideOnClick?: boolean | 'toggle';\n\n /** Determines if the tooltip has interactive content inside of it, so that it can be hovered over and clicked inside without hiding */\n interactive?: boolean;\n\n /** className of Tooltip */\n className?: string;\n\n /** Determines if the tooltip is shown once it gets created, respecting delay */\n showOnCreate?: boolean;\n\n /** Specifies the maximum width of the tooltip */\n maxWidth?: number | string;\n\n /** The preferred placement of the tooltip */\n placement?: AutoPlacement | BasePlacement | VariationPlacement;\n\n /** Determines the events that cause the tooltip to show. Multiple event names are separated by spaces */\n trigger?: string;\n}\n\nexport function Tooltip({\n children,\n content,\n maxWidth = 200,\n animation = 'shift-toward-subtle',\n ...rest\n}: TooltipProps) {\n return (\n // @ts-ignore\n <StyledTippy content={content} maxWidth={maxWidth} animation={animation} {...rest}>\n {children}\n </StyledTippy>\n );\n}\n\nTooltip.displayName = '@kubed/components/Tooltip';\n"],"names":["React","StyledTippy"],"mappings":";;;;;;;;;;;AAAA,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC;AACtC,IAAI,mBAAmB,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACvD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC;AACnD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC;AACzD,IAAI,eAAe,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,KAAK,GAAG,IAAI,GAAG,GAAG,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAChK,IAAI,cAAc,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK;AAC/B,EAAE,KAAK,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;AAChC,IAAI,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC;AAClC,MAAM,eAAe,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;AACxC,EAAE,IAAI,mBAAmB;AACzB,IAAI,KAAK,IAAI,IAAI,IAAI,mBAAmB,CAAC,CAAC,CAAC,EAAE;AAC7C,MAAM,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC;AACpC,QAAQ,eAAe,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;AAC1C,KAAK;AACL,EAAE,OAAO,CAAC,CAAC;AACX,CAAC,CAAC;AACF,IAAI,SAAS,GAAG,CAAC,MAA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B;;;;"}
1
+ {"version":3,"file":"Tooltip.js","sources":["../../src/Tooltip/Tooltip.tsx"],"sourcesContent":["import React from 'react';\nimport type { Instance, Props } from 'tippy.js';\nimport type { TippyProps } from '@tippyjs/react';\nimport { StyledTippy } from './Tooltip.styles';\n\nexport type BasePlacement = 'top' | 'left' | 'right' | 'bottom';\nexport type AutoPlacement = 'auto' | 'auto-start' | 'auto-end';\nexport type VariationPlacement =\n | 'top-start'\n | 'top-end'\n | 'bottom-start'\n | 'bottom-end'\n | 'right-start'\n | 'right-end'\n | 'left-start'\n | 'left-end';\n\nexport interface TooltipProps extends TippyProps {\n /** The element to append the tooltip to */\n appendTo?: 'parent' | Element | ((ref: Element) => Element);\n\n /** The react component to use as the trigger for the tooltip */\n children: React.ReactElement;\n\n /** Tooltip content */\n content?: React.ReactNode;\n\n /** Tooltip show or not (in controlled mode) */\n visible?: boolean;\n\n /** True to disable tooltip */\n disabled?: boolean;\n\n /** Delay in ms once a trigger event is fired before a Tooltip shows or hides */\n delay?: number | [number | null, number | null];\n\n /** Duration in ms of the transition animation */\n duration?: number | [number | null, number | null];\n\n /** Determines if the tooltip hides upon clicking the reference or outside of the tooltip */\n hideOnClick?: boolean | 'toggle';\n\n /** Determines if the tooltip has interactive content inside of it, so that it can be hovered over and clicked inside without hiding */\n interactive?: boolean;\n\n /** className of Tooltip */\n className?: string;\n\n /** Determines if the tooltip is shown once it gets created, respecting delay */\n showOnCreate?: boolean;\n\n /** Specifies the maximum width of the tooltip */\n maxWidth?: number | string;\n\n /** The preferred placement of the tooltip */\n placement?: AutoPlacement | BasePlacement | VariationPlacement;\n\n /** Determines the events that cause the tooltip to show. Multiple event names are separated by spaces */\n trigger?: string;\n}\n\nexport type TooltipInstance<T = Props> = Instance<T>;\n\nexport function Tooltip({\n children,\n content,\n maxWidth = 200,\n animation = 'shift-toward-subtle',\n ...rest\n}: TooltipProps) {\n return (\n // @ts-ignore\n <StyledTippy content={content} maxWidth={maxWidth} animation={animation} {...rest}>\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HANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var index=require("./ConfigProvider/index.js"),Button=require("./Button/Button.js"),Group=require("./Group/Group.js"),Container=require("./Container/Container.js"),Center=require("./Center/Center.js"),Row=require("./Grid/Row.js"),Navs=require("./Navs/Navs.js"),Snippet=require("./Snippet/Snippet.js"),Tabs=require("./Tabs/Tabs.js"),Text=require("./Text/Text.js"),Tooltip=require("./Tooltip/Tooltip.js"),Popover=require("./Popover/Popover.js"),Divider=require("./Divider/Divider.js"),Menu=require("./Menu/Menu.js"),StatusDot=require("./StatusDot/StatusDot.js"),Tag=require("./Tag/Tag.js"),Badge=require("./Badge/Badge.js"),Alert=require("./Alert/Alert.js"),Card=require("./Card/Card.js"),Descriptions=require("./Descriptions/Descriptions.js"),Entity=require("./Entity/Entity.js"),Dropdown=require("./Dropdown/Dropdown.js"),LoadingOverlay=require("./LoadingOverlay/LoadingOverlay.js"),Input=require("./Input/Input.js"),InputPassword=require("./InputPassword/InputPassword.js"),FilterInput=require("./FilterInput/FilterInput.js"),Textarea=require("./Textarea/Textarea.js"),Empty=require("./Empty/Empty.js"),Form=require("./Form/Form.js"),Select=require("./Select/Select.js"),Checkbox=require("./Checkbox/Checkbox.js"),Radio=require("./Radio/Radio.js"),Switch=require("./Switch/Switch.js"),InputNumber=require("./InputNumber/InputNumber.js"),DatePicker=require("./DatePicker/DatePicker.js"),Banner=require("./Banner/Banner.js"),Notify=require("./Notify/Notify.js"),AutoComplete=require("./AutoComplete/AutoComplete.js"),ActionConfirm=require("./ActionConfirm/ActionConfirm.js"),Progress=require("./Progress/Progress.js"),color=require("./utils/color.js"),Steps=require("./Steps/Steps.js"),TypeSelect=require("./TypeSelect/TypeSelect.js"),ShowMore=require("./ShowMore/ShowMore.js"),Loading=require("./Loading/Loading.js"),TimePicker=require("./TimePicker/TimePicker.js"),Drawer=require("./Drawer/Drawer.js"),Collapse=require("./Collapse/Collapse.js"),forwardRef=require("./utils/forwardRef.js"),toArray=require("./utils/toArray.js"),useForm=require("./Form/hooks/useForm.js"),CssBaseline=require("./theme/CssBaseline.js"),ThemeContext=require("./theme/ThemeContext.js"),utils=require("./theme/utils.js"),Col=require("./Grid/Col.js"),Tab=require("./Tabs/Tab/Tab.js"),MenuItem=require("./Menu/MenuItem/MenuItem.js"),MenuLabel=require("./Menu/MenuLabel/MenuLabel.js"),BadgeAnchor=require("./Badge/BadgeAnchor.js"),Description=require("./Descriptions/Description.js"),Field=require("./Entity/Field.js"),FieldForm=require("rc-field-form"),FormItem=require("./Form/FormItem/FormItem.js"),Modal=require("./Modal/Modal.js"),ModalContext=require("./Modal/ModalProvider/ModalContext.js"),CheckboxGroup=require("./Checkbox/CheckboxGroup.js"),RadioGroup=require("./Radio/RadioGroup.js"),BannerTip=require("./Banner/BannerTip.js"),toast=require("react-hot-toast"),Slider=require("./Slider/Slider/Slider.js"),RangeSlider=require("./Slider/RangeSlider/RangeSlider.js"),Step=require("./Steps/Step/Step.js"),StepCompleted=require("./Steps/StepCompleted/StepCompleted.js"),TabStep=require("./Steps/TabStep/TabStep.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e.default:e}var toast__default=_interopDefaultLegacy(toast);exports.KubedConfigProvider=index.KubedConfigProvider,exports.Button=Button.Button,exports.Group=Group.Group,exports.Container=Container.Container,exports.sizes=Container.sizes,exports.Center=Center.Center,exports.Row=Row.Row,exports.Navs=Navs.Navs,exports.Snippet=Snippet.Snippet,exports.Tabs=Tabs.Tabs,exports.Text=Text.Text,exports.Tooltip=Tooltip.Tooltip,exports.Popover=Popover.Popover,exports.Divider=Divider.Divider,exports.Menu=Menu.Menu,exports.StatusDot=StatusDot.StatusDot,exports.Tag=Tag.Tag,exports.Badge=Badge.Badge,exports.Alert=Alert.Alert,exports.Card=Card.Card,exports.Descriptions=Descriptions.Descriptions,exports.Entity=Entity.Entity,exports.Dropdown=Dropdown.Dropdown,exports.LoadingOverlay=LoadingOverlay.LoadingOverlay,exports.Input=Input.Input,exports.fixControlledValue=Input.fixControlledValue,exports.InputPassword=InputPassword.InputPassword,exports.FilterInput=FilterInput.FilterInput,exports.Textarea=Textarea.Textarea,exports.Empty=Empty.Empty,exports.Form=Form.Form,exports.Select=Select.Select,exports.Checkbox=Checkbox.Checkbox,exports.Radio=Radio.Radio,exports.Switch=Switch.Switch,exports.InputNumber=InputNumber.InputNumber,exports.DatePicker=DatePicker.DatePicker,exports.Banner=Banner.Banner,exports.Notify=Notify.Notify,exports.AutoComplete=AutoComplete.AutoComplete,exports.ActionConfirm=ActionConfirm.ActionConfirm,exports.Progress=Progress.Progress,exports.addColorAlpha=color.addColorAlpha,exports.colorToRgbValues=color.colorToRgbValues,exports.Steps=Steps.Steps,exports.TypeSelect=TypeSelect.TypeSelect,exports.ShowMore=ShowMore.ShowMore,exports.Loading=Loading.Loading,exports.TimePicker=TimePicker.default,exports.Drawer=Drawer.default,exports.Collapse=Collapse.default,exports.forwardRef=forwardRef.default,exports.toArray=toArray.default,exports.useForm=useForm.default,exports.CssBaseline=CssBaseline.default,exports.useTheme=ThemeContext.useTheme,exports.themeUtils=utils.default,exports.Col=Col.Col,exports.Tab=Tab.Tab,exports.MenuItem=MenuItem.MenuItem,exports.MenuLabel=MenuLabel.MenuLabel,exports.BadgeAnchor=BadgeAnchor.BadgeAnchor,exports.Description=Description.Description,exports.Field=Field.Field,exports.FormList=FieldForm.List,exports.useWatch=FieldForm.useWatch,exports.FormItem=FormItem.FormItem,exports.Modal=Modal.Modal,exports.useModal=ModalContext.useModal,exports.CheckboxGroup=CheckboxGroup.CheckboxGroup,exports.RadioGroup=RadioGroup.RadioGroup,exports.BannerTip=BannerTip.BannerTip,exports.notify=toast__default,exports.Slider=Slider.Slider,exports.RangeSlider=RangeSlider.RangeSlider,exports.Step=Step.Step,exports.StepCompleted=StepCompleted.StepCompleted,exports.TabStep=TabStep.TabStep;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var index=require("./ConfigProvider/index.js"),Button=require("./Button/Button.js"),Group=require("./Group/Group.js"),Container=require("./Container/Container.js"),Center=require("./Center/Center.js"),Row=require("./Grid/Row.js"),Navs=require("./Navs/Navs.js"),Snippet=require("./Snippet/Snippet.js"),Tabs=require("./Tabs/Tabs.js"),Text=require("./Text/Text.js"),Tooltip=require("./Tooltip/Tooltip.js"),Popover=require("./Popover/Popover.js"),Divider=require("./Divider/Divider.js"),Menu=require("./Menu/Menu.js"),StatusDot=require("./StatusDot/StatusDot.js"),Tag=require("./Tag/Tag.js"),Badge=require("./Badge/Badge.js"),Alert=require("./Alert/Alert.js"),Card=require("./Card/Card.js"),Descriptions=require("./Descriptions/Descriptions.js"),Entity=require("./Entity/Entity.js"),Dropdown=require("./Dropdown/Dropdown.js"),LoadingOverlay=require("./LoadingOverlay/LoadingOverlay.js"),Input=require("./Input/Input.js"),InputPassword=require("./InputPassword/InputPassword.js"),FilterInput=require("./FilterInput/FilterInput.js"),Textarea=require("./Textarea/Textarea.js"),Empty=require("./Empty/Empty.js"),Form=require("./Form/Form.js"),Select=require("./Select/Select.js"),Checkbox=require("./Checkbox/Checkbox.js"),Radio=require("./Radio/Radio.js"),Switch=require("./Switch/Switch.js"),InputNumber=require("./InputNumber/InputNumber.js"),DatePicker=require("./DatePicker/DatePicker.js"),Banner=require("./Banner/Banner.js"),Notify=require("./Notify/Notify.js"),AutoComplete=require("./AutoComplete/AutoComplete.js"),ActionConfirm=require("./ActionConfirm/ActionConfirm.js"),Progress=require("./Progress/Progress.js"),color=require("./utils/color.js"),Steps=require("./Steps/Steps.js"),TypeSelect=require("./TypeSelect/TypeSelect.js"),ShowMore=require("./ShowMore/ShowMore.js"),Dropzone=require("./Dropzone/Dropzone.js"),Loading=require("./Loading/Loading.js"),TimePicker=require("./TimePicker/TimePicker.js"),Drawer=require("./Drawer/Drawer.js"),Collapse=require("./Collapse/Collapse.js"),forwardRef=require("./utils/forwardRef.js"),toArray=require("./utils/toArray.js"),useForm=require("./Form/hooks/useForm.js"),CssBaseline=require("./theme/CssBaseline.js"),ThemeContext=require("./theme/ThemeContext.js"),utils=require("./theme/utils.js"),Col=require("./Grid/Col.js"),Tab=require("./Tabs/Tab/Tab.js"),MenuItem=require("./Menu/MenuItem/MenuItem.js"),MenuLabel=require("./Menu/MenuLabel/MenuLabel.js"),BadgeAnchor=require("./Badge/BadgeAnchor.js"),Description=require("./Descriptions/Description.js"),Field=require("./Entity/Field.js"),FieldForm=require("rc-field-form"),FormItem=require("./Form/FormItem/FormItem.js"),Modal=require("./Modal/Modal.js"),ModalContext=require("./Modal/ModalProvider/ModalContext.js"),CheckboxGroup=require("./Checkbox/CheckboxGroup.js"),RadioGroup=require("./Radio/RadioGroup.js"),BannerTip=require("./Banner/BannerTip.js"),toast=require("react-hot-toast"),Slider=require("./Slider/Slider/Slider.js"),RangeSlider=require("./Slider/RangeSlider/RangeSlider.js"),Step=require("./Steps/Step/Step.js"),StepCompleted=require("./Steps/StepCompleted/StepCompleted.js"),TabStep=require("./Steps/TabStep/TabStep.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e.default:e}var toast__default=_interopDefaultLegacy(toast);exports.KubedConfigProvider=index.KubedConfigProvider,exports.Button=Button.Button,exports.Group=Group.Group,exports.Container=Container.Container,exports.sizes=Container.sizes,exports.Center=Center.Center,exports.Row=Row.Row,exports.Navs=Navs.Navs,exports.Snippet=Snippet.Snippet,exports.Tabs=Tabs.Tabs,exports.Text=Text.Text,exports.Tooltip=Tooltip.Tooltip,exports.Popover=Popover.Popover,exports.Divider=Divider.Divider,exports.Menu=Menu.Menu,exports.StatusDot=StatusDot.StatusDot,exports.Tag=Tag.Tag,exports.Badge=Badge.Badge,exports.Alert=Alert.Alert,exports.Card=Card.Card,exports.Descriptions=Descriptions.Descriptions,exports.Entity=Entity.Entity,exports.Dropdown=Dropdown.Dropdown,exports.LoadingOverlay=LoadingOverlay.LoadingOverlay,exports.Input=Input.Input,exports.fixControlledValue=Input.fixControlledValue,exports.InputPassword=InputPassword.InputPassword,exports.FilterInput=FilterInput.FilterInput,exports.Textarea=Textarea.Textarea,exports.Empty=Empty.Empty,exports.Form=Form.Form,exports.Select=Select.Select,exports.Checkbox=Checkbox.Checkbox,exports.Radio=Radio.Radio,exports.Switch=Switch.Switch,exports.InputNumber=InputNumber.InputNumber,exports.DatePicker=DatePicker.DatePicker,exports.Banner=Banner.Banner,exports.Notify=Notify.Notify,exports.AutoComplete=AutoComplete.AutoComplete,exports.ActionConfirm=ActionConfirm.ActionConfirm,exports.Progress=Progress.Progress,exports.addColorAlpha=color.addColorAlpha,exports.colorToRgbValues=color.colorToRgbValues,exports.Steps=Steps.Steps,exports.TypeSelect=TypeSelect.TypeSelect,exports.ShowMore=ShowMore.ShowMore,exports.Dropzone=Dropzone.Dropzone,exports._Dropzone=Dropzone._Dropzone,exports.Loading=Loading.Loading,exports.TimePicker=TimePicker.default,exports.Drawer=Drawer.default,exports.Collapse=Collapse.default,exports.forwardRef=forwardRef.default,exports.toArray=toArray.default,exports.useForm=useForm.default,exports.CssBaseline=CssBaseline.default,exports.useTheme=ThemeContext.useTheme,exports.themeUtils=utils.default,exports.Col=Col.Col,exports.Tab=Tab.Tab,exports.MenuItem=MenuItem.MenuItem,exports.MenuLabel=MenuLabel.MenuLabel,exports.BadgeAnchor=BadgeAnchor.BadgeAnchor,exports.Description=Description.Description,exports.Field=Field.Field,exports.FormList=FieldForm.List,exports.useWatch=FieldForm.useWatch,exports.FormItem=FormItem.FormItem,exports.Modal=Modal.Modal,exports.useModal=ModalContext.useModal,exports.CheckboxGroup=CheckboxGroup.CheckboxGroup,exports.RadioGroup=RadioGroup.RadioGroup,exports.BannerTip=BannerTip.BannerTip,exports.notify=toast__default,exports.Slider=Slider.Slider,exports.RangeSlider=RangeSlider.RangeSlider,exports.Step=Step.Step,exports.StepCompleted=StepCompleted.StepCompleted,exports.TabStep=TabStep.TabStep;
2
2
  //# sourceMappingURL=index.js.map
package/cjs/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e.default:e}var React__default=_interopDefaultLegacy(React);function createSafeContext(e){const r=React.createContext(null);return[({children:t,value:n})=>React__default.createElement(r.Provider,{value:n},t),()=>{const t=React.useContext(r);if(t===null)throw new Error(e);return t}]}exports.createSafeContext=createSafeContext;
2
+ //# sourceMappingURL=createSafeContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createSafeContext.js","sources":["../../src/utils/createSafeContext.tsx"],"sourcesContent":["import React, { createContext, useContext } from 'react';\n\nexport function createSafeContext<ContextValue>(errorMessage: string) {\n const Context = createContext<ContextValue | null>(null);\n\n const useSafeContext = () => {\n const ctx = useContext(Context);\n\n if (ctx === null) {\n throw new Error(errorMessage);\n }\n\n return ctx;\n };\n\n const Provider = ({ children, value }: { value: ContextValue; children: React.ReactNode }) => (\n <Context.Provider value={value}>{children}</Context.Provider>\n );\n\n return [Provider, useSafeContext] as const;\n}\n"],"names":["createContext","useContext","React"],"mappings":";;;;;;;;;;AACO,SAAS,iBAAiB,CAAC,YAAY,EAAE;AAChD,EAAE,MAAM,OAAO,GAAGA,mBAAa,CAAC,IAAI,CAAC,CAAC;AACtC,EAAE,MAAM,cAAc,GAAG,MAAM;AAC/B,IAAI,MAAM,GAAG,GAAGC,gBAAU,CAAC,OAAO,CAAC,CAAC;AACpC,IAAI,IAAI,GAAG,KAAK,IAAI,EAAE;AACtB,MAAM,MAAM,IAAI,KAAK,CAAC,YAAY,CAAC,CAAC;AACpC,KAAK;AACL,IAAI,OAAO,GAAG,CAAC;AACf,GAAG,CAAC;AACJ,EAAE,MAAM,QAAQ,GAAG,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,qBAAqBC,cAAK,CAAC,aAAa,CAAC,OAAO,CAAC,QAAQ,EAAE;AAClG,IAAI,KAAK;AACT,GAAG,EAAE,QAAQ,CAAC,CAAC;AACf,EAAE,OAAO,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;AACpC;;;;"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e.default:e}var React__default=_interopDefaultLegacy(React);function isElement(e){return Array.isArray(e)||e===null?!1:typeof e=="object"?e.type!==React__default.Fragment:!1}exports.isElement=isElement;
2
+ //# sourceMappingURL=isElement.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isElement.js","sources":["../../src/utils/isElement.ts"],"sourcesContent":["import React from 'react';\n\nexport function isElement(value: any): value is React.ReactElement {\n if (Array.isArray(value) || value === null) {\n return false;\n }\n\n if (typeof value === 'object') {\n if (value.type === React.Fragment) {\n return false;\n }\n\n return true;\n }\n\n return false;\n}\n"],"names":["React"],"mappings":";;;;;;;;;;AACO,SAAS,SAAS,CAAC,KAAK,EAAE;AACjC,EAAE,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,KAAK,IAAI,EAAE;AAC9C,IAAI,OAAO,KAAK,CAAC;AACjB,GAAG;AACH,EAAE,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AACjC,IAAI,IAAI,KAAK,CAAC,IAAI,KAAKA,cAAK,CAAC,QAAQ,EAAE;AACvC,MAAM,OAAO,KAAK,CAAC;AACnB,KAAK;AACL,IAAI,OAAO,IAAI,CAAC;AAChB,GAAG;AACH,EAAE,OAAO,KAAK,CAAC;AACf;;;;"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});function upperFirst(e){return typeof e!="string"?"":e.charAt(0).toUpperCase()+e.slice(1)}exports.upperFirst=upperFirst;
2
+ //# sourceMappingURL=upperFirst.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"upperFirst.js","sources":["../../src/utils/upperFirst.ts"],"sourcesContent":["export function upperFirst(value: string) {\n return typeof value !== 'string' ? '' : value.charAt(0).toUpperCase() + value.slice(1);\n}\n"],"names":[],"mappings":";;;;AAAO,SAAS,UAAU,CAAC,KAAK,EAAE;AAClC,EAAE,OAAO,OAAO,KAAK,KAAK,QAAQ,GAAG,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACzF;;;;"}
@@ -0,0 +1,2 @@
1
+ import{createSafeContext as e}from"../utils/createSafeContext.js";const[o,t]=e("Dropzone component was not found in tree");export{o as DropzoneProvider,t as useDropzoneContext};
2
+ //# sourceMappingURL=Dropzone.context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dropzone.context.js","sources":["../../src/Dropzone/Dropzone.context.ts"],"sourcesContent":["import { createSafeContext } from '../utils/createSafeContext';\n\nexport interface DropzoneContextValue {\n idle: boolean;\n accept: boolean;\n reject: boolean;\n}\n\nexport const [DropzoneProvider, useDropzoneContext] = createSafeContext<DropzoneContextValue>(\n 'Dropzone component was not found in tree'\n);\n"],"names":[],"mappings":";;AACY,MAAC,CAAC,gBAAgB,EAAE,kBAAkB,CAAC,GAAG,iBAAiB,CAAC,0CAA0C;;;;"}
@@ -0,0 +1,2 @@
1
+ import n from"react";import{useDropzone as Q}from"react-dropzone";import{assignRef as T}from"@kubed/hooks";import{LoadingOverlay as U}from"../LoadingOverlay/LoadingOverlay.js";import{DropzoneProvider as X}from"./Dropzone.context.js";import{DropzoneAccept as Y,DropzoneReject as Z,DropzoneIdle as $}from"./DropzoneStatus.js";import{DropzoneWrapper as ee,DropzoneInner as re}from"./Dropzone.styles.js";var oe=Object.defineProperty,ae=Object.defineProperties,te=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertySymbols,g=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,f=(e,r,o)=>r in e?oe(e,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[r]=o,i=(e,r)=>{for(var o in r||(r={}))g.call(r,o)&&f(e,o,r[o]);if(l)for(var o of l(r))u.call(r,o)&&f(e,o,r[o]);return e},m=(e,r)=>ae(e,te(r)),ne=(e,r)=>{var o={};for(var a in e)g.call(e,a)&&r.indexOf(a)<0&&(o[a]=e[a]);if(e!=null&&l)for(var a of l(e))r.indexOf(a)<0&&u.call(e,a)&&(o[a]=e[a]);return o};function t(e){const r=e,{className:o,padding:a,radius:le,disabled:O,classNames:pe,styles:ce,loading:p=!1,multiple:_=!0,maxSize:y=1/0,accept:c,children:b,onDropAny:j,onDrop:z,onReject:P,openRef:E,name:F,maxFiles:A,autoFocus:R,activateOnClick:I=!0,activateOnDrag:w=!0,dragEventsBubbling:x=!0,activateOnKeyboard:h=!0,onDragEnter:N,onDragLeave:C,onDragOver:L,onFileDialogCancel:S,onFileDialogOpen:k,preventDropOnDocument:B,useFsAccessApi:K=!0,getFilesFromEvent:v,validator:V}=r,W=ne(r,["className","padding","radius","disabled","classNames","styles","loading","multiple","maxSize","accept","children","onDropAny","onDrop","onReject","openRef","name","maxFiles","autoFocus","activateOnClick","activateOnDrag","dragEventsBubbling","activateOnKeyboard","onDragEnter","onDragLeave","onDragOver","onFileDialogCancel","onFileDialogOpen","preventDropOnDocument","useFsAccessApi","getFilesFromEvent","validator"]),{getRootProps:q,getInputProps:G,isDragAccept:s,isDragReject:d,open:H}=Q(i({onDrop:j,onDropAccepted:z,onDropRejected:P,disabled:O||p,accept:Array.isArray(c)?c.reduce((J,M)=>m(i({},J),{[M]:[]}),{}):c,multiple:_,maxSize:y,maxFiles:A,autoFocus:R,noClick:!I,noDrag:!w,noDragEventsBubbling:!x,noKeyboard:!h,onDragEnter:N,onDragLeave:C,onDragOver:L,onFileDialogCancel:S,onFileDialogOpen:k,preventDropOnDocument:B,useFsAccessApi:K,validator:V},v?{getFilesFromEvent:v}:null));T(E,H);const D=!s&&!d;return n.createElement(X,{value:{accept:s,reject:d,idle:D}},n.createElement(ee,m(i(i({},W),q()),{"data-accept":s||void 0,"data-reject":d||void 0,"data-idle":D||void 0,"data-loading":p||void 0,className:o}),n.createElement(U,{visible:p}),n.createElement("input",m(i({},G()),{name:F})),n.createElement(re,null,b)))}t.displayName="@mantine/dropzone/Dropzone",t.Accept=Y,t.Reject=Z,t.Idle=$;const ie=t;export{ie as Dropzone,t as _Dropzone};
2
+ //# sourceMappingURL=Dropzone.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dropzone.js","sources":["../../src/Dropzone/Dropzone.tsx"],"sourcesContent":["import React from 'react';\nimport {\n useDropzone,\n FileRejection,\n Accept,\n FileWithPath,\n DropEvent,\n FileError,\n} from 'react-dropzone';\nimport { assignRef } from '@kubed/hooks';\n\nimport { ForwardRefWithStaticComponents } from '../utils/ForwardRefWithStaticComponents';\nimport { LoadingOverlay } from '../LoadingOverlay/LoadingOverlay';\nimport { DefaultProps, KubedNumberSize } from '../theme';\nimport { DropzoneProvider } from './Dropzone.context';\nimport { DropzoneAccept, DropzoneIdle, DropzoneReject } from './DropzoneStatus';\n\nimport { DropzoneWrapper, DropzoneInner } from './Dropzone.styles';\n\nexport interface DropzoneProps\n extends DefaultProps,\n Omit<React.ComponentPropsWithRef<'div'>, 'onDrop'> {\n /** Padding from theme.spacing, or number to set padding in px */\n padding?: KubedNumberSize;\n\n /** Border radius from theme.radius or number to set border-radius in px */\n radius?: KubedNumberSize;\n\n /** Dropzone statues */\n children: React.ReactNode;\n\n /** Disable files capturing */\n disabled?: boolean;\n\n /** Called when any files are dropped into dropzone */\n onDropAny?(files: FileWithPath[], fileRejections: FileRejection[]): void;\n\n /** Called when valid files are dropped into dropzone */\n onDrop(files: FileWithPath[]): void;\n\n /** Called when selected files don't meet file restrictions */\n onReject?(fileRejections: FileRejection[]): void;\n\n /** Display loading overlay over dropzone */\n loading?: boolean;\n\n /** File types to accept */\n accept?: Accept | string[];\n\n /** Get open function as ref */\n openRef?: React.ForwardedRef<() => void | undefined>;\n\n /** Allow selection of multiple files */\n multiple?: boolean;\n\n /** Set maximum file size in bytes */\n maxSize?: number;\n\n /** Name of the form control. Submitted with the form as part of a name/value pair. */\n name?: string;\n\n /** Number of files that user can pick */\n maxFiles?: number;\n\n /** Set to true to autofocus the root element */\n autoFocus?: boolean;\n\n /** If false, disables click to open the native file selection dialog */\n activateOnClick?: boolean;\n\n /** If false, disables drag 'n' drop */\n activateOnDrag?: boolean;\n\n /** If false, disables Space/Enter to open the native file selection dialog. Note that it also stops tracking the focus state. */\n activateOnKeyboard?: boolean;\n\n /** If false, stops drag event propagation to parents */\n dragEventsBubbling?: boolean;\n\n /** Called when the `dragenter` event occurs */\n onDragEnter?(event: React.DragEvent<HTMLElement>): void;\n\n /** Called when the `dragleave` event occurs */\n onDragLeave?(event: React.DragEvent<HTMLElement>): void;\n\n /** Called when the `dragover` event occurs */\n onDragOver?(event: React.DragEvent<HTMLElement>): void;\n\n /** Called when user closes the file selection dialog with no selection */\n onFileDialogCancel?(): void;\n\n /** Called when user opens the file selection dialog */\n onFileDialogOpen?(): void;\n\n /** If false, allow dropped items to take over the current browser window */\n preventDropOnDocument?: boolean;\n\n /** Set to true to use the File System Access API to open the file picker instead of using an <input type=\"file\"> click event, defaults to true */\n useFsAccessApi?: boolean;\n\n /** Use this to provide a custom file aggregator */\n getFilesFromEvent?: (event: DropEvent) => Promise<Array<File | DataTransferItem>>;\n\n /** Custom validation function. It must return null if there's no errors. */\n validator?: <T extends File>(file: T) => FileError | FileError[] | null;\n}\n\nexport function _Dropzone(props: DropzoneProps) {\n const {\n className,\n padding,\n radius,\n disabled,\n classNames,\n styles,\n loading = false,\n multiple = true,\n maxSize = Infinity,\n accept,\n children,\n onDropAny,\n onDrop,\n onReject,\n openRef,\n name,\n // unstyled,\n maxFiles,\n autoFocus,\n activateOnClick = true,\n activateOnDrag = true,\n dragEventsBubbling = true,\n activateOnKeyboard = true,\n onDragEnter,\n onDragLeave,\n onDragOver,\n onFileDialogCancel,\n onFileDialogOpen,\n preventDropOnDocument,\n useFsAccessApi = true,\n getFilesFromEvent,\n validator,\n ...others\n } = props;\n\n const { getRootProps, getInputProps, isDragAccept, isDragReject, open } = useDropzone({\n onDrop: onDropAny,\n onDropAccepted: onDrop,\n onDropRejected: onReject,\n disabled: disabled || loading,\n accept: Array.isArray(accept) ? accept.reduce((r, key) => ({ ...r, [key]: [] }), {}) : accept,\n multiple,\n maxSize,\n maxFiles,\n autoFocus,\n noClick: !activateOnClick,\n noDrag: !activateOnDrag,\n noDragEventsBubbling: !dragEventsBubbling,\n noKeyboard: !activateOnKeyboard,\n onDragEnter,\n onDragLeave,\n onDragOver,\n onFileDialogCancel,\n onFileDialogOpen,\n preventDropOnDocument,\n useFsAccessApi,\n validator,\n ...(getFilesFromEvent ? { getFilesFromEvent } : null),\n });\n\n assignRef(openRef, open);\n const isIdle = !isDragAccept && !isDragReject;\n\n return (\n <DropzoneProvider value={{ accept: isDragAccept, reject: isDragReject, idle: isIdle }}>\n <DropzoneWrapper\n {...others}\n {...getRootProps()}\n data-accept={isDragAccept || undefined}\n data-reject={isDragReject || undefined}\n data-idle={isIdle || undefined}\n data-loading={loading || undefined}\n className={className}\n >\n <LoadingOverlay visible={loading} />\n <input {...getInputProps()} name={name} />\n <DropzoneInner>{children}</DropzoneInner>\n </DropzoneWrapper>\n </DropzoneProvider>\n );\n}\n\n_Dropzone.displayName = '@mantine/dropzone/Dropzone';\n_Dropzone.Accept = DropzoneAccept;\n_Dropzone.Reject = DropzoneReject;\n_Dropzone.Idle = DropzoneIdle;\n\nexport const Dropzone: ForwardRefWithStaticComponents<\n DropzoneProps,\n {\n Accept: typeof DropzoneAccept;\n Reject: typeof DropzoneReject;\n Idle: typeof DropzoneIdle;\n }\n> = _Dropzone as any;\n"],"names":["React"],"mappings":";;;;;;;;AAAA,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC;AACtC,IAAI,UAAU,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACzC,IAAI,iBAAiB,GAAG,MAAM,CAAC,yBAAyB,CAAC;AACzD,IAAI,mBAAmB,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACvD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC;AACnD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC;AACzD,IAAI,eAAe,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,KAAK,GAAG,IAAI,GAAG,GAAG,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAChK,IAAI,cAAc,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK;AAC/B,EAAE,KAAK,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;AAChC,IAAI,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC;AAClC,MAAM,eAAe,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAA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AE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE;AACvE,GAAG,kBAAkBA,cAAK,CAAC,aAAa,CAAC,eAAe,EAAE,aAAa,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,EAAE,MAAM,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE;AACpI,IAAI,aAAa,EAAE,YAAY,IAAI,KAAK,CAAC;AACzC,IAAI,aAAa,EAAE,YAAY,IAAI,KAAK,CAAC;AACzC,IAAI,WAAW,EAAE,MAAM,IAAI,KAAK,CAAC;AACjC,IAAI,cAAc,EAAE,OAAO,IAAI,KAAK,CAAC;AACrC,IAAI,SAAS;AACb,GAAG,CAAC,kBAAkBA,cAAK,CAAC,aAAa,CAAC,cAAc,EAAE;AAC1D,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG,CAAC,kBAAkBA,cAAK,CAAC,aAAa,CAAC,OAAO,EAAE,aAAa,CAAC,cAAc,CAAC,EAAE,EAAE,aAAa,EAAE,CAAC,EAAE;AACtG,IAAI,IAAI;AACR,GAAG,CAAC,CAAC,kBAAkBA,cAAK,CAAC,aAAa,CAAC,aAAa,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC;AAC5E,CAAC;AACD,SAAS,CAAC,WAAW,GAAG,4BAA4B,CAAC;AACrD,SAAS,CAAC,MAAM,GAAG,cAAc,CAAC;AAClC,SAAS,CAAC,MAAM,GAAG,cAAc,CAAC;AAClC,SAAS,CAAC,IAAI,GAAG,YAAY,CAAC;AAClB,MAAC,QAAQ,GAAG;;;;"}
@@ -0,0 +1,14 @@
1
+ import e from"styled-components";const r=e.div`
2
+ box-sizing: border-box;
3
+ cursor: pointer;
4
+ user-select: none;
5
+ position: relative;
6
+ transition: background-color 150ms ease;
7
+ border: 2px dashed ${({theme:o})=>o.palette.border};
8
+ border-radius: 4px;
9
+ padding: 16px;
10
+ `,n=e.div`
11
+ pointer-events: none;
12
+ user-select: none;
13
+ `;export{n as DropzoneInner,r as DropzoneWrapper};
14
+ //# sourceMappingURL=Dropzone.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dropzone.styles.js","sources":["../../src/Dropzone/Dropzone.styles.ts"],"sourcesContent":["import styled from 'styled-components';\n\nexport const DropzoneWrapper = styled.div`\n box-sizing: border-box;\n cursor: pointer;\n user-select: none;\n position: relative;\n transition: background-color 150ms ease;\n border: 2px dashed ${({ theme }) => theme.palette.border};\n border-radius: 4px;\n padding: 16px;\n`;\n\nexport const DropzoneInner = styled.div`\n pointer-events: none;\n user-select: none;\n`;\n"],"names":[],"mappings":";;AACY,MAAC,eAAe,GAAG,MAAM,CAAC,GAAG,CAAC;AAC1C;AACA;AACA;AACA;AACA;AACA,qBAAqB,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;AAC3D;AACA;AACA,EAAE;AACU,MAAC,aAAa,GAAG,MAAM,CAAC,GAAG,CAAC;AACxC;AACA;AACA;;;;"}
@@ -0,0 +1,2 @@
1
+ import s,{cloneElement as m}from"react";import{isElement as f}from"../utils/isElement.js";import{upperFirst as _}from"../utils/upperFirst.js";import{useDropzoneContext as u}from"./Dropzone.context.js";var l=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable,O=(t,r)=>{var n={};for(var e in t)d.call(t,e)&&r.indexOf(e)<0&&(n[e]=t[e]);if(t!=null&&l)for(var e of l(t))r.indexOf(e)<0&&j.call(t,e)&&(n[e]=t[e]);return n};function p(t){const r=n=>{const e=n,{children:o}=e,a=O(e,["children"]),c=u(),i=f(o)?o:s.createElement("span",null,o);return c[t]?m(i,a):null};return r.displayName=`@kubed/components/Dropzone/${_(t)}`,r}const b=p("accept"),y=p("reject"),v=p("idle");export{b as DropzoneAccept,v as DropzoneIdle,y as DropzoneReject};
2
+ //# sourceMappingURL=DropzoneStatus.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DropzoneStatus.js","sources":["../../src/Dropzone/DropzoneStatus.tsx"],"sourcesContent":["import React, { cloneElement } from 'react';\nimport { isElement } from '../utils/isElement';\nimport { upperFirst } from '../utils/upperFirst';\nimport { DropzoneContextValue, useDropzoneContext } from './Dropzone.context';\n\nexport interface DropzoneStatusProps {\n // eslint-disable-next-line react/no-unused-prop-types\n children: React.ReactNode;\n}\n\nfunction createDropzoneStatus(status: keyof DropzoneContextValue) {\n const Component = (props: DropzoneStatusProps): JSX.Element => {\n const { children, ...others } = props;\n\n const ctx = useDropzoneContext();\n const _children = isElement(children) ? children : <span>{children}</span>;\n\n if (ctx[status]) {\n return cloneElement(_children, others);\n }\n\n return null;\n };\n\n Component.displayName = `@kubed/components/Dropzone/${upperFirst(status)}`;\n\n return Component;\n}\n\nexport const DropzoneAccept = createDropzoneStatus('accept');\nexport const DropzoneReject = createDropzoneStatus('reject');\nexport const DropzoneIdle = createDropzoneStatus('idle');\n\nexport type DropzoneAcceptProps = DropzoneStatusProps;\nexport type DropzoneRejectProps = DropzoneStatusProps;\nexport type DropzoneIdleProps = DropzoneStatusProps;\n"],"names":["React"],"mappings":";;;;;AAAA,IAAI,mBAAmB,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACvD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC;AACnD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC;AACzD,IAAI,SAAS,GAAG,CAAC,MAAM,EAAE,OAAO,KAAK;AACrC,EAAE,IAAI,MAAM,GAAG,EAAE,CAAC;AAClB,EAAE,KAAK,IAAI,IAAI,IAAI,MAAM;AACzB,IAAI,IAAI,YAAY,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC;AACpE,MAAM,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;AA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GAAG,oBAAoB,CAAC,MAAM;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Popover.js","sources":["../../src/Popover/Popover.tsx"],"sourcesContent":["import React from 'react';\nimport styled from 'styled-components';\nimport { Tooltip, TooltipProps } from '../Tooltip/Tooltip';\nimport { addColorAlpha } from '../utils/color';\n\ninterface WrapperProps {\n $width?: number;\n}\n\nconst PopoverWrapper = styled('div')<WrapperProps>`\n display: flex;\n flex-direction: column;\n ${({ $width }) => ($width ? `width: ${$width}px` : null)};\n`;\n\nconst PopoverTitle = styled.div`\n font-weight: 600;\n font-size: ${({ theme }) => theme.font.fontSizeBase};\n`;\n\nconst PopoverContent = styled.div`\n color: ${({ theme }) => addColorAlpha(theme.palette.background, 0.7)};\n`;\n\nexport interface PopoverProps extends TooltipProps {\n title?: string;\n width?: number;\n contentClassName?: string;\n}\n\nexport function Popover({\n title,\n children,\n maxWidth = '264px',\n width,\n interactive = true,\n content,\n contentClassName,\n ...rest\n}: PopoverProps) {\n const popContent = (\n <PopoverWrapper $width={width} className={contentClassName}>\n {title && <PopoverTitle>{title}</PopoverTitle>}\n <PopoverContent>{content}</PopoverContent>\n </PopoverWrapper>\n );\n\n return (\n <Tooltip {...rest} content={popContent} interactive={interactive} maxWidth={maxWidth}>\n {children}\n </Tooltip>\n );\n}\n\nPopover.displayName = '@kubed/components/Popover';\n"],"names":["React"],"mappings":";;;;;AAAA,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC;AACtC,IAAI,UAAU,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACzC,IAAI,iBAAiB,GAAG,MAAM,CAAC,yBAAyB,CAAC;AACzD,IAAI,mBAAmB,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACvD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC;AACnD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC;AACzD,IAAI,eAAe,GAAG,CAAC,GAAG,EAAE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;AAC/B,IAAI,OAAO;AACX,IAAI,UAAU;AACd,IAAI,UAAU;AACd,IAAI,OAAO;AACX,IAAI,aAAa;AACjB,IAAI,SAAS;AACb,IAAI,kBAAkB;AACtB,GAAG,CAAC,CAAC;AACL,EAAE,MAAM,UAAU,mBAAmBA,cAAK,CAAC,aAAa,CAAC,cAAc,EAAE;AACzE,IAAI,MAAM,EAAE,KAAK;AACjB,IAAI,SAAS,EAAE,gBAAgB;AAC/B,GAAG,EAAE,KAAK,oBAAoBA,cAAK,CAAC,aAAa,CAAC,YAAY,EAAE,IAAI,EAAE,KAAK,CAAC,kBAAkBA,cAAK,CAAC,aAAa,CAAC,cAAc,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;AAClJ,EAAE,uBAAuBA,cAAK,CAAC,aAAa,CAAC,OAAO,EAAE,aAAa,CAAC,cAAc,CAAC,EAAE,EAAE,IAAI,CAAC,EAAE;AAC9F,IAAI,OAAO,EAAE,UAAU;AACvB,IAAI,WAAW;AACf,IAAI,QAAQ;AACZ,GAAG,CAAC,EAAE,QAAQ,CAAC,CAAC;AAChB,CAAC;AACD,OAAO,CAAC,WAAW,GAAG,2BAA2B;;;;"}
1
+ {"version":3,"file":"Popover.js","sources":["../../src/Popover/Popover.tsx"],"sourcesContent":["import React from 'react';\nimport styled from 'styled-components';\nimport type { Props } from 'tippy.js';\nimport type { TooltipProps, TooltipInstance } from '../Tooltip/Tooltip';\nimport { Tooltip } from '../Tooltip/Tooltip';\nimport { addColorAlpha } from '../utils/color';\n\ninterface WrapperProps {\n $width?: number;\n}\n\nconst PopoverWrapper = styled('div')<WrapperProps>`\n display: flex;\n flex-direction: column;\n ${({ $width }) => ($width ? `width: ${$width}px` : null)};\n`;\n\nconst PopoverTitle = styled.div`\n font-weight: 600;\n font-size: ${({ theme }) => theme.font.fontSizeBase};\n`;\n\nconst PopoverContent = styled.div`\n color: ${({ theme }) => addColorAlpha(theme.palette.background, 0.7)};\n`;\n\nexport interface PopoverProps extends TooltipProps {\n title?: string;\n width?: number;\n contentClassName?: string;\n}\n\nexport type PopoverInstance<T = Props> = TooltipInstance<T>;\n\nexport function Popover({\n title,\n children,\n maxWidth = '264px',\n width,\n interactive = true,\n content,\n contentClassName,\n ...rest\n}: PopoverProps) {\n const popContent = (\n <PopoverWrapper $width={width} className={contentClassName}>\n {title && <PopoverTitle>{title}</PopoverTitle>}\n <PopoverContent>{content}</PopoverContent>\n </PopoverWrapper>\n );\n\n return (\n <Tooltip {...rest} content={popContent} interactive={interactive} maxWidth={maxWidth}>\n {children}\n </Tooltip>\n );\n}\n\nPopover.displayName = '@kubed/components/Popover';\n"],"names":["React"],"mappings":";;;;;AAAA,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC;AACtC,IAAI,UAAU,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACzC,IAAI,iBAAiB,GAAG,MAAM,CAAC,yBAAyB,CAAC;AACzD,IAAI,mBAAmB,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACvD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC;AACnD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC;AACzD,IAAI,eAAe,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,KAAK,GAAG,IAAI,GAAG,GAAG,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAChK,IAAI,cAAc,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK;AAC/B,EAAE,KAAK,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;AAChC,IAAI,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC;AAClC,MAAM,eAAe,CAA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AAC,CAAC;AAClJ,EAAE,uBAAuBA,cAAK,CAAC,aAAa,CAAC,OAAO,EAAE,aAAa,CAAC,cAAc,CAAC,EAAE,EAAE,IAAI,CAAC,EAAE;AAC9F,IAAI,OAAO,EAAE,UAAU;AACvB,IAAI,WAAW;AACf,IAAI,QAAQ;AACZ,GAAG,CAAC,EAAE,QAAQ,CAAC,CAAC;AAChB,CAAC;AACD,OAAO,CAAC,WAAW,GAAG,2BAA2B;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.js","sources":["../../src/Tooltip/Tooltip.tsx"],"sourcesContent":["import React from 'react';\nimport { TippyProps } from '@tippyjs/react';\nimport { StyledTippy } from './Tooltip.styles';\n\nexport type BasePlacement = 'top' | 'left' | 'right' | 'bottom';\nexport type AutoPlacement = 'auto' | 'auto-start' | 'auto-end';\nexport type VariationPlacement =\n | 'top-start'\n | 'top-end'\n | 'bottom-start'\n | 'bottom-end'\n | 'right-start'\n | 'right-end'\n | 'left-start'\n | 'left-end';\n\nexport interface TooltipProps extends TippyProps {\n /** The element to append the tooltip to */\n appendTo?: 'parent' | Element | ((ref: Element) => Element);\n\n /** The react component to use as the trigger for the tooltip */\n children: React.ReactElement;\n\n /** Tooltip content */\n content?: React.ReactNode;\n\n /** Tooltip show or not (in controlled mode) */\n visible?: boolean;\n\n /** True to disable tooltip */\n disabled?: boolean;\n\n /** Delay in ms once a trigger event is fired before a Tooltip shows or hides */\n delay?: number | [number | null, number | null];\n\n /** Duration in ms of the transition animation */\n duration?: number | [number | null, number | null];\n\n /** Determines if the tooltip hides upon clicking the reference or outside of the tooltip */\n hideOnClick?: boolean | 'toggle';\n\n /** Determines if the tooltip has interactive content inside of it, so that it can be hovered over and clicked inside without hiding */\n interactive?: boolean;\n\n /** className of Tooltip */\n className?: string;\n\n /** Determines if the tooltip is shown once it gets created, respecting delay */\n showOnCreate?: boolean;\n\n /** Specifies the maximum width of the tooltip */\n maxWidth?: number | string;\n\n /** The preferred placement of the tooltip */\n placement?: AutoPlacement | BasePlacement | VariationPlacement;\n\n /** Determines the events that cause the tooltip to show. Multiple event names are separated by spaces */\n trigger?: string;\n}\n\nexport function Tooltip({\n children,\n content,\n maxWidth = 200,\n animation = 'shift-toward-subtle',\n ...rest\n}: TooltipProps) {\n return (\n // @ts-ignore\n <StyledTippy content={content} maxWidth={maxWidth} animation={animation} {...rest}>\n {children}\n </StyledTippy>\n );\n}\n\nTooltip.displayName = '@kubed/components/Tooltip';\n"],"names":["React"],"mappings":";;;AAAA,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC;AACtC,IAAI,mBAAmB,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACvD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC;AACnD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC;AACzD,IAAI,eAAe,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,KAAK,GAAG,IAAI,GAAG,GAAG,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAChK,IAAI,cAAc,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK;AAC/B,EAAE,KAAK,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;AAChC,IAAI,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC;AAClC,MAAM,eAAe,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;AACxC,EAAE,IAAI,mBAAmB;AACzB,IAAI,KAAK,IAAI,IAAI,IAAI,mBAAmB,CAAC,CAAC,CAAC,EAAE;AAC7C,MAAM,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC,E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,aAAa,CAAC,WAAW,EAAE,cAAc,CAAC;AACzE,IAAI,OAAO;AACX,IAAI,QAAQ;AACZ,IAAI,SAAS;AACb,GAAG,EAAE,IAAI,CAAC,EAAE,QAAQ,CAAC,CAAC;AACtB,CAAC;AACD,OAAO,CAAC,WAAW,GAAG,2BAA2B;;;;"}
1
+ {"version":3,"file":"Tooltip.js","sources":["../../src/Tooltip/Tooltip.tsx"],"sourcesContent":["import React from 'react';\nimport type { Instance, Props } from 'tippy.js';\nimport type { TippyProps } from '@tippyjs/react';\nimport { StyledTippy } from './Tooltip.styles';\n\nexport type BasePlacement = 'top' | 'left' | 'right' | 'bottom';\nexport type AutoPlacement = 'auto' | 'auto-start' | 'auto-end';\nexport type VariationPlacement =\n | 'top-start'\n | 'top-end'\n | 'bottom-start'\n | 'bottom-end'\n | 'right-start'\n | 'right-end'\n | 'left-start'\n | 'left-end';\n\nexport interface TooltipProps extends TippyProps {\n /** The element to append the tooltip to */\n appendTo?: 'parent' | Element | ((ref: Element) => Element);\n\n /** The react component to use as the trigger for the tooltip */\n children: React.ReactElement;\n\n /** Tooltip content */\n content?: React.ReactNode;\n\n /** Tooltip show or not (in controlled mode) */\n visible?: boolean;\n\n /** True to disable tooltip */\n disabled?: boolean;\n\n /** Delay in ms once a trigger event is fired before a Tooltip shows or hides */\n delay?: number | [number | null, number | null];\n\n /** Duration in ms of the transition animation */\n duration?: number | [number | null, number | null];\n\n /** Determines if the tooltip hides upon clicking the reference or outside of the tooltip */\n hideOnClick?: boolean | 'toggle';\n\n /** Determines if the tooltip has interactive content inside of it, so that it can be hovered over and clicked inside without hiding */\n interactive?: boolean;\n\n /** className of Tooltip */\n className?: string;\n\n /** Determines if the tooltip is shown once it gets created, respecting delay */\n showOnCreate?: boolean;\n\n /** Specifies the maximum width of the tooltip */\n maxWidth?: number | string;\n\n /** The preferred placement of the tooltip */\n placement?: AutoPlacement | BasePlacement | VariationPlacement;\n\n /** Determines the events that cause the tooltip to show. Multiple event names are separated by spaces */\n trigger?: string;\n}\n\nexport type TooltipInstance<T = Props> = Instance<T>;\n\nexport function Tooltip({\n children,\n content,\n maxWidth = 200,\n animation = 'shift-toward-subtle',\n ...rest\n}: TooltipProps) {\n return (\n // @ts-ignore\n <StyledTippy content={content} maxWidth={maxWidth} animation={animation} {...rest}>\n {children}\n </StyledTippy>\n );\n}\n\nTooltip.displayName = '@kubed/components/Tooltip';\n"],"names":["React"],"mappings":";;;AAAA,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC;AACtC,IAAI,mBAAmB,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACvD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC;AACnD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC;AACzD,IAAI,eAAe,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,KAAK,GAAG,IAAI,GAAG,GAAG,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAChK,IAAI,cAAc,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK;AAC/B,EAAE,KAAK,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;AAChC,IAAI,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC;AAClC,MAAM,eAAe,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;AACxC,EAAE,IAAI,mBAAmB;AACzB,IAAI,KAAK,IAAI,IAAI,IAAI,mBAAmB,CAAC,CAAC,CAAC,EAAE;AAC7C,MAAM,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC;AACpC,QAAQ,eAAe,CAAC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E,IAAI,OAAO;AACX,IAAI,QAAQ;AACZ,IAAI,SAAS;AACb,GAAG,EAAE,IAAI,CAAC,EAAE,QAAQ,CAAC,CAAC;AACtB,CAAC;AACD,OAAO,CAAC,WAAW,GAAG,2BAA2B;;;;"}
package/esm/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export{KubedConfigProvider}from"./ConfigProvider/index.js";export{Button}from"./Button/Button.js";export{Group}from"./Group/Group.js";export{Container,sizes}from"./Container/Container.js";export{Center}from"./Center/Center.js";export{Row}from"./Grid/Row.js";export{Navs}from"./Navs/Navs.js";export{Snippet}from"./Snippet/Snippet.js";export{Tabs}from"./Tabs/Tabs.js";export{Text}from"./Text/Text.js";export{Tooltip}from"./Tooltip/Tooltip.js";export{Popover}from"./Popover/Popover.js";export{Divider}from"./Divider/Divider.js";export{Menu}from"./Menu/Menu.js";export{StatusDot}from"./StatusDot/StatusDot.js";export{Tag}from"./Tag/Tag.js";export{Badge}from"./Badge/Badge.js";export{Alert}from"./Alert/Alert.js";export{Card}from"./Card/Card.js";export{Descriptions}from"./Descriptions/Descriptions.js";export{Entity}from"./Entity/Entity.js";export{Dropdown}from"./Dropdown/Dropdown.js";export{LoadingOverlay}from"./LoadingOverlay/LoadingOverlay.js";export{Input,fixControlledValue}from"./Input/Input.js";export{InputPassword}from"./InputPassword/InputPassword.js";export{FilterInput}from"./FilterInput/FilterInput.js";export{Textarea}from"./Textarea/Textarea.js";export{Empty}from"./Empty/Empty.js";export{Form}from"./Form/Form.js";export{Select}from"./Select/Select.js";export{Checkbox}from"./Checkbox/Checkbox.js";export{Radio}from"./Radio/Radio.js";export{Switch}from"./Switch/Switch.js";export{InputNumber}from"./InputNumber/InputNumber.js";export{DatePicker}from"./DatePicker/DatePicker.js";export{Banner}from"./Banner/Banner.js";export{Notify}from"./Notify/Notify.js";export{AutoComplete}from"./AutoComplete/AutoComplete.js";export{ActionConfirm}from"./ActionConfirm/ActionConfirm.js";export{Progress}from"./Progress/Progress.js";export{addColorAlpha,colorToRgbValues}from"./utils/color.js";export{Steps}from"./Steps/Steps.js";export{TypeSelect}from"./TypeSelect/TypeSelect.js";export{ShowMore}from"./ShowMore/ShowMore.js";export{Loading}from"./Loading/Loading.js";export{default as TimePicker}from"./TimePicker/TimePicker.js";export{default as Drawer}from"./Drawer/Drawer.js";export{default as Collapse}from"./Collapse/Collapse.js";export{default as forwardRef}from"./utils/forwardRef.js";export{default as toArray}from"./utils/toArray.js";export{default as useForm}from"./Form/hooks/useForm.js";export{default as CssBaseline}from"./theme/CssBaseline.js";export{useTheme}from"./theme/ThemeContext.js";export{default as themeUtils}from"./theme/utils.js";export{Col}from"./Grid/Col.js";export{Tab}from"./Tabs/Tab/Tab.js";export{MenuItem}from"./Menu/MenuItem/MenuItem.js";export{MenuLabel}from"./Menu/MenuLabel/MenuLabel.js";export{BadgeAnchor}from"./Badge/BadgeAnchor.js";export{Description}from"./Descriptions/Description.js";export{Field}from"./Entity/Field.js";export{List as FormList,useWatch}from"rc-field-form";export{FormItem}from"./Form/FormItem/FormItem.js";export{Modal}from"./Modal/Modal.js";export{useModal}from"./Modal/ModalProvider/ModalContext.js";export{CheckboxGroup}from"./Checkbox/CheckboxGroup.js";export{RadioGroup}from"./Radio/RadioGroup.js";export{BannerTip}from"./Banner/BannerTip.js";export{default as notify}from"react-hot-toast";export{Slider}from"./Slider/Slider/Slider.js";export{RangeSlider}from"./Slider/RangeSlider/RangeSlider.js";export{Step}from"./Steps/Step/Step.js";export{StepCompleted}from"./Steps/StepCompleted/StepCompleted.js";export{TabStep}from"./Steps/TabStep/TabStep.js";
1
+ export{KubedConfigProvider}from"./ConfigProvider/index.js";export{Button}from"./Button/Button.js";export{Group}from"./Group/Group.js";export{Container,sizes}from"./Container/Container.js";export{Center}from"./Center/Center.js";export{Row}from"./Grid/Row.js";export{Navs}from"./Navs/Navs.js";export{Snippet}from"./Snippet/Snippet.js";export{Tabs}from"./Tabs/Tabs.js";export{Text}from"./Text/Text.js";export{Tooltip}from"./Tooltip/Tooltip.js";export{Popover}from"./Popover/Popover.js";export{Divider}from"./Divider/Divider.js";export{Menu}from"./Menu/Menu.js";export{StatusDot}from"./StatusDot/StatusDot.js";export{Tag}from"./Tag/Tag.js";export{Badge}from"./Badge/Badge.js";export{Alert}from"./Alert/Alert.js";export{Card}from"./Card/Card.js";export{Descriptions}from"./Descriptions/Descriptions.js";export{Entity}from"./Entity/Entity.js";export{Dropdown}from"./Dropdown/Dropdown.js";export{LoadingOverlay}from"./LoadingOverlay/LoadingOverlay.js";export{Input,fixControlledValue}from"./Input/Input.js";export{InputPassword}from"./InputPassword/InputPassword.js";export{FilterInput}from"./FilterInput/FilterInput.js";export{Textarea}from"./Textarea/Textarea.js";export{Empty}from"./Empty/Empty.js";export{Form}from"./Form/Form.js";export{Select}from"./Select/Select.js";export{Checkbox}from"./Checkbox/Checkbox.js";export{Radio}from"./Radio/Radio.js";export{Switch}from"./Switch/Switch.js";export{InputNumber}from"./InputNumber/InputNumber.js";export{DatePicker}from"./DatePicker/DatePicker.js";export{Banner}from"./Banner/Banner.js";export{Notify}from"./Notify/Notify.js";export{AutoComplete}from"./AutoComplete/AutoComplete.js";export{ActionConfirm}from"./ActionConfirm/ActionConfirm.js";export{Progress}from"./Progress/Progress.js";export{addColorAlpha,colorToRgbValues}from"./utils/color.js";export{Steps}from"./Steps/Steps.js";export{TypeSelect}from"./TypeSelect/TypeSelect.js";export{ShowMore}from"./ShowMore/ShowMore.js";export{Dropzone,_Dropzone}from"./Dropzone/Dropzone.js";export{Loading}from"./Loading/Loading.js";export{default as TimePicker}from"./TimePicker/TimePicker.js";export{default as Drawer}from"./Drawer/Drawer.js";export{default as Collapse}from"./Collapse/Collapse.js";export{default as forwardRef}from"./utils/forwardRef.js";export{default as toArray}from"./utils/toArray.js";export{default as useForm}from"./Form/hooks/useForm.js";export{default as CssBaseline}from"./theme/CssBaseline.js";export{useTheme}from"./theme/ThemeContext.js";export{default as themeUtils}from"./theme/utils.js";export{Col}from"./Grid/Col.js";export{Tab}from"./Tabs/Tab/Tab.js";export{MenuItem}from"./Menu/MenuItem/MenuItem.js";export{MenuLabel}from"./Menu/MenuLabel/MenuLabel.js";export{BadgeAnchor}from"./Badge/BadgeAnchor.js";export{Description}from"./Descriptions/Description.js";export{Field}from"./Entity/Field.js";export{List as FormList,useWatch}from"rc-field-form";export{FormItem}from"./Form/FormItem/FormItem.js";export{Modal}from"./Modal/Modal.js";export{useModal}from"./Modal/ModalProvider/ModalContext.js";export{CheckboxGroup}from"./Checkbox/CheckboxGroup.js";export{RadioGroup}from"./Radio/RadioGroup.js";export{BannerTip}from"./Banner/BannerTip.js";export{default as notify}from"react-hot-toast";export{Slider}from"./Slider/Slider/Slider.js";export{RangeSlider}from"./Slider/RangeSlider/RangeSlider.js";export{Step}from"./Steps/Step/Step.js";export{StepCompleted}from"./Steps/StepCompleted/StepCompleted.js";export{TabStep}from"./Steps/TabStep/TabStep.js";
2
2
  //# sourceMappingURL=index.js.map
package/esm/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,2 @@
1
+ import n,{createContext as c,useContext as a}from"react";function u(r){const t=c(null);return[({children:e,value:o})=>n.createElement(t.Provider,{value:o},e),()=>{const e=a(t);if(e===null)throw new Error(r);return e}]}export{u as createSafeContext};
2
+ //# sourceMappingURL=createSafeContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createSafeContext.js","sources":["../../src/utils/createSafeContext.tsx"],"sourcesContent":["import React, { createContext, useContext } from 'react';\n\nexport function createSafeContext<ContextValue>(errorMessage: string) {\n const Context = createContext<ContextValue | null>(null);\n\n const useSafeContext = () => {\n const ctx = useContext(Context);\n\n if (ctx === null) {\n throw new Error(errorMessage);\n }\n\n return ctx;\n };\n\n const Provider = ({ children, value }: { value: ContextValue; children: React.ReactNode }) => (\n <Context.Provider value={value}>{children}</Context.Provider>\n );\n\n return [Provider, useSafeContext] as const;\n}\n"],"names":["React"],"mappings":";;AACO,SAAS,iBAAiB,CAAC,YAAY,EAAE;AAChD,EAAE,MAAM,OAAO,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC;AACtC,EAAE,MAAM,cAAc,GAAG,MAAM;AAC/B,IAAI,MAAM,GAAG,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC;AACpC,IAAI,IAAI,GAAG,KAAK,IAAI,EAAE;AACtB,MAAM,MAAM,IAAI,KAAK,CAAC,YAAY,CAAC,CAAC;AACpC,KAAK;AACL,IAAI,OAAO,GAAG,CAAC;AACf,GAAG,CAAC;AACJ,EAAE,MAAM,QAAQ,GAAG,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,qBAAqBA,cAAK,CAAC,aAAa,CAAC,OAAO,CAAC,QAAQ,EAAE;AAClG,IAAI,KAAK;AACT,GAAG,EAAE,QAAQ,CAAC,CAAC;AACf,EAAE,OAAO,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;AACpC;;;;"}
@@ -0,0 +1,2 @@
1
+ import t from"react";function e(r){return Array.isArray(r)||r===null?!1:typeof r=="object"?r.type!==t.Fragment:!1}export{e as isElement};
2
+ //# sourceMappingURL=isElement.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isElement.js","sources":["../../src/utils/isElement.ts"],"sourcesContent":["import React from 'react';\n\nexport function isElement(value: any): value is React.ReactElement {\n if (Array.isArray(value) || value === null) {\n return false;\n }\n\n if (typeof value === 'object') {\n if (value.type === React.Fragment) {\n return false;\n }\n\n return true;\n }\n\n return false;\n}\n"],"names":["React"],"mappings":";;AACO,SAAS,SAAS,CAAC,KAAK,EAAE;AACjC,EAAE,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,KAAK,IAAI,EAAE;AAC9C,IAAI,OAAO,KAAK,CAAC;AACjB,GAAG;AACH,EAAE,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AACjC,IAAI,IAAI,KAAK,CAAC,IAAI,KAAKA,cAAK,CAAC,QAAQ,EAAE;AACvC,MAAM,OAAO,KAAK,CAAC;AACnB,KAAK;AACL,IAAI,OAAO,IAAI,CAAC;AAChB,GAAG;AACH,EAAE,OAAO,KAAK,CAAC;AACf;;;;"}
@@ -0,0 +1,2 @@
1
+ function t(r){return typeof r!="string"?"":r.charAt(0).toUpperCase()+r.slice(1)}export{t as upperFirst};
2
+ //# sourceMappingURL=upperFirst.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"upperFirst.js","sources":["../../src/utils/upperFirst.ts"],"sourcesContent":["export function upperFirst(value: string) {\n return typeof value !== 'string' ? '' : value.charAt(0).toUpperCase() + value.slice(1);\n}\n"],"names":[],"mappings":"AAAO,SAAS,UAAU,CAAC,KAAK,EAAE;AAClC,EAAE,OAAO,OAAO,KAAK,KAAK,QAAQ,GAAG,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACzF;;;;"}
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ export interface DropzoneContextValue {
3
+ idle: boolean;
4
+ accept: boolean;
5
+ reject: boolean;
6
+ }
7
+ export declare const DropzoneProvider: ({ children, value }: {
8
+ value: DropzoneContextValue;
9
+ children: import("react").ReactNode;
10
+ }) => JSX.Element, useDropzoneContext: () => DropzoneContextValue;
11
+ //# sourceMappingURL=Dropzone.context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dropzone.context.d.ts","sourceRoot":"","sources":["../../../src/Dropzone/Dropzone.context.ts"],"names":[],"mappings":";AAEA,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,eAAO,MAAO,gBAAgB;;;mBAAE,kBAAkB,4BAEjD,CAAC"}
@@ -0,0 +1,85 @@
1
+ import React from 'react';
2
+ import { FileRejection, Accept, FileWithPath, DropEvent, FileError } from 'react-dropzone';
3
+ import { ForwardRefWithStaticComponents } from '../utils/ForwardRefWithStaticComponents';
4
+ import { DefaultProps, KubedNumberSize } from '../theme';
5
+ import { DropzoneAccept, DropzoneIdle, DropzoneReject } from './DropzoneStatus';
6
+ export interface DropzoneProps extends DefaultProps, Omit<React.ComponentPropsWithRef<'div'>, 'onDrop'> {
7
+ /** Padding from theme.spacing, or number to set padding in px */
8
+ padding?: KubedNumberSize;
9
+ /** Border radius from theme.radius or number to set border-radius in px */
10
+ radius?: KubedNumberSize;
11
+ /** Dropzone statues */
12
+ children: React.ReactNode;
13
+ /** Disable files capturing */
14
+ disabled?: boolean;
15
+ /** Called when any files are dropped into dropzone */
16
+ onDropAny?(files: FileWithPath[], fileRejections: FileRejection[]): void;
17
+ /** Called when valid files are dropped into dropzone */
18
+ onDrop(files: FileWithPath[]): void;
19
+ /** Called when selected files don't meet file restrictions */
20
+ onReject?(fileRejections: FileRejection[]): void;
21
+ /** Display loading overlay over dropzone */
22
+ loading?: boolean;
23
+ /** File types to accept */
24
+ accept?: Accept | string[];
25
+ /** Get open function as ref */
26
+ openRef?: React.ForwardedRef<() => void | undefined>;
27
+ /** Allow selection of multiple files */
28
+ multiple?: boolean;
29
+ /** Set maximum file size in bytes */
30
+ maxSize?: number;
31
+ /** Name of the form control. Submitted with the form as part of a name/value pair. */
32
+ name?: string;
33
+ /** Number of files that user can pick */
34
+ maxFiles?: number;
35
+ /** Set to true to autofocus the root element */
36
+ autoFocus?: boolean;
37
+ /** If false, disables click to open the native file selection dialog */
38
+ activateOnClick?: boolean;
39
+ /** If false, disables drag 'n' drop */
40
+ activateOnDrag?: boolean;
41
+ /** If false, disables Space/Enter to open the native file selection dialog. Note that it also stops tracking the focus state. */
42
+ activateOnKeyboard?: boolean;
43
+ /** If false, stops drag event propagation to parents */
44
+ dragEventsBubbling?: boolean;
45
+ /** Called when the `dragenter` event occurs */
46
+ onDragEnter?(event: React.DragEvent<HTMLElement>): void;
47
+ /** Called when the `dragleave` event occurs */
48
+ onDragLeave?(event: React.DragEvent<HTMLElement>): void;
49
+ /** Called when the `dragover` event occurs */
50
+ onDragOver?(event: React.DragEvent<HTMLElement>): void;
51
+ /** Called when user closes the file selection dialog with no selection */
52
+ onFileDialogCancel?(): void;
53
+ /** Called when user opens the file selection dialog */
54
+ onFileDialogOpen?(): void;
55
+ /** If false, allow dropped items to take over the current browser window */
56
+ preventDropOnDocument?: boolean;
57
+ /** Set to true to use the File System Access API to open the file picker instead of using an <input type="file"> click event, defaults to true */
58
+ useFsAccessApi?: boolean;
59
+ /** Use this to provide a custom file aggregator */
60
+ getFilesFromEvent?: (event: DropEvent) => Promise<Array<File | DataTransferItem>>;
61
+ /** Custom validation function. It must return null if there's no errors. */
62
+ validator?: <T extends File>(file: T) => FileError | FileError[] | null;
63
+ }
64
+ export declare function _Dropzone(props: DropzoneProps): JSX.Element;
65
+ export declare namespace _Dropzone {
66
+ var displayName: string;
67
+ var Accept: {
68
+ (props: import("./DropzoneStatus").DropzoneStatusProps): JSX.Element;
69
+ displayName: string;
70
+ };
71
+ var Reject: {
72
+ (props: import("./DropzoneStatus").DropzoneStatusProps): JSX.Element;
73
+ displayName: string;
74
+ };
75
+ var Idle: {
76
+ (props: import("./DropzoneStatus").DropzoneStatusProps): JSX.Element;
77
+ displayName: string;
78
+ };
79
+ }
80
+ export declare const Dropzone: ForwardRefWithStaticComponents<DropzoneProps, {
81
+ Accept: typeof DropzoneAccept;
82
+ Reject: typeof DropzoneReject;
83
+ Idle: typeof DropzoneIdle;
84
+ }>;
85
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AAC,CAAC,SAAS,IAAI,EAAE,IAAI,EAAE,CAAC,KAAK,SAAS,GAAG,SAAS,EAAE,GAAG,IAAI,CAAC;CACzE;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,aAAa,eAkF7C;yBAlFe,SAAS;;;;;;;;;;;;;;;AAyFzB,eAAO,MAAM,QAAQ,EAAE,8BAA8B,CACnD,aAAa,EACb;IACE,MAAM,EAAE,OAAO,cAAc,CAAC;IAC9B,MAAM,EAAE,OAAO,cAAc,CAAC;IAC9B,IAAI,EAAE,OAAO,YAAY,CAAC;CAC3B,CACiB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare const DropzoneWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
2
+ export declare const DropzoneInner: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
3
+ //# sourceMappingURL=Dropzone.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dropzone.styles.d.ts","sourceRoot":"","sources":["../../../src/Dropzone/Dropzone.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,yGAS3B,CAAC;AAEF,eAAO,MAAM,aAAa,yGAGzB,CAAC"}
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ export interface DropzoneStatusProps {
3
+ children: React.ReactNode;
4
+ }
5
+ export declare const DropzoneAccept: {
6
+ (props: DropzoneStatusProps): JSX.Element;
7
+ displayName: string;
8
+ };
9
+ export declare const DropzoneReject: {
10
+ (props: DropzoneStatusProps): JSX.Element;
11
+ displayName: string;
12
+ };
13
+ export declare const DropzoneIdle: {
14
+ (props: DropzoneStatusProps): JSX.Element;
15
+ displayName: string;
16
+ };
17
+ export declare type DropzoneAcceptProps = DropzoneStatusProps;
18
+ export declare type DropzoneRejectProps = DropzoneStatusProps;
19
+ export declare type DropzoneIdleProps = DropzoneStatusProps;
20
+ //# sourceMappingURL=DropzoneStatus.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DropzoneStatus.d.ts","sourceRoot":"","sources":["../../../src/Dropzone/DropzoneStatus.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuB,MAAM,OAAO,CAAC;AAK5C,MAAM,WAAW,mBAAmB;IAElC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAqBD,eAAO,MAAM,cAAc;YAlBC,mBAAmB,GAAG,WAAW;;CAkBD,CAAC;AAC7D,eAAO,MAAM,cAAc;YAnBC,mBAAmB,GAAG,WAAW;;CAmBD,CAAC;AAC7D,eAAO,MAAM,YAAY;YApBG,mBAAmB,GAAG,WAAW;;CAoBL,CAAC;AAEzD,oBAAY,mBAAmB,GAAG,mBAAmB,CAAC;AACtD,oBAAY,mBAAmB,GAAG,mBAAmB,CAAC;AACtD,oBAAY,iBAAiB,GAAG,mBAAmB,CAAC"}