@jobber/components 6.103.2 → 6.103.4

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,8 +1,9 @@
1
- import type { ReactNode } from "react";
1
+ import type { ReactElement, ReactNode } from "react";
2
+ import React from "react";
2
3
  /**
3
4
  * Returns the first React Child that receives `true` from isCorrectComponent
4
5
  * @param children React Children
5
- * @param isCorrectComponent a function that accepts a JSX Element and returns a boolean.
6
+ * @param isCorrectComponent a function that accepts a ReactElement and returns a boolean.
6
7
  * @returns The first child component that returns true on isCorrectComponent
7
8
  */
8
- export declare function useChildComponent(children: ReactNode | undefined, isCorrectComponent: (toCheck: JSX.Element) => boolean): JSX.Element | undefined;
9
+ export declare function useChildComponent(children: ReactNode | undefined, isCorrectComponent: (toCheck: ReactElement) => boolean): ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
@@ -1,8 +1,9 @@
1
+ import React from "react";
1
2
  import type { ComboboxProps } from "./Combobox.types";
2
3
  import { ComboboxAction } from "./components/ComboboxAction";
3
4
  import { ComboboxOption as ComboboxOptionComponent } from "./components/ComboboxOption/ComboboxOption";
4
5
  import { ComboboxActivator } from "./components/ComboboxActivator";
5
- export declare function Combobox(props: ComboboxProps): JSX.Element;
6
+ export declare function Combobox(props: ComboboxProps): React.JSX.Element;
6
7
  export declare namespace Combobox {
7
8
  var Activator: typeof ComboboxActivator;
8
9
  var Action: typeof ComboboxAction;
@@ -15,4 +15,4 @@ export interface ComboboxProviderProps {
15
15
  readonly onSelectAll?: (selection: ComboboxOption[]) => void;
16
16
  }
17
17
  export declare const ComboboxContext: React.Context<Omit<ComboboxProviderProps, "children">>;
18
- export declare function ComboboxContextProvider({ children, ...props }: ComboboxProviderProps): JSX.Element;
18
+ export declare function ComboboxContextProvider({ children, ...props }: ComboboxProviderProps): React.JSX.Element;
@@ -1,2 +1,3 @@
1
+ import React from "react";
1
2
  import type { ComboboxContentProps } from "../../Combobox.types";
2
- export declare function ComboboxContent(props: ComboboxContentProps): JSX.Element;
3
+ export declare function ComboboxContent(props: ComboboxContentProps): React.JSX.Element;
@@ -1,2 +1,3 @@
1
+ import React from "react";
1
2
  import type { ComboboxHeaderProps } from "../../../Combobox.types";
2
- export declare function ComboboxContentHeader(props: ComboboxHeaderProps): JSX.Element;
3
+ export declare function ComboboxContentHeader(props: ComboboxHeaderProps): React.JSX.Element;
@@ -1,2 +1,3 @@
1
+ import React from "react";
1
2
  import type { ComboboxListProps } from "../../../Combobox.types";
2
- export declare function ComboboxContentList(props: ComboboxListProps): JSX.Element;
3
+ export declare function ComboboxContentList(props: ComboboxListProps): React.JSX.Element;
@@ -1,2 +1,3 @@
1
+ import React from "react";
1
2
  import type { ComboboxSearchProps } from "../../../Combobox.types";
2
- export declare function ComboboxContentSearch(props: ComboboxSearchProps): JSX.Element;
3
+ export declare function ComboboxContentSearch(props: ComboboxSearchProps): React.JSX.Element;
@@ -1,4 +1,4 @@
1
- import type { ReactElement, ReactNode } from "react";
1
+ import { type ReactElement, type ReactNode } from "react";
2
2
  import type { IconNames } from "@jobber/design";
3
3
  import type { XOR } from "ts-xor";
4
4
  import { type Breakpoints } from "./DataList.const";
@@ -144,7 +144,7 @@ export interface DataListSelectedAllType<T extends DataListObject = DataListObje
144
144
  readonly unselected: T["id"][];
145
145
  }
146
146
  export type DataListSelectedType<T extends string | number = DataListObject["id"]> = T[] | DataListSelectedAllType;
