@bcgov/design-system-react-components 0.7.0-pr680 → 0.7.0-pr690
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.cjs +1605 -297
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.js +1599 -298
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +62 -26
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { DisclosureProps, DisclosureGroupProps, DialogProps as DialogProps$1, ButtonProps as ButtonProps$1, CalendarProps, DateValue, CheckboxProps, CheckboxGroupProps as CheckboxGroupProps$1, ValidationResult, DatePickerProps as DatePickerProps$1, FormProps, HeadingProps as HeadingProps$1, LinkProps as LinkProps$1, ModalOverlayProps, ProgressBarProps as ProgressBarProps$1, RadioProps, RadioGroupProps as RadioGroupProps$1,
|
|
3
|
-
export { DialogTrigger, TooltipTrigger } from 'react-aria-components';
|
|
2
|
+
import { DisclosureProps, DisclosureGroupProps, DialogProps as DialogProps$1, ButtonProps as ButtonProps$1, CalendarProps, DateValue, CheckboxProps, CheckboxGroupProps as CheckboxGroupProps$1, ValidationResult, DatePickerProps as DatePickerProps$1, FormProps, HeadingProps as HeadingProps$1, LinkProps as LinkProps$1, MenuItemProps as MenuItemProps$1, MenuItemRenderProps, MenuProps as MenuProps$1, Key, PopoverProps, ModalOverlayProps, ProgressBarProps as ProgressBarProps$1, RadioProps, RadioGroupProps as RadioGroupProps$1, TagProps as TagProps$1, SelectProps as SelectProps$1, ListBoxItemProps as ListBoxItemProps$1, SeparatorProps as SeparatorProps$1, TagGroupProps as TagGroupProps$1, TagListProps as TagListProps$1, TextProps as TextProps$1, TextFieldProps as TextFieldProps$1, TimeValue, TimeFieldProps as TimeFieldProps$1, ToggleButtonProps as ToggleButtonProps$1, ToggleButtonGroupProps as ToggleButtonGroupProps$1, SwitchProps as SwitchProps$1, TooltipProps, NumberFieldProps as NumberFieldProps$1 } from 'react-aria-components';
|
|
3
|
+
export { DialogTrigger, MenuSection, Header as MenuSectionHeader, MenuTrigger, SubmenuTrigger, TooltipTrigger } from 'react-aria-components';
|
|
4
4
|
import { PropsWithChildren } from 'react';
|
|
5
5
|
|
|
6
6
|
interface AccordionProps extends DisclosureProps {
|
|
@@ -227,6 +227,30 @@ interface LinkProps extends LinkProps$1 {
|
|
|
227
227
|
}
|
|
228
228
|
declare function Link({ children, size, danger, isButton, buttonVariant, isUnstyled, iconLeft, iconRight, ariaLabel, ...props }: LinkProps): react_jsx_runtime.JSX.Element;
|
|
229
229
|
|
|
230
|
+
interface MenuItemProps extends MenuItemProps$1 {
|
|
231
|
+
label?: string;
|
|
232
|
+
description?: string;
|
|
233
|
+
size?: "small" | "medium";
|
|
234
|
+
iconLeft?: React.ReactElement;
|
|
235
|
+
children?: React.ReactNode | ((props: MenuItemRenderProps & {
|
|
236
|
+
defaultChildren: React.ReactNode;
|
|
237
|
+
}) => React.ReactNode);
|
|
238
|
+
}
|
|
239
|
+
declare function MenuItem({ size, label, description, iconLeft, ...props }: MenuItemProps): react_jsx_runtime.JSX.Element;
|
|
240
|
+
|
|
241
|
+
interface MenuSectionProps {
|
|
242
|
+
id: Key;
|
|
243
|
+
header?: string;
|
|
244
|
+
items: MenuItemProps[];
|
|
245
|
+
}
|
|
246
|
+
interface MenuProps<T extends MenuItemProps> extends MenuProps$1<T> {
|
|
247
|
+
itemSize?: "small" | "medium";
|
|
248
|
+
items?: T[];
|
|
249
|
+
sections?: MenuSectionProps[];
|
|
250
|
+
placement?: PopoverProps["placement"];
|
|
251
|
+
}
|
|
252
|
+
declare function Menu<T extends MenuItemProps>({ itemSize, children, items, sections, placement, ...props }: MenuProps<T>): react_jsx_runtime.JSX.Element;
|
|
253
|
+
|
|
230
254
|
declare function Modal({ children, ...props }: ModalOverlayProps): react_jsx_runtime.JSX.Element;
|
|
231
255
|
|
|
232
256
|
interface ProgressBarProps extends ProgressBarProps$1 {
|
|
@@ -252,6 +276,26 @@ interface RadioGroupProps extends RadioGroupProps$1 {
|
|
|
252
276
|
}
|
|
253
277
|
declare function RadioGroup({ orientation, label, description, children, errorMessage, flexWrap, ...props }: RadioGroupProps): react_jsx_runtime.JSX.Element;
|
|
254
278
|
|
|
279
|
+
interface TagProps extends TagProps$1 {
|
|
280
|
+
/**
|
|
281
|
+
* Icon that appears to the left of the `textValue` field
|
|
282
|
+
*/
|
|
283
|
+
icon?: React.ReactNode;
|
|
284
|
+
/**
|
|
285
|
+
* Background color
|
|
286
|
+
*/
|
|
287
|
+
color?: "bc-blue" | "bc-gold" | "blue" | "dark" | "gray" | "grey" | "green" | "red" | "yellow";
|
|
288
|
+
/**
|
|
289
|
+
* tagStyle
|
|
290
|
+
*/
|
|
291
|
+
tagStyle?: "rectangular" | "circular";
|
|
292
|
+
/**
|
|
293
|
+
* size
|
|
294
|
+
*/
|
|
295
|
+
size?: "xsmall" | "small" | "medium";
|
|
296
|
+
}
|
|
297
|
+
declare function Tag({ color, tagStyle, size, icon, id, textValue, ...props }: TagProps): react_jsx_runtime.JSX.Element;
|
|
298
|
+
|
|
255
299
|
interface ListBoxItemProps extends ListBoxItemProps$1 {
|
|
256
300
|
/** Text label for the option. Provide an `id` if this is not unique. */
|
|
257
301
|
label: string;
|
|
@@ -263,6 +307,10 @@ interface ListBoxItemProps extends ListBoxItemProps$1 {
|
|
|
263
307
|
iconLeft?: React.ReactElement;
|
|
264
308
|
/** Right icon slot */
|
|
265
309
|
iconRight?: React.ReactElement;
|
|
310
|
+
/** Optional color token forwarded to selected tags */
|
|
311
|
+
color?: TagProps["color"];
|
|
312
|
+
/** Optional style token forwarded to selected tags */
|
|
313
|
+
tagStyle?: TagProps["tagStyle"];
|
|
266
314
|
}
|
|
267
315
|
interface SelectionSectionProps {
|
|
268
316
|
id: Key;
|
|
@@ -271,7 +319,7 @@ interface SelectionSectionProps {
|
|
|
271
319
|
/** Flat list of options within the section */
|
|
272
320
|
items: ListBoxItemProps[];
|
|
273
321
|
}
|
|
274
|
-
interface SelectProps<T extends object> extends SelectProps$1<T> {
|
|
322
|
+
interface SelectProps<T extends object, M extends "single" | "multiple" = "single"> extends SelectProps$1<T, M> {
|
|
275
323
|
/** Use `items` for a flat list of options */
|
|
276
324
|
items?: ListBoxItemProps[];
|
|
277
325
|
/** Use `sections` for a sectioned list with `items` options in each section */
|
|
@@ -286,9 +334,11 @@ interface SelectProps<T extends object> extends SelectProps$1<T> {
|
|
|
286
334
|
description?: string;
|
|
287
335
|
/** Used for data validation and error handling */
|
|
288
336
|
errorMessage?: string | ((validation: ValidationResult) => string);
|
|
337
|
+
/** Overflow behaviour */
|
|
338
|
+
overflow?: "wrap" | "scroll";
|
|
289
339
|
}
|
|
290
|
-
/** Select displays a collapsible list of options and allows a user to select one of them. */
|
|
291
|
-
declare function Select<T extends object>({ items, sections, label, description, placeholder, size, errorMessage, ...props }: SelectProps<T>): react_jsx_runtime.JSX.Element;
|
|
340
|
+
/** Select displays a collapsible list of options and allows a user to select one or more of them. */
|
|
341
|
+
declare function Select<T extends object, M extends "single" | "multiple" = "single">({ items, sections, label, description, placeholder, size, errorMessage, selectionMode, overflow, ...props }: SelectProps<T, M>): react_jsx_runtime.JSX.Element;
|
|
292
342
|
|
|
293
343
|
interface SeparatorProps extends SeparatorProps$1 {
|
|
294
344
|
size?: "small" | "medium" | "large";
|
|
@@ -359,6 +409,12 @@ declare function SvgDashIcon({ id }: {
|
|
|
359
409
|
id?: string | undefined;
|
|
360
410
|
}): react_jsx_runtime.JSX.Element;
|
|
361
411
|
|
|
412
|
+
interface SvgPlaceholderIconProps {
|
|
413
|
+
/** Width and height of the placeholder icon, defaults to 20 */
|
|
414
|
+
size?: number;
|
|
415
|
+
}
|
|
416
|
+
declare function SvgPlaceholderIcon({ size, ...props }: SvgPlaceholderIconProps): react_jsx_runtime.JSX.Element;
|
|
417
|
+
|
|
362
418
|
declare function SvgPlusIcon({ id }: {
|
|
363
419
|
id?: string | undefined;
|
|
364
420
|
}): react_jsx_runtime.JSX.Element;
|
|
@@ -377,26 +433,6 @@ declare function SvgReactAriaIcon({ id }: {
|
|
|
377
433
|
id?: string | undefined;
|
|
378
434
|
}): react_jsx_runtime.JSX.Element;
|
|
379
435
|
|
|
380
|
-
interface TagProps extends TagProps$1 {
|
|
381
|
-
/**
|
|
382
|
-
* Icon that appears to the left of the `textValue` field
|
|
383
|
-
*/
|
|
384
|
-
icon?: React.ReactNode;
|
|
385
|
-
/**
|
|
386
|
-
* Background color
|
|
387
|
-
*/
|
|
388
|
-
color?: "bc-blue" | "bc-gold" | "blue" | "dark" | "gray" | "grey" | "green" | "red" | "yellow";
|
|
389
|
-
/**
|
|
390
|
-
* tagStyle
|
|
391
|
-
*/
|
|
392
|
-
tagStyle?: "rectangular" | "circular";
|
|
393
|
-
/**
|
|
394
|
-
* size
|
|
395
|
-
*/
|
|
396
|
-
size?: "small" | "medium";
|
|
397
|
-
}
|
|
398
|
-
declare function Tag({ color, tagStyle, size, icon, id, textValue, }: TagProps): react_jsx_runtime.JSX.Element;
|
|
399
|
-
|
|
400
436
|
interface TagGroupProps extends TagGroupProps$1 {
|
|
401
437
|
/**
|
|
402
438
|
* Labels the TagGroup, appears above the tags.
|
|
@@ -481,4 +517,4 @@ interface NumberFieldProps extends NumberFieldProps$1 {
|
|
|
481
517
|
}
|
|
482
518
|
declare function NumberField({ size, label, description, errorMessage, ...props }: NumberFieldProps): react_jsx_runtime.JSX.Element;
|
|
483
519
|
|
|
484
|
-
export { Accordion, AccordionGroup, AlertBanner, AlertDialog, Button, ButtonGroup, Calendar, Callout, Checkbox, CheckboxGroup, DatePicker, Dialog, Footer, FooterLinks, Form, Header, Heading, InlineAlert, Link, Modal, NumberField, ProgressBar, ProgressCircle, Radio, RadioGroup, Select, Separator, SvgBcLogo, SvgBcOutlineIcon, SvgBetaIcon, SvgCalendarIcon, SvgCheckCircleIcon, SvgCheckIcon, SvgChevronDownIcon, SvgChevronLeftIcon, SvgChevronRightIcon, SvgChevronUpIcon, SvgCloseIcon, SvgDashIcon$1 as SvgDashIcon, SvgExclamationCircleIcon, SvgExclamationIcon, SvgInfoIcon, SvgDashIcon as SvgMinusIcon, SvgPlusIcon, SvgReactAriaIcon, SvgTooltipArrowUp, SvgUpRightFromSquareIcon, Switch, Tag, TagGroup, TagList, Text, TextArea, TextField, TimeField, ToggleButton, ToggleButtonGroup, Tooltip };
|
|
520
|
+
export { Accordion, AccordionGroup, AlertBanner, AlertDialog, Button, ButtonGroup, Calendar, Callout, Checkbox, CheckboxGroup, DatePicker, Dialog, Footer, FooterLinks, Form, Header, Heading, InlineAlert, Link, Menu, MenuItem, Modal, NumberField, ProgressBar, ProgressCircle, Radio, RadioGroup, Select, Separator, SvgBcLogo, SvgBcOutlineIcon, SvgBetaIcon, SvgCalendarIcon, SvgCheckCircleIcon, SvgCheckIcon, SvgChevronDownIcon, SvgChevronLeftIcon, SvgChevronRightIcon, SvgChevronUpIcon, SvgCloseIcon, SvgDashIcon$1 as SvgDashIcon, SvgExclamationCircleIcon, SvgExclamationIcon, SvgInfoIcon, SvgDashIcon as SvgMinusIcon, SvgPlaceholderIcon, SvgPlusIcon, SvgReactAriaIcon, SvgTooltipArrowUp, SvgUpRightFromSquareIcon, Switch, Tag, TagGroup, TagList, Text, TextArea, TextField, TimeField, ToggleButton, ToggleButtonGroup, Tooltip };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bcgov/design-system-react-components",
|
|
3
|
-
"version": "0.7.0-
|
|
3
|
+
"version": "0.7.0-pr690",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/bcgov/design-system.git",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"dist/cjs"
|
|
43
43
|
],
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@bcgov/design-tokens": "
|
|
45
|
+
"@bcgov/design-tokens": "4.0.0",
|
|
46
46
|
"@react-aria/datepicker": "3.17.0",
|
|
47
47
|
"@react-aria/i18n": "3.13.0",
|
|
48
48
|
"react-aria-components": "1.17.0"
|