@equisoft/design-elements-react 9.7.2-snapshot.20250520181715 → 9.7.2-snapshot.20250520201612

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,5 +1,5 @@
1
1
  import { VoidFunctionComponent } from 'react';
2
- import { DropdownListOption } from '../dropdown-list/dropdown-list';
2
+ import { DropdownListOption } from '../dropdown-list/dropdown-list-option';
3
3
  interface CalendarHeaderProps {
4
4
  date: Date;
5
5
  months: string[];
@@ -1,5 +1,5 @@
1
1
  import type { Locale } from 'date-fns';
2
- import { DropdownListOption } from '../../dropdown-list/dropdown-list';
2
+ import { DropdownListOption } from '../../dropdown-list/dropdown-list-option';
3
3
  export type SupportedLocale = 'fr-CA' | 'en-CA' | 'en-US';
4
4
  export type DayOfWeek = 0 | 1 | 2 | 3 | 4 | 5 | 6;
5
5
  export declare function getLocale(localeArray: Locale[], localeCode?: SupportedLocale): Locale;
@@ -0,0 +1,4 @@
1
+ import { ListboxOption } from '../listbox/listbox';
2
+ export interface DropdownListOption extends ListboxOption {
3
+ label: string;
4
+ }
@@ -1,11 +1,8 @@
1
1
  import { VoidFunctionComponent } from 'react';
2
2
  import { IconName } from '../icon/icon';
3
- import { ListboxOption } from '../listbox/listbox';
4
3
  import { ToggletipProps } from '../toggletip/toggletip';
5
4
  import { TooltipProps } from '../tooltip/tooltip';
6
- export interface DropdownListOption extends ListboxOption {
7
- label: string;
8
- }
5
+ import { DropdownListOption } from './dropdown-list-option';
9
6
  type Value = string | string[];
10
7
  export interface TagValue {
11
8
  id?: string;
@@ -54,6 +51,7 @@ export interface DropdownListProps<M extends boolean | undefined> {
54
51
  value?: Value;
55
52
  hint?: string;
56
53
  multiselect?: M;
54
+ maxSelectableOptions?: number;
57
55
  /**
58
56
  * Display an icon inside the Dropdown control
59
57
  */
@@ -0,0 +1,9 @@
1
+ import { DropdownListOption } from '../dropdown-list-option';
2
+ export declare function optionsAreEqual(option: DropdownListOption, optionToCompare: DropdownListOption): boolean;
3
+ export declare function addUniqueOption(newOption: DropdownListOption, options?: DropdownListOption[]): DropdownListOption[];
4
+ export declare function removeOption(optionToRemove: DropdownListOption, options?: DropdownListOption[]): DropdownListOption[];
5
+ export declare function isOptionEnabled(option: DropdownListOption): boolean;
6
+ export declare function disableNonSelectedOptions(options: DropdownListOption[], selectedOptions: DropdownListOption[]): DropdownListOption[];
7
+ export declare function getDefaultOptions(value: string | string[] | undefined, options: DropdownListOption[], multiselect?: boolean): DropdownListOption[] | undefined;
8
+ export declare function getOptionLabel(option: DropdownListOption): string;
9
+ export declare function isOptionSelected(option: DropdownListOption, selectedOptions?: DropdownListOption[]): boolean;
package/dist/index.d.ts CHANGED
@@ -14,7 +14,8 @@ export { Checkbox, CheckboxProps } from './components/checkbox/checkbox';
14
14
  export { CheckboxGroup } from './components/checkbox-group/checkbox-group';
15
15
  export { Combobox, ComboboxOption } from './components/combobox/combobox';
16
16
  export { Datepicker, DatepickerHandles } from './components/date-picker/date-picker';
17
- export { DropdownList, DropdownListOption } from './components/dropdown-list/dropdown-list';
17
+ export { DropdownList } from './components/dropdown-list/dropdown-list';
18
+ export { DropdownListOption } from './components/dropdown-list/dropdown-list-option';
18
19
  export * from './components/money-input';
19
20
  export * from './components/numeric-input';
20
21
  export { PasswordCreationInput } from './components/password-creation-input/password-creation-input';
@@ -10,5 +10,6 @@ export declare function getPreviousElement<T>(array: T[], currentIndex: number,
10
10
  export declare function findPreviousElement<T>(array: T[], currentIndex: number, predicate: Predicate<T>, { wrapAround }?: FindOptions): T | undefined;
11
11
  export declare function getNextElement<T>(array: T[], currentIndex: number, { wrapAround }?: FindOptions): T | undefined;
12
12
  export declare function findNextElement<T>(array: T[], currentIndex: number, predicate: Predicate<T>, { wrapAround }?: FindOptions): T | undefined;
13
- export declare function unique<T>(list: T[]): T[];
13
+ export declare function unique<T>(list: T[], predicate?: (item: T, itemToCompared: T) => boolean): T[];
14
+ export declare function includes<T>(list: T[], item: T, predicate?: (item: T, itemToCompared: T) => boolean): boolean;
14
15
  export {};
@@ -1,2 +1,3 @@
1
1
  export declare function getRootDocument(element: Element | null): DocumentOrShadowRoot | null;
2
+ export declare function getRootElement(shadowRoot: ShadowRoot | null): Element;
2
3
  export declare function sanitizeId(id: string): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equisoft/design-elements-react",
3
- "version": "9.7.2-snapshot.20250520181715",
3
+ "version": "9.7.2-snapshot.20250520201612",
4
4
  "description": "React implementation of the Equisoft design system.",
5
5
  "license": "UNLICENSED",
6
6
  "main": "dist/bundle.js",