playbook-ui 13.16.0 → 13.17.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 (49) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/menu.yml +4 -1
  3. package/dist/pb_advanced_table/Components/CollapsibleTrail.d.ts +1 -0
  4. package/dist/pb_advanced_table/Components/CustomCell.d.ts +11 -0
  5. package/dist/pb_advanced_table/Components/LoadingCell.d.ts +1 -0
  6. package/dist/pb_advanced_table/Components/SortIconButton.d.ts +8 -0
  7. package/dist/pb_advanced_table/Components/SubRowHeaderRow.d.ts +13 -0
  8. package/dist/pb_advanced_table/Components/TableHeaderCell.d.ts +16 -0
  9. package/dist/pb_advanced_table/Components/ToggleIconButton.d.ts +8 -0
  10. package/dist/pb_advanced_table/Context/AdvancedTableContext.d.ts +3 -0
  11. package/dist/pb_advanced_table/SubKits/TableBody.d.ts +6 -0
  12. package/dist/pb_advanced_table/SubKits/TableHeader.d.ts +9 -0
  13. package/dist/pb_advanced_table/Utilities/BrowserCheck.d.ts +1 -0
  14. package/dist/pb_advanced_table/Utilities/ExpansionControlHelpers.d.ts +3 -0
  15. package/dist/pb_advanced_table/Utilities/IconHelpers.d.ts +1 -0
  16. package/dist/pb_advanced_table/Utilities/types.d.ts +5 -0
  17. package/dist/pb_advanced_table/_advanced_table.d.ts +41 -0
  18. package/dist/pb_flex/_flex.d.ts +1 -1
  19. package/dist/pb_label_value/_label_value.d.ts +1 -1
  20. package/dist/pb_layout/_layout.d.ts +1 -1
  21. package/dist/pb_legend/_legend.d.ts +1 -1
  22. package/dist/pb_lightbox/_lightbox.d.ts +1 -1
  23. package/dist/pb_line_graph/_line_graph.d.ts +1 -1
  24. package/dist/pb_list/_list.d.ts +1 -1
  25. package/dist/pb_list/_list_item.d.ts +1 -1
  26. package/dist/pb_map/_map.d.ts +6 -6
  27. package/dist/pb_map/_map_controls.d.ts +3 -3
  28. package/dist/pb_map/_map_custom_button.d.ts +1 -1
  29. package/dist/pb_message/_message.d.ts +2 -2
  30. package/dist/pb_message/_message_mention.d.ts +1 -1
  31. package/dist/pb_nav/_item.d.ts +1 -1
  32. package/dist/pb_nav/_nav.d.ts +3 -3
  33. package/dist/pb_radio/_radio.d.ts +88 -88
  34. package/dist/pb_select/_select.d.ts +88 -88
  35. package/dist/pb_table/_table.d.ts +7 -6
  36. package/dist/pb_text_input/_text_input.d.ts +88 -88
  37. package/dist/pb_textarea/_textarea.d.ts +92 -92
  38. package/dist/pb_tooltip/_tooltip.d.ts +88 -88
  39. package/dist/playbook-doc.js +30 -8
  40. package/dist/playbook-rails.js +14 -6
  41. package/dist/playbook.css +1 -1
  42. package/dist/playbook.js +30 -8
  43. package/dist/utilities/globalProps.d.ts +1 -1
  44. package/package.json +3 -2
  45. package/dist/app/components/playbook/pb_docs/kit_api.html.erb +0 -321
  46. package/dist/app/components/playbook/pb_docs/kit_api.rb +0 -150
  47. package/dist/app/components/playbook/pb_docs/kit_example.html.erb +0 -80
  48. package/dist/app/components/playbook/pb_docs/kit_example.rb +0 -78
  49. package/dist/pb_doc_helper.rb +0 -103
