@kroo-web/design-system 1.7.0 → 1.9.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.
@@ -9,3 +9,15 @@ export type TCheckboxProps<T extends FieldValues> = {
9
9
  variant?: 'checkbox' | 'radio';
10
10
  };
11
11
  export declare const Checkbox: <T extends FieldValues>(props: TCheckboxProps<T>) => React.JSX.Element;
12
+ export type TNativeCheckboxProps = {
13
+ disabled?: boolean;
14
+ error?: {
15
+ message: string;
16
+ };
17
+ helper?: {
18
+ message: string;
19
+ };
20
+ id: string;
21
+ label: ReactNode | string;
22
+ } & React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
23
+ export declare const NativeCheckbox: React.ForwardRefExoticComponent<Omit<TNativeCheckboxProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
@@ -1,4 +1,5 @@
1
1
  import React, { ReactNode } from 'react';
2
+ import { ComboBoxProps } from 'react-aria-components';
2
3
  import { ControllerRenderProps, FieldValues } from 'react-hook-form';
3
4
  export type TComboBoxItem = {
4
5
  img?: string;
@@ -15,3 +16,36 @@ export type TComboBoxProps = {
15
16
  };
16
17
  export declare const ComboBox: (props: Omit<TComboBoxProps, "field">) => React.JSX.Element;
17
18
  export declare const Field: ({ alwaysOpen, field: { onBlur, ...restField }, label, onSelect, options }: TComboBoxProps) => React.JSX.Element;
19
+ export type TNativeComboBoxRootProps = {
20
+ children: ReactNode;
21
+ disabled?: boolean;
22
+ error?: {
23
+ message: string;
24
+ };
25
+ helper?: {
26
+ message: string;
27
+ };
28
+ hideLabel?: boolean;
29
+ id: string;
30
+ label: string;
31
+ missing?: boolean;
32
+ placeholder?: string;
33
+ } & Omit<ComboBoxProps<TComboBoxItem>, 'children' | 'isDisabled' | 'label' | 'onOpenChange' | 'placeholder'>;
34
+ export declare const Root: ({ children, disabled, error, helper, hideLabel, id, label, missing, placeholder, ...rest }: TNativeComboBoxRootProps) => React.JSX.Element;
35
+ export declare const Options: ({ children }: {
36
+ children: ReactNode;
37
+ }) => React.JSX.Element;
38
+ export declare const Item: ({ children, img }: {
39
+ children: ReactNode;
40
+ img?: string;
41
+ }) => React.JSX.Element;
42
+ export declare const NativeComboBox: {
43
+ Item: ({ children, img }: {
44
+ children: ReactNode;
45
+ img?: string;
46
+ }) => React.JSX.Element;
47
+ Options: ({ children }: {
48
+ children: ReactNode;
49
+ }) => React.JSX.Element;
50
+ Root: ({ children, disabled, error, helper, hideLabel, id, label, missing, placeholder, ...rest }: TNativeComboBoxRootProps) => React.JSX.Element;
51
+ };
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ export type TFieldErrorProps = {
3
+ error: {
4
+ message: string;
5
+ };
6
+ };
7
+ export declare const FieldError: ({ error }: TFieldErrorProps) => React.JSX.Element;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ export type TFieldHelperProps = {
3
+ helper: {
4
+ message: string;
5
+ };
6
+ /**
7
+ * The id of the field helper this is required and expected to be used in conjunction with describeBy on the input field
8
+ * so they are associated..
9
+ */
10
+ id: string;
11
+ };
12
+ export declare const FieldHelper: ({ helper, id }: TFieldHelperProps) => React.JSX.Element;
package/dist/types.d.ts CHANGED
@@ -2,6 +2,7 @@ import * as AccordionPrimitive from '@radix-ui/react-accordion';
2
2
  import React$1, { PropsWithChildren, ReactNode, DetailedHTMLProps, InputHTMLAttributes, HTMLProps, ElementType, ButtonHTMLAttributes, ChangeEventHandler, OptionHTMLAttributes, SelectHTMLAttributes } from 'react';
3
3
  import { MaterialSymbolProps } from 'react-material-symbols';
4
4
  import { FieldValues, Path, ControllerRenderProps, UseFormReturn, FieldError } from 'react-hook-form';
5
+ import { ComboBoxProps } from 'react-aria-components';
5
6
  import * as zustand from 'zustand';
6
7
  import { OTPInputProps } from 'input-otp';
7
8
  import * as RadixPopover from '@radix-ui/react-popover';
@@ -123,6 +124,18 @@ type TCheckboxProps<T extends FieldValues> = {
123
124
  variant?: 'checkbox' | 'radio';
124
125
  };
125
126
  declare const Checkbox: <T extends FieldValues>(props: TCheckboxProps<T>) => React$1.JSX.Element;
127
+ type TNativeCheckboxProps = {
128
+ disabled?: boolean;
129
+ error?: {
130
+ message: string;
131
+ };
132
+ helper?: {
133
+ message: string;
134
+ };
135
+ id: string;
136
+ label: ReactNode | string;
137
+ } & React$1.DetailedHTMLProps<React$1.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
138
+ declare const NativeCheckbox: React$1.ForwardRefExoticComponent<Omit<TNativeCheckboxProps, "ref"> & React$1.RefAttributes<HTMLInputElement>>;
126
139
 
127
140
  type TColumnsProps = {
128
141
  children: React$1.ReactNode;
@@ -145,6 +158,39 @@ type TComboBoxProps = {
145
158
  };
146
159
  declare const ComboBox: (props: Omit<TComboBoxProps, "field">) => React$1.JSX.Element;
147
160
  declare const Field: ({ alwaysOpen, field: { onBlur, ...restField }, label, onSelect, options }: TComboBoxProps) => React$1.JSX.Element;
161
+ type TNativeComboBoxRootProps = {
162
+ children: ReactNode;
163
+ disabled?: boolean;
164
+ error?: {
165
+ message: string;
166
+ };
167
+ helper?: {
168
+ message: string;
169
+ };
170
+ hideLabel?: boolean;
171
+ id: string;
172
+ label: string;
173
+ missing?: boolean;
174
+ placeholder?: string;
175
+ } & Omit<ComboBoxProps<TComboBoxItem>, 'children' | 'isDisabled' | 'label' | 'onOpenChange' | 'placeholder'>;
176
+ declare const Root: ({ children, disabled, error, helper, hideLabel, id, label, missing, placeholder, ...rest }: TNativeComboBoxRootProps) => React$1.JSX.Element;
177
+ declare const Options: ({ children }: {
178
+ children: ReactNode;
179
+ }) => React$1.JSX.Element;
180
+ declare const Item: ({ children, img }: {
181
+ children: ReactNode;
182
+ img?: string;
183
+ }) => React$1.JSX.Element;
184
+ declare const NativeComboBox: {
185
+ Item: ({ children, img }: {
186
+ children: ReactNode;
187
+ img?: string;
188
+ }) => React$1.JSX.Element;
189
+ Options: ({ children }: {
190
+ children: ReactNode;
191
+ }) => React$1.JSX.Element;
192
+ Root: ({ children, disabled, error, helper, hideLabel, id, label, missing, placeholder, ...rest }: TNativeComboBoxRootProps) => React$1.JSX.Element;
193
+ };
148
194
 
149
195
  type TDatePicker<T extends FieldValues> = {
150
196
  disabled?: boolean;
@@ -524,4 +570,4 @@ interface WrapperProps extends PropsWithChildren {
524
570
  }
525
571
  declare const Wrapper: ({ as, children, className, variants }: WrapperProps) => React$1.JSX.Element;
526
572
 
527
- 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, NativeDatePicker, NativeNumberField, NativePhoneField, NativeSelect, 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 TNativeDatePickerProps, type TNativeInputProps, type TNativeNumberFieldProps, type TNativeSelectProps, 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 };
573
+ export { Accordion, Button, Buttons, Callout, Card, Cards, type CardsVariants, Checkbox, Columns, ComboBox, DatePicker, Disclosure, Field, Form, type ICardOwnProps, type ICardProps, type ICardsProps, Icon, Item, Link, Loading, Modal, NativeCheckbox, NativeComboBox, NativeDatePicker, NativeNumberField, NativePhoneField, NativeSelect, NativeTextField, NumberField, OTPInput, Options, PhoneField, PinInput, Popover, ProgressIndicator, RadioGroup, Range, Root, 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 TNativeCheckboxProps, type TNativeComboBoxRootProps, type TNativeCountrySelectProps, type TNativeDatePickerProps, type TNativeInputProps, type TNativeNumberFieldProps, type TNativeSelectProps, 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.7.0",
3
+ "version": "1.9.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",
@@ -110,6 +110,7 @@
110
110
  "framer-motion": "^11.0.8",
111
111
  "input-otp": "^1.4.1",
112
112
  "postcss": "^8.4.35",
113
+ "react-aria-components": "^1.6.0",
113
114
  "react-hook-form": "^7.51.0",
114
115
  "react-material-symbols": "^4.4.0",
115
116
  "zustand": "^4.5.2"