@hai-dev/ui-kit 1.0.12 → 1.1.1
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.
- package/dist/{Box-D8oKffw9.js → Box-CykjCaXY.js} +21 -22
- package/dist/{Button-BBF8hp7e.js → Button-CcvrOEKV.js} +6 -5
- package/dist/{ButtonBase-T2KH9jsD.js → ButtonBase-DPLf5-lz.js} +226 -279
- package/dist/{CircularProgress-BQQkuSse.js → CircularProgress-CrHaMZDC.js} +4 -3
- package/dist/{Dialog-B97c7WYP.js → Dialog-DqFOpJyx.js} +118 -125
- package/dist/{DialogTitle-Du4tqTs0.js → DialogTitle-CeM_Z851.js} +4 -4
- package/dist/{Typography-r_TXEM1e.js → Typography-DDVoglvI.js} +38 -40
- package/dist/assets/centered-decorator.css +1 -0
- package/dist/assets/code-input.css +1 -0
- package/dist/assets/dark-decorator.css +1 -0
- package/dist/assets/upload-dialog-errors.css +1 -1
- package/dist/chainPropTypes-C04Ex8aP.js +413 -0
- package/dist/components/button/button.js +1 -1
- package/dist/components/circular-progress-loader/circular-progress-loader.js +3 -3
- package/dist/components/code-input/code-input.d.ts +3 -0
- package/dist/components/code-input/code-input.js +934 -0
- package/dist/components/code-input/code-input.stories.d.ts +7 -0
- package/dist/components/code-input/constants.d.ts +8 -0
- package/dist/components/code-input/constants.js +11 -0
- package/dist/components/code-input/index.d.ts +2 -0
- package/dist/components/code-input/index.js +4 -0
- package/dist/components/code-input/types.d.ts +11 -0
- package/dist/components/code-input/utils/get-code-input-label.d.ts +2 -0
- package/dist/components/code-input/utils/get-code-input-label.js +5 -0
- package/dist/components/code-input/utils/index.d.ts +2 -0
- package/dist/components/code-input/utils/index.js +6 -0
- package/dist/components/code-input/utils/slide-down-animate.d.ts +1 -0
- package/dist/components/code-input/utils/slide-down-animate.js +10 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +4 -2
- package/dist/components/photo-crop-uploader/components/error-upload-dialog/error-upload-dialog.js +6 -6
- package/dist/components/photo-crop-uploader/components/photo-list/photo-list.js +1 -1
- package/dist/components/photo-crop-uploader/components/upload-button/upload-button.js +1 -1
- package/dist/components/photo-crop-uploader/components/upload-dialog/upload-dialog-errors.js +2 -2
- package/dist/components/photo-crop-uploader/components/upload-dialog/upload-dialog.js +12 -10
- package/dist/components/photo-crop-uploader/photo-crop-uploader.d.ts +2 -2
- package/dist/components/photo-crop-uploader/photo-crop-uploader.js +183 -168
- package/dist/components/photo-crop-uploader/types.d.ts +8 -7
- package/dist/components/photo-crop-uploader/utils/draw-cropped-image.js +28 -29
- package/dist/components/photo-crop-uploader/utils/get-default-cropped-photo.d.ts +4 -2
- package/dist/components/photo-crop-uploader/utils/get-default-cropped-photo.js +34 -32
- package/dist/createSimplePaletteValueFilter-B7--0ryQ.js +17 -0
- package/dist/{createTheme-RvzX1VSA.js → createTheme-RRQUOQoF.js} +182 -178
- package/dist/decorators/centered-decorator/centered-decorator.js +7 -0
- package/dist/decorators/centered-decorator/index.d.ts +2 -0
- package/dist/decorators/centered-decorator/index.js +4 -0
- package/dist/decorators/centered-decorator/types.js +1 -0
- package/dist/decorators/dark-decorator/dark-decorator.d.ts +3 -0
- package/dist/decorators/dark-decorator/dark-decorator.js +7 -0
- package/dist/decorators/dark-decorator/index.d.ts +2 -0
- package/dist/decorators/dark-decorator/index.js +4 -0
- package/dist/decorators/dark-decorator/types.d.ts +4 -0
- package/dist/decorators/dark-decorator/types.js +1 -0
- package/dist/decorators/index.d.ts +2 -1
- package/dist/decorators/index.js +4 -2
- package/dist/extendSxProp-VC2-7DJw.js +49 -0
- package/dist/index-BMkXyDFs.js +91 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +19 -17
- package/dist/isHostComponent-Dm_U9uOy.js +14 -0
- package/dist/memoTheme-5A7c_y33.js +15 -0
- package/dist/refType-CCKoQjVR.js +61 -0
- package/dist/{upload-dialog-errors-ku54UrUb.js → upload-dialog-errors-Bxun25O-.js} +41 -41
- package/package.json +1 -1
- package/dist/chainPropTypes-KIxDwPzf.js +0 -387
- package/dist/createSimplePaletteValueFilter-nb0wSOzC.js +0 -30
- package/dist/decorators/centered-decorator.js +0 -16
- package/dist/extendSxProp-BW9e6LtL.js +0 -36
- package/dist/useTheme-CsjkCBFJ.js +0 -16
- /package/dist/{decorators → components/code-input}/types.js +0 -0
- /package/dist/decorators/{centered-decorator.d.ts → centered-decorator/centered-decorator.d.ts} +0 -0
- /package/dist/decorators/{types.d.ts → centered-decorator/types.d.ts} +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { CodeInput } from './';
|
|
3
|
+
type CodeInputMeta = Meta<typeof CodeInput>;
|
|
4
|
+
type CodeInputStory = StoryObj<typeof CodeInput>;
|
|
5
|
+
declare const meta: CodeInputMeta;
|
|
6
|
+
export default meta;
|
|
7
|
+
export declare const Base: CodeInputStory;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const DEFAULT_CODE_LENGTH = 6;
|
|
2
|
+
export declare const CODE_REGEX: RegExp;
|
|
3
|
+
export declare const NOT_CODE_REGEX: RegExp;
|
|
4
|
+
export declare const BACKSPACE_KEY = "Backspace";
|
|
5
|
+
export declare const ARROW_LEFT_KEY = "ArrowLeft";
|
|
6
|
+
export declare const ARROW_RIGHT_KEY = "ArrowRight";
|
|
7
|
+
export declare const ENTER_KEY = "Enter";
|
|
8
|
+
export declare const TAB_KEY = "Tab";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const E = 6, t = /^\d+$/, _ = /\D/g, o = "Backspace", c = "ArrowLeft", n = "ArrowRight", s = "Enter", R = "Tab";
|
|
2
|
+
export {
|
|
3
|
+
c as ARROW_LEFT_KEY,
|
|
4
|
+
n as ARROW_RIGHT_KEY,
|
|
5
|
+
o as BACKSPACE_KEY,
|
|
6
|
+
t as CODE_REGEX,
|
|
7
|
+
E as DEFAULT_CODE_LENGTH,
|
|
8
|
+
s as ENTER_KEY,
|
|
9
|
+
_ as NOT_CODE_REGEX,
|
|
10
|
+
R as TAB_KEY
|
|
11
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Locale } from '../../types';
|
|
2
|
+
export type CodeInputProps = {
|
|
3
|
+
length?: number;
|
|
4
|
+
value?: string;
|
|
5
|
+
onChange?: (value: string) => void;
|
|
6
|
+
onComplete?: (value: string) => void;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
className?: string;
|
|
9
|
+
autoFocus?: boolean;
|
|
10
|
+
locale?: Locale;
|
|
11
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const slideDownAnimation: (element?: HTMLInputElement | null) => Animation | undefined;
|
package/dist/components/index.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { PhotoCropUploader as e } from "./photo-crop-uploader/photo-crop-uploader.js";
|
|
2
2
|
import { drawCroppedImage as t } from "./photo-crop-uploader/utils/draw-cropped-image.js";
|
|
3
|
-
import { Button as
|
|
3
|
+
import { Button as a } from "./button/button.js";
|
|
4
4
|
import { CircularProgressLoader as f } from "./circular-progress-loader/circular-progress-loader.js";
|
|
5
|
+
import { CodeInput as C } from "./code-input/code-input.js";
|
|
5
6
|
export {
|
|
6
|
-
|
|
7
|
+
a as Button,
|
|
7
8
|
f as CircularProgressLoader,
|
|
9
|
+
C as CodeInput,
|
|
8
10
|
e as PhotoCropUploader,
|
|
9
11
|
t as drawCroppedImage
|
|
10
12
|
};
|
package/dist/components/photo-crop-uploader/components/error-upload-dialog/error-upload-dialog.js
CHANGED
|
@@ -2,13 +2,13 @@ import { jsx as e, jsxs as f } from "react/jsx-runtime";
|
|
|
2
2
|
import { c as p } from "../../../../index-B2JRaoNz.js";
|
|
3
3
|
import { localizedText as m } from "../../locale.js";
|
|
4
4
|
import { EN_LOCALE as u } from "../../../../constants.js";
|
|
5
|
-
import { D as x } from "../../../../Dialog-
|
|
6
|
-
import { D as T, a as C, b as D } from "../../../../DialogTitle-
|
|
5
|
+
import { D as x } from "../../../../Dialog-DqFOpJyx.js";
|
|
6
|
+
import { D as T, a as C, b as D } from "../../../../DialogTitle-CeM_Z851.js";
|
|
7
7
|
import * as y from "react";
|
|
8
|
-
import { g as h, a as E, c as N, P as o } from "../../../../createTheme-
|
|
9
|
-
import { u as _, s as b, c as P, r as j } from "../../../../chainPropTypes-
|
|
10
|
-
import { T as v } from "../../../../Typography-
|
|
11
|
-
import { B as w } from "../../../../Button-
|
|
8
|
+
import { g as h, a as E, c as N, P as o } from "../../../../createTheme-RRQUOQoF.js";
|
|
9
|
+
import { u as _, s as b, c as P, r as j } from "../../../../chainPropTypes-C04Ex8aP.js";
|
|
10
|
+
import { T as v } from "../../../../Typography-DDVoglvI.js";
|
|
11
|
+
import { B as w } from "../../../../Button-CcvrOEKV.js";
|
|
12
12
|
import '../../../../assets/error-upload-dialog.css';function O(t) {
|
|
13
13
|
return h("MuiDialogContentText", t);
|
|
14
14
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as p, jsx as m } from "react/jsx-runtime";
|
|
2
2
|
import { c as o } from "../../../../index-B2JRaoNz.js";
|
|
3
3
|
import { MAX_ITEMS_COUNT as r } from "./constants.js";
|
|
4
|
-
import { B as n } from "../../../../Box-
|
|
4
|
+
import { B as n } from "../../../../Box-CykjCaXY.js";
|
|
5
5
|
import '../../../../assets/photo-list.css';const g = "_photoList_rrp1z_1", u = "_item_rrp1z_6", x = "_image_rrp1z_17", t = {
|
|
6
6
|
photoList: g,
|
|
7
7
|
item: u,
|
|
@@ -5,7 +5,7 @@ import { localizedText as x } from "../../locale.js";
|
|
|
5
5
|
import { EN_LOCALE as V } from "../../../../constants.js";
|
|
6
6
|
import { SUPPORTED_IMAGE_EXTENSIONS as y } from "../../constants.js";
|
|
7
7
|
import { UPLOAD_BUTTON_WIDTH_DEFAULT as W, UPLOAD_BUTTON_TAB_INDEX as j, UPLOAD_BUTTON_IMAGE_SIZE as T } from "./constants.js";
|
|
8
|
-
import { B as H } from "../../../../Button-
|
|
8
|
+
import { B as H } from "../../../../Button-CcvrOEKV.js";
|
|
9
9
|
import '../../../../assets/upload-button.css';const M = "data:image/svg+xml,%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Transformed%20by:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20width='800px'%20height='800px'%20viewBox='0%200%201024%201024'%20xmlns='http://www.w3.org/2000/svg'%20fill='%23000000'%3e%3cg%20id='SVGRepo_bgCarrier'%20stroke-width='0'/%3e%3cg%20id='SVGRepo_tracerCarrier'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cg%20id='SVGRepo_iconCarrier'%3e%3cpath%20fill='%23ffffff'%20d='M544%20864V672h128L512%20480%20352%20672h128v192H320v-1.6c-5.376.32-10.496%201.6-16%201.6A240%20240%200%200%201%2064%20624c0-123.136%2093.12-223.488%20212.608-237.248A239.808%20239.808%200%200%201%20512%20192a239.872%20239.872%200%200%201%20235.456%20194.752c119.488%2013.76%20212.48%20114.112%20212.48%20237.248a240%20240%200%200%201-240%20240c-5.376%200-10.56-1.28-16-1.6v1.6H544z'/%3e%3c/g%3e%3c/svg%3e", F = "_dragDropWrapper_cgx9x_1", z = "_input_cgx9x_4", i = {
|
|
10
10
|
dragDropWrapper: F,
|
|
11
11
|
input: z
|
package/dist/components/photo-crop-uploader/components/upload-dialog/upload-dialog-errors.js
CHANGED
|
@@ -2,8 +2,8 @@ import "react/jsx-runtime";
|
|
|
2
2
|
import "../../../../index-B2JRaoNz.js";
|
|
3
3
|
import "../../locale.js";
|
|
4
4
|
import "../../../../constants.js";
|
|
5
|
-
import { U as s } from "../../../../upload-dialog-errors-
|
|
6
|
-
import "../../../../DialogTitle-
|
|
5
|
+
import { U as s } from "../../../../upload-dialog-errors-Bxun25O-.js";
|
|
6
|
+
import "../../../../DialogTitle-CeM_Z851.js";
|
|
7
7
|
import "../../../button/button.js";
|
|
8
8
|
export {
|
|
9
9
|
s as UploadDialogErrors
|
|
@@ -2,21 +2,22 @@ import { jsxs as L, jsx as a, Fragment as _ } from "react/jsx-runtime";
|
|
|
2
2
|
import * as P from "react";
|
|
3
3
|
import { S as $ } from "../../../../index-BiffjjQq.js";
|
|
4
4
|
import { c as i } from "../../../../index-B2JRaoNz.js";
|
|
5
|
-
import { s as n, U as V } from "../../../../upload-dialog-errors-
|
|
5
|
+
import { s as n, U as V } from "../../../../upload-dialog-errors-Bxun25O-.js";
|
|
6
6
|
import { PhotoList as H } from "../photo-list/photo-list.js";
|
|
7
7
|
import { localizedText as p } from "../../locale.js";
|
|
8
8
|
import { EN_LOCALE as Z } from "../../../../constants.js";
|
|
9
9
|
import { CLOSE_ICON_SIZE as w } from "./constants.js";
|
|
10
10
|
import { DEFAULT_MIN_DIMENSION as Y, DEFAULT_ASPECT_RATIO as q } from "../../constants.js";
|
|
11
|
-
import { D as T } from "../../../../Dialog-
|
|
12
|
-
import { a as D, b as O, D as G } from "../../../../DialogTitle-
|
|
11
|
+
import { D as T } from "../../../../Dialog-DqFOpJyx.js";
|
|
12
|
+
import { a as D, b as O, D as G } from "../../../../DialogTitle-CeM_Z851.js";
|
|
13
13
|
import { CircularProgressLoader as J } from "../../../circular-progress-loader/circular-progress-loader.js";
|
|
14
|
-
import { a as K, g as Q, c as X, b as m, P as t } from "../../../../createTheme-
|
|
15
|
-
import { m as A
|
|
16
|
-
import {
|
|
14
|
+
import { a as K, g as Q, c as X, b as m, P as t } from "../../../../createTheme-RRQUOQoF.js";
|
|
15
|
+
import { m as A } from "../../../../memoTheme-5A7c_y33.js";
|
|
16
|
+
import { c as M } from "../../../../createSimplePaletteValueFilter-B7--0ryQ.js";
|
|
17
|
+
import { u as oo, s as W, c as eo, b as to } from "../../../../chainPropTypes-C04Ex8aP.js";
|
|
17
18
|
import { u as ao } from "../../../../useId-CK6Kn3Tn.js";
|
|
18
|
-
import { B as ro } from "../../../../ButtonBase-
|
|
19
|
-
import { C as no } from "../../../../CircularProgress-
|
|
19
|
+
import { B as ro } from "../../../../ButtonBase-DPLf5-lz.js";
|
|
20
|
+
import { C as no } from "../../../../CircularProgress-CrHaMZDC.js";
|
|
20
21
|
import { Button as E } from "../../../button/button.js";
|
|
21
22
|
import '../../../../assets/upload-dialog.css';function io(o) {
|
|
22
23
|
return Q("MuiIconButton", o);
|
|
@@ -300,7 +301,7 @@ process.env.NODE_ENV !== "production" && (j.propTypes = {
|
|
|
300
301
|
*/
|
|
301
302
|
sx: t.oneOfType([t.arrayOf(t.oneOfType([t.func, t.object, t.bool])), t.func, t.object])
|
|
302
303
|
});
|
|
303
|
-
const po = "data:image/svg+xml,%3csvg%20width='46'%20height='46'%20viewBox='0%200%2046%2046'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M17.3434%2015.4595C16.8227%2014.9388%2015.9785%2014.9388%2015.4578%2015.4595C14.9371%2015.9802%2014.9371%2016.8244%2015.4578%2017.3451L21.1146%2023.002L15.4578%2028.6588C14.9371%2029.1795%2014.9371%2030.0237%2015.4578%2030.5444C15.9785%2031.0651%2016.8227%2031.0651%2017.3434%2030.5444L23.0002%2024.8876L28.6571%2030.5444C29.1778%2031.0651%2030.022%2031.0651%2030.5427%2030.5444C31.0634%2030.0237%2031.0634%2029.1795%2030.5427%2028.6588L24.8858%2023.002L30.5427%2017.3451C31.0634%2016.8244%2031.0634%2015.9802%2030.5427%2015.4595C30.022%2014.9388%2029.1778%2014.9388%2028.6571%2015.4595L23.0002%2021.1163L17.3434%2015.4595Z'%20fill='%233AA8FF'/%3e%3c/svg%3e",
|
|
304
|
+
const po = "data:image/svg+xml,%3csvg%20width='46'%20height='46'%20viewBox='0%200%2046%2046'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M17.3434%2015.4595C16.8227%2014.9388%2015.9785%2014.9388%2015.4578%2015.4595C14.9371%2015.9802%2014.9371%2016.8244%2015.4578%2017.3451L21.1146%2023.002L15.4578%2028.6588C14.9371%2029.1795%2014.9371%2030.0237%2015.4578%2030.5444C15.9785%2031.0651%2016.8227%2031.0651%2017.3434%2030.5444L23.0002%2024.8876L28.6571%2030.5444C29.1778%2031.0651%2030.022%2031.0651%2030.5427%2030.5444C31.0634%2030.0237%2031.0634%2029.1795%2030.5427%2028.6588L24.8858%2023.002L30.5427%2017.3451C31.0634%2016.8244%2031.0634%2015.9802%2030.5427%2015.4595C30.022%2014.9388%2029.1778%2014.9388%2028.6571%2015.4595L23.0002%2021.1163L17.3434%2015.4595Z'%20fill='%233AA8FF'/%3e%3c/svg%3e", Po = (o) => {
|
|
304
305
|
const {
|
|
305
306
|
onCloseDialogHandler: e,
|
|
306
307
|
photoSources: r = [],
|
|
@@ -367,6 +368,7 @@ const po = "data:image/svg+xml,%3csvg%20width='46'%20height='46'%20viewBox='0%20
|
|
|
367
368
|
children: /* @__PURE__ */ a(
|
|
368
369
|
"img",
|
|
369
370
|
{
|
|
371
|
+
draggable: !1,
|
|
370
372
|
width: w,
|
|
371
373
|
height: w,
|
|
372
374
|
src: po,
|
|
@@ -448,5 +450,5 @@ const po = "data:image/svg+xml,%3csvg%20width='46'%20height='46'%20viewBox='0%20
|
|
|
448
450
|
);
|
|
449
451
|
};
|
|
450
452
|
export {
|
|
451
|
-
|
|
453
|
+
Po as UploadDialog
|
|
452
454
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
2
|
import { PhotoCropUploaderProps } from './types';
|
|
3
|
-
export declare
|
|
3
|
+
export declare function PhotoCropUploader(props: PhotoCropUploaderProps): ReactElement;
|