@papillonarts/components 0.39.0 → 0.41.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 (34) hide show
  1. package/build/Legacy/Alert/Alert.type.d.ts.map +1 -1
  2. package/build/Legacy/Alert/Alert.type.js +3 -1
  3. package/build/Legacy/Alert/__tests__/Alert.doc.md +74 -41
  4. package/build/Legacy/Blankslate/__tests__/Blankslate.doc.md +60 -22
  5. package/build/Legacy/Breadcrumb/__tests__/Breadcrumb.doc.md +39 -13
  6. package/build/Legacy/Button/__tests__/Button.doc.md +339 -0
  7. package/build/Legacy/Dropdown/__tests__/Dropdown.doc.md +54 -0
  8. package/build/Legacy/ErrorBoundary/ErrorBoundary.type.d.ts.map +1 -1
  9. package/build/Legacy/ErrorBoundary/__tests__/ErrorBoundary.doc.md +33 -0
  10. package/build/Legacy/Form/Checkbox/__tests__/Checkbox.doc.md +87 -0
  11. package/build/Legacy/Form/Input/__tests__/Input.doc.md +84 -0
  12. package/build/Legacy/Form/Radio/__tests__/Radio.doc.md +66 -0
  13. package/build/Legacy/Grid/DisplayTable/__tests__/DisplayTable.doc.md +34 -0
  14. package/build/Legacy/Grid/FlexGrid/FlexGrid.js +2 -2
  15. package/build/Legacy/Grid/FlexGrid/__tests__/FlexGrid.doc.md +158 -0
  16. package/build/Legacy/Icon/__tests__/Icon.doc.md +58 -0
  17. package/build/Legacy/Label/__tests__/Label.doc.md +33 -0
  18. package/build/Legacy/Loader/__tests__/Loader.doc.md +61 -0
  19. package/build/Legacy/Markdown/__tests__/Markdown.doc.md +28 -13
  20. package/build/Legacy/Navigation/Menu/__tests__/Menu.doc.md +53 -0
  21. package/build/Legacy/Navigation/TabNav/__tests__/TabNav.doc.md +99 -0
  22. package/build/Legacy/Navigation/UnderlineNav/__tests__/UnderlineNav.doc.md +106 -0
  23. package/build/Legacy/Pagination/PreviousNext/__tests__/PreviousNext.doc.md +57 -0
  24. package/build/Legacy/Popover/__tests__/Popover.doc.md +260 -0
  25. package/build/Legacy/Progress/__tests__/Progress.doc.md +51 -0
  26. package/build/Legacy/Select/__tests__/Select.doc.md +54 -0
  27. package/build/Legacy/SelectMenu/__tests__/SelectMenu.doc.md +35 -0
  28. package/build/Legacy/Subhead/__tests__/Subhead.doc.md +43 -0
  29. package/build/Legacy/SyntaxHighlighter/__tests__/SyntaxHighlighter.doc.md +45 -21
  30. package/build/Legacy/Toast/__tests__/Toast.doc.md +73 -0
  31. package/build/Modern/Flash/__tests__/Flash.doc.md +151 -6
  32. package/build/Modern/Link/__tests__/Link.doc.md +91 -5
  33. package/build/Modern/Pagination/__tests__/Pagination.doc.md +89 -7
  34. package/package.json +4 -4
