@segmentify/ui 0.0.49 → 0.0.50
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/components/molecules/campaign-title.d.ts +6 -6
- package/dist/components/molecules/input-field.d.ts +2 -6
- package/dist/components/molecules/switch-field.d.ts +1 -1
- package/dist/components/organisms/form-input.d.ts +3 -2
- package/dist/components/organisms/form-select.d.ts +19 -0
- package/dist/components/organisms/form-switch.d.ts +1 -1
- package/dist/components/organisms/form-time-picker.d.ts +22 -0
- package/dist/index.d.ts +2 -0
- package/dist/segmentify-ui.cjs +60 -60
- package/dist/segmentify-ui.js +5348 -5257
- package/dist/ui.css +6 -19
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
interface CampaignTitleProps {
|
|
2
|
-
label:
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
campaignId: string;
|
|
3
|
+
label: React.ReactNode;
|
|
4
|
+
isEdit?: boolean;
|
|
5
|
+
campaignId?: string;
|
|
6
|
+
children?: React.ReactNode;
|
|
7
7
|
}
|
|
8
|
-
declare const CampaignTitle: ({ label,
|
|
8
|
+
declare const CampaignTitle: ({ label, campaignId, isEdit, children }: CampaignTitleProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
export { CampaignTitle };
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
3
|
import { labelVariants } from '../../lib/design-variants';
|
|
4
|
-
export interface InputFieldProps {
|
|
4
|
+
export interface InputFieldProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'label'> {
|
|
5
5
|
name: string;
|
|
6
|
-
value
|
|
7
|
-
onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
8
|
-
placeholder: string;
|
|
6
|
+
value?: string | number | readonly string[];
|
|
9
7
|
label?: string;
|
|
10
8
|
labelVariant?: VariantProps<typeof labelVariants>['variant'];
|
|
11
|
-
type?: React.HTMLInputTypeAttribute;
|
|
12
9
|
description?: string;
|
|
13
|
-
className?: string;
|
|
14
10
|
isReadOnly?: boolean;
|
|
15
11
|
inputClassName?: string;
|
|
16
12
|
hasRequiredIndicator?: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Switch } from '../../components/atoms/switch';
|
|
2
2
|
interface Props extends React.ComponentProps<typeof Switch> {
|
|
3
|
-
label
|
|
3
|
+
label?: string;
|
|
4
4
|
name: string;
|
|
5
5
|
}
|
|
6
6
|
export declare const SwitchField: ({ label, name, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { type Control, type FieldValues, type Path } from 'react-hook-form';
|
|
2
3
|
import type { ClassValue } from 'clsx';
|
|
3
|
-
type Props<TFieldValues extends FieldValues = FieldValues> = {
|
|
4
|
+
type Props<TFieldValues extends FieldValues = FieldValues> = Omit<React.InputHTMLAttributes<HTMLInputElement>, 'name' | 'defaultValue'> & {
|
|
4
5
|
name: Path<TFieldValues>;
|
|
5
6
|
label: string;
|
|
6
7
|
placeholder?: string;
|
|
@@ -11,5 +12,5 @@ type Props<TFieldValues extends FieldValues = FieldValues> = {
|
|
|
11
12
|
tooltipContent?: string;
|
|
12
13
|
hasRequiredIndicator?: boolean;
|
|
13
14
|
};
|
|
14
|
-
export declare const FormInput: <TFieldValues extends FieldValues>({ label, containerClassName, inputClassName, name, description, placeholder, tooltipContent, hasRequiredIndicator, control, ...props }: Props<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare const FormInput: <TFieldValues extends FieldValues>({ label, containerClassName, inputClassName, name, description, placeholder, tooltipContent, hasRequiredIndicator, control, type, ...props }: Props<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
15
16
|
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ClassValue } from 'clsx';
|
|
3
|
+
import { type Control, type FieldValues, type Path } from 'react-hook-form';
|
|
4
|
+
import { SelectField } from '../../components/molecules/select-field';
|
|
5
|
+
import type { SelectItemProps } from '../../lib/types';
|
|
6
|
+
type SelectFieldRest = Omit<React.ComponentProps<typeof SelectField>, 'value' | 'onChange' | 'hasFormControlWrapper' | 'label' | 'labelClassName'>;
|
|
7
|
+
type FormSelectProps<TFieldValues extends FieldValues = FieldValues> = {
|
|
8
|
+
name: Path<TFieldValues>;
|
|
9
|
+
label: string;
|
|
10
|
+
options: SelectItemProps[];
|
|
11
|
+
placeholder: string;
|
|
12
|
+
control?: Control<TFieldValues>;
|
|
13
|
+
description?: string;
|
|
14
|
+
tooltipContent?: string;
|
|
15
|
+
hasRequiredIndicator?: boolean;
|
|
16
|
+
containerClassName?: ClassValue;
|
|
17
|
+
} & SelectFieldRest;
|
|
18
|
+
export declare const FormSelect: <TFieldValues extends FieldValues = FieldValues>({ name, label, options, placeholder, description, tooltipContent, hasRequiredIndicator, containerClassName, control, ...selectFieldProps }: FormSelectProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type Control, type FieldValues, type Path } from 'react-hook-form';
|
|
2
2
|
type Props<TFieldValues extends FieldValues = FieldValues> = {
|
|
3
3
|
name: Path<TFieldValues>;
|
|
4
|
-
label
|
|
4
|
+
label?: string;
|
|
5
5
|
control?: Control<TFieldValues>;
|
|
6
6
|
description?: string;
|
|
7
7
|
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TimePicker component for selecting time values in forms.
|
|
3
|
+
*
|
|
4
|
+
* @component
|
|
5
|
+
* @param {Object} props - The component props.
|
|
6
|
+
* @param {string} props.name - The name of the input field for form registration.
|
|
7
|
+
* @param {string} [props.label] - The label message ID for internationalization.
|
|
8
|
+
* @param {string} [props.description] - The description message ID for internationalization.
|
|
9
|
+
* @param {string} [props.containerClassName] - Additional CSS classes for the container.
|
|
10
|
+
* @param {number} [props.step=60] - The step interval in seconds for the time input.
|
|
11
|
+
* @returns {JSX.Element} The rendered TimePicker component.
|
|
12
|
+
*/
|
|
13
|
+
type FormTimePickerProps = {
|
|
14
|
+
name: string;
|
|
15
|
+
label?: string;
|
|
16
|
+
description?: string;
|
|
17
|
+
containerClassName?: string;
|
|
18
|
+
showErrorPlaceholder?: boolean;
|
|
19
|
+
step?: number;
|
|
20
|
+
};
|
|
21
|
+
export declare const FormTimePicker: ({ name, label, description, containerClassName, showErrorPlaceholder, step, }: FormTimePickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -32,6 +32,8 @@ export { FieldDescription } from './components/atoms/field-description';
|
|
|
32
32
|
export { FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage } from './components/atoms/form';
|
|
33
33
|
export { FormCheckbox } from './components/organisms/form-checkbox';
|
|
34
34
|
export { FormCombobox } from './components/organisms/form-combobox';
|
|
35
|
+
export { FormSelect } from './components/organisms/form-select';
|
|
36
|
+
export { FormTimePicker } from './components/organisms/form-time-picker';
|
|
35
37
|
export { FormDatePicker } from './components/organisms/form-date-picker';
|
|
36
38
|
export { FormFileUpload } from './components/organisms/form-file-upload';
|
|
37
39
|
export { FormInput } from './components/organisms/form-input';
|