playbook_ui 12.21.0 → 12.22.0.pre.alpha.PLAY603datepickerquickpickinputpresetdropdown696
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_date_picker/_date_picker.scss +26 -0
- data/app/pb_kits/playbook/pb_date_picker/_date_picker.tsx +99 -95
- data/app/pb_kits/playbook/pb_date_picker/date_picker.html.erb +3 -2
- data/app/pb_kits/playbook/pb_date_picker/date_picker.rb +1 -1
- data/app/pb_kits/playbook/pb_date_picker/date_picker.test.js +44 -1
- data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.ts +34 -2
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick.html.erb +8 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick.jsx +18 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/index.js +2 -1
- data/app/pb_kits/playbook/pb_date_picker/plugins/quickPick.tsx +166 -0
- data/app/pb_kits/playbook/pb_date_picker/sass_partials/_calendar_input_icon.scss +3 -2
- data/app/pb_kits/playbook/pb_date_picker/sass_partials/_quick_pick_styles.scss +75 -0
- data/app/pb_kits/playbook/pb_docs/kit_example.html.erb +23 -19
- data/app/pb_kits/playbook/pb_nav/_item.tsx +1 -1
- data/app/pb_kits/playbook/pb_nav/_subtle_mixin.scss +1 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/MoreExtensionsDropdown.tsx +69 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/Toolbar.tsx +9 -2
- data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarDropdown.tsx +10 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.tsx +4 -2
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_more_extensions.jsx +55 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_more_extensions.md +12 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/index.js +2 -1
- data/app/pb_kits/playbook/pb_weekday_stacked/{_weekday_stacked.jsx → _weekday_stacked.tsx} +4 -5
- data/app/pb_kits/playbook/pb_weekday_stacked/weekday_stacked.test.jsx +105 -0
- data/lib/playbook/version.rb +2 -2
- metadata +16 -8
@@ -1,3 +1,4 @@
|
|
1
|
+
@import "../../tokens/colors";
|
1
2
|
// Calendar Icon Styles
|
2
3
|
.cal_icon_wrapper {
|
3
4
|
pointer-events: none;
|
@@ -13,8 +14,8 @@
|
|
13
14
|
padding-left: $space_sm - 1;
|
14
15
|
color: $text_lt_light;
|
15
16
|
@media (hover: hover) {
|
16
|
-
&:hover
|
17
|
-
|
17
|
+
&:hover{
|
18
|
+
background-color: rgba($focus_input_light,$opacity_5);
|
18
19
|
}
|
19
20
|
}
|
20
21
|
&.dark {
|
@@ -0,0 +1,75 @@
|
|
1
|
+
@import "../../tokens/animation-curves";
|
2
|
+
@import "../../tokens/colors";
|
3
|
+
@import "../../tokens/typography";
|
4
|
+
@import "../../tokens/titles";
|
5
|
+
@import "../../tokens/spacing";
|
6
|
+
|
7
|
+
$pb_card_border_width: 1px;
|
8
|
+
$pb_card_border_radius: $border_rad_heavier;
|
9
|
+
|
10
|
+
// used to display dropdown on the left of the calender
|
11
|
+
.quick-pick-drop-down {
|
12
|
+
width: auto;
|
13
|
+
display: grid;
|
14
|
+
}
|
15
|
+
|
16
|
+
.quick-pick-ul {
|
17
|
+
padding: $space_xs 0px;
|
18
|
+
margin: 0;
|
19
|
+
list-style: none;
|
20
|
+
}
|
21
|
+
|
22
|
+
.nav-item {
|
23
|
+
list-style: none;
|
24
|
+
border-radius: 6px;
|
25
|
+
border-bottom: 0;
|
26
|
+
margin: $space_xs $space_sm;
|
27
|
+
}
|
28
|
+
|
29
|
+
.nav-item-link {
|
30
|
+
text-decoration: none;
|
31
|
+
border-width: $pb_card_border_width;
|
32
|
+
border-style: solid;
|
33
|
+
border-color: $border_light;
|
34
|
+
border-radius: $pb_card_border_radius;
|
35
|
+
padding: $space_xs 14px;
|
36
|
+
transition-property: color, background-color;
|
37
|
+
transition-duration: 0.15s;
|
38
|
+
transition-timing-function: $bezier;
|
39
|
+
line-height: 1.4;
|
40
|
+
color: $charcoal;
|
41
|
+
font-size: $font_default;
|
42
|
+
font-weight: $regular;
|
43
|
+
&.active {
|
44
|
+
border-width: 2px;
|
45
|
+
border-color: $primary;
|
46
|
+
}
|
47
|
+
@media (hover:hover) {
|
48
|
+
&:hover {
|
49
|
+
cursor: pointer;
|
50
|
+
box-shadow: $shadow-deep;
|
51
|
+
border-color: $slate;
|
52
|
+
}
|
53
|
+
}
|
54
|
+
}
|
55
|
+
|
56
|
+
// Hide the calendar
|
57
|
+
.quick-pick-drop-down > .flatpickr-months, .quick-pick-drop-down > .flatpickr-innerContainer {
|
58
|
+
display: none;
|
59
|
+
}
|
60
|
+
|
61
|
+
@media only screen and (max-width: 767px) {
|
62
|
+
.quick-pick-ul {
|
63
|
+
padding: $space_xs $space_xs;
|
64
|
+
display: grid;
|
65
|
+
grid-template-columns: 1fr 1fr;
|
66
|
+
}
|
67
|
+
|
68
|
+
.nav-item {
|
69
|
+
margin: $space_xxs $space_xs;
|
70
|
+
}
|
71
|
+
|
72
|
+
.nav-item-link {
|
73
|
+
padding: $space_xs $space_xxs;
|
74
|
+
}
|
75
|
+
}
|
@@ -46,25 +46,29 @@
|
|
46
46
|
|
47
47
|
<script>
|
48
48
|
var htmlButton = document.getElementById('<%= "copy-html-#{example_key}" %>')
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
49
|
+
if (htmlButton) {
|
50
|
+
htmlButton.addEventListener('click', function() {
|
51
|
+
var tempElement = document.createElement('div')
|
52
|
+
tempElement.innerHTML = `<%= example_html %>`
|
53
|
+
var decodedString = tempElement.textContent || tempElement.innerText;
|
54
|
+
copyContent(decodedString)
|
55
|
+
})
|
56
|
+
}
|
55
57
|
|
56
58
|
var button = document.getElementById('<%= "copy-button-#{example_key}" %>')
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
59
|
+
if (button) {
|
60
|
+
button.addEventListener('click', function() {
|
61
|
+
var tempElement = document.createElement('div')
|
62
|
+
tempElement.innerHTML = `<%= source %>`
|
63
|
+
var decodedString = tempElement.textContent || tempElement.innerText;
|
64
|
+
copyContent(decodedString)
|
65
|
+
var fadeAwayDiv = document.getElementById("<%= "tooltip-#{example_key}" %>")
|
66
|
+
setTimeout(function() {
|
67
|
+
fadeAwayDiv.classList.remove('show')
|
68
|
+
}, 3000)
|
69
|
+
setTimeout(function() {
|
70
|
+
fadeAwayDiv.classList.add('hide')
|
71
|
+
}, 3001)
|
72
|
+
})
|
73
|
+
}
|
70
74
|
</script>
|
@@ -0,0 +1,69 @@
|
|
1
|
+
import React, { useState } from 'react'
|
2
|
+
|
3
|
+
import Flex from '../../pb_flex/_flex'
|
4
|
+
import PbReactPopover from '../../pb_popover/_popover'
|
5
|
+
import Icon from '../../pb_icon/_icon'
|
6
|
+
import Nav from '../../pb_nav/_nav'
|
7
|
+
import NavItem from '../../pb_nav/_item'
|
8
|
+
|
9
|
+
const MoreExtensionsDropdown = ({extensions}: any) => {
|
10
|
+
const [showPopover, setShowPopover] = useState(false)
|
11
|
+
|
12
|
+
const handleTogglePopover = () => {
|
13
|
+
setShowPopover(true)
|
14
|
+
}
|
15
|
+
|
16
|
+
const handlePopoverClose = (shouldClosePopover: boolean) => {
|
17
|
+
setShowPopover(!shouldClosePopover)
|
18
|
+
}
|
19
|
+
|
20
|
+
|
21
|
+
const popoverReference = (
|
22
|
+
<button
|
23
|
+
className="toolbar_button"
|
24
|
+
onClick={handleTogglePopover}
|
25
|
+
>
|
26
|
+
<Flex
|
27
|
+
align="center"
|
28
|
+
className="toolbar_button_icon"
|
29
|
+
justify="center"
|
30
|
+
>
|
31
|
+
<Icon icon="ellipsis" size="lg" />
|
32
|
+
</Flex>
|
33
|
+
</button>
|
34
|
+
|
35
|
+
);
|
36
|
+
|
37
|
+
return (
|
38
|
+
<PbReactPopover
|
39
|
+
closeOnClick='outside'
|
40
|
+
padding='none'
|
41
|
+
placement="bottom"
|
42
|
+
reference={popoverReference}
|
43
|
+
shouldClosePopover={handlePopoverClose}
|
44
|
+
show={showPopover}
|
45
|
+
>
|
46
|
+
<Nav
|
47
|
+
paddingTop={extensions.length > 1 ? "xs" : "none"}
|
48
|
+
paddingBottom={extensions.length > 1 ? "xs" : "none"}
|
49
|
+
variant="subtle"
|
50
|
+
>
|
51
|
+
{extensions && extensions.map(({ icon, text, onclick, isActive}:any, index:number) => (
|
52
|
+
<NavItem
|
53
|
+
cursor="pointer"
|
54
|
+
className={`pb_tiptap_toolbar_dropdown_list_item ${isActive ? "is-active" : ""}`}
|
55
|
+
iconLeft={icon}
|
56
|
+
key={`${text}_${index}`}
|
57
|
+
margin='none'
|
58
|
+
onClick={()=> {onclick(); setShowPopover(false)}}
|
59
|
+
text={text}
|
60
|
+
paddingTop='xxs'
|
61
|
+
paddingBottom='xxs'
|
62
|
+
/>
|
63
|
+
))}
|
64
|
+
</Nav>
|
65
|
+
</PbReactPopover>
|
66
|
+
)
|
67
|
+
}
|
68
|
+
|
69
|
+
export default MoreExtensionsDropdown
|
@@ -9,8 +9,9 @@ import ToolbarDropdown from "./ToolbarDropdown";
|
|
9
9
|
import ToolbarNodes from "./ToolbarNodes";
|
10
10
|
import { ToolbarTypes } from "./EditorTypes";
|
11
11
|
import ToolbarHistoryItems from "./ToolbarHistory";
|
12
|
+
import MoreExtensionsDropdown from "./MoreExtensionsDropdown";
|
12
13
|
|
13
|
-
const EditorToolbar = ({ editor }:any) => {
|
14
|
+
const EditorToolbar = ({ editor, extensions }:any) => {
|
14
15
|
const toolbaritems = [
|
15
16
|
{
|
16
17
|
icon: "bold",
|
@@ -51,10 +52,16 @@ const EditorToolbar = ({ editor }:any) => {
|
|
51
52
|
)}
|
52
53
|
<SectionSeparator orientation="vertical" />
|
53
54
|
<ToolbarNodes editor={editor} />
|
55
|
+
{
|
56
|
+
extensions && (
|
57
|
+
<>
|
58
|
+
<MoreExtensionsDropdown extensions={extensions}/>
|
59
|
+
</>
|
60
|
+
)
|
61
|
+
}
|
54
62
|
</FlexItem>
|
55
63
|
<ToolbarHistoryItems editor={editor} />
|
56
64
|
</Flex>
|
57
|
-
{/* <SectionSeparator /> */}
|
58
65
|
</Background>
|
59
66
|
);
|
60
67
|
};
|
@@ -98,7 +98,17 @@ const popoverReference = (
|
|
98
98
|
activeCount === 2 ? (
|
99
99
|
activeItems[1]
|
100
100
|
) : (
|
101
|
+
activeCount === 1 ? (
|
101
102
|
activeItems[0] || null
|
103
|
+
) : (
|
104
|
+
<Flex align="center" key="paragraph" gap="xs">
|
105
|
+
<Icon icon="paragraph" size="lg" />
|
106
|
+
<div>Paragraph</div>
|
107
|
+
<Flex className={showPopover ? "fa-flip-vertical" : ""} display="inline_flex">
|
108
|
+
<Icon fixedWidth icon="angle-down" margin-left="xs" />
|
109
|
+
</Flex>
|
110
|
+
</Flex>
|
111
|
+
)
|
102
112
|
)
|
103
113
|
}
|
104
114
|
</Button>
|
@@ -35,7 +35,8 @@ type RichTextEditorProps = {
|
|
35
35
|
data?: { [key: string]: string },
|
36
36
|
focus?: boolean,
|
37
37
|
id?: string,
|
38
|
-
inline?: boolean,
|
38
|
+
inline?: boolean,
|
39
|
+
extensions?: { [key: string]: string }[],
|
39
40
|
name?: string,
|
40
41
|
onChange: (html: string, text: string) => void,
|
41
42
|
placeholder?: string,
|
@@ -56,6 +57,7 @@ const RichTextEditor = (props: RichTextEditorProps) => {
|
|
56
57
|
data = {},
|
57
58
|
focus = false,
|
58
59
|
inline = false,
|
60
|
+
extensions,
|
59
61
|
name,
|
60
62
|
onChange = noop,
|
61
63
|
placeholder,
|
@@ -162,7 +164,7 @@ const RichTextEditor = (props: RichTextEditorProps) => {
|
|
162
164
|
{
|
163
165
|
advancedEditor ? (
|
164
166
|
<div className='pb_rich_text_editor_advanced_container'>
|
165
|
-
<EditorToolbar editor={advancedEditor}/>
|
167
|
+
<EditorToolbar extensions={extensions} editor={advancedEditor}/>
|
166
168
|
{ children }
|
167
169
|
</div>
|
168
170
|
) : (
|
@@ -0,0 +1,55 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import { RichTextEditor } from '../..'
|
3
|
+
import { useEditor, EditorContent } from "@tiptap/react"
|
4
|
+
import StarterKit from "@tiptap/starter-kit"
|
5
|
+
import Link from '@tiptap/extension-link'
|
6
|
+
|
7
|
+
import HorizontalRule from "@tiptap/extension-horizontal-rule"
|
8
|
+
import Highlight from '@tiptap/extension-highlight'
|
9
|
+
|
10
|
+
|
11
|
+
const RichTextEditorMoreExtensions = (props) => {
|
12
|
+
|
13
|
+
const editor = useEditor({
|
14
|
+
extensions: [
|
15
|
+
StarterKit,
|
16
|
+
Link,
|
17
|
+
HorizontalRule,
|
18
|
+
Highlight.configure({ multicolor: true })
|
19
|
+
],
|
20
|
+
content:"Add your text here. You can format your text, add links, quotes, and bullets."
|
21
|
+
})
|
22
|
+
if (!editor) {
|
23
|
+
return null
|
24
|
+
}
|
25
|
+
|
26
|
+
const ExtensionsList = [
|
27
|
+
{
|
28
|
+
icon: "horizontal-rule",
|
29
|
+
isActive: editor.isActive("horizontalRule"),
|
30
|
+
text: "Horizontal Rule",
|
31
|
+
onclick: () => editor.chain().focus().setHorizontalRule().run(),
|
32
|
+
},
|
33
|
+
{
|
34
|
+
icon: "highlighter",
|
35
|
+
isActive: editor.isActive("highlight"),
|
36
|
+
text: "Highlighter",
|
37
|
+
onclick: () => editor.chain().focus().toggleHighlight().run(),
|
38
|
+
}
|
39
|
+
]
|
40
|
+
|
41
|
+
|
42
|
+
return (
|
43
|
+
<div>
|
44
|
+
<RichTextEditor
|
45
|
+
advancedEditor={editor}
|
46
|
+
extensions={ExtensionsList}
|
47
|
+
{...props}
|
48
|
+
>
|
49
|
+
<EditorContent editor={editor}/>
|
50
|
+
</RichTextEditor>
|
51
|
+
</div>
|
52
|
+
)
|
53
|
+
}
|
54
|
+
|
55
|
+
export default RichTextEditorMoreExtensions
|
@@ -0,0 +1,12 @@
|
|
1
|
+
This variant allows you to optionally include any of [Tiptap’s 53 extensions](https://tiptap.dev/extensions) within any advanced editor by using the `extensions` prop.
|
2
|
+
|
3
|
+
__NOTE__: In order to leverage this prop, you __must__ install the extension you need in your project, import it and pass it to the extensions array as shown in this example with the HorizontalRule and the Highlight extensions.
|
4
|
+
|
5
|
+
In order to add the extension to the editor toolbar, create an array of objects (as shown in the ExtensionsList array in the example below). Each object in this array should include:
|
6
|
+
|
7
|
+
`icon`: the icon to display within the toolbar dropdown (any Fontawesome icons can be used)
|
8
|
+
`isActive`: sets the extension to active within the dropdown, when applicable
|
9
|
+
`text`: the label within the toolbar dropdown
|
10
|
+
`onclick`: initializes the extension when it’s clicked within the dropdown (snytax varies with extension, see Tiptap's docs for more information)
|
11
|
+
|
12
|
+
This array can then be passed to the `extensions` prop and all extensions in the array will be rendered in the ellipsis dropdown.
|
@@ -14,6 +14,7 @@ examples:
|
|
14
14
|
react:
|
15
15
|
- rich_text_editor_default: Default
|
16
16
|
- rich_text_editor_advanced_default: Advanced Default
|
17
|
+
- rich_text_editor_more_extensions: Advanced (Extra Extensions)
|
17
18
|
- rich_text_editor_simple: Simple
|
18
19
|
- rich_text_editor_attributes: Attributes
|
19
20
|
- rich_text_editor_focus: Focus
|
@@ -7,4 +7,5 @@ export { default as RichTextEditorTemplates } from './_rich_text_editor_template
|
|
7
7
|
export { default as RichTextEditorToolbarBottom } from './_rich_text_editor_toolbar_bottom.jsx'
|
8
8
|
export { default as RichTextEditorInline } from './_rich_text_editor_inline.jsx'
|
9
9
|
export { default as RichTextEditorPreview } from './_rich_text_editor_preview.jsx'
|
10
|
-
export { default as RichTextEditorAdvancedDefault } from './_rich_text_editor_advanced_default.jsx'
|
10
|
+
export { default as RichTextEditorAdvancedDefault } from './_rich_text_editor_advanced_default.jsx'
|
11
|
+
export { default as RichTextEditorMoreExtensions } from './_rich_text_editor_more_extensions.jsx'
|
@@ -12,18 +12,17 @@ import DateTime from '../pb_kit/dateTime'
|
|
12
12
|
|
13
13
|
type WeekdayStackedProps = {
|
14
14
|
align?: "left" | "center" | "right",
|
15
|
-
aria?:
|
15
|
+
aria?: {[key:string]:string },
|
16
16
|
className?: string,
|
17
17
|
dark?: boolean,
|
18
18
|
data?: object,
|
19
|
-
date:
|
19
|
+
date: Date,
|
20
20
|
id?: string,
|
21
21
|
variant?: "day_only" | "month_day" | "expanded",
|
22
22
|
compact?: boolean,
|
23
|
-
id?: string,
|
24
23
|
}
|
25
24
|
|
26
|
-
const getDayOfWeek = (value, compact) => {
|
25
|
+
const getDayOfWeek = (value: Date | string, compact: boolean) => {
|
27
26
|
const dateTime = new DateTime({ value })
|
28
27
|
if (compact) {
|
29
28
|
return dateTime.toDayAbbr()
|
@@ -32,7 +31,7 @@ const getDayOfWeek = (value, compact) => {
|
|
32
31
|
}
|
33
32
|
}
|
34
33
|
|
35
|
-
const getFormattedDate = (value, variant) => {
|
34
|
+
const getFormattedDate = (value: Date | string, variant: "day_only" | "month_day" | "expanded") => {
|
36
35
|
const dateTime = new DateTime({ value })
|
37
36
|
if (variant === 'day_only') {
|
38
37
|
return dateTime.toDay()
|
@@ -0,0 +1,105 @@
|
|
1
|
+
import React from "react";
|
2
|
+
import { render, screen } from "../utilities/test-utils";
|
3
|
+
|
4
|
+
import WeekdayStacked from "./_weekday_stacked";
|
5
|
+
|
6
|
+
const TEST_DATE = "01/01/2020 00:00:000 GMT-0500";
|
7
|
+
jest.setSystemTime(new Date(TEST_DATE));
|
8
|
+
const testId = "weekdaystacked-kit";
|
9
|
+
const realDate = Date;
|
10
|
+
|
11
|
+
beforeEach(() => {
|
12
|
+
global.Date.now = jest.fn(() => new Date(TEST_DATE));
|
13
|
+
});
|
14
|
+
|
15
|
+
afterEach(() => {
|
16
|
+
global.Date = realDate;
|
17
|
+
});
|
18
|
+
|
19
|
+
describe("WeekdayStacked Kit", () => {
|
20
|
+
test("renders className", () => {
|
21
|
+
render(
|
22
|
+
<WeekdayStacked
|
23
|
+
data={{ testid: testId }}
|
24
|
+
/>
|
25
|
+
);
|
26
|
+
|
27
|
+
const kit = screen.getByTestId(testId);
|
28
|
+
expect(kit).toHaveClass("pb_weekday_stacked_kit_left");
|
29
|
+
});
|
30
|
+
|
31
|
+
test("renders Caption with weekday", () => {
|
32
|
+
render(
|
33
|
+
<WeekdayStacked
|
34
|
+
data={{ testid: testId }}
|
35
|
+
/>
|
36
|
+
);
|
37
|
+
|
38
|
+
const kit = screen.getByTestId(testId);
|
39
|
+
const text = kit.querySelector(".pb_caption_kit_md");
|
40
|
+
expect(text.textContent).toEqual("Wed")
|
41
|
+
});
|
42
|
+
|
43
|
+
test("renders Title with date", () => {
|
44
|
+
render(
|
45
|
+
<WeekdayStacked
|
46
|
+
data={{ testid: testId }}
|
47
|
+
/>
|
48
|
+
);
|
49
|
+
|
50
|
+
const kit = screen.getByTestId(testId);
|
51
|
+
const text = kit.querySelector(".pb_title_kit_size_4");
|
52
|
+
expect(text.textContent).toEqual("1/1")
|
53
|
+
});
|
54
|
+
|
55
|
+
test("renders compact prop", () => {
|
56
|
+
render(
|
57
|
+
<WeekdayStacked
|
58
|
+
compact
|
59
|
+
data={{ testid: testId }}
|
60
|
+
/>
|
61
|
+
);
|
62
|
+
|
63
|
+
const kit = screen.getByTestId(testId);
|
64
|
+
const text = kit.querySelector(".pb_caption_kit_md");
|
65
|
+
expect(text.textContent).toEqual("W")
|
66
|
+
});
|
67
|
+
|
68
|
+
test("renders align prop", () => {
|
69
|
+
render(
|
70
|
+
<WeekdayStacked
|
71
|
+
align="left"
|
72
|
+
data={{ testid: testId }}
|
73
|
+
/>
|
74
|
+
);
|
75
|
+
|
76
|
+
const kit = screen.getByTestId(testId);
|
77
|
+
expect(kit).toHaveClass("pb_weekday_stacked_kit_left")
|
78
|
+
});
|
79
|
+
|
80
|
+
test("renders day_only variant prop", () => {
|
81
|
+
render(
|
82
|
+
<WeekdayStacked
|
83
|
+
data={{ testid: testId }}
|
84
|
+
variant="day_only"
|
85
|
+
/>
|
86
|
+
);
|
87
|
+
|
88
|
+
const kit = screen.getByTestId(testId);
|
89
|
+
const text = kit.querySelector(".pb_title_kit_size_4");
|
90
|
+
expect(text.textContent).toEqual("1")
|
91
|
+
});
|
92
|
+
|
93
|
+
test("renders expanded variant prop", () => {
|
94
|
+
render(
|
95
|
+
<WeekdayStacked
|
96
|
+
data={{ testid: testId }}
|
97
|
+
variant="expanded"
|
98
|
+
/>
|
99
|
+
);
|
100
|
+
|
101
|
+
const kit = screen.getByTestId(testId);
|
102
|
+
const text = kit.querySelector(".pb_title_kit_size_4");
|
103
|
+
expect(text.textContent).toEqual("Jan 1")
|
104
|
+
});
|
105
|
+
});
|
data/lib/playbook/version.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: playbook_ui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 12.
|
4
|
+
version: 12.22.0.pre.alpha.PLAY603datepickerquickpickinputpresetdropdown696
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Power UX
|
8
8
|
- Power Devs
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2023-05-
|
12
|
+
date: 2023-05-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionpack
|
@@ -745,6 +745,8 @@ files:
|
|
745
745
|
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_positions.md
|
746
746
|
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_positions_element.html.erb
|
747
747
|
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_positions_element.jsx
|
748
|
+
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick.html.erb
|
749
|
+
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick.jsx
|
748
750
|
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_range.html.erb
|
749
751
|
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_range.jsx
|
750
752
|
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_time.html.erb
|
@@ -759,6 +761,7 @@ files:
|
|
759
761
|
- app/pb_kits/playbook/pb_date_picker/docs/_description.md
|
760
762
|
- app/pb_kits/playbook/pb_date_picker/docs/example.yml
|
761
763
|
- app/pb_kits/playbook/pb_date_picker/docs/index.js
|
764
|
+
- app/pb_kits/playbook/pb_date_picker/plugins/quickPick.tsx
|
762
765
|
- app/pb_kits/playbook/pb_date_picker/plugins/timeSelect.ts
|
763
766
|
- app/pb_kits/playbook/pb_date_picker/sass_partials/_calendar_input_icon.scss
|
764
767
|
- app/pb_kits/playbook/pb_date_picker/sass_partials/_day_styles.scss
|
@@ -768,6 +771,7 @@ files:
|
|
768
771
|
- app/pb_kits/playbook/pb_date_picker/sass_partials/_input_styles.scss
|
769
772
|
- app/pb_kits/playbook/pb_date_picker/sass_partials/_month_and_year_styles.scss
|
770
773
|
- app/pb_kits/playbook/pb_date_picker/sass_partials/_overrides.scss
|
774
|
+
- app/pb_kits/playbook/pb_date_picker/sass_partials/_quick_pick_styles.scss
|
771
775
|
- app/pb_kits/playbook/pb_date_picker/sass_partials/_time_selection_styles.scss
|
772
776
|
- app/pb_kits/playbook/pb_date_picker/sass_partials/_week_styles.scss
|
773
777
|
- app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.scss
|
@@ -1721,6 +1725,7 @@ files:
|
|
1721
1725
|
- app/pb_kits/playbook/pb_radio/radio.test.js
|
1722
1726
|
- app/pb_kits/playbook/pb_rich_text_editor/TipTap/EditorButton.tsx
|
1723
1727
|
- app/pb_kits/playbook/pb_rich_text_editor/TipTap/EditorTypes.ts
|
1728
|
+
- app/pb_kits/playbook/pb_rich_text_editor/TipTap/MoreExtensionsDropdown.tsx
|
1724
1729
|
- app/pb_kits/playbook/pb_rich_text_editor/TipTap/Toolbar.tsx
|
1725
1730
|
- app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarDropdown.tsx
|
1726
1731
|
- app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarHistory.tsx
|
@@ -1740,6 +1745,8 @@ files:
|
|
1740
1745
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_focus.jsx
|
1741
1746
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_inline.html.erb
|
1742
1747
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_inline.jsx
|
1748
|
+
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_more_extensions.jsx
|
1749
|
+
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_more_extensions.md
|
1743
1750
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_preview.html.erb
|
1744
1751
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_preview.jsx
|
1745
1752
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_simple.html.erb
|
@@ -2347,8 +2354,8 @@ files:
|
|
2347
2354
|
- app/pb_kits/playbook/pb_walkthrough/docs/example.yml
|
2348
2355
|
- app/pb_kits/playbook/pb_walkthrough/docs/index.js
|
2349
2356
|
- app/pb_kits/playbook/pb_walkthrough/walkthrough.test.jsx
|
2350
|
-
- app/pb_kits/playbook/pb_weekday_stacked/_weekday_stacked.jsx
|
2351
2357
|
- app/pb_kits/playbook/pb_weekday_stacked/_weekday_stacked.scss
|
2358
|
+
- app/pb_kits/playbook/pb_weekday_stacked/_weekday_stacked.tsx
|
2352
2359
|
- app/pb_kits/playbook/pb_weekday_stacked/docs/_weekday_stacked_compact.html.erb
|
2353
2360
|
- app/pb_kits/playbook/pb_weekday_stacked/docs/_weekday_stacked_compact.jsx
|
2354
2361
|
- app/pb_kits/playbook/pb_weekday_stacked/docs/_weekday_stacked_default.html.erb
|
@@ -2359,6 +2366,7 @@ files:
|
|
2359
2366
|
- app/pb_kits/playbook/pb_weekday_stacked/docs/index.js
|
2360
2367
|
- app/pb_kits/playbook/pb_weekday_stacked/weekday_stacked.html.erb
|
2361
2368
|
- app/pb_kits/playbook/pb_weekday_stacked/weekday_stacked.rb
|
2369
|
+
- app/pb_kits/playbook/pb_weekday_stacked/weekday_stacked.test.jsx
|
2362
2370
|
- app/pb_kits/playbook/playbook-doc.js
|
2363
2371
|
- app/pb_kits/playbook/playbook-rails-react-bindings.js
|
2364
2372
|
- app/pb_kits/playbook/playbook-rails.js
|
@@ -2487,7 +2495,7 @@ homepage: http://playbook.powerapp.cloud
|
|
2487
2495
|
licenses:
|
2488
2496
|
- ISC
|
2489
2497
|
metadata: {}
|
2490
|
-
post_install_message:
|
2498
|
+
post_install_message:
|
2491
2499
|
rdoc_options: []
|
2492
2500
|
require_paths:
|
2493
2501
|
- lib
|
@@ -2498,12 +2506,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
2498
2506
|
version: '0'
|
2499
2507
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
2500
2508
|
requirements:
|
2501
|
-
- - "
|
2509
|
+
- - ">"
|
2502
2510
|
- !ruby/object:Gem::Version
|
2503
|
-
version:
|
2511
|
+
version: 1.3.1
|
2504
2512
|
requirements: []
|
2505
2513
|
rubygems_version: 3.3.7
|
2506
|
-
signing_key:
|
2514
|
+
signing_key:
|
2507
2515
|
specification_version: 4
|
2508
2516
|
summary: Playbook Design System
|
2509
2517
|
test_files: []
|