@sebgroup/green-react 3.5.6 → 3.7.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.
Files changed (80) hide show
  1. package/README.md +1 -1
  2. package/index.esm.js +2350 -5664
  3. package/package.json +4 -4
  4. package/src/index.d.ts +25 -24
  5. package/src/lib/accordion/accordion-item.d.ts +17 -17
  6. package/src/lib/accordion/accordion.d.ts +6 -6
  7. package/src/lib/alert-ribbon/alert-ribbon.d.ts +16 -16
  8. package/src/lib/badge/badge.d.ts +23 -23
  9. package/src/lib/breadcrumb/breadcrumb.d.ts +7 -0
  10. package/src/lib/card/card.d.ts +8 -8
  11. package/src/lib/context-menu/context-menu.d.ts +9 -9
  12. package/src/lib/datepicker/datepicker.d.ts +55 -22
  13. package/src/lib/dropdown/dropdown.d.ts +58 -58
  14. package/src/lib/filter-chips/filter-chips.d.ts +3 -0
  15. package/src/lib/form/button/button.d.ts +14 -14
  16. package/src/lib/form/buttonGroup/buttonGroup.d.ts +13 -13
  17. package/src/lib/form/checkbox/checkbox.d.ts +15 -15
  18. package/src/lib/form/form.d.ts +10 -10
  19. package/src/lib/form/formContext.d.ts +13 -13
  20. package/src/lib/form/formItems.d.ts +10 -10
  21. package/src/lib/form/group/group.d.ts +13 -13
  22. package/src/lib/form/iconButton/iconButton.d.ts +12 -12
  23. package/src/lib/form/index.d.ts +12 -12
  24. package/src/lib/form/input/input.d.ts +26 -26
  25. package/src/lib/form/radioButton/radioButton.d.ts +9 -9
  26. package/src/lib/form/radioButton/radioGroup.d.ts +16 -16
  27. package/src/lib/form/text/text.d.ts +6 -6
  28. package/src/lib/form/textarea/textarea.d.ts +15 -15
  29. package/src/lib/form/useInput.d.ts +5 -5
  30. package/src/lib/form/validateInput.d.ts +9 -9
  31. package/src/lib/formItem/formItem.d.ts +13 -13
  32. package/src/lib/formItem/index.d.ts +1 -1
  33. package/src/lib/grouped-list/grouped-list.d.ts +3 -3
  34. package/src/lib/icons/bankId.d.ts +2 -2
  35. package/src/lib/icons/check.d.ts +2 -2
  36. package/src/lib/icons/chevronDown.d.ts +2 -2
  37. package/src/lib/icons/edit.d.ts +2 -2
  38. package/src/lib/icons/index.d.ts +8 -8
  39. package/src/lib/icons/infoCircle.d.ts +2 -2
  40. package/src/lib/icons/square-exclamation.d.ts +2 -2
  41. package/src/lib/icons/square-info.d.ts +2 -2
  42. package/src/lib/icons/times.d.ts +2 -2
  43. package/src/lib/in-page-wizard/inPageWizardStepCard.d.ts +24 -24
  44. package/src/lib/in-page-wizard/index.d.ts +1 -1
  45. package/src/lib/layout/flexbox/flexbox.d.ts +13 -13
  46. package/src/lib/layout/flexbox/types.d.ts +5 -5
  47. package/src/lib/layout/index.d.ts +1 -1
  48. package/src/lib/link/link.d.ts +7 -7
  49. package/src/lib/list/index.d.ts +2 -2
  50. package/src/lib/list/list.d.ts +14 -14
  51. package/src/lib/list/listItem.d.ts +10 -10
  52. package/src/lib/list/valueList.d.ts +33 -33
  53. package/src/lib/modal/modal.d.ts +19 -19
  54. package/src/lib/navbar/navbar.d.ts +12 -12
  55. package/src/lib/popover/popover.d.ts +2 -0
  56. package/src/lib/select/index.d.ts +1 -1
  57. package/src/lib/select/select.d.ts +25 -25
  58. package/src/lib/slider/index.d.ts +1 -1
  59. package/src/lib/slider/slider.d.ts +3 -3
  60. package/src/lib/stepper/stepper.d.ts +15 -15
  61. package/src/lib/table/components/Table.d.ts +13 -13
  62. package/src/lib/table/components/context/TableContextProvider.d.ts +19 -19
  63. package/src/lib/table/components/index.d.ts +9 -9
  64. package/src/lib/table/components/parts/TableBody/TableBody.d.ts +4 -4
  65. package/src/lib/table/components/parts/TableBody/index.d.ts +1 -1
  66. package/src/lib/table/components/parts/TableCell/TableCell.d.ts +3 -3
  67. package/src/lib/table/components/parts/TableCell/index.d.ts +1 -1
  68. package/src/lib/table/components/parts/TableHeader/TableHeader.d.ts +4 -4
  69. package/src/lib/table/components/parts/TableHeader/index.d.ts +1 -1
  70. package/src/lib/table/components/parts/TableHeaderCell/TableHeaderCell.d.ts +9 -9
  71. package/src/lib/table/components/parts/TableHeaderCell/index.d.ts +1 -1
  72. package/src/lib/table/components/parts/TableRow/TableRow.d.ts +15 -15
  73. package/src/lib/table/components/parts/TableRow/index.d.ts +1 -1
  74. package/src/lib/table/components/parts/helperFunctions/helperFunctions.d.ts +51 -51
  75. package/src/lib/table/components/parts/helperFunctions/index.d.ts +1 -1
  76. package/src/lib/table/components/table-typings.d.ts +14 -14
  77. package/src/lib/table/story/multiple-story-tables.d.ts +17 -17
  78. package/src/lib/tabs/tabs.d.ts +26 -26
  79. package/src/types/index.d.ts +1 -1
  80. package/src/types/props/index.d.ts +40 -40
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@sebgroup/green-react",
3
- "version": "3.5.6",
3
+ "version": "3.7.0",
4
4
  "peerDependencies": {
5
5
  "react": "^17 || ^18",
6
6
  "react-dom": "^17 || ^18"
7
7
  },