147
- export type LayoutRenderer<T extends DataListObject> = (item: DataListItemType<T[]>) => JSX.Element;
147
+ export type LayoutRenderer<T extends DataListObject> = (item: DataListItemType<T[]>) => ReactElement;
148
148
  export interface DataListLayoutProps<T extends DataListObject> {
149
149
  readonly children: LayoutRenderer<T>;
150
150
  /**
@@ -1,7 +1,8 @@
1
+ import type { ReactElement } from "react";
1
2
  import React from "react";
2
3
  import type { DataListObject } from "@jobber/components/DataList/DataList.types";
3
4
  interface ListItemInternalProps<T extends DataListObject> {
4
- readonly children: JSX.Element;
5
+ readonly children: ReactElement;
5
6
  readonly item: T;
6
7
  }
7
8
  export declare function DataListItemInternal<T extends DataListObject>({ children, item, }: ListItemInternalProps<T>): React.JSX.Element;
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  export declare enum SortDirection {
2
3
  ascending = 0,
3
4
  descending = 1,
@@ -6,5 +7,5 @@ export declare enum SortDirection {
6
7
  interface SortIconProps {
7
8
  readonly direction: SortDirection;
8
9
  }
9
- export declare function SortIcon({ direction }: SortIconProps): JSX.Element;
10
+ export declare function SortIcon({ direction }: SortIconProps): React.JSX.Element;
10
11
  export {};
@@ -15,4 +15,4 @@ export interface DataTableSortableHeaderProps {
15
15
  */
16
16
  readonly onSort?: () => void;
17
17
  }
