@liketysplit/react-luna 0.1.4 → 0.1.6

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.
@@ -1,12 +1,18 @@
1
1
  export * from "./luna-button";
2
2
  export * from "./luna-card";
3
+ export * from "./luna-checkbox";
4
+ export * from "./luna-date-input";
5
+ export * from "./luna-date-picker";
6
+ export * from "./luna-radio";
3
7
  export * from "./luna-divider";
4
8
  export * from "./luna-header";
5
9
  export * from "./luna-input";
10
+ export * from "./luna-slider";
6
11
  export * from "./luna-textarea";
7
12
  export * from "./luna-select";
8
13
  export * from "./luna-multiselect";
9
14
  export * from "./luna-autocomplete";
15
+ export * from "./luna-switch";
10
16
  export * from "./luna-text";
11
17
  export * from "./luna-row";
12
18
  export * from "./luna-column";
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ import "./LunaCheckbox.css";
3
+ export declare const LunaCheckbox: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "type"> & {
4
+ label?: React.ReactNode;
5
+ description?: React.ReactNode;
6
+ helpText?: React.ReactNode;
7
+ error?: React.ReactNode;
8
+ indeterminate?: boolean;
9
+ } & React.RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,8 @@
1
+ import type React from "react";
2
+ export type LunaCheckboxProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "type"> & {
3
+ label?: React.ReactNode;
4
+ description?: React.ReactNode;
5
+ helpText?: React.ReactNode;
6
+ error?: React.ReactNode;
7
+ indeterminate?: boolean;
8
+ };
@@ -0,0 +1,2 @@
1
+ export * from "./LunaCheckbox";
2
+ export * from "./LunaCheckbox.props";
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ import "./LunaDateInput.css";
3
+ export declare const LunaDateInput: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "type" | "prefix"> & {
4
+ label?: React.ReactNode;
5
+ externalLabel?: boolean;
6
+ helpText?: React.ReactNode;
7
+ error?: React.ReactNode;
8
+ inputSize?: "sm" | "md" | "lg";
9
+ fullWidth?: boolean;
10
+ } & React.RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,9 @@
1
+ import type React from "react";
2
+ export type LunaDateInputProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, "prefix" | "size" | "type"> & {
3
+ label?: React.ReactNode;
4
+ externalLabel?: boolean;
5
+ helpText?: React.ReactNode;
6
+ error?: React.ReactNode;
7
+ inputSize?: "sm" | "md" | "lg";
8
+ fullWidth?: boolean;
9
+ };
@@ -0,0 +1,2 @@
1
+ export * from "./LunaDateInput";
2
+ export type { LunaDateInputProps } from "./LunaDateInput.props";
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import type { LunaDatePickerProps } from "./LunaDatePicker.props";
3
+ import "./LunaDatePicker.css";
4
+ export declare const LunaDatePicker: React.ForwardRefExoticComponent<LunaDatePickerProps & React.RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,28 @@
1
+ import type React from "react";
2
+ export type LunaDateRangeValue = {
3
+ start?: string;
4
+ end?: string;
5
+ };
6
+ type LunaDatePickerBaseProps = {
7
+ label?: React.ReactNode;
8
+ externalLabel?: boolean;
9
+ helpText?: React.ReactNode;
10
+ error?: React.ReactNode;
11
+ inputSize?: "sm" | "md" | "lg";
12
+ fullWidth?: boolean;
13
+ buttonPosition?: "pre" | "post";
14
+ };
15
+ type LunaDatePickerSimpleOrPickerProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, "prefix" | "size" | "type" | "value" | "defaultValue" | "onChange"> & LunaDatePickerBaseProps & {
16
+ mode?: "simple" | "picker";
17
+ value?: string;
18
+ defaultValue?: string;
19
+ onChange?: (value: string) => void;
20
+ };
21
+ type LunaDatePickerRangeProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, "prefix" | "size" | "type" | "value" | "defaultValue" | "onChange"> & LunaDatePickerBaseProps & {
22
+ mode: "range";
23
+ value?: LunaDateRangeValue;
24
+ defaultValue?: LunaDateRangeValue;
25
+ onChange?: (value: LunaDateRangeValue) => void;
26
+ };
27
+ export type LunaDatePickerProps = LunaDatePickerSimpleOrPickerProps | LunaDatePickerRangeProps;
28
+ export {};
@@ -0,0 +1,19 @@
1
+ import type { LunaDateRangeValue } from "./LunaDatePicker.props";
2
+ export declare function parseDateValue(value?: string): Date | null;
3
+ export declare function formatDateValue(date: Date): string;
4
+ export declare function formatInputDate(value?: string): string;
5
+ export declare function parseInputDate(value?: string): string | null;
6
+ export declare function formatDisplayDate(value?: string): string;
7
+ export declare function formatDisplayRange(value?: LunaDateRangeValue): string;
8
+ export declare function startOfMonth(date: Date): Date;
9
+ export declare function addMonths(date: Date, amount: number): Date;
10
+ export declare function isSameDay(left: Date | null, right: Date | null): boolean;
11
+ export declare function isBeforeDay(left: Date | null, right: Date | null): boolean;
12
+ export declare function isInRange(date: Date, start: Date | null, end: Date | null): boolean;
13
+ export declare function isOutsideLimits(date: Date, min?: string, max?: string): boolean;
14
+ export declare function buildMonthGrid(visibleMonth: Date): {
15
+ date: Date;
16
+ value: string;
17
+ day: number;
18
+ inMonth: boolean;
19
+ }[];
@@ -0,0 +1,2 @@
1
+ export * from "./LunaDatePicker";
2
+ export type { LunaDatePickerProps, LunaDateRangeValue } from "./LunaDatePicker.props";
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import "./LunaRadio.css";
3
+ export declare const LunaRadio: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "type"> & {
4
+ label?: React.ReactNode;
5
+ description?: React.ReactNode;
6
+ helpText?: React.ReactNode;
7
+ error?: React.ReactNode;
8
+ } & React.RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,7 @@
1
+ import type React from "react";
2
+ export type LunaRadioProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "type"> & {
3
+ label?: React.ReactNode;
4
+ description?: React.ReactNode;
5
+ helpText?: React.ReactNode;
6
+ error?: React.ReactNode;
7
+ };
@@ -0,0 +1,2 @@
1
+ export * from "./LunaRadio";
2
+ export type { LunaRadioProps } from "./LunaRadio.props";
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ import "./LunaSlider.css";
3
+ export declare const LunaSlider: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "type"> & {
4
+ label?: React.ReactNode;
5
+ description?: React.ReactNode;
6
+ helpText?: React.ReactNode;
7
+ error?: React.ReactNode;
8
+ showValue?: boolean;
9
+ } & React.RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,8 @@
1
+ import type React from "react";
2
+ export type LunaSliderProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "type"> & {
3
+ label?: React.ReactNode;
4
+ description?: React.ReactNode;
5
+ helpText?: React.ReactNode;
6
+ error?: React.ReactNode;
7
+ showValue?: boolean;
8
+ };
@@ -0,0 +1,2 @@
1
+ export * from "./LunaSlider";
2
+ export type { LunaSliderProps } from "./LunaSlider.props";
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import "./LunaSwitch.css";
3
+ export declare const LunaSwitch: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "type"> & {
4
+ label?: React.ReactNode;
5
+ description?: React.ReactNode;
6
+ helpText?: React.ReactNode;
7
+ error?: React.ReactNode;
8
+ } & React.RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,7 @@
1
+ import type React from "react";
2
+ export type LunaSwitchProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "type"> & {
3
+ label?: React.ReactNode;
4
+ description?: React.ReactNode;
5
+ helpText?: React.ReactNode;
6
+ error?: React.ReactNode;
7
+ };
@@ -0,0 +1,2 @@
1
+ export * from "./LunaSwitch";
2
+ export type { LunaSwitchProps } from "./LunaSwitch.props";