8
8
  "dependencies": {
9
- "@sebgroup/green-core": "^1.16.0",
10
- "@sebgroup/chlorophyll": "^3.3.4",
9
+ "@sebgroup/green-core": "^1.22.3",
10
+ "@sebgroup/chlorophyll": "^3.4.0",
11
11
  "@sebgroup/extract": "^3.0.1",
12
12
  "@lit/react": "^1.0.2",
13
13
  "classnames": "^2.3.2"
@@ -28,7 +28,7 @@
28
28
  "bugs": {
29
29
  "url": "https://github.com/sebgroup/green/labels/react"
30
30
  },
31
- "homepage": "https://sebgroup.github.io/green/latest/react/",
31
+ "homepage": "https://storybook.seb.io/latest/react/",
32
32
  "module": "./index.esm.js",
33
33
  "type": "module",
34
34
  "main": "./index.esm.js"
package/src/index.d.ts CHANGED
@@ -1,24 +1,25 @@
1
- export * from './lib/accordion/accordion';
2
- export * from './lib/alert-ribbon/alert-ribbon';
3
- export * from './lib/badge/badge';
4
- export * from './lib/card/card';
5
- export * from './lib/datepicker/datepicker';
6
- export * from './lib/dropdown/dropdown';
7
- export * from './lib/form';
8
- export * from './lib/formItem';
9
- export * from './lib/layout';
10
- export * from './lib/in-page-wizard';
11
- export * from './lib/link/link';
12
- export * from './lib/list';
13
- export * from './lib/grouped-list/grouped-list';
14
- export * from './lib/navbar/navbar';
15
- export * from './lib/select';
16
- export * from './lib/slider';
17
- export * from './lib/stepper/stepper';
18
- export * from './lib/tabs/tabs';
19
- export * from './lib/modal/modal';
20
- export * from './lib/context-menu/context-menu';
21
- export * from './types';
22
- export * from './lib/table/components';
23
- export * from './lib/icons';
24
- export { AlertRibbon as Alert } from './lib/alert-ribbon/alert-ribbon';
1
+ export * from './lib/accordion/accordion';
2
+ export * from './lib/alert-ribbon/alert-ribbon';
3
+ export * from './lib/badge/badge';
4
+ export * from './lib/card/card';
5
+ export * from './lib/datepicker/datepicker';
6
+ export * from './lib/dropdown/dropdown';
7
+ export * from './lib/form';
8
+ export * from './lib/formItem';
9
+ export * from './lib/layout';
10
+ export * from './lib/in-page-wizard';
11
+ export * from './lib/link/link';
12
+ export * from './lib/list';
13
+ export * from './lib/grouped-list/grouped-list';
14
+ export * from './lib/navbar/navbar';
15
+ export * from './lib/select';
16
+ export * from './lib/slider';
17
+ export * from './lib/stepper/stepper';
18
+ export * from './lib/tabs/tabs';
19
+ export * from './lib/modal/modal';
20
+ export * from './lib/context-menu/context-menu';
21
+ export * from './types';
22
+ export * from './lib/table/components';
23
+ export * from './lib/icons';
24
+ export * from './lib/breadcrumb/breadcrumb';
25
+ export { AlertRibbon as Alert } from './lib/alert-ribbon/alert-ribbon';
@@ -1,17 +1,17 @@
1
- import React from 'react';
2
- interface AccordionItemProps {
3
- item: AccordionItemInterface;
4
- index: number;
5
- uuid: string;
6
- }
7
- export interface AccordionItemInterface {
8
- label: string;
9
- labelElementLevel: 2 | 3 | 4 | 5 | 6;
10
- subLabel?: string;
11
- content: JSX.Element;
12
- onClick?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
13
- onOpen?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
14
- onClose?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
15
- }
16
- declare const AccordionItem: ({ item, index, uuid }: AccordionItemProps) => import("react/jsx-runtime").JSX.Element;
17
- export default AccordionItem;
1
+ import React from 'react';
2
+ interface AccordionItemProps {
3
+ item: AccordionItemInterface;
4
+ index: number;
5
+ uuid: string;
6
+ }
7
+ export interface AccordionItemInterface {
8
+ label: string;
9
+ labelElementLevel: 2 | 3 | 4 | 5 | 6;
10
+ subLabel?: string;
11
+ content: JSX.Element;
12
+ onClick?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
13
+ onOpen?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
14
+ onClose?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
15
+ }
16
+ declare const AccordionItem: ({ item, index, uuid }: AccordionItemProps) => import("react/jsx-runtime").JSX.Element;
17
+ export default AccordionItem;
@@ -1,6 +1,6 @@
1
- import { AccordionItemInterface } from './accordion-item';
2
- export interface AccordionInterface {
3
- items: AccordionItemInterface[];
4
- }
5
- export declare const Accordion: ({ items }: AccordionInterface) => import("react/jsx-runtime").JSX.Element;
6
- export default Accordion;
1
+ import { AccordionItemInterface } from './accordion-item';
2
+ export interface AccordionInterface {
3
+ items: AccordionItemInterface[];
4
+ }
5
+ export declare const Accordion: ({ items }: AccordionInterface) => import("react/jsx-runtime").JSX.Element;
6
+ export default Accordion;
@@ -1,16 +1,16 @@
1
- import React, { AriaAttributes, ReactNode } from 'react';
2
- import { AlertRibbonType } from '@sebgroup/extract';
3
- export interface AlertRibbonProps {
4
- children: ReactNode;
5
- type?: AlertRibbonType;
6
- header?: ReactNode;
7
- footer?: ReactNode;
8
- isCloseable?: boolean;
9
- closeText?: string;
10
- onClose?: (event: React.MouseEvent<HTMLButtonElement>) => void;
11
- role?: 'alert';
12
- ['aria-live']?: AriaAttributes['aria-live'];
13
- closeAriaLabel?: string;
14
- }
15
- export declare function AlertRibbon({ type, header, footer, children, closeText, isCloseable, onClose, role, 'aria-live': ariaLive, closeAriaLabel, }: AlertRibbonProps): import("react/jsx-runtime").JSX.Element;
16
- export default AlertRibbon;
1
+ import React, { AriaAttributes, ReactNode } from 'react';
2
+ import { AlertRibbonType } from '@sebgroup/extract';
3
+ export interface AlertRibbonProps {
4
+ children: ReactNode;
5
+ type?: AlertRibbonType;
6
+ header?: ReactNode;
7
+ footer?: ReactNode;
8
+ isCloseable?: boolean;
9
+ closeText?: string;
10
+ onClose?: (event: React.MouseEvent<HTMLButtonElement>) => void;
11
+ role?: 'alert';
12
+ ['aria-live']?: AriaAttributes['aria-live'];
13
+ closeAriaLabel?: string;
14
+ }
15
+ export declare function AlertRibbon({ type, header, footer, children, closeText, isCloseable, onClose, role, 'aria-live': ariaLive, closeAriaLabel, }: AlertRibbonProps): import("react/jsx-runtime").JSX.Element;
16
+ export default AlertRibbon;
@@ -1,23 +1,23 @@
1
- import { HTMLProps, ReactNode } from 'react';
2
- import { BadgeType } from '@sebgroup/extract';
3
- export interface BadgeProps extends HTMLProps<HTMLSpanElement> {
4
- children?: ReactNode;
5
- badgeType?: BadgeType;
6
- isCloseable?: boolean;
7
- closeText?: string;
8
- customColor?: string;
9
- customBackgroundColor?: string;
10
- }
11
- /**
12
- * Renders a badge component.
13
- *
14
- * @param {React.ReactNode} props.children - The content of the badge.
15
- * @param {string} props.badgeType - The type of the badge.
16
- * @param {boolean} props.isCloseable - Indicates if the badge is closeable.
17
- * @param {string} props.closeText - The text for the close button.
18
- * @param {string} props.customColor - The custom color for the badge.
19
- * @param {string} props.customBackgroundColor - The custom background color for the badge.
20
- * @returns {React.ReactNode} The rendered badge component.
21
- */
22
- export declare function Badge({ children, badgeType, isCloseable, closeText, customColor, customBackgroundColor, ...props }: BadgeProps): import("react/jsx-runtime").JSX.Element | null;
23
- export default Badge;
1
+ import { HTMLProps, ReactNode } from 'react';
2
+ import { BadgeType } from '@sebgroup/extract';
3
+ export interface BadgeProps extends HTMLProps<HTMLSpanElement> {
4
+ children?: ReactNode;
5
+ badgeType?: BadgeType;
6
+ isCloseable?: boolean;
7
+ closeText?: string;
8
+ customColor?: string;
9
+ customBackgroundColor?: string;
10
+ }
11
+ /**
12
+ * Renders a badge component.
13
+ *
14
+ * @param {React.ReactNode} props.children - The content of the badge.
15
+ * @param {string} props.badgeType - The type of the badge.
16
+ * @param {boolean} props.isCloseable - Indicates if the badge is closeable.
17
+ * @param {string} props.closeText - The text for the close button.
18
+ * @param {string} props.customColor - The custom color for the badge.
19
+ * @param {string} props.customBackgroundColor - The custom background color for the badge.
20
+ * @returns {React.ReactNode} The rendered badge component.
21
+ */
22
+ export declare function Badge({ children, badgeType, isCloseable, closeText, customColor, customBackgroundColor, ...props }: BadgeProps): import("react/jsx-runtime").JSX.Element | null;
23
+ export default Badge;
@@ -0,0 +1,7 @@
1
+ import React, { PropsWithChildren } from 'react';
2
+ export type BreadcrumbProps = {
3
+ className?: string;
4
+ };
5
+ export type BreadcrumItembProps = JSX.IntrinsicElements['li'];
6
+ export declare const Breadcrumb: React.FC<PropsWithChildren<BreadcrumbProps>>;
7
+ export declare const BreadcrumbItem: React.FC<BreadcrumItembProps>;
@@ -1,8 +1,8 @@
1
- import { ReactNode } from 'react';
2
- export interface CardProps {
3
- children?: ReactNode;
4
- header?: ReactNode;
5
- footer?: ReactNode;
6
- }
7
- export declare function Card({ children, header, footer }: CardProps): import("react/jsx-runtime").JSX.Element;
8
- export default Card;
1
+ import { ReactNode } from 'react';
2
+ export interface CardProps {
3
+ children?: ReactNode;
4
+ header?: ReactNode;
5
+ footer?: ReactNode;
6
+ }
7
+ export declare function Card({ children, header, footer }: CardProps): import("react/jsx-runtime").JSX.Element;
8
+ export default Card;
@@ -1,9 +1,9 @@
1
- import { GdsContextMenu, GdsMenuItem, GdsMenuHeading } from '@sebgroup/green-core/components/context-menu/index.js';
2
- export declare const ContextMenu: import("@lit/react").ReactWebComponent<GdsContextMenu, {
3
- onMenuItemClick: string;
4
- onUiStateChange: string;
5
- }>;
6
- export declare const MenuItem: import("@lit/react").ReactWebComponent<GdsMenuItem, {
7
- onMenuItemClick: string;
8
- }>;
9
- export declare const CoreMenuHeading: import("@lit/react").ReactWebComponent<GdsMenuHeading, {}>;
1
+ import { GdsContextMenu, GdsMenuItem, GdsMenuHeading } from '@sebgroup/green-core/components/context-menu/index.js';
2
+ export declare const ContextMenu: import("@lit/react").ReactWebComponent<GdsContextMenu, {
3
+ onMenuItemClick: string;
4
+ onUiStateChange: string;
5
+ }>;
6
+ export declare const MenuItem: import("@lit/react").ReactWebComponent<GdsMenuItem, {
7
+ onMenuItemClick: string;
8
+ }>;
9
+ export declare const CoreMenuHeading: import("@lit/react").ReactWebComponent<GdsMenuHeading, {}>;
@@ -1,22 +1,55 @@
1
- import { GdsDatepicker } from '@sebgroup/green-core/components/datepicker/index.js';
2
- export declare const CoreDatepicker: import("@lit/react").ReactWebComponent<GdsDatepicker, {
3
- onchange: string;
4
- }>;
5
- export interface DatepickerOptions {
6
- label?: string;
7
- onChange?: (value: any) => void;
8
- minDate?: Date;
9
- maxDate?: Date;
10
- value?: Date;
11
- showWeeks?: boolean;
12
- testId?: string;
13
- size?: 'small' | 'medium';
14
- hideLabel?: boolean;
15
- disabledWeekends?: boolean;
16
- disabledDates?: Date[];
17
- /** @deprecated Use `value` instead */
18
- selectedDate?: Date;
19
- /** @deprecated Use `value` instead */
20
- currentDate?: Date;
21
- }
22
- export declare const Datepicker: ({ label, onChange, minDate, maxDate, value, showWeeks, testId, selectedDate, currentDate, ...props }: DatepickerOptions) => import("react/jsx-runtime").JSX.Element;
1
+ import { GdsDatepicker } from '@sebgroup/green-core/components/datepicker/index.js';
2
+ export declare const CoreDatepicker: import("@lit/react").ReactWebComponent<GdsDatepicker, {
3
+ onchange: string;
4
+ }>;
5
+ export interface DatepickerOptions {
6
+ /**
7
+ * The label for the Datepicker.
8
+ */
9
+ label?: string;
10
+ /**
11
+ * Callback function that is called when the value of the Datepicker changes.
12
+ */
13
+ onChange?: (value: any) => void;
14
+ /**
15
+ * The minimum date that can be selected.
16
+ */
17
+ minDate?: Date;
18
+ /**
19
+ * The maximum date that can be selected.
20
+ */
21
+ maxDate?: Date;
22
+ /**
23
+ * The value of the Datepicker.
24
+ */
25
+ value?: Date;
26
+ /**
27
+ * Whether to show the week numbers.
28
+ */
29
+ showWeeks?: boolean;
30
+ /**
31
+ * The test ID used for testing.
32
+ */
33
+ testId?: string;
34
+ /**
35
+ * The size of the Datepicker.
36
+ */
37
+ size?: 'small' | 'medium';
38
+ /**
39
+ * Whether to hide the label.
40
+ */
41
+ hideLabel?: boolean;
42
+ /**
43
+ * Whether to disable weekends.
44
+ */
45
+ disabledWeekends?: boolean;
46
+ /**
47
+ * An array of disabled dates.
48
+ */
49
+ disabledDates?: Date[];
50
+ /** @deprecated Use `value` instead */
51
+ selectedDate?: Date;
52
+ /** @deprecated Use `value` instead */
53
+ currentDate?: Date;
54
+ }
55
+ export declare const Datepicker: ({ label, onChange, minDate, maxDate, value, showWeeks, testId, selectedDate, currentDate, ...props }: DatepickerOptions) => import("react/jsx-runtime").JSX.Element;
@@ -1,58 +1,58 @@
1
- import { GdsDropdown, GdsOption } from '@sebgroup/green-core/components/dropdown/index.js';
2
- export declare type CompareWith<T = any> = (o1: T, o2: T) => boolean;
3
- export declare type SearchFilter<T = any> = (search: string, value: T) => boolean;
4
- export declare type DropdownPlacements = 'bottom-start' | 'top-start';
5
- export declare type OnChange<T = any> = (value: T) => void;
6
- export declare type IndicatorType = 'success' | 'error' | 'info';
7
- export declare type ValidatorType = 'Required' | 'Email';
8
- export interface ValidatorRules {
9
- type: ValidatorType;
10
- custom?: () => string | undefined;
11
- }
12
- export interface IValidator {
13
- message: string;
14
- indicator: IndicatorType;
15
- rules?: ValidatorRules;
16
- }
17
- export interface DropdownArgs {
18
- compareWith?: CompareWith;
19
- display?: string;
20
- id?: string;
21
- informationLabel?: string;
22
- label?: string;
23
- multiSelect?: boolean;
24
- options: DropdownOption[];
25
- searchFilter?: SearchFilter;
26
- searchable?: boolean;
27
- texts?: DropdownTexts;
28
- useValue?: string;
29
- validator?: IValidator;
30
- value?: any;
31
- /** Force width of the popover to match trigger */
32
- syncPopoverWidth?: boolean;
33
- /** Size of the dropdown trigger */
34
- size?: 'small' | 'medium';
35
- /** Hide the label */
36
- hideLabel?: boolean;
37
- /** Max height of the dropdown */
38
- maxHeight?: number;
39
- }
40
- export interface DropdownTexts {
41
- placeholder?: string;
42
- }
43
- export interface DropdownOption {
44
- label?: string;
45
- value?: any;
46
- selected?: boolean;
47
- heading?: boolean;
48
- [key: string]: any;
49
- }
50
- export declare const CoreDropdown: import("@lit/react").ReactWebComponent<GdsDropdown<any>, {
51
- onchange: string;
52
- }>;
53
- export declare const CoreOption: import("@lit/react").ReactWebComponent<GdsOption, {}>;
54
- export interface DropdownProps extends DropdownArgs {
55
- onChange?: OnChange;
56
- }
57
- export declare const Dropdown: ({ compareWith, display, id, informationLabel, label, multiSelect, onChange, options, searchFilter, searchable, texts, useValue, validator, value, syncPopoverWidth, ...props }: DropdownProps) => import("react/jsx-runtime").JSX.Element;
58
- export default Dropdown;
1
+ import { GdsDropdown, GdsOption } from '@sebgroup/green-core/components/dropdown/index.js';
2
+ export type CompareWith<T = any> = (o1: T, o2: T) => boolean;
3
+ export type SearchFilter<T = any> = (search: string, value: T) => boolean;
4
+ export type DropdownPlacements = 'bottom-start' | 'top-start';
5
+ export type OnChange<T = any> = (value: T) => void;
6
+ export type IndicatorType = 'success' | 'error' | 'info';
7
+ export type ValidatorType = 'Required' | 'Email';
8
+ export interface ValidatorRules {
9
+ type: ValidatorType;
10
+ custom?: () => string | undefined;
11
+ }
12
+ export interface IValidator {
13
+ message: string;
14
+ indicator: IndicatorType;
15
+ rules?: ValidatorRules;
16
+ }
17
+ export interface DropdownArgs {
18
+ compareWith?: CompareWith;
19
+ display?: string;
20
+ id?: string;
21
+ informationLabel?: string;
22
+ label?: string;
23
+ multiSelect?: boolean;
24
+ options: DropdownOption[];
25
+ searchFilter?: SearchFilter;
26
+ searchable?: boolean;
27
+ texts?: DropdownTexts;
28
+ useValue?: string;
29
+ validator?: IValidator;
30
+ value?: any;
31
+ /** Force width of the popover to match trigger */
32
+ syncPopoverWidth?: boolean;
33
+ /** Size of the dropdown trigger */
34
+ size?: 'small' | 'medium';
35
+ /** Hide the label */
36
+ hideLabel?: boolean;
37
+ /** Max height of the dropdown */
38
+ maxHeight?: number;
39
+ }
40
+ export interface DropdownTexts {
41
+ placeholder?: string;
42
+ }
43
+ export interface DropdownOption {
44
+ label?: string;
45
+ value?: any;
46
+ selected?: boolean;
47
+ heading?: boolean;
48
+ [key: string]: any;
49
+ }
50
+ export declare const CoreDropdown: import("@lit/react").ReactWebComponent<GdsDropdown<any>, {
51
+ onchange: string;
52
+ }>;
53
+ export declare const CoreOption: import("@lit/react").ReactWebComponent<GdsOption, {}>;
54
+ export interface DropdownProps extends DropdownArgs {
55
+ onChange?: OnChange;
56
+ }
57
+ export declare const Dropdown: ({ compareWith, display, id, informationLabel, label, multiSelect, onChange, options, searchFilter, searchable, texts, useValue, validator, value, syncPopoverWidth, ...props }: DropdownProps) => import("react/jsx-runtime").JSX.Element;
58
+ export default Dropdown;
@@ -0,0 +1,3 @@
1
+ import { GdsFilterChips, GdsFilterChip } from '@sebgroup/green-core/components/filter-chips/index.js';
2
+ export declare const FilterChips: import("@lit/react").ReactWebComponent<GdsFilterChips<any>, {}>;
3
+ export declare const FilterChip: import("@lit/react").ReactWebComponent<GdsFilterChip<any>, {}>;
@@ -1,14 +1,14 @@
1
- import { ButtonHTMLAttributes, DetailedHTMLProps } from 'react';
2
- import { ButtonSize, ButtonVariant } from '@sebgroup/extract';
3
- export interface ButtonProps extends DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement> {
4
- /** Button styling. Available options: 'primary', 'secondary', 'ghost' and 'tertiary'. */
5
- variant?: ButtonVariant;
6
- /** Styling button as active or not */
7
- active?: boolean;
8
- /** Button size. Available options: 'small' and 'large'. */
9
- size?: ButtonSize;
10
- /** Renders as a `data-testid` attribute on the `<button>` element, useful in testing scenarios. */
11
- testId?: string;
12
- }
13
- export declare function Button({ className, variant, active, type, size, testId, ...otherProps }: ButtonProps): import("react/jsx-runtime").JSX.Element;
14
- export default Button;
1
+ import { ButtonHTMLAttributes, DetailedHTMLProps } from 'react';
2
+ import { ButtonSize, ButtonVariant } from '@sebgroup/extract';
3
+ export interface ButtonProps extends DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement> {
4
+ /** Button styling. Available options: 'primary', 'secondary', 'ghost' and 'tertiary'. */
5
+ variant?: ButtonVariant;
6
+ /** Styling button as active or not */
7
+ active?: boolean;
8
+ /** Button size. Available options: 'small' and 'large'. */
9
+ size?: ButtonSize;
10
+ /** Renders as a `data-testid` attribute on the `<button>` element, useful in testing scenarios. */
11
+ testId?: string;
12
+ }
13
+ export declare function Button({ className, variant, active, type, size, testId, ...otherProps }: ButtonProps): import("react/jsx-runtime").JSX.Element;
14
+ export default Button;
@@ -1,13 +1,13 @@
1
- import { ReactElement } from 'react';
2
- import { ButtonVariant } from '@sebgroup/extract';
3
- import { ButtonProps } from '../button/button';
4
- interface ButtonGroupProps {
5
- children: ReactElement<ButtonProps> | ReactElement<ButtonProps>[];
6
- /** Class names passed to the child elements */
7
- className?: string;
8
- selectedIndex?: number;
9
- variant?: ButtonVariant;
10
- id?: string;
11
- }
12
- export declare const ButtonGroup: ({ children, className, selectedIndex, variant, id, }: ButtonGroupProps) => import("react/jsx-runtime").JSX.Element;
13
- export default ButtonGroup;
1
+ import { ReactElement } from 'react';
2
+ import { ButtonVariant } from '@sebgroup/extract';
3
+ import { ButtonProps } from '../button/button';
4
+ interface ButtonGroupProps {
5
+ children: ReactElement<ButtonProps> | ReactElement<ButtonProps>[];
6
+ /** Class names passed to the child elements */
7
+ className?: string;
8
+ selectedIndex?: number;
9
+ variant?: ButtonVariant;
10
+ id?: string;
11
+ }
12
+ export declare const ButtonGroup: ({ children, className, selectedIndex, variant, id, }: ButtonGroupProps) => import("react/jsx-runtime").JSX.Element;
13
+ export default ButtonGroup;
@@ -1,15 +1,15 @@
1
- import { IValidator } from '@sebgroup/extract';
2
- import { FormEventHandler, HTMLProps } from 'react';
3
- export interface CheckboxProps extends HTMLProps<HTMLInputElement> {
4
- /** Use this prop to control the checked state of the checkbox */
5
- checked?: boolean;
6
- /** The label of the checkbox */
7
- label?: string;
8
- /** A test id that will be placed in the `data-testid` attribute on the input element */
9
- testId?: string;
10
- /** An object used to render the validation status for the component */
11
- validator?: IValidator;
12
- /** A handler function that takes the event and can act on it */
13
- onChange?: FormEventHandler<HTMLInputElement>;
14
- }
15
- export declare const Checkbox: ({ "aria-describedby": ariaDescribedBy, id, label, validator, testId, required, className, ...props }: CheckboxProps) => import("react/jsx-runtime").JSX.Element;
1
+ import { IValidator } from '@sebgroup/extract';
2
+ import { FormEventHandler, HTMLProps } from 'react';
3
+ export interface CheckboxProps extends HTMLProps<HTMLInputElement> {
4
+ /** Use this prop to control the checked state of the checkbox */
5
+ checked?: boolean;
6
+ /** The label of the checkbox */
7
+ label?: string;
8
+ /** A test id that will be placed in the `data-testid` attribute on the input element */
9
+ testId?: string;
10
+ /** An object used to render the validation status for the component */
11
+ validator?: IValidator;
12
+ /** A handler function that takes the event and can act on it */
13
+ onChange?: FormEventHandler<HTMLInputElement>;
14
+ }
15
+ export declare const Checkbox: ({ "aria-describedby": ariaDescribedBy, id, label, validator, testId, required, className, ...props }: CheckboxProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,10 +1,10 @@
1
- import { FormDirection, Size } from '@sebgroup/extract';
2
- import { HTMLProps, ReactNode } from 'react';
3
- export interface FormProps extends HTMLProps<HTMLFormElement> {
4
- children?: ReactNode;
5
- direction?: FormDirection;
6
- formSize?: Size;
7
- onFormSubmit?: (values: any) => void;
8
- }
9
- export declare const Form: React.FC<FormProps>;
10
- export default Form;
1
+ import { FormDirection, Size } from '@sebgroup/extract';
2
+ import { HTMLProps, ReactNode } from 'react';
3
+ export interface FormProps extends HTMLProps<HTMLFormElement> {
4
+ children?: ReactNode;
5
+ direction?: FormDirection;
6
+ formSize?: Size;
7
+ onFormSubmit?: (values: any) => void;
8
+ }
9
+ export declare const Form: React.FC<FormProps>;
10
+ export default Form;
@@ -1,13 +1,13 @@
1
- import React from 'react';
2
- import { FormProps } from './form';
3
- interface FormContextReturnType {
4
- setValues: React.Dispatch<React.SetStateAction<Record<string, any>>>;
5
- setErrors: React.Dispatch<React.SetStateAction<Record<string, any>>>;
6
- setFields: React.Dispatch<React.SetStateAction<Record<string, any>>>;
7
- errors?: Record<string, any>;
8
- values?: Record<string, any>;
9
- }
10
- export declare const FormContext: React.Context<FormContextReturnType>;
11
- export declare const useFormContext: () => FormContextReturnType;
12
- export declare const FormProvider: ({ children, direction, formSize, onSubmit, onFormSubmit, ...props }: React.PropsWithChildren<FormProps>) => import("react/jsx-runtime").JSX.Element;
13
- export {};
1
+ import React from 'react';
2
+ import { FormProps } from './form';
3
+ interface FormContextReturnType {
4
+ setValues: React.Dispatch<React.SetStateAction<Record<string, any>>>;
5
+ setErrors: React.Dispatch<React.SetStateAction<Record<string, any>>>;
6
+ setFields: React.Dispatch<React.SetStateAction<Record<string, any>>>;
7
+ errors?: Record<string, any>;
8
+ values?: Record<string, any>;
9
+ }
10
+ export declare const FormContext: React.Context<FormContextReturnType>;
11
+ export declare const useFormContext: () => FormContextReturnType;
12
+ export declare const FormProvider: ({ children, direction, formSize, onSubmit, onFormSubmit, ...props }: React.PropsWithChildren<FormProps>) => import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -1,10 +1,10 @@
1
- import { IValidator } from '@sebgroup/extract';
2
- import React from 'react';
3
- export interface FormItemsProps {
4
- children: React.ReactNode;
5
- name: string;
6
- validate?: IValidator;
7
- onChange?: React.ChangeEventHandler<HTMLInputElement>;
8
- }
9
- export declare const FormItems: React.FC<FormItemsProps>;
10
- export default FormItems;
1
+ import { IValidator } from '@sebgroup/extract';
2
+ import React from 'react';
3
+ export interface FormItemsProps {
4
+ children: React.ReactNode;
5
+ name: string;
6
+ validate?: IValidator;
7
+ onChange?: React.ChangeEventHandler<HTMLInputElement>;
8
+ }
9
+ export declare const FormItems: React.FC<FormItemsProps>;
10
+ export default FormItems;