18
- export declare function DataTableSortableHeader(props: DataTableSortableHeaderProps & React.HTMLAttributes<HTMLTableCellElement>): JSX.Element;
18
+ export declare function DataTableSortableHeader(props: DataTableSortableHeaderProps & React.HTMLAttributes<HTMLTableCellElement>): React.JSX.Element;
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import type { StatusIndicatorType } from "../StatusIndicator/StatusIndicator.type";
2
3
  export interface StatusLabelType {
3
4
  readonly statusLabel: string;
@@ -21,5 +22,5 @@ interface StatusLabelProps {
21
22
  */
22
23
  readonly status: StatusIndicatorType;
23
24
  }
24
- export declare function StatusLabel({ label, alignment, status, }: StatusLabelProps): JSX.Element;
25
+ export declare function StatusLabel({ label, alignment, status, }: StatusLabelProps): React.JSX.Element;
25
26
  export {};
package/dist/styles.css CHANGED
@@ -6401,10 +6401,9 @@ a._7BLGtYNuJOU-.zgRx3ehZ2z8-:hover {
6401
6401
  -webkit-transform: translateY(0) scale(1);
6402
6402
  transform: translateY(0) scale(1);
6403
6403
  }
6404
- .-hmXAsAfH9U- {
6405
6404
 
6406
6405
  /* options */
6407
- option {
6406
+ .-hmXAsAfH9U- option {
6408
6407
  padding: 4px 0;
6409
6408
  padding: var(--space-smaller) 0;
6410
6409
  color: hsl(198, 35%, 21%);
@@ -6414,16 +6413,16 @@ a._7BLGtYNuJOU-.zgRx3ehZ2z8-:hover {
6414
6413
  cursor: pointer;
6415
6414
  }
6416
6415
 
6417
- option:hover,
6418
- option:focus,
6419
- option:focus-visible,
6420
- option:checked {
6416
+ .-hmXAsAfH9U- option:hover,
6417
+ .-hmXAsAfH9U- option:focus,
6418
+ .-hmXAsAfH9U- option:focus-visible,
6419
+ .-hmXAsAfH9U- option:checked {
6421
6420
  background-color: hsl(53, 21%, 93%);
6422
6421
  background-color: var(--color-surface--hover);
6423
6422
  }
6424
6423
 
6425
6424
  /* optgroup headers */
6426
- optgroup {
6425
+ .-hmXAsAfH9U- optgroup {
6427
6426
  padding: 8px 0 0 0;
6428
6427
  padding: var(--space-small) 0 0 0;
6429
6428
  color: hsl(197, 90%, 12%);
@@ -6438,36 +6437,35 @@ a._7BLGtYNuJOU-.zgRx3ehZ2z8-:hover {
6438
6437
  }
6439
6438
 
6440
6439
  /* Divider directly under the group label */
6441
- optgroup option:first-child {
6440
+ .-hmXAsAfH9U- optgroup option:first-child {
6442
6441
  border-top: 1px solid hsl(200, 13%, 87%);
6443
6442
  border-top: var(--border-base) solid var(--color-border);
6444
6443
  }
6445
6444
 
6446
6445
  /* Disabled groups and their options */
6447
- optgroup[disabled] {
6446
+ .-hmXAsAfH9U- optgroup[disabled] {
6448
6447
  color: hsl(0, 0%, 58%);
6449
6448
  color: var(--color-disabled);
6450
6449
  }
6451
- optgroup[disabled] option,
6452
- option[disabled] {
6450
+ .-hmXAsAfH9U- optgroup[disabled] option,
6451
+ .-hmXAsAfH9U- option[disabled] {
6453
6452
  color: hsl(0, 0%, 58%);
6454
6453
  color: var(--color-disabled);
6455
6454
  cursor: default;
6456
6455
  }
6457
6456
 
6458
- optgroup[disabled] option:focus,
6459
- optgroup[disabled] option:focus-visible,
6460
- optgroup[disabled] option:checked,
6461
- optgroup[disabled] option:hover,
6462
- option[disabled]:focus,
6463
- option[disabled]:focus-visible,
6464
- option[disabled]:checked,
6465
- option[disabled]:hover {
6457
+ .-hmXAsAfH9U- optgroup[disabled] option:focus,
6458
+ .-hmXAsAfH9U- optgroup[disabled] option:focus-visible,
6459
+ .-hmXAsAfH9U- optgroup[disabled] option:checked,
6460
+ .-hmXAsAfH9U- optgroup[disabled] option:hover,
6461
+ .-hmXAsAfH9U- option[disabled]:focus,
6462
+ .-hmXAsAfH9U- option[disabled]:focus-visible,
6463
+ .-hmXAsAfH9U- option[disabled]:checked,
6464
+ .-hmXAsAfH9U- option[disabled]:hover {
6466
6465
  background-color: transparent;
6467
6466
  }
6468
6467
 
6469
6468
  /* Animate the chevron rotation for the provided postfix class */
6470
- }
6471
6469
  .-hmXAsAfH9U- + ._5ST4c1fXDYU- svg {
6472
6470
  transition: -webkit-transform 100ms;
6473
6471
  transition: -webkit-transform var(--timing-quick);
@@ -5,7 +5,7 @@ var React = require('react');
5
5
  /**
6
6
  * Returns the first React Child that receives `true` from isCorrectComponent
7
7
  * @param children React Children
8
- * @param isCorrectComponent a function that accepts a JSX Element and returns a boolean.
8
+ * @param isCorrectComponent a function that accepts a ReactElement and returns a boolean.
9
9
  * @returns The first child component that returns true on isCorrectComponent
10
10
  */
11
11
  function useChildComponent(children, isCorrectComponent) {
@@ -3,7 +3,7 @@ import React__default, { useMemo, isValidElement } from 'react';
3
3
  /**
4
4
  * Returns the first React Child that receives `true` from isCorrectComponent
5
5
  * @param children React Children
6
- * @param isCorrectComponent a function that accepts a JSX Element and returns a boolean.
6
+ * @param isCorrectComponent a function that accepts a ReactElement and returns a boolean.
7
7
  * @returns The first child component that returns true on isCorrectComponent
8
8
  */
9
9
  function useChildComponent(children, isCorrectComponent) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jobber/components",
3
- "version": "6.103.2",
3
+ "version": "6.103.4",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -538,5 +538,5 @@
538
538
  "> 1%",
539
539
  "IE 10"
540
540
  ],
541
- "gitHead": "901fec98e7fac64fac23c225d7ac6da63d0739f5"
541
+ "gitHead": "89fec0b77276ec2b2fc80f4fc4ec2f6d207c1ac6"
542
542
  }