package/CHANGELOG.md CHANGED
@@ -1,3 +1,31 @@
1
+ # 13.16.0
2
+ ##### January 22, 2024
3
+
4
+ List of changes:
5
+
6
+ **Fixed Bugs:**
7
+
8
+ - Fixed Telemetry Links [\#3011](https://github.com/powerhome/playbook/pull/3011) ([thestephenmarshall](https://github.com/thestephenmarshall))
9
+ - Fixed Broken Gauge Kit [\#3031](https://github.com/powerhome/playbook/pull/3031) ([nidaqg](https://github.com/nidaqg))
10
+
11
+ **Improvements:**
12
+
13
+ - Linter Implementation: Kits P - S [\#3043](https://github.com/powerhome/playbook/pull/3043) ([thestephenmarshall](https://github.com/thestephenmarshall))
14
+ - Select Kit: Added Inline Variant With Visible Chevron [\#3037](https://github.com/powerhome/playbook/pull/3037) ([thestephenmarshall](https://github.com/thestephenmarshall))
15
+ - Added Components Filter [\#3029](https://github.com/powerhome/playbook/pull/3029) ([carloslimasd](https://github.com/carloslimasd))
16
+ - Linter Implementation: Kits F - J [\#3021](https://github.com/powerhome/playbook/pull/3021) ([thestephenmarshall](https://github.com/thestephenmarshall))
17
+ - Linted Date Picker Kit [\#2990](https://github.com/powerhome/playbook/pull/2990) ([markdoeswork](https://github.com/markdoeswork))
18
+ - Website - Icons Index Foundation [\#2965](https://github.com/powerhome/playbook/pull/2965) ([israel-molestina](https://github.com/israel-molestina))
19
+ - Updated Collapsible Docs [\#2984](https://github.com/powerhome/playbook/pull/2984) ([rachelradford21](https://github.com/rachelradford21))
20
+ - Updated Swift Nav Docs [\#2980](https://github.com/powerhome/playbook/pull/2980) ([rachelradford21](https://github.com/rachelradford21))
21
+
22
+
23
+
24
+ [Full Changelog](https://github.com/powerhome/playbook/compare/13.16.0...13.16.0)
25
+
26
+
27
+
28
+
1
29
  # 13.15.0
2
30
  ##### January 5, 2024
3
31
 
package/dist/menu.yml CHANGED
@@ -43,6 +43,9 @@ kits:
43
43
  - name: "table"
44
44
  platforms: *web
45
45
  description: Tables display a collection of structured data and typically have the ability to sort, filter, and paginate data.
46
+ - name: "advanced_table"
47
+ platforms: *react_only
48
+ description: The Advanced Table can be used to display complex, nested data in a way that allows for expansion and/or sorting.
46
49
  - name: "list"
47
50
  platforms: *web
48
51
  description: Lists display a vertical set of related content.
@@ -354,4 +357,4 @@ kits:
354
357
  description: Multiple users stacked is used in tight spaces, where we need to indicate that multiple users are associated to a specific action or item.
355
358
  - name: "user"
356
359
  platforms: *web
357
- description: This kit was created for having a systematic way of displaying users with avatar, titles, name and territory. This is a versatile kit with features than can be added to display more info.
360
+ description: This kit was created for having a systematic way of displaying users with avatar, titles, name and territory. This is a versatile kit with features than can be added to display more info.
@@ -0,0 +1 @@
1
+ export declare const renderCollapsibleTrail: (currentDepth: number) => JSX.Element[];
@@ -0,0 +1,11 @@
1
+ import { GlobalProps } from "../../utilities/globalProps";
2
+ import { Getter, Row } from "@tanstack/react-table";
3
+ import { DataType } from "../Utilities/types";
4
+ interface CustomCellProps {
5
+ getValue?: Getter<string>;
6
+ onRowToggleClick?: (arg: Row<DataType>) => void;
7
+ row: Row<DataType>;
8
+ value?: string;
9
+ }
10
+ export declare const CustomCell: ({ getValue, onRowToggleClick, row, value, }: CustomCellProps & GlobalProps) => JSX.Element;
11
+ export {};
@@ -0,0 +1 @@
1
+ export declare const LoadingCell: () => JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { Header } from "@tanstack/react-table";
2
+ import { DataType } from "../Utilities/types";
3
+ declare type SortIconButtonProps = {
4
+ header: Header<DataType, unknown>;
5
+ sortIcon?: string | string[];
6
+ };
7
+ export declare const SortIconButton: ({ header, sortIcon }: SortIconButtonProps) => JSX.Element;
8
+ export {};
@@ -0,0 +1,13 @@
1
+ import { Row, Table } from "@tanstack/react-table";
2
+ import { DataType } from "../Utilities/types";
3
+ import { GlobalProps } from "../../utilities/globalProps";
4
+ interface SubRowHeaderRowProps {
5
+ collapsibleTrail?: boolean;
6
+ enableToggleExpansion?: "all" | "header";
7
+ onClick: (row: Row<DataType>) => void;
8
+ row: Row<DataType>;
9
+ subRowHeaders?: string[];
10
+ table: Table<DataType>;
11
+ }
12
+ export declare const SubRowHeaderRow: ({ collapsibleTrail, enableToggleExpansion, onClick, row, subRowHeaders, table, }: SubRowHeaderRowProps & GlobalProps) => JSX.Element;
13
+ export {};
@@ -0,0 +1,16 @@
1
+ import React from "react";
2
+ import { Header } from "@tanstack/react-table";
3
+ import { DataType } from "../Utilities/types";
4
+ import { GlobalProps } from "../../utilities/globalProps";
5
+ declare type TableHeaderCellProps = {
6
+ enableSorting?: boolean;
7
+ enableToggleExpansion?: "all" | "header";
8
+ handleExpandOrCollapse?: () => void;
9
+ header?: Header<DataType, unknown>;
10
+ headerChildren?: React.ReactNode | React.ReactNode[];
11
+ headerId?: string;
12
+ loading?: boolean;
13
+ sortIcon?: string | string[];
14
+ } & GlobalProps;
15
+ export declare const TableHeaderCell: ({ enableSorting, enableToggleExpansion, handleExpandOrCollapse, header, headerChildren, headerId, loading, sortIcon, }: TableHeaderCellProps) => JSX.Element;
16
+ export {};
@@ -0,0 +1,8 @@
1
+ import { Row } from "@tanstack/react-table";
2
+ import { DataType } from "../Utilities/types";
3
+ interface ToggleIconButtonProps {
4
+ onClick: (row: Row<DataType>) => void;
5
+ row?: Row<DataType>;
6
+ }
7
+ export declare const ToggleIconButton: ({ row, onClick }: ToggleIconButtonProps) => JSX.Element;
8
+ export {};
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const AdvancedTableContext: import("react").Context<any>;
3
+ export default AdvancedTableContext;
@@ -0,0 +1,6 @@
1
+ declare type TableBodyProps = {
2
+ collapsibleTrail?: boolean;
3
+ subRowHeaders?: string[];
4
+ };
5
+ export declare const TableBody: ({ collapsibleTrail, subRowHeaders, }: TableBodyProps) => JSX.Element;
6
+ export {};
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ declare type TableHeaderProps = {
3
+ children?: React.ReactNode | React.ReactNode[];
4
+ enableSorting?: boolean;
5
+ headerId?: string;
6
+ sortIcon?: string | string[];
7
+ };
8
+ export declare const TableHeader: ({ children, enableSorting, headerId, sortIcon, }: TableHeaderProps) => JSX.Element;
9
+ export {};
@@ -0,0 +1 @@
1
+ export declare const isChrome: () => boolean;
@@ -0,0 +1,3 @@
1
+ import { RowModel } from "@tanstack/react-table";
2
+ import { DataType } from "./types";
3
+ export declare const updateExpandAndCollapseState: (tableRows: RowModel<DataType>, expanded: Record<string, boolean>, targetParent: string) => Record<string, boolean>;
@@ -0,0 +1 @@
1
+ export declare const displayIcon: (icon: string | string[]) => string[];
@@ -0,0 +1,5 @@
1
+ import { ExpandedState } from "@tanstack/react-table";
2
+ export declare type ExpandedStateObject = Extract<ExpandedState, Record<string, boolean>>;
3
+ export declare type DataType = {
4
+ [key: string]: any;
5
+ };
@@ -0,0 +1,41 @@
1
+ import React from "react";
2
+ import { GlobalProps } from "../utilities/globalProps";
3
+ import { Row } from "@tanstack/react-table";
4
+ import { DataType } from "./Utilities/types";
5
+ declare type AdvancedTableProps = {
6
+ aria?: {
7
+ [key: string]: string;
8
+ };
9
+ children?: React.ReactNode | React.ReactNode[];
10
+ className?: string;
11
+ columnDefinitions: DataType[];
12
+ data?: {
13
+ [key: string]: string;
14
+ };
15
+ enableToggleExpansion?: "all" | "header";
16
+ expandedControl?: DataType;
17
+ id?: string;
18
+ initialLoadingRowsCount?: number;
19
+ loading?: boolean | string;
20
+ onRowToggleClick?: (arg: Row<DataType>) => void;
21
+ onToggleExpansionClick?: (arg: Row<DataType>) => void;
22
+ sortControl?: DataType;
23
+ tableData: DataType[];
24
+ tableOptions?: DataType;
25
+ tableProps?: DataType;
26
+ toggleExpansionIcon?: string | string[];
27
+ } & GlobalProps;
28
+ declare const AdvancedTable: {
29
+ (props: AdvancedTableProps): JSX.Element;
30
+ Header: ({ children, enableSorting, headerId, sortIcon, }: {
31
+ children?: React.ReactNode | React.ReactNode[];
32
+ enableSorting?: boolean;
33
+ headerId?: string;
34
+ sortIcon?: string | string[];
35
+ }) => JSX.Element;
36
+ Body: ({ collapsibleTrail, subRowHeaders, }: {
37
+ collapsibleTrail?: boolean;
38
+ subRowHeaders?: string[];
39
+ }) => JSX.Element;
40
+ };
41
+ export default AdvancedTable;
@@ -8,7 +8,7 @@ declare type FlexProps = {
8
8
  horizontal?: "left" | "center" | "right" | "stretch" | "none";
9
9
  justify?: "start" | "center" | "end" | "around" | "between" | "evenly" | "none";
10
10
  htmlOptions?: {
11
- [key: string]: string | number | boolean | (() => void);
11
+ [key: string]: string | number | boolean | (() => void) | ((arg?: unknown) => void);
12
12
  };
13
13
  id?: string;
14
14
  inline?: boolean;
@@ -5,7 +5,7 @@ declare type LabelValueProps = {
5
5
  };
6
6
  className?: string;
7
7
  dark?: boolean;
8
- data?: object;
8
+ data?: Record<string, unknown>;
9
9
  date?: Date;
10
10
  htmlOptions?: {
11
11
  [key: string]: string | number | boolean | (() => void);
@@ -7,7 +7,7 @@ declare type LayoutPropTypes = {
7
7
  className?: string;
8
8
  collapse?: "xs" | "sm" | "md" | "lg" | "xl";
9
9
  dark?: boolean;
10
- data?: object;
10
+ data?: Record<string, unknown>;
11
11
  full?: boolean;
12
12
  htmlOptions?: {
13
13
  [key: string]: string | number | boolean | (() => void);
@@ -5,7 +5,7 @@ declare type LegendProps = {
5
5
  className?: string;
6
6
  color?: string;
7
7
  dark?: boolean;
8
- data?: object;
8
+ data?: Record<string, unknown>;
9
9
  htmlOptions?: {
10
10
  [key: string]: string | number | boolean | (() => void);
11
11
  };
@@ -16,7 +16,7 @@ declare type LightboxType = {
16
16
  id?: string;
17
17
  photos: [];
18
18
  initialPhoto?: number;
19
- onChange?: (index: number) => {};
19
+ onChange?: (index: number) => void;
20
20
  onClickRight?: () => void;
21
21
  onClose?: () => void;
22
22
  icon: string;
@@ -1,7 +1,7 @@
1
1
  declare type LineGraphProps = {
2
2
  align?: "left" | "right" | "center";
3
3
  axisTitle?: string;
4
- dark?: Boolean;
4
+ dark?: boolean;
5
5
  xAxisCategories: [];
6
6
  yAxisMin: number;
7
7
  yAxisMax: number;
@@ -7,7 +7,7 @@ declare type ListProps = {
7
7
  className?: string;
8
8
  children: React.ReactNode[] | React.ReactNode;
9
9
  dark?: boolean;
10
- data?: object;
10
+ data?: Record<string, unknown>;
11
11
  htmlOptions?: {
12
12
  [key: string]: string | number | boolean | (() => void);
13
13
  };
@@ -5,7 +5,7 @@ declare type ListItemProps = {
5
5
  };
6
6
  children: React.ReactNode[] | React.ReactNode;
7
7
  className?: string;
8
- data?: object;
8
+ data?: Record<string, unknown>;
9
9
  htmlOptions?: {
10
10
  [key: string]: string | number | boolean | (() => void);
11
11
  };
@@ -15,18 +15,18 @@ declare type MapProps = {
15
15
  id?: string;
16
16
  zoomBtns?: boolean;
17
17
  flyTo?: boolean;
18
- zoomInClick?: () => {};
19
- zoomOutClick?: () => {};
20
- flyToClick?: () => {};
18
+ zoomInClick?: () => void;
19
+ zoomOutClick?: () => void;
20
+ flyToClick?: () => void;
21
21
  } & GlobalProps;
22
22
  declare const Map: {
23
23
  (props: MapProps): JSX.Element;
24
24
  Controls: ({ zoomBtns, zoomInClick, zoomOutClick, flyTo, flyToClick, children, }: {
25
25
  zoomBtns?: boolean;
26
26
  flyTo?: boolean;
27
- zoomInClick?: () => {};
28
- zoomOutClick?: () => {};
29
- flyToClick?: () => {};
27
+ zoomInClick?: () => void;
28
+ zoomOutClick?: () => void;
29
+ flyToClick?: () => void;
30
30
  children?: React.ReactNode | React.ReactNode[];
31
31
  }) => JSX.Element;
32
32
  };
@@ -2,9 +2,9 @@ import React from "react";
2
2
  declare type MapControlTypes = {
3
3
  zoomBtns?: boolean;
4
4
  flyTo?: boolean;
5
- zoomInClick?: () => {};
6
- zoomOutClick?: () => {};
7
- flyToClick?: () => {};
5
+ zoomInClick?: () => void;
6
+ zoomOutClick?: () => void;
7
+ flyToClick?: () => void;
8
8
  children?: React.ReactNode | React.ReactNode[];
9
9
  };
10
10
  declare const MapControls: ({ zoomBtns, zoomInClick, zoomOutClick, flyTo, flyToClick, children, }: MapControlTypes) => JSX.Element;
@@ -1,5 +1,5 @@
1
1
  declare type MapCustomButtonTypes = {
2
- onClick?: () => {};
2
+ onClick?: () => void;
3
3
  icon?: string;
4
4
  };
5
5
  declare const MapCustomButton: ({ onClick, icon }: MapCustomButtonTypes) => JSX.Element;
@@ -8,7 +8,7 @@ declare type MessageProps = {
8
8
  avatarUrl?: string;
9
9
  children?: React.ReactChild[] | React.ReactChild;
10
10
  className?: string;
11
- data?: object;
11
+ data?: Record<string, unknown>;
12
12
  htmlOptions?: {
13
13
  [key: string]: string | number | boolean | (() => void);
14
14
  };
@@ -28,7 +28,7 @@ declare const Message: {
28
28
  };
29
29
  children?: React.ReactChild | React.ReactChild[];
30
30
  className?: string;
31
- data?: object;
31
+ data?: Record<string, unknown>;
32
32
  htmlOptions?: {
33
33
  [key: string]: string | number | boolean | (() => void);
34
34
  };
@@ -5,7 +5,7 @@ declare type MessageMentionProps = {
5
5
  };
6
6
  children?: React.ReactChild[] | React.ReactChild;
7
7
  className?: string;
8
- data?: object;
8
+ data?: Record<string, unknown>;
9
9
  htmlOptions?: {
10
10
  [key: string]: string | number | boolean | (() => void);
11
11
  };
@@ -11,7 +11,7 @@ declare type NavItemProps = {
11
11
  children?: React.ReactNode[] | React.ReactNode;
12
12
  className?: string;
13
13
  collapsible?: boolean;
14
- data?: object;
14
+ data?: Record<string, unknown>;
15
15
  dark?: boolean;
16
16
  fontSize?: "normal" | "small";
17
17
  htmlOptions?: {
@@ -8,19 +8,19 @@ declare type NavProps = {
8
8
  borderless?: boolean;
9
9
  children?: React.ReactNode[] | React.ReactNode;
10
10
  className?: string | string[];
11
- data?: object;
11
+ data?: Record<string, unknown>;
12
12
  dark?: boolean;
13
13
  highlight?: boolean;
14
14
  htmlOptions?: {
15
15
  [key: string]: string | number | boolean | (() => void);
16
16
  };
17
17
  id?: string;
18
- onClick?: React.MouseEventHandler<HTMLElement>;
18
+ onClick?: () => void;
19
19
  orientation?: "vertical" | "horizontal";
20
20
  link?: string;
21
21
  title?: string;
22
22
  variant?: "normal" | "subtle";
23
23
  itemSpacing?: SpacingObject;
24
24
  } & GlobalProps;
25
- declare const Nav: (props: NavProps) => JSX.Element;
25
+ declare const Nav: (props: NavProps) => React.ReactElement;
26
26
  export default Nav;