@team_yumi/ramen 0.4.0-next.20231124-6a01ee9-56428f393d415f317b0ef9a378f93e4a → 0.4.0-next.20231128-37228e3-f736c71a66d1e1d0149e2f5eb53bb260

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 (31) hide show
  1. package/components/core/x-accordion/root.d.ts +38 -0
  2. package/components/core/{xinput → x-input}/root.d.ts +1 -1
  3. package/components/core/x-text-area/root.d.ts +45 -0
  4. package/components/core/x-text-field/index.d.ts +2 -0
  5. package/components/core/x-text-field/root.d.ts +31 -0
  6. package/components/core/xcurrency-input/root.d.ts +1 -1
  7. package/components/core/xdecision/root.d.ts +1 -0
  8. package/components/core/xemail-input/root.d.ts +1 -1
  9. package/components/core/xnumber-input/root.d.ts +1 -1
  10. package/components/core/xpassword-input/root.d.ts +1 -1
  11. package/components/core/xphone-input/root.d.ts +1 -1
  12. package/components/core/xsearch-input/root.d.ts +1 -1
  13. package/components/core/xtext-input/root.d.ts +1 -1
  14. package/components/mobile/x-bottom-sheet/index.d.ts +2 -0
  15. package/components/mobile/x-bottom-sheet/root.d.ts +85 -0
  16. package/hooks/useMountTransition.d.ts +1 -1
  17. package/index.core.d.ts +3 -1
  18. package/index.css +95 -61
  19. package/index.js +1 -1
  20. package/index.mobile.d.ts +4 -2
  21. package/index.web.d.ts +3 -1
  22. package/models/Collections/IBottomExpandableState.d.ts +1 -0
  23. package/models/Collections/IDecisionValueType.d.ts +1 -0
  24. package/models/Collections/ITextFieldType.d.ts +1 -0
  25. package/models/Collections/index.d.ts +4 -1
  26. package/package.json +1 -1
  27. package/components/core/xtext-area/root.d.ts +0 -13
  28. package/components/mobile/xbottom-sheet/root.d.ts +0 -26
  29. /package/components/{mobile/xbottom-sheet → core/x-accordion}/index.d.ts +0 -0
  30. /package/components/core/{xinput → x-input}/index.d.ts +0 -0
  31. /package/components/core/{xtext-area → x-text-area}/index.d.ts +0 -0
@@ -0,0 +1,38 @@
1
+ import React from "react";
2
+ import { Collections } from "@yumi/models";
3
+ export interface IProps {
4
+ /**
5
+ * Set open or close accordion
6
+ */
7
+ isOpen?: boolean;
8
+ /**
9
+ * Set default value to open or close accordion
10
+ */
11
+ defaultOpen?: boolean;
12
+ /**
13
+ * Set button text for open accordion
14
+ */
15
+ openedTitle?: string;
16
+ /**
17
+ * Set button text for close accordion
18
+ */
19
+ closedTitle?: string;
20
+ /**
21
+ * Set state disabled
22
+ */
23
+ disabled?: boolean;
24
+ /**
25
+ * Child Elements
26
+ */
27
+ children?: React.ReactNode;
28
+ /**
29
+ * Set size for button 'xxs', 'xs', 's', 'm', 'l', 'xl'
30
+ */
31
+ size?: (typeof Collections.ISize)[number];
32
+ /**
33
+ * Handle when accordion is open or close action
34
+ */
35
+ onToggle?: (open: boolean) => void;
36
+ }
37
+ declare const XAccordion: React.FC<IProps>;
38
+ export default XAccordion;
@@ -1,5 +1,5 @@
1
1
  import React, { LegacyRef, MouseEventHandler } from 'react';