@@ -0,0 +1,158 @@
1
+ # Features
2
+
3
+ > You can use flex utilities on the container and columns to create a flexbox grid.
4
+
5
+ > This can be useful for keeping columns the same height, justifying content and vertically aligning items. The flexbox grid is also great for working with responsive layouts.
6
+
7
+ ```
8
+ FlexGrid all props and variants
9
+ ```
10
+
11
+ ## Props
12
+
13
+ ```typescript
14
+ export interface IFlexGrid {
15
+ className?: string
16
+ items: IFlexGridItem[]
17
+ idIndex?: number
18
+ isSelectedIndex?: number
19
+ selection?: string
20
+ sort: ISort
21
+ onChange?: (value) => void
22
+ onClick?: (value) => void
23
+ onDoubleClick?: (value) => void
24
+ iconColor?: IIconColor
25
+ state?: string
26
+ }
27
+ ```
28
+
29
+ ## Variants
30
+
31
+ ```
32
+ RadioWithSelection
33
+
34
+ RadioWithSelectionInactive
35
+
36
+ RadioWithoutSelection
37
+
38
+ RadioWithoutSelectionInactive
39
+
40
+ CheckboxWithSelection
41
+
42
+ CheckboxWithSelectionInactive
43
+
44
+ CheckboxWithoutSelection
45
+
46
+ CheckboxWithoutSelectionInactive
47
+ ```
48
+
49
+ ### Radio With Selection
50
+
51
+ > FlexGrid radio with selection variant
52
+
53
+ ```tsx
54
+ <FlexGrid
55
+ items={radioItemsWithSelection}
56
+ idIndex={0}
57
+ isSelectedIndex={1}
58
+ selection={FlexGridSelection.Radio}
59
+ sort={SortDefault}
60
+ onChange={action('onChange')}
61
+ onDoubleClick={action('onDoubleClick')}
62
+ />
63
+ ```
64
+
65
+ ### Radio With Selection Inactive
66
+
67
+ > FlexGrid radio with selection inactive variant
68
+
69
+ ```tsx
70
+ <FlexGrid
71
+ items={radioItemsWithSelection}
72
+ idIndex={0}
73
+ isSelectedIndex={1}
74
+ selection={FlexGridSelection.Radio}
75
+ sort={SortDefault}
76
+ onChange={action('onChange')}
77
+ onDoubleClick={action('onDoubleClick')}
78
+ state={FlexGridState.Inactive}
79
+ />
80
+ ```
81
+
82
+ ### Radio Without Selection
83
+
84
+ > FlexGrid radio without selection variant
85
+
86
+ ```tsx
87
+ <FlexGrid idIndex={0} items={radioItemsWithoutSelection} sort={SortDefault} onChange={action('onChange')} />
88
+ ```
89
+
90
+ ### Radio Without Selection Inactive
91
+
92
+ > FlexGrid radio without selection inactive variant
93
+
94
+ ```tsx
95
+ <FlexGrid idIndex={0} items={radioItemsWithoutSelection} sort={SortDefault} onChange={action('onChange')} state={FlexGridState.Inactive} />
96
+ ```
97
+
98
+ ### Checkbox With Selection
99
+
100
+ > FlexGrid checkbox with selection variant
101
+
102
+ ```tsx
103
+ <FlexGrid
104
+ items={checkboxItemsWithSelection}
105
+ idIndex={0}
106
+ isSelectedIndex={1}
107
+ selection={FlexGridSelection.Checkbox}
108
+ sort={SortDefault}
109
+ onChange={action('onChange')}
110
+ onDoubleClick={action('onDoubleClick')}
111
+ />
112
+ ```
113
+
114
+ ### Checkbox With Selection Inactive
115
+
116
+ > FlexGrid checkbox with selection inactive variant
117
+
118
+ ```tsx
119
+ <FlexGrid
120
+ items={checkboxItemsWithSelection}
121
+ idIndex={0}
122
+ isSelectedIndex={1}
123
+ selection={FlexGridSelection.Checkbox}
124
+ sort={SortDefault}
125
+ onChange={action('onChange')}
126
+ onDoubleClick={action('onDoubleClick')}
127
+ state={FlexGridState.Inactive}
128
+ />
129
+ ```
130
+
131
+ ### Checkbox Without Selection
132
+
133
+ > FlexGrid checkbox without selection variant
134
+
135
+ ```tsx
136
+ <FlexGrid
137
+ idIndex={0}
138
+ items={checkboxItemsWithoutSelection}
139
+ sort={SortDefault}
140
+ onChange={action('onChange')}
141
+ onDoubleClick={action('onDoubleClick')}
142
+ />
143
+ ```
144
+
145
+ ### Checkbox Without Selection Inactive
146
+
147
+ > FlexGrid checkbox without selection inactive variant
148
+
149
+ ```tsx
150
+ <FlexGrid
151
+ idIndex={0}
152
+ items={checkboxItemsWithoutSelection}
153
+ sort={SortDefault}
154
+ onChange={action('onChange')}
155
+ onDoubleClick={action('onDoubleClick')}
156
+ state={FlexGridState.Inactive}
157
+ />
158
+ ```
@@ -0,0 +1,58 @@
1
+ # Features
2
+
3
+ > Generic icon component.
4
+
5
+ ```
6
+ Icon all props and variants
7
+ ```
8
+
9
+ ## Props
10
+
11
+ ```typescript
12
+ export interface IIcon {
13
+ className?: string
14
+ ariaLabel?: string
15
+ icon: string
16
+ height?: number
17
+ width?: number
18
+ size?: number
19
+ fill?: string
20
+ verticalAlign?: string
21
+ }
22
+ ```
23
+
24
+ ## Variants
25
+
26
+ ```
27
+ Default
28
+
29
+ AllIcons
30
+ ```
31
+
32
+ ### Default
33
+
34
+ > Icon default variant
35
+
36
+ ```tsx
37
+ <Icon className={className} icon={icon} size={size} {...rest} />
38
+ ```
39
+
40
+ ### All Icons
41
+
42
+ > Icon all icons variant
43
+
44
+ ```tsx
45
+ <div
46
+ style={{
47
+ columns: '4',
48
+ width: '800px',
49
+ }}
50
+ >
51
+ {IconNameKeys.map((icon) => (
52
+ <div key={icon} style={{ padding: '4px', fontSize: '14px', lineHeight: '21px' }}>
53
+ <Icon icon={icon} style={{ marginRight: '4px', verticalAlign: 'middle' }} />
54
+ <span style={{ display: 'inline-block', verticalAlign: 'middle' }}>{icon}</span>
55
+ </div>
56
+ ))}
57
+ </div>
58
+ ```
@@ -0,0 +1,33 @@
1
+ # Features
2
+
3
+ > Labels add metadata or indicate status of items and navigational elements. Three different types of labels are available: Labels for adding metadata, States for indicating status, and Counters for showing the count for a number of items.
4
+
5
+ ```
6
+ Label all props and variants
7
+ ```
8
+
9
+ ## Props
10
+
11
+ ```typescript
12
+ export interface ILabel {
13
+ className?: string
14
+ text: string
15
+ variant?: string
16
+ backgroundColor?: string
17
+ textColor?: string
18
+ }
19
+ ```
20
+
21
+ ## Variants
22
+
23
+ ```
24
+ Default
25
+ ```
26
+
27
+ ### Default
28
+
29
+ > Label default variant
30
+
31
+ ```tsx
32
+ <Label text="default label" />
33
+ ```
@@ -0,0 +1,61 @@
1
+ # Features
2
+
3
+ > Loaders inform users that an action is still in progress and might take a while to complete.
4
+
5
+ ```
6
+ Loader all props and variants
7
+ ```
8
+
9
+ ## Props
10
+
11
+ ```typescript
12
+ export interface ILoader {
13
+ className?: string
14
+ variant: string
15
+ text: string
16
+ }
17
+ ```
18
+
19
+ ## Variants
20
+
21
+ ```
22
+ Heading
23
+
24
+ Text
25
+
26
+ Label
27
+
28
+ Button
29
+ ```
30
+
31
+ ### Heading
32
+
33
+ > Loader heading variant
34
+
35
+ ```tsx
36
+ <Loader variant={LoaderVariant.Heading} text={textValue} />
37
+ ```
38
+
39
+ ### Text
40
+
41
+ > Loader text variant
42
+
43
+ ```tsx
44
+ <Loader variant={LoaderVariant.Text} text={textValue} />
45
+ ```
46
+
47
+ ### Label
48
+
49
+ > Loader label variant
50
+
51
+ ```tsx
52
+ <Loader variant={LoaderVariant.Label} text={textValue} />
53
+ ```
54
+
55
+ ### Button
56
+
57
+ > Loader button variant
58
+
59
+ ```tsx
60
+ <Loader variant={LoaderVariant.Button} text={textValue} />
61
+ ```
@@ -1,33 +1,48 @@
1
- # Markdown
1
+ # Features
2
2
 
