@kroo-web/design-system 1.3.0 → 1.4.0

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,4 +1,4 @@
1
- import React, { ReactNode } from 'react';
1
+ import React, { ChangeEventHandler, DetailedHTMLProps, InputHTMLAttributes, ReactNode } from 'react';
2
2
  import { FieldValues, Path } from 'react-hook-form';
3
3
  export type TPhoneFieldProps<T extends FieldValues> = {
4
4
  className?: string;
@@ -11,3 +11,22 @@ export type TPhoneFieldProps<T extends FieldValues> = {
11
11
  placeholder?: string;
12
12
  };
13
13
  export declare const PhoneField: <T extends FieldValues>(props: TPhoneFieldProps<T>) => React.JSX.Element;
14
+ export type TNativeCountrySelectProps = {
15
+ id: string;
16
+ onChange?: ChangeEventHandler<HTMLSelectElement>;
17
+ } & DetailedHTMLProps<InputHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>;
18
+ export type TNativeInputProps = {
19
+ className?: string;
20
+ error?: {
21
+ message: string;
22
+ };
23
+ id: string;
24
+ placeholder: string;
25
+ } & DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
26
+ export declare const NativePhoneField: {
27
+ CountrySelect: React.ForwardRefExoticComponent<Omit<TNativeCountrySelectProps, "ref"> & React.RefAttributes<HTMLSelectElement>>;
28
+ Input: React.ForwardRefExoticComponent<Omit<TNativeInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
29
+ Root: ({ children }: {
30
+ children: ReactNode;
31
+ }) => React.JSX.Element;
32
+ };
package/dist/types.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as AccordionPrimitive from '@radix-ui/react-accordion';
2
- import React$1, { PropsWithChildren, ReactNode, HTMLProps, ElementType, ButtonHTMLAttributes, OptionHTMLAttributes, DetailedHTMLProps, InputHTMLAttributes } from 'react';
2
+ import React$1, { PropsWithChildren, ReactNode, HTMLProps, ElementType, ButtonHTMLAttributes, ChangeEventHandler, DetailedHTMLProps, InputHTMLAttributes, OptionHTMLAttributes } from 'react';
3
3
  import { MaterialSymbolProps } from 'react-material-symbols';
4
4
  import { FieldValues, Path, ControllerRenderProps, UseFormReturn, FieldError } from 'react-hook-form';
5
5
  import * as zustand from 'zustand';
@@ -247,6 +247,25 @@ type TPhoneFieldProps<T extends FieldValues> = {
247
247
  placeholder?: string;
248
248
  };
249
249
  declare const PhoneField: <T extends FieldValues>(props: TPhoneFieldProps<T>) => React$1.JSX.Element;
250
+ type TNativeCountrySelectProps = {
251
+ id: string;
252
+ onChange?: ChangeEventHandler<HTMLSelectElement>;
253
+ } & DetailedHTMLProps<InputHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>;
254
+ type TNativeInputProps = {
255
+ className?: string;
256
+ error?: {
257
+ message: string;
258
+ };
259
+ id: string;
260
+ placeholder: string;
261
+ } & DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
262
+ declare const NativePhoneField: {
263
+ CountrySelect: React$1.ForwardRefExoticComponent<Omit<TNativeCountrySelectProps, "ref"> & React$1.RefAttributes<HTMLSelectElement>>;
264
+ Input: React$1.ForwardRefExoticComponent<Omit<TNativeInputProps, "ref"> & React$1.RefAttributes<HTMLInputElement>>;
265
+ Root: ({ children }: {
266
+ children: ReactNode;
267
+ }) => React$1.JSX.Element;
268
+ };
250
269
 
251
270
  interface TPinInputProps<T extends FieldValues> {
252
271
  isNumeric?: boolean;
@@ -455,4 +474,4 @@ interface WrapperProps extends PropsWithChildren {
455
474
  }
456
475
  declare const Wrapper: ({ as, children, className, variants }: WrapperProps) => React$1.JSX.Element;
457
476
 
458
- export { Accordion, Button, Buttons, Callout, Card, Cards, type CardsVariants, Checkbox, Columns, ComboBox, DatePicker, Disclosure, Field, Form, type ICardOwnProps, type ICardProps, type ICardsProps, Icon, Link, Loading, Modal, NativeTextField, NumberField, OTPInput, PhoneField, PinInput, Popover, ProgressIndicator, RadioGroup, Range, Select, Skeleton, type TAccordionRootProps, type TAccordionTriggerProps, type TButtonProps, type TCalloutRootProps, type TCalloutTextProps, type TCardVariants, type TCheckboxProps, type TColumnsProps, type TComboBoxItem, type TComboBoxProps, type TDatePicker, type TDisclosureProps, type TIconProps, type TItem, type TLegacyMarketingFooter, type TLegacyMarketingHeading, type TLegacyMarketingText, type TLink, type TLoadingProps, type TModalButtonProps, type TModalContentProps, type TModalControlProps, type TModalHeaderProps, type TNativeTextFieldProps, type TNumberFieldProps, type TPhoneFieldProps, type TPinInputProps, type TPopoverContentProps, type TPopoverRootProps, type TPopoverTriggerProps, type TProgressIndicatorProps, type TRadioGroupProps, type TRangeProps, type TSelectProps, type TSkeletonProps, type TTabsContent, type TTabsList, type TTabsRoot, type TTabsTrigger, type TTagProps, type TTextFieldProps, type TToastDescriptionProps, type TToastIconProps, type TToastRootProps, type TToastTitleProps, type TTooltipContentProps, type TTooltipRootProps, type TTooltipTriggerProps, type TTypography, type TTypographyProps, type TTypographyVariants, type TUseModalProps, Table, TableBody, TableData, TableFooter, TableHead, TableHeader, TableRoot, TableRow, Tabs, Tag, TextField, Toast, Tooltip, Typography, Wrapper, type WrapperProps, type WrapperVariants, useModal };
477
+ export { Accordion, Button, Buttons, Callout, Card, Cards, type CardsVariants, Checkbox, Columns, ComboBox, DatePicker, Disclosure, Field, Form, type ICardOwnProps, type ICardProps, type ICardsProps, Icon, Link, Loading, Modal, NativePhoneField, NativeTextField, NumberField, OTPInput, PhoneField, PinInput, Popover, ProgressIndicator, RadioGroup, Range, Select, Skeleton, type TAccordionRootProps, type TAccordionTriggerProps, type TButtonProps, type TCalloutRootProps, type TCalloutTextProps, type TCardVariants, type TCheckboxProps, type TColumnsProps, type TComboBoxItem, type TComboBoxProps, type TDatePicker, type TDisclosureProps, type TIconProps, type TItem, type TLegacyMarketingFooter, type TLegacyMarketingHeading, type TLegacyMarketingText, type TLink, type TLoadingProps, type TModalButtonProps, type TModalContentProps, type TModalControlProps, type TModalHeaderProps, type TNativeCountrySelectProps, type TNativeInputProps, type TNativeTextFieldProps, type TNumberFieldProps, type TPhoneFieldProps, type TPinInputProps, type TPopoverContentProps, type TPopoverRootProps, type TPopoverTriggerProps, type TProgressIndicatorProps, type TRadioGroupProps, type TRangeProps, type TSelectProps, type TSkeletonProps, type TTabsContent, type TTabsList, type TTabsRoot, type TTabsTrigger, type TTagProps, type TTextFieldProps, type TToastDescriptionProps, type TToastIconProps, type TToastRootProps, type TToastTitleProps, type TTooltipContentProps, type TTooltipRootProps, type TTooltipTriggerProps, type TTypography, type TTypographyProps, type TTypographyVariants, type TUseModalProps, Table, TableBody, TableData, TableFooter, TableHead, TableHeader, TableRoot, TableRow, Tabs, Tag, TextField, Toast, Tooltip, Typography, Wrapper, type WrapperProps, type WrapperVariants, useModal };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kroo-web/design-system",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "description": "Web design system for Kroo including the components for the marketing site and the product side.",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",