@kroo-web/design-system 1.8.0 → 1.9.1
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/cjs/index.js +15 -24
- package/dist/cjs/src/components/ComboBox/index.d.ts +34 -0
- package/dist/cjs/src/components/shared/FieldError/index.d.ts +7 -0
- package/dist/cjs/src/components/shared/FieldHelper/index.d.ts +12 -0
- package/dist/esm/index.js +15 -24
- package/dist/esm/src/components/ComboBox/index.d.ts +34 -0
- package/dist/esm/src/components/shared/FieldError/index.d.ts +7 -0
- package/dist/esm/src/components/shared/FieldHelper/index.d.ts +12 -0
- package/dist/types.d.ts +35 -1
- package/package.json +2 -1
|
@@ -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,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';
|
|
@@ -157,6 +158,39 @@ type TComboBoxProps = {
|
|
|
157
158
|
};
|
|
158
159
|
declare const ComboBox: (props: Omit<TComboBoxProps, "field">) => React$1.JSX.Element;
|
|
159
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
|
+
};
|
|
160
194
|
|
|
161
195
|
type TDatePicker<T extends FieldValues> = {
|
|
162
196
|
disabled?: boolean;
|
|
@@ -536,4 +570,4 @@ interface WrapperProps extends PropsWithChildren {
|
|
|
536
570
|
}
|
|
537
571
|
declare const Wrapper: ({ as, children, className, variants }: WrapperProps) => React$1.JSX.Element;
|
|
538
572
|
|
|
539
|
-
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, NativeCheckbox, 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 TNativeCheckboxProps, 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.
|
|
3
|
+
"version": "1.9.1",
|
|
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"
|