2
- import { Collections } from './../../../models';
2
+ import { Collections } from '../../../models';
3
3
  export interface IProps {
4
4
  inputRef?: LegacyRef<HTMLInputElement>;
5
5
  type?: (typeof Collections.IInputType)[number];
@@ -0,0 +1,45 @@
1
+ import React from 'react';
2
+ export interface IProps {
3
+ /**
4
+ * Label text
5
+ */
6
+ label?: string;
7
+ /**
8
+ * Helper text
9
+ */
10
+ caption?: string;
11
+ /**
12
+ * Error message
13
+ */
14
+ error?: string;
15
+ /**
16
+ * Show mandatory symbol for textarea when is required
17
+ */
18
+ mandatory?: boolean;
19
+ /**
20
+ * text for placeholder
21
+ */
22
+ placeholder?: string;
23
+ /**
24
+ * Property to display character counter
25
+ */
26
+ showCount?: boolean;
27
+ /**
28
+ * The maximum number of characters in Textarea
29
+ */
30
+ maxLength?: number;
31
+ /**
32
+ * The textarea content value
33
+ */
34
+ value?: string;
35
+ /**
36
+ * Whether the textarea is disabled
37
+ */
38
+ disabled?: boolean;
39
+ /**
40
+ * Callback when user input
41
+ */
42
+ onChange?: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
43
+ }
44
+ declare const XTextArea: React.FC<IProps>;
45
+ export default XTextArea;
@@ -0,0 +1,2 @@
1
+ import Root from './root';
2
+ export default Root;
@@ -0,0 +1,31 @@
1
+ import React from 'react';
2
+ import { IProps as IInputProps } from '../x-input/root';
3
+ import { Collections } from '@yumi/models';
4
+ /**
5
+ * Properties for a custom input component.
6
+ * Extends the base input properties (excluding 'type').
7
+ */
8
+ export interface IProps extends Omit<IInputProps, 'type'> {
9
+ /**
10
+ * Type of the input field, must be a value from Collections.ITextFieldType.
11
+ */
12
+ type: (typeof Collections.ITextFieldType)[number];
13
+ /**
14
+ * Label for the input field.
15
+ */
16
+ label?: string;
17
+ /**
18
+ * Additional caption or description for the input field.
19
+ */
20
+ caption?: string;
21
+ /**
22
+ * Error message associated with the input field.
23
+ */
24
+ error?: string;
25
+ /**
26
+ * Whether the input field is mandatory.
27
+ */
28
+ mandatory?: boolean;
29
+ }
30
+ declare const XTextField: React.FC<IProps>;
31
+ export default XTextField;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { IProps as IInputProps } from './../xinput/root';
2
+ import { IProps as IInputProps } from '../x-input/root';
3
3
  export declare type IProps = Omit<IInputProps, 'type'>;
4
4
  declare const XCurrencyInput: React.FC<IProps>;
5
5
  export default XCurrencyInput;
@@ -11,6 +11,7 @@ export interface IProps {
11
11
  onClickAffirmative: (state: boolean) => void;
12
12
  onClickNegative: (state: boolean) => void;
13
13
  onClickDoesntApplyOption?: (state: boolean) => void;
14
+ initialValue?: (typeof Collections.IDecisionValueType)[number];
14
15
  }
15
16
  declare const XDecision: React.FC<IProps>;
16
17
  export default XDecision;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { Collections } from './../../../models';
3
- import { IProps as IInputProps } from './../xinput/root';
3
+ import { IProps as IInputProps } from '../x-input/root';
4
4
  export interface IProps extends Omit<IInputProps, 'type' | 'icon'> {
5
5
  size?: (typeof Collections.IEmailInputSize)[number];
6
6
  }
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { Collections } from './../../../models';
3
- import { IProps as IInputProps } from './../xinput/root';
3
+ import { IProps as IInputProps } from '../x-input/root';
4
4
  export interface IProps extends Omit<IInputProps, 'type'> {
5
5
  size?: (typeof Collections.INumberInputSize)[number];
6
6
  }
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { Collections } from './../../../models';
3
- import { IProps as IInputProps } from './../xinput/root';
3
+ import { IProps as IInputProps } from '../x-input/root';
4
4
  export interface IProps extends Omit<IInputProps, 'type'> {
5
5
  size?: (typeof Collections.INumberInputSize)[number];
6
6
  }
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { Collections } from './../../../models';
3
- import { IProps as IInputProps } from './../xinput/root';
3
+ import { IProps as IInputProps } from '../x-input/root';
4
4
  export interface IProps extends Omit<IInputProps, 'type'> {
5
5
  size?: (typeof Collections.IPhoneInputSize)[number];
6
6
  }
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { Collections } from './../../../models';
3
- import { IProps as IInputProps } from './../xinput/root';
3
+ import { IProps as IInputProps } from '../x-input/root';
4
4
  export interface IProps extends Omit<IInputProps, 'type' | 'icon'> {
5
5
  size?: (typeof Collections.ISearchInputSize)[number];
6
6
  }
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { Collections } from './../../../models';
3
- import { IProps as IInputProps } from './../xinput/root';
3
+ import { IProps as IInputProps } from '../x-input/root';
4
4
  export interface IProps extends Omit<IInputProps, 'type'> {
5
5
  size?: (typeof Collections.ITextInputSize)[number];
6
6
  }
@@ -0,0 +1,2 @@
1
+ import Root from './root';
2
+ export default Root;
@@ -0,0 +1,85 @@
1
+ import React from 'react';
2
+ import { Collections } from '../../../models';
3
+ export interface IAction {
4
+ /**
5
+ * The key of the action
6
+ */
7
+ key: string;
8
+ /**
9
+ * The text of the action button
10
+ */
11
+ text: string;
12
+ /**
13
+ * The type of the action button
14
+ */
15
+ type: (typeof Collections.IType)[number];
16
+ /**
17
+ * The icon of the action button
18
+ */
19
+ icon?: (typeof Collections.IIcon)[number];
20
+ /**
21
+ * If true, the action button will be disabled
22
+ */
23
+ disabled?: boolean;
24
+ /**
25
+ * If true, the action button will be loading
26
+ */
27
+ loading?: boolean;
28
+ }
29
+ export interface IProps {
30
+ /**
31
+ * If true, the component will show a transition when it is expanded or collapsed
32
+ */
33
+ animation?: boolean;
34
+ /**
35
+ * If true, the component will be expanded
36
+ */
37
+ expanded: boolean;
38
+ /**
39
+ * The content of the component
40
+ */
41
+ children?: React.ReactNode;
42
+ /**
43
+ * The content of the header
44
+ */
45
+ headerChildren?: React.ReactNode;
46
+ /**
47
+ * The icon of the header
48
+ */
49
+ icon?: (typeof Collections.IIcon)[number];
50
+ /**
51
+ * The title of the header
52
+ */
53
+ title?: string;
54
+ /**
55
+ * The state of the bottom sheet
56
+ */
57
+ display?: (typeof Collections.IBottomExpandableState)[number];
58
+ /**
59
+ * The subtitle of the header
60
+ */
61
+ subtitle?: string;
62
+ /**
63
+ * The callback fired when the component is expanded
64
+ */
65
+ onExpand?: () => void;
66
+ /**
67
+ * The callback fired when the component is collapsed
68
+ */
69
+ onCollapse?: () => void;
70
+ /**
71
+ * The actions of the component
72
+ */
73
+ actions?: IAction[];
74
+ /**
75
+ * The callback fired when an action is clicked
76
+ * @param key
77
+ */
78
+ onActionClick?: (key: string) => void;
79
+ /**
80
+ * The number for the badge of the header
81
+ */
82
+ badge?: number;
83
+ }
84
+ declare const XBottomSheet: React.FC<IProps>;
85
+ export default XBottomSheet;
@@ -1 +1 @@
1
- export declare const useMountTransition: (isMounted: any, unmountDelay: number) => boolean;
1
+ export declare const useMountTransition: (isMounted: boolean | undefined, unmountDelay: number) => boolean;
package/index.core.d.ts CHANGED
@@ -27,7 +27,7 @@ declare const _default: {
27
27
  XRadioButton: import("react").FC<import("./components/core/xradio-button/root").IProps>;
28
28
  XAvatar: import("react").FC<import("./components/core/xavatar/root").IProps>;
29
29
  XAlert: import("react").FC<import("./components/core/xalert/root").IProps>;
30
- XTextArea: import("react").FC<import("./components/core/xtext-area/root").IProps>;
30
+ XTextArea: import("react").FC<import("./components/core/x-text-area/root").IProps>;
31
31
  XFormItem: import("react").FC<import("./components/core/xform-item/root").IProps>;
32
32
  XList: typeof XList;
33
33
  XCard: import("react").FC<import("./components/core/xcard/root").IProps>;
@@ -70,5 +70,7 @@ declare const _default: {
70
70
  XProgressBar: import("react").FC<import("./components/core/xprogress-bar/root").IProps>;
71
71
  XBar: import("react").FC<import("./components/core/xbar/root").IProps>;
72
72
  XDecision: import("react").FC<import("./components/core/xdecision/root").IProps>;
73
+ XTextField: import("react").FC<import("./components/core/x-text-field/root").IProps>;
74
+ XAccordion: import("react").FC<import("./components/core/x-accordion/root").IProps>;
73
75
  };
74
76
  export default _default;