3
- > Markdown component all features
3
+ ```
4
+ Markdown all props and variants
5
+ ```
4
6
 
7
+ ## Props
8
+
9
+ ```typescript
10
+ export interface IMarkdown {
11
+ highlighter?: string
12
+ children?: string
13
+ }
5
14
  ```
6
- # Features
7
15
 
8
- > Default
16
+ ## Variants
17
+
18
+ ```
19
+ Default
20
+
21
+ HLJS
22
+
23
+ Prism
9
24
  ```
10
25
 
11
- ## Default
26
+ ### Default
12
27
 
13
- > Markdown component default feature
28
+ > Markdown default variant
14
29
 
15
- ```jsx
30
+ ```tsx
16
31
  <Markdown>{MarkdownCode}</Markdown>
17
32
  ```
18
33
 
19
- ## HLJS
34
+ ### HLJS
20
35
 
21
- > Markdown component hljs feature
36
+ > Markdown hljs variant
22
37
 
23
- ```jsx
38
+ ```tsx
24
39
  <Markdown highlighter={MarkdownHighlighter.HLJS}>{MarkdownCode}</Markdown>
25
40
  ```
26
41
 
27
- ## Prism
42
+ ### Prism
28
43
 
29
- > Markdown component prism feature
44
+ > Markdown prism variant
30
45
 
