@placeholderco/placeholder-ui 2.1.0 → 2.2.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.
- package/dist/editors/CodeMirror.svelte +295 -297
- package/dist/editors/tiptap/LinkActionMenu.svelte +6 -1
- package/dist/editors/tiptap/extensions/Alert.js +17 -17
- package/dist/editors/tiptap/extensions/Div.js +19 -19
- package/dist/editors/tiptap/extensions/Span.js +14 -14
- package/dist/editors/tiptap/toolbar/AlertButton.svelte +254 -253
- package/dist/editors/tiptap/toolbar/AlignCenterButton.svelte +11 -11
- package/dist/editors/tiptap/toolbar/AlignJustifyButton.svelte +11 -11
- package/dist/editors/tiptap/toolbar/AlignLeftButton.svelte +11 -11
- package/dist/editors/tiptap/toolbar/AlignRightButton.svelte +11 -11
- package/dist/editors/tiptap/toolbar/BoldButton.svelte +11 -11
- package/dist/editors/tiptap/toolbar/BulletListButton.svelte +11 -11
- package/dist/editors/tiptap/toolbar/CodeButton.svelte +11 -11
- package/dist/editors/tiptap/toolbar/ColorButton.svelte +265 -265
- package/dist/editors/tiptap/toolbar/DocumentButton.svelte +51 -51
- package/dist/editors/tiptap/toolbar/HeadingButton.svelte +21 -21
- package/dist/editors/tiptap/toolbar/HtmlButton.svelte +48 -52
- package/dist/editors/tiptap/toolbar/ImageButton.svelte +35 -39
- package/dist/editors/tiptap/toolbar/ItalicButton.svelte +11 -11
- package/dist/editors/tiptap/toolbar/LinkButton.svelte +249 -249
- package/dist/editors/tiptap/toolbar/OrderedListButton.svelte +11 -11
- package/dist/editors/tiptap/toolbar/RedoButton.svelte +11 -11
- package/dist/editors/tiptap/toolbar/StrikethroughButton.svelte +11 -11
- package/dist/editors/tiptap/toolbar/SubscriptButton.svelte +11 -11
- package/dist/editors/tiptap/toolbar/SuperscriptButton.svelte +11 -11
- package/dist/editors/tiptap/toolbar/TableButton.svelte +231 -224
- package/dist/editors/tiptap/toolbar/ToolbarButton.svelte +59 -65
- package/dist/editors/tiptap/toolbar/UnderlineButton.svelte +11 -11
- package/dist/editors/tiptap/toolbar/UndoButton.svelte +11 -11
- package/dist/form/Autocomplete.svelte +24 -22
- package/dist/form/AutocompleteMulti.svelte +24 -22
- package/dist/form/Checkbox.svelte +4 -4
- package/dist/form/Chips.svelte +15 -7
- package/dist/form/ColorPicker.svelte +5 -20
- package/dist/form/ComboBox.svelte +4 -4
- package/dist/form/ComboBoxItemBuilder.svelte +14 -32
- package/dist/form/ComboBoxMulti.svelte +7 -3
- package/dist/form/CronBuilder.svelte +32 -110
- package/dist/form/DatePicker.svelte +9 -28
- package/dist/form/DateRangePicker.svelte +46 -36
- package/dist/form/DateTimePicker.svelte +11 -30
- package/dist/form/Number.svelte +1 -3
- package/dist/form/RadioGroup.svelte +1 -3
- package/dist/form/Select.svelte +25 -28
- package/dist/form/SelectMulti.svelte +36 -38
- package/dist/form/StringArrayBuilder.svelte +1 -3
- package/dist/form/TextArea.svelte +5 -6
- package/dist/form/Textbox.svelte +10 -4
- package/dist/form/TimePicker.svelte +10 -4
- package/dist/icon/Icon.svelte +5 -1
- package/dist/index.d.ts +147 -146
- package/dist/index.js +78 -77
- package/dist/layout/CustomNavbar.svelte +1 -1
- package/dist/layout/NavbarItemDisplay.svelte +1 -1
- package/dist/layout/NavbarItemView.svelte +3 -1
- package/dist/layout/Sidenav.svelte +1 -1
- package/dist/models/ComboBoxItem.d.ts +4 -4
- package/dist/models/NotifyModel.js +0 -1
- package/dist/theme.svelte.d.ts +1 -1
- package/dist/theme.svelte.js +46 -22
- package/dist/ui/Accordion.svelte +1 -3
- package/dist/ui/Badge.svelte +4 -5
- package/dist/ui/Button.svelte +7 -1
- package/dist/ui/ContextMenu.svelte +5 -11
- package/dist/ui/Dialog.svelte +16 -3
- package/dist/ui/Dialog.svelte.d.ts +7 -1
- package/dist/ui/Dropdown.svelte +21 -10
- package/dist/ui/MultiSortable.svelte +1 -3
- package/dist/ui/Pagination.svelte +2 -2
- package/dist/ui/Popover.svelte +16 -37
- package/dist/ui/ProgressBar.svelte +1 -4
- package/dist/ui/ThemeSwitcher.svelte +2 -1
- package/dist/ui/Tooltip.svelte +1 -37
- package/dist/util/DateFunctions.js +1 -1
- package/dist/util/Floating.d.ts +70 -0
- package/dist/util/Floating.js +321 -0
- package/dist/util/NavigateTo.js +2 -2
- package/dist/util/Transitions.d.ts +1 -1
- package/dist/util/Transitions.js +1 -1
- package/package.json +25 -25
|
@@ -11,26 +11,26 @@ export const Alert = Node.create({
|
|
|
11
11
|
parseHTML: (element) => element.getAttribute('data-variant'),
|
|
12
12
|
renderHTML: (attributes) => {
|
|
13
13
|
return {
|
|
14
|
-
'data-variant': attributes.variant
|
|
14
|
+
'data-variant': attributes.variant
|
|
15
15
|
};
|
|
16
|
-
}
|
|
16
|
+
}
|
|
17
17
|
},
|
|
18
18
|
title: {
|
|
19
19
|
default: 'Alert',
|
|
20
20
|
parseHTML: (element) => element.getAttribute('data-title'),
|
|
21
21
|
renderHTML: (attributes) => {
|
|
22
22
|
return {
|
|
23
|
-
'data-title': attributes.title
|
|
23
|
+
'data-title': attributes.title
|
|
24
24
|
};
|
|
25
|
-
}
|
|
26
|
-
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
27
|
};
|
|
28
28
|
},
|
|
29
29
|
parseHTML() {
|
|
30
30
|
return [
|
|
31
31
|
{
|
|
32
|
-
tag: 'div[data-type="alert"]'
|
|
33
|
-
}
|
|
32
|
+
tag: 'div[data-type="alert"]'
|
|
33
|
+
}
|
|
34
34
|
];
|
|
35
35
|
},
|
|
36
36
|
renderHTML({ HTMLAttributes }) {
|
|
@@ -38,14 +38,14 @@ export const Alert = Node.create({
|
|
|
38
38
|
'div',
|
|
39
39
|
mergeAttributes(HTMLAttributes, {
|
|
40
40
|
'data-type': 'alert',
|
|
41
|
-
class: `alert alert-${HTMLAttributes['data-variant'] || 'default'}
|
|
41
|
+
class: `alert alert-${HTMLAttributes['data-variant'] || 'default'}`
|
|
42
42
|
}),
|
|
43
43
|
[
|
|
44
44
|
'div',
|
|
45
45
|
{ class: 'alert-title', 'data-title-element': 'true' },
|
|
46
|
-
HTMLAttributes['data-title'] || 'Alert'
|
|
46
|
+
HTMLAttributes['data-title'] || 'Alert'
|
|
47
47
|
],
|
|
48
|
-
['div', { class: 'alert-content' }, 0]
|
|
48
|
+
['div', { class: 'alert-content' }, 0]
|
|
49
49
|
];
|
|
50
50
|
},
|
|
51
51
|
addCommands() {
|
|
@@ -60,13 +60,13 @@ export const Alert = Node.create({
|
|
|
60
60
|
content: [
|
|
61
61
|
{
|
|
62
62
|
type: 'text',
|
|
63
|
-
text: 'Enter your alert message here...'
|
|
64
|
-
}
|
|
65
|
-
]
|
|
66
|
-
}
|
|
67
|
-
]
|
|
63
|
+
text: 'Enter your alert message here...'
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
68
|
});
|
|
69
|
-
}
|
|
69
|
+
}
|
|
70
70
|
};
|
|
71
|
-
}
|
|
71
|
+
}
|
|
72
72
|
});
|
|
@@ -7,7 +7,7 @@ export const Div = Node.create({
|
|
|
7
7
|
defining: false,
|
|
8
8
|
addOptions() {
|
|
9
9
|
return {
|
|
10
|
-
HTMLAttributes: {}
|
|
10
|
+
HTMLAttributes: {}
|
|
11
11
|
};
|
|
12
12
|
},
|
|
13
13
|
parseHTML() {
|
|
@@ -24,12 +24,12 @@ export const Div = Node.create({
|
|
|
24
24
|
return false;
|
|
25
25
|
// Preserve all attributes
|
|
26
26
|
const attrs = {};
|
|
27
|
-
Array.from(element.attributes).forEach(attr => {
|
|
27
|
+
Array.from(element.attributes).forEach((attr) => {
|
|
28
28
|
attrs[attr.name] = attr.value;
|
|
29
29
|
});
|
|
30
30
|
return attrs;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
33
|
];
|
|
34
34
|
},
|
|
35
35
|
renderHTML({ HTMLAttributes }) {
|
|
@@ -42,7 +42,7 @@ export const Div = Node.create({
|
|
|
42
42
|
},
|
|
43
43
|
toggleDiv: () => ({ commands }) => {
|
|
44
44
|
return commands.toggleNode(this.name, 'paragraph');
|
|
45
|
-
}
|
|
45
|
+
}
|
|
46
46
|
};
|
|
47
47
|
},
|
|
48
48
|
addAttributes() {
|
|
@@ -50,40 +50,40 @@ export const Div = Node.create({
|
|
|
50
50
|
// Preserve all HTML attributes
|
|
51
51
|
class: {
|
|
52
52
|
default: null,
|
|
53
|
-
parseHTML: element => element.getAttribute('class'),
|
|
54
|
-
renderHTML: attributes => {
|
|
53
|
+
parseHTML: (element) => element.getAttribute('class'),
|
|
54
|
+
renderHTML: (attributes) => {
|
|
55
55
|
if (!attributes.class)
|
|
56
56
|
return {};
|
|
57
57
|
return { class: attributes.class };
|
|
58
|
-
}
|
|
58
|
+
}
|
|
59
59
|
},
|
|
60
60
|
style: {
|
|
61
61
|
default: null,
|
|
62
|
-
parseHTML: element => element.getAttribute('style'),
|
|
63
|
-
renderHTML: attributes => {
|
|
62
|
+
parseHTML: (element) => element.getAttribute('style'),
|
|
63
|
+
renderHTML: (attributes) => {
|
|
64
64
|
if (!attributes.style)
|
|
65
65
|
return {};
|
|
66
66
|
return { style: attributes.style };
|
|
67
|
-
}
|
|
67
|
+
}
|
|
68
68
|
},
|
|
69
69
|
id: {
|
|
70
70
|
default: null,
|
|
71
|
-
parseHTML: element => element.getAttribute('id'),
|
|
72
|
-
renderHTML: attributes => {
|
|
71
|
+
parseHTML: (element) => element.getAttribute('id'),
|
|
72
|
+
renderHTML: (attributes) => {
|
|
73
73
|
if (!attributes.id)
|
|
74
74
|
return {};
|
|
75
75
|
return { id: attributes.id };
|
|
76
|
-
}
|
|
76
|
+
}
|
|
77
77
|
},
|
|
78
78
|
'data-type': {
|
|
79
79
|
default: null,
|
|
80
|
-
parseHTML: element => element.getAttribute('data-type'),
|
|
81
|
-
renderHTML: attributes => {
|
|
80
|
+
parseHTML: (element) => element.getAttribute('data-type'),
|
|
81
|
+
renderHTML: (attributes) => {
|
|
82
82
|
if (!attributes['data-type'])
|
|
83
83
|
return {};
|
|
84
84
|
return { 'data-type': attributes['data-type'] };
|
|
85
|
-
}
|
|
86
|
-
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
87
|
};
|
|
88
|
-
}
|
|
88
|
+
}
|
|
89
89
|
});
|
|
@@ -8,15 +8,15 @@ export const Span = Node.create({
|
|
|
8
8
|
defining: false,
|
|
9
9
|
addOptions() {
|
|
10
10
|
return {
|
|
11
|
-
HTMLAttributes: {}
|
|
11
|
+
HTMLAttributes: {}
|
|
12
12
|
};
|
|
13
13
|
},
|
|
14
14
|
parseHTML() {
|
|
15
15
|
return [
|
|
16
16
|
{
|
|
17
17
|
tag: 'span',
|
|
18
|
-
priority: 50
|
|
19
|
-
}
|
|
18
|
+
priority: 50
|
|
19
|
+
}
|
|
20
20
|
];
|
|
21
21
|
},
|
|
22
22
|
renderHTML({ HTMLAttributes }) {
|
|
@@ -26,31 +26,31 @@ export const Span = Node.create({
|
|
|
26
26
|
return {
|
|
27
27
|
class: {
|
|
28
28
|
default: null,
|
|
29
|
-
parseHTML: element => element.getAttribute('class'),
|
|
30
|
-
renderHTML: attributes => {
|
|
29
|
+
parseHTML: (element) => element.getAttribute('class'),
|
|
30
|
+
renderHTML: (attributes) => {
|
|
31
31
|
if (!attributes.class)
|
|
32
32
|
return {};
|
|
33
33
|
return { class: attributes.class };
|
|
34
|
-
}
|
|
34
|
+
}
|
|
35
35
|
},
|
|
36
36
|
style: {
|
|
37
37
|
default: null,
|
|
38
|
-
parseHTML: element => element.getAttribute('style'),
|
|
39
|
-
renderHTML: attributes => {
|
|
38
|
+
parseHTML: (element) => element.getAttribute('style'),
|
|
39
|
+
renderHTML: (attributes) => {
|
|
40
40
|
if (!attributes.style)
|
|
41
41
|
return {};
|
|
42
42
|
return { style: attributes.style };
|
|
43
|
-
}
|
|
43
|
+
}
|
|
44
44
|
},
|
|
45
45
|
id: {
|
|
46
46
|
default: null,
|
|
47
|
-
parseHTML: element => element.getAttribute('id'),
|
|
48
|
-
renderHTML: attributes => {
|
|
47
|
+
parseHTML: (element) => element.getAttribute('id'),
|
|
48
|
+
renderHTML: (attributes) => {
|
|
49
49
|
if (!attributes.id)
|
|
50
50
|
return {};
|
|
51
51
|
return { id: attributes.id };
|
|
52
|
-
}
|
|
53
|
-
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
54
|
};
|
|
55
|
-
}
|
|
55
|
+
}
|
|
56
56
|
});
|