wini-web-components 2.6.1 → 2.6.2

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.
@@ -12,9 +12,10 @@ interface ButtonProps {
12
12
  /**
13
13
  * default: size32: button-text-3 \
14
14
  * recommend: size64: button-text-1 | size56: button-text-1 | size48: button-text-1 | size40: button-text-3 | size32: button-text-3 | size24: button-text-5
15
+ * status button: button-primary | button-infor | button-warning | button-error | button-success | button-grey | button-neutral | button-infor-main | button-warning-main | button-error-main | button-success-main
15
16
  * */
16
17
  className?: string;
17
- onClick?: React.MouseEventHandler<HTMLButtonElement>;
18
+ onClick?: React.MouseEventHandler<HTMLButtonElement | HTMLAnchorElement>;
18
19
  }
19
20
  export declare class Button extends React.Component<ButtonProps> {
20
21
  render(): React.JSX.Element;
@@ -10,7 +10,7 @@ const button_module_css_1 = __importDefault(require("./button.module.css"));
10
10
  class Button extends react_1.default.Component {
11
11
  render() {
12
12
  var _a, _b, _c;
13
- return this.props.linkTo ? react_1.default.createElement("a", { id: this.props.id, href: this.props.disabled ? undefined : this.props.linkTo, target: this.props.target, className: `${button_module_css_1.default['button-container']} row ${(_a = this.props.className) !== null && _a !== void 0 ? _a : "button-text-3"}`, style: this.props.style },
13
+ return this.props.linkTo ? react_1.default.createElement("a", { id: this.props.id, href: this.props.disabled ? undefined : this.props.linkTo, target: this.props.target, className: `${button_module_css_1.default['button-container']} row ${(_a = this.props.className) !== null && _a !== void 0 ? _a : "button-text-3"}`, style: this.props.style, onClick: this.props.onClick },
14
14
  this.props.prefix,
15
15
  react_1.default.createElement(text_1.Text, { maxLine: 1, className: button_module_css_1.default['button-label'] }, this.props.label),
16
16
  this.props.suffix) : react_1.default.createElement("button", { id: this.props.id, type: (_b = this.props.type) !== null && _b !== void 0 ? _b : "button", disabled: this.props.disabled, className: `${button_module_css_1.default['button-container']} row ${(_c = this.props.className) !== null && _c !== void 0 ? _c : "button-text-3"}`, style: this.props.style, onClick: this.props.onClick },
@@ -4,12 +4,6 @@ export declare const today: Date;
4
4
  export declare const startDate: Date;
5
5
  export declare const endDate: Date;
6
6
  export declare const inRangeTime: (date: Date, startDate: Date, endDate: Date) => boolean;
7
- export declare enum CalendarType {
8
- DATE = 0,
9
- MONTH = 1,
10
- YEAR = 2,
11
- DATETIME = 3
12
- }
13
7
  interface CalendarProps extends WithTranslation {
14
8
  id?: string;
15
9
  value?: Date | {
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.Calendar = exports.CalendarType = exports.inRangeTime = exports.endDate = exports.startDate = exports.today = void 0;
6
+ exports.Calendar = exports.inRangeTime = exports.endDate = exports.startDate = exports.today = void 0;
7
7
  const react_1 = __importDefault(require("react"));
8
8
  const calendar_module_css_1 = __importDefault(require("./calendar.module.css"));
9
9
  const date_fns_1 = require("date-fns");
@@ -14,13 +14,6 @@ exports.startDate = new Date(exports.today.getFullYear() - 100, exports.today.ge
14
14
  exports.endDate = new Date(exports.today.getFullYear() + 100, exports.today.getMonth(), exports.today.getDate());
15
15
  const inRangeTime = (date, startDate, endDate) => ((0, date_fns_1.differenceInCalendarDays)(date, startDate) > -1 && (0, date_fns_1.differenceInCalendarDays)(endDate, date) > -1);
16
16
  exports.inRangeTime = inRangeTime;
17
- var CalendarType;
18
- (function (CalendarType) {
19
- CalendarType[CalendarType["DATE"] = 0] = "DATE";
20
- CalendarType[CalendarType["MONTH"] = 1] = "MONTH";
21
- CalendarType[CalendarType["YEAR"] = 2] = "YEAR";
22
- CalendarType[CalendarType["DATETIME"] = 3] = "DATETIME";
23
- })(CalendarType || (exports.CalendarType = CalendarType = {}));
24
17
  var CalendarTab;
25
18
  (function (CalendarTab) {
26
19
  CalendarTab[CalendarTab["DATE"] = 0] = "DATE";
@@ -0,0 +1,36 @@
1
+ import { CSSProperties, ReactNode } from "react";
2
+ import React from "react";
3
+ interface ValueProps {
4
+ start?: Date;
5
+ end?: Date;
6
+ /** type: 1: daily, 2: weekly, 3: monthly */
7
+ repeatData?: {
8
+ type: 1 | 2 | 3;
9
+ value: Array<string | number>;
10
+ };
11
+ }
12
+ interface DateTimePickerProps {
13
+ id?: string;
14
+ value?: Date;
15
+ endValue?: Date;
16
+ min?: Date;
17
+ max?: Date;
18
+ pickOnly?: boolean;
19
+ helperText?: string;
20
+ helperTextColor?: string;
21
+ placeholder?: string;
22
+ className?: string;
23
+ style?: CSSProperties;
24
+ disabled?: boolean;
25
+ pickerType?: "auto" | "date" | "datetime" | "daterange" | "datetimerange";
26
+ enableRepeat?: boolean;
27
+ /** type: 1: daily, 2: weekly, 3: monthly */
28
+ repeatValue?: {
29
+ type: 1 | 2 | 3;
30
+ value: Array<"everyday" | "last" | number>;
31
+ };
32
+ prefix?: ReactNode;
33
+ onChange?: (ev?: Date | ValueProps) => void;
34
+ }
35
+ export declare function DateTimePicker(props: DateTimePickerProps): React.JSX.Element;
36
+ export {};