31
- ```jsx
46
+ ```tsx
32
47
  <Markdown highlighter={MarkdownHighlighter.PRISM}>{MarkdownCode}</Markdown>
33
48
  ```
@@ -0,0 +1,53 @@
1
+ # Features
2
+
3
+ > The menu is a vertical list of navigational links. A menu's width and placement must be set by you. If you like, just use our grid columns as a parent. Otherwise, apply a custom width.
4
+
5
+ ```
6
+ Menu all props and variants
7
+ ```
8
+
9
+ ## Props
10
+
11
+ ```typescript
12
+ export interface IMenu {
13
+ className?: string
14
+ heading?: string
15
+ ariaAttr: IAriaAttr
16
+ items: IItem[]
17
+ onClick: (value) => void
18
+ }
19
+ ```
20
+
21
+ ## Variants
22
+
23
+ ```
24
+ Default
25
+
26
+ WithIcons
27
+
28
+ WithHeading
29
+ ```
30
+
31
+ ### Default
32
+
33
+ > Menu default variant
34
+
35
+ ```tsx
36
+ <Menu ariaAttr={ariaAttr} items={defaultItems} onClick={action('onClick')} />
37
+ ```
38
+
39
+ ### With Icons
40
+
41
+ > Menu with icons variant
42
+
43
+ ```tsx
44
+ <Menu ariaAttr={ariaAttr} items={iconItems} onClick={action('onClick')} />
45
+ ```
46
+
47
+ ### With Heading
48
+
49
+ > Menu with heading variant
50
+
51
+ ```tsx
52
+ <Menu heading={heading} ariaAttr={ariaAttr} items={defaultItems} onClick={action('onClick')} />
53
+ ```
@@ -0,0 +1,99 @@
1
+ # Features
2
+
3
+ > When you need to toggle between different views, consider using a tabnav. It'll give you a left-aligned horizontal row of tabs.
4
+
5
+ ```
6
+ TabNav all props and variants
7
+ ```
8
+
9
+ ## Props
10
+
11
+ ```typescript
12
+ export interface ITabNav {
13
+ className?: string
14
+ ariaAttr: IAriaAttr
15
+ items: IItem[]
16
+ actions?: React.ReactNode[]
17
+ onClick: (value) => void
18
+ children?: React.ReactNode
19
+ state?: string
20
+ }
21
+ ```
22
+
23
+ ## Variants
24
+
25
+ ```
26
+ Default
27
+
28
+ WithButtonActions
29
+
30
+ WithTextActions
31
+
32
+ WithLinkActions
33
+
34
+ WithNavigation
35
+
36
+ WithMixedEnabledVisibleItems
37
+
38
+ Inactive
39
+ ```
40
+
41
+ ### Default
42
+
43
+ > TabNav default variant
44
+
45
+ ```tsx
46
+ <TabNav ariaAttr={ariaAttr} items={defaultItems} onClick={action('onClick')} />
47
+ ```
48
+
49
+ ### With Button Actions
50
+
51
+ > TabNav with button actions variant
52
+
53
+ ```tsx
54
+ <TabNav ariaAttr={ariaAttr} items={defaultItems} actions={buttonActions} onClick={action('onClick')} />
55
+ ```
56
+
57
+ ### With Text Actions
58
+
59
+ > TabNav with text actions variant
60
+
61
+ ```tsx
62
+ <TabNav ariaAttr={ariaAttr} items={defaultItems} actions={textActions} onClick={action('onClick')} />
63
+ ```
64
+
65
+ ### With Link Actions
66
+
67
+ > TabNav with link actions variant
68
+
69
+ ```tsx
70
+ <TabNav ariaAttr={ariaAttr} items={defaultItems} actions={linkActions} onClick={action('onClick')} />
71
+ ```
72
+
73
+ ### With Navigation
74
+
75
+ > TabNav with navigation variant
76
+
77
+ ```tsx
78
+ <BrowserRouter>
79
+ <TabNav ariaAttr={ariaAttr} items={navigationItems} onClick={action('onClick')} />
80
+ </BrowserRouter>
81
+ ```
82
+
83
+ ### With Mixed Enabled Visible Items
84
+
85
+ > TabNav with mixed enabled visible icons variant
86
+
87
+ ```tsx
88
+ <BrowserRouter>
89
+ <TabNav ariaAttr={ariaAttr} items={mixedEnabledVisibleItems} onClick={action('onClick')} />
90
+ </BrowserRouter>
91
+ ```
92
+
93
+ ### Inactive
94
+
95
+ > TabNav inactive variant
96
+
97
+ ```tsx
98
+ <TabNav ariaAttr={ariaAttr} items={defaultItems} onClick={action('onClick')} state={TabNavState.Inactive} />
99
+ ```
@@ -0,0 +1,106 @@
1
+ # Features
2
+
3
+ > Use UnderlineNav to style navigation with a minimal underlined selected state, typically used for navigation placed at the top of the page. This component comes with variations to accommodate icons, containers and other content.
4
+
5
+ ```
6
+ UnderlineNav all props and variants
7
+ ```
8
+
9
+ ## Props
10
+
11
+ ```typescript
12
+ export interface IUnderlineNav {
13
+ className?: string
14
+ ariaAttr: IAriaAttr
15
+ items: IItem[]
16
+ itemType: string
17
+ actions?: React.ReactNode[]
18
+ align?: string
19
+ fullContainer?: boolean
20
+ onClick: (value) => void
21
+ }
22
+ ```
23
+
24
+ ## Variants
25
+
26
+ ```
27
+ Default
28
+
29
+ WithActions
30
+
31
+ RightAligned
32
+
33
+ RightAlignedWithActions
34
+
35
+ WithIcons
36
+
37
+ FullContainer
38
+ ```
39
+
40
+ ### Default
41
+
42
+ > UnderlineNav default variant
43
+
44
+ ```tsx
45
+ <UnderlineNav ariaAttr={ariaAttr} items={buttonItems} itemType={UnderlineNavItemType.Button} onClick={action('onClick')} />
46
+ ```
47
+
48
+ ### With Actions
49
+
50
+ > UnderlineNav with actions variant
51
+
52
+ ```tsx
53
+ <UnderlineNav ariaAttr={ariaAttr} items={anchorItems} itemType={UnderlineNavItemType.A} actions={actions} onClick={action('onClick')} />
54
+ ```
55
+
56
+ ### Right Aligned
57
+
58
+ > UnderlineNav right aligned variant
59
+
60
+ ```tsx
61
+ <UnderlineNav
62
+ ariaAttr={ariaAttr}
63
+ items={anchorItems}
64
+ itemType={UnderlineNavItemType.A}
65
+ align={UnderlineNavAlignmentType.Right}
66
+ onClick={action('onClick')}
67
+ />
68
+ ```
69
+
70
+ ### Right Aligned With Actions
71
+
72
+ > UnderlineNav right aligned with actions variant
73
+
74
+ ```tsx
75
+ <UnderlineNav
76
+ ariaAttr={ariaAttr}
77
+ items={anchorItems}
78
+ itemType={UnderlineNavItemType.A}
79
+ align={UnderlineNavAlignmentType.Right}
80
+ actions={actions}
81
+ onClick={action('onClick')}
82
+ />
83
+ ```
84
+
85
+ ### With Icons
86
+
87
+ > UnderlineNav with icons variant
88
+
89
+ ```tsx
90
+ <UnderlineNav ariaAttr={ariaAttr} items={iconItems} itemType={UnderlineNavItemType.A} onClick={action('onClick')} />
91
+ ```
92
+
93
+ ### Full Container
94
+
95
+ > UnderlineNav full container variant
96
+
97
+ ```tsx
98
+ <UnderlineNav
99
+ ariaAttr={ariaAttr}
100
+ items={fullContainerItems}
101
+ itemType={UnderlineNavItemType.A}
102
+ actions={actions}
103
+ fullContainer
104
+ onClick={action('onClick')}
105
+ />
106
+ ```
@@ -0,0 +1,57 @@
1
+ # Features
2
+
3
+ > Use the pagination component to apply button styles to a connected set of links that go to related pages (for example, previous, next, or page numbers).
4
+
5
+ > You can make a very simple pagination container with just the Previous and Next buttons. Add the aria-disabled="true" attribute to the Previous button if there isn't a preceding page, or to the Next button if there isn't a succeeding page.
6
+
7
+ ```
8
+ PreviousNext all props and variants
9
+ ```
10
+
11
+ ## Props
12
+
13
+ ```typescript
14
+ export interface IPreviousNext {
15
+ className?: string
16
+ ariaAttr: IAriaAttr
17
+ currentPage: ICurrentPageType
18
+ previous?: IPreviousNextType
19
+ next?: IPreviousNextType
20
+ onClick: (value) => void
21
+ state?: string
22
+ }
23
+ ```
24
+
25
+ ## Variants
26
+
27
+ ```
28
+ Default
29
+
30
+ Active
31
+
32
+ Inactive
33
+ ```
34
+
35
+ ### Default
36
+
37
+ > PreviousNext default variant
38
+
39
+ ```tsx
40
+ <PreviousNext ariaAttr={ariaAttr} currentPage={currentPage} onClick={action('onClick')} />
41
+ ```
42
+
43
+ ### Active
44
+
45
+ > PreviousNext active variant
46
+
47
+ ```tsx
48
+ <PreviousNext ariaAttr={ariaAttr} currentPage={currentPage} onClick={action('onClick')} state={PreviousNextState.Active} />
49
+ ```
50
+
51
+ ### Inactive
52
+
53
+ > PreviousNext inactive variant
54
+
55
+ ```tsx
56
+ <PreviousNext ariaAttr={ariaAttr} currentPage={currentPage} onClick={action('onClick')} state={PreviousNextState.Inactive} />
57
+ ```