@pageboard/html 0.11.29 → 0.12.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/elements/accordion.js +0 -1
- package/elements/card.js +5 -5
- package/elements/consent.js +1 -1
- package/elements/embed.js +1 -1
- package/elements/fieldsets.js +2 -2
- package/elements/form.js +2 -2
- package/elements/grid.js +3 -3
- package/elements/heading.js +1 -1
- package/elements/image.js +4 -4
- package/elements/input-date.js +3 -4
- package/elements/inputs.js +12 -12
- package/elements/layout.js +8 -9
- package/elements/link.js +1 -1
- package/elements/menu.js +7 -7
- package/elements/navigation.js +3 -16
- package/elements/pagination.js +1 -1
- package/elements/paragraph.js +2 -2
- package/elements/sitemap.js +8 -8
- package/elements/sticky.js +2 -2
- package/elements/tab.js +1 -1
- package/elements/table.js +10 -10
- package/elements/template.js +1 -1
- package/lib/nouislider.js +28 -0
- package/package.json +1 -1
- package/ui/accordion.js +3 -21
- package/ui/consent.css +3 -3
- package/ui/consent.js +9 -13
- package/ui/embed.js +11 -17
- package/ui/fieldset-list.js +9 -9
- package/ui/fieldset.js +4 -8
- package/ui/form.js +143 -158
- package/ui/heading-helper.js +13 -19
- package/ui/image.js +15 -23
- package/ui/input-date-slot.js +2 -2
- package/ui/input-date.js +2 -7
- package/ui/input-file.js +58 -61
- package/ui/input-range.js +4 -8
- package/ui/layout.js +2 -6
- package/ui/media.js +15 -28
- package/ui/menu.js +23 -27
- package/ui/pagination.js +2 -2
- package/ui/query-tags.js +4 -4
- package/ui/rating.js +2 -2
- package/ui/scroll-link.js +2 -9
- package/ui/select.js +21 -23
- package/ui/sitemap-helper.js +5 -5
- package/ui/sitemap.js +15 -15
- package/ui/sticky.js +2 -6
- package/ui/tab-helper.js +32 -34
- package/ui/tab.js +2 -4
- package/ui/time.js +2 -7
- package/ui/transition.js +21 -21
package/elements/accordion.js
CHANGED
package/elements/card.js
CHANGED
|
@@ -46,7 +46,7 @@ exports.cards = {
|
|
|
46
46
|
default: 'stackable'
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
|
-
html: '<div class="ui [columns|
|
|
49
|
+
html: '<div class="ui [columns|as:colnums] [shape] [responsive] cards"></div>',
|
|
50
50
|
stylesheets: [
|
|
51
51
|
'../ui/card.css'
|
|
52
52
|
]
|
|
@@ -88,8 +88,8 @@ exports.card = {
|
|
|
88
88
|
nodes: 'paragraph+',
|
|
89
89
|
title: 'extra'
|
|
90
90
|
}],
|
|
91
|
-
html: `<div class="ui [fluid
|
|
92
|
-
<div class="image [image
|
|
91
|
+
html: `<div class="ui [fluid] [centered] card">
|
|
92
|
+
<div class="image [image|alt::hidden]" block-content="image"></div>
|
|
93
93
|
<div class="content" block-content="content"></div>
|
|
94
94
|
<div class="extra content" block-content="extra"></div>
|
|
95
95
|
</div>`
|
|
@@ -143,8 +143,8 @@ exports.cardlink = {
|
|
|
143
143
|
nodes: 'paragraph_nolink+',
|
|
144
144
|
title: 'extra'
|
|
145
145
|
}],
|
|
146
|
-
html: `<a href="[url]" class="ui [fluid
|
|
147
|
-
<div class="image [image
|
|
146
|
+
html: `<a href="[url]" class="ui [fluid] [centered] card">
|
|
147
|
+
<div class="image [image|alt::hidden]" block-content="image"></div>
|
|
148
148
|
<div class="content" block-content="content"></div>
|
|
149
149
|
<div class="extra content" block-content="extra"></div>
|
|
150
150
|
</a>`
|
package/elements/consent.js
CHANGED
|
@@ -20,7 +20,7 @@ exports.consent_form = {
|
|
|
20
20
|
'content.': 'content.content'
|
|
21
21
|
},
|
|
22
22
|
html: `<form is="element-consent" class="ui form" data-transient="[transient]">
|
|
23
|
-
<x[transient
|
|
23
|
+
<x[transient|alt:template:div|at:-] block-content="content"></x[transient|alt:template:div|at:-]>
|
|
24
24
|
</form>`,
|
|
25
25
|
scripts: ['../ui/storage.js', '../ui/consent.js'],
|
|
26
26
|
stylesheets: ['../ui/consent.css']
|
package/elements/embed.js
CHANGED
|
@@ -25,7 +25,7 @@ exports.embed = {
|
|
|
25
25
|
};
|
|
26
26
|
},
|
|
27
27
|
tag: 'iframe,element-embed',
|
|
28
|
-
html: `<element-embed class="ui embed" data-src="[url]" id="[name|
|
|
28
|
+
html: `<element-embed class="ui embed" data-src="[url]" id="[name|as:xid]"></element-embed>`,
|
|
29
29
|
scripts: [
|
|
30
30
|
'../ui/embed.js'
|
|
31
31
|
],
|
package/elements/fieldsets.js
CHANGED
|
@@ -29,7 +29,7 @@ exports.fieldset = {
|
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
contents: "fieldset_legend block+",
|
|
32
|
-
html: '<fieldset class="[plain
|
|
32
|
+
html: '<fieldset class="[plain]" data-name="[name|split:.|slice:1|join:.]" data-value="[value]" is="element-fieldset"></fieldset>',
|
|
33
33
|
scripts: ["../ui/fieldset.js"],
|
|
34
34
|
stylesheets: ['../ui/fieldset.css']
|
|
35
35
|
};
|
|
@@ -104,7 +104,7 @@ exports.fieldlist_button = {
|
|
|
104
104
|
nodes: "inline*",
|
|
105
105
|
marks: "nolink"
|
|
106
106
|
},
|
|
107
|
-
html: '<button type="button" class="ui [full
|
|
107
|
+
html: '<button type="button" class="ui [full|alt:fluid:] button" value="[type]">Label</button>',
|
|
108
108
|
stylesheets: [
|
|
109
109
|
'../lib/components/button.css',
|
|
110
110
|
]
|
package/elements/form.js
CHANGED
|
@@ -168,12 +168,12 @@ exports.api_form = {
|
|
|
168
168
|
tag: 'form[method="post"]',
|
|
169
169
|
html: `<form is="element-form" method="post" name="[name]"
|
|
170
170
|
action="/.api/form/[$id]"
|
|
171
|
-
parameters="[$expr
|
|
171
|
+
parameters="[$expr?.action?.parameters|templates:$query]"
|
|
172
172
|
success="[redirection|urltpl:url:parameters]"
|
|
173
173
|
badrequest="[badrequest|urltpl:url:parameters]"
|
|
174
174
|
unauthorized="[unauthorized|urltpl:url:parameters]"
|
|
175
175
|
notfound="[notfound|urltpl:url:parameters]"
|
|
176
|
-
class="ui form [hidden
|
|
176
|
+
class="ui form [hidden]"></form>`,
|
|
177
177
|
stylesheets: [
|
|
178
178
|
'../lib/components/form.css',
|
|
179
179
|
'../ui/form.css'
|
package/elements/grid.js
CHANGED
|
@@ -43,7 +43,7 @@ exports.grid = {
|
|
|
43
43
|
maximum: 16
|
|
44
44
|
}
|
|
45
45
|
},
|
|
46
|
-
html: '<div class="ui [responsive] [width|
|
|
46
|
+
html: '<div class="ui [responsive] [width|eq:min|alt::equal width] [columns|as:colnums|post: columns] grid [width|switch:contained:container]"></div>',
|
|
47
47
|
stylesheets: [
|
|
48
48
|
'../lib/components/grid.css'
|
|
49
49
|
]
|
|
@@ -64,7 +64,7 @@ exports.grid_column = {
|
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
66
|
contents: "block+|card",
|
|
67
|
-
html: '<div class="[width|
|
|
67
|
+
html: '<div class="[width|as:colnums|post: wide] column"></div>'
|
|
68
68
|
};
|
|
69
69
|
|
|
70
70
|
exports.grid_row = {
|
|
@@ -95,5 +95,5 @@ exports.grid_row = {
|
|
|
95
95
|
maximum: 16
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
|
-
html: '<div class="[responsive] [columns|
|
|
98
|
+
html: '<div class="[responsive] [columns|as:colnums|post: columns] row"></div>'
|
|
99
99
|
};
|
package/elements/heading.js
CHANGED
|
@@ -56,7 +56,7 @@ exports.heading = {
|
|
|
56
56
|
icon: '<i class="icon header"></i>',
|
|
57
57
|
tag: 'h1,h2,h3,h4,h5,h6',
|
|
58
58
|
html: `<h[level] class="ui [align|or:left] aligned header" is="h[level]-helper" id="[id]" entitled="[entitled]">
|
|
59
|
-
<a aria-hidden="true" href="[$loc.pathname][$loc.search][id|pre:#]">[linkable|
|
|
59
|
+
<a aria-hidden="true" href="[$loc.pathname][$loc.search][id|pre:#]">[linkable|prune:*]#</a>
|
|
60
60
|
<div block-content="text">Heading</div>
|
|
61
61
|
</hn>`,
|
|
62
62
|
parse: function (dom) {
|
package/elements/image.js
CHANGED
|
@@ -281,10 +281,10 @@ exports.inlineImage = {
|
|
|
281
281
|
data-src="[url]"
|
|
282
282
|
data-crop="[crop.x];[crop.y];[crop.width];[crop.height];[crop.zoom]"
|
|
283
283
|
alt="" class="ui inline image
|
|
284
|
-
[display.avatar
|
|
285
|
-
[display.rounded
|
|
286
|
-
[display.circular
|
|
287
|
-
[display.spaced
|
|
284
|
+
[display.avatar]
|
|
285
|
+
[display.rounded]
|
|
286
|
+
[display.circular]
|
|
287
|
+
[display.spaced]
|
|
288
288
|
[display.floated|pre:floated ]
|
|
289
289
|
[display.align|post: aligned]" />`,
|
|
290
290
|
stylesheets: [
|
package/elements/input-date.js
CHANGED
|
@@ -52,7 +52,6 @@ exports.input_date_time = {
|
|
|
52
52
|
step: {
|
|
53
53
|
title: 'Time steps',
|
|
54
54
|
description: 'Ignored for dates',
|
|
55
|
-
type: 'integer',
|
|
56
55
|
default: null,
|
|
57
56
|
anyOf: [{
|
|
58
57
|
const: null,
|
|
@@ -85,8 +84,8 @@ exports.input_date_time = {
|
|
|
85
84
|
<label block-content="label">Label</label>
|
|
86
85
|
<input is="element-input-date"
|
|
87
86
|
name="[name]" disabled="[disabled]" placeholder="[placeholder]"
|
|
88
|
-
required="[required]" value="[value]" step="[step
|
|
89
|
-
type="[format|
|
|
87
|
+
required="[required]" value="[value]" step="[step]"
|
|
88
|
+
type="[format|switch:datetime:datetime-local]"
|
|
90
89
|
/>
|
|
91
90
|
</div>`,
|
|
92
91
|
scripts: [
|
|
@@ -147,7 +146,7 @@ exports.input_date_slot = {
|
|
|
147
146
|
},
|
|
148
147
|
html: `<div class="field">
|
|
149
148
|
<label block-content="label">Label</label>
|
|
150
|
-
<element-input-date-slot type="[format|
|
|
149
|
+
<element-input-date-slot type="[format|switch:datetime:datetime-local]" step="[step]">
|
|
151
150
|
<input is="element-input-date" name="[nameStart]" value="[valueStart]" />
|
|
152
151
|
<input is="element-input-date" name="[nameEnd]" value="[valueEnd]" />
|
|
153
152
|
</element-input-date-slot>
|
package/elements/inputs.js
CHANGED
|
@@ -49,7 +49,7 @@ exports.input_button = {
|
|
|
49
49
|
default: false
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
|
-
html: '<button type="[type]" disabled="[disabled]" class="ui [full
|
|
52
|
+
html: '<button type="[type]" disabled="[disabled]" class="ui [full|alt:fluid:] button" name="[name]" value="[value]">[type|schema:title]</button>',
|
|
53
53
|
stylesheets: [
|
|
54
54
|
'../lib/components/button.css',
|
|
55
55
|
]
|
|
@@ -69,7 +69,7 @@ exports.input_fields = {
|
|
|
69
69
|
}
|
|
70
70
|
},
|
|
71
71
|
contents: "(input_text|input_range|input_checkbox|input_radio|input_select|input_button)+",
|
|
72
|
-
html: `<div class="[inline
|
|
72
|
+
html: `<div class="[inline] fields"></div>`
|
|
73
73
|
};
|
|
74
74
|
|
|
75
75
|
exports.input_text = {
|
|
@@ -160,24 +160,24 @@ exports.input_text = {
|
|
|
160
160
|
tel: /^(\(\d+\))? *\d+([ .-]?\d+)*$/.source,
|
|
161
161
|
email: /^[\w.!#$%&'*+/=?^`{|}~-]+@\w(?:[\w-]{0,61}\w)?(?:\.\w(?:[\w-]{0,61}\w)?)*$/.source
|
|
162
162
|
},
|
|
163
|
-
html: `<div class="[width|
|
|
163
|
+
html: `<div class="[width|as:colnums|post: wide] field [type|eq:hidden|or:]">
|
|
164
164
|
<label block-content="label">Label</label>
|
|
165
|
-
<textarea
|
|
165
|
+
[type|eq:textarea|prune:*:1]<textarea
|
|
166
166
|
name="[name]"
|
|
167
167
|
required="[required]"
|
|
168
168
|
readonly="[readonly]"
|
|
169
169
|
disabled="[disabled]"
|
|
170
170
|
placeholder="[placeholder]"
|
|
171
|
-
>[value|
|
|
172
|
-
<input name="[name]"
|
|
171
|
+
>[value|as:text]</textarea>
|
|
172
|
+
[type|neq:textarea|prune:*:1]<input name="[name]"
|
|
173
173
|
required="[required]"
|
|
174
174
|
readonly="[readonly]"
|
|
175
175
|
disabled="[disabled]"
|
|
176
176
|
placeholder="[placeholder]"
|
|
177
|
-
type="[type|
|
|
178
|
-
pattern="[$element.patterns.[type]
|
|
177
|
+
type="[type|switch:new-password:password]"
|
|
178
|
+
pattern="[$element.patterns.[type]]"
|
|
179
179
|
value="[value]"
|
|
180
|
-
autocomplete="[type|
|
|
180
|
+
autocomplete="[type|eq:new-password|fail:]" />
|
|
181
181
|
</div>`
|
|
182
182
|
};
|
|
183
183
|
|
|
@@ -213,7 +213,7 @@ exports.input_number = {
|
|
|
213
213
|
id: 'label',
|
|
214
214
|
nodes: 'inline*'
|
|
215
215
|
},
|
|
216
|
-
html: `<div class="
|
|
216
|
+
html: `<div class="field">
|
|
217
217
|
<label block-content="label">Label</label>
|
|
218
218
|
<input name="[name]"
|
|
219
219
|
required="[required]"
|
|
@@ -320,7 +320,7 @@ exports.input_checkbox = {
|
|
|
320
320
|
nodes: 'inline*'
|
|
321
321
|
},
|
|
322
322
|
html: `<div class="field">
|
|
323
|
-
<div class="ui [toggle
|
|
323
|
+
<div class="ui [toggle] checkbox">
|
|
324
324
|
<input type="checkbox" required="[required]" disabled="[disabled]"
|
|
325
325
|
name="[name]" value="[value]" checked="[checked]"
|
|
326
326
|
id="for-[name][value|or:|pre:-]-[$id|slice:0:6]" />
|
|
@@ -433,7 +433,7 @@ exports.input_select = {
|
|
|
433
433
|
}],
|
|
434
434
|
html: `<div class="field">
|
|
435
435
|
<label block-content="label">Label</label>
|
|
436
|
-
<element-select class="ui selection dropdown [multiple
|
|
436
|
+
<element-select class="ui selection dropdown [multiple]"
|
|
437
437
|
data-name="[name]" data-disabled="[disabled]" data-required="[required]"
|
|
438
438
|
data-multiple="[multiple]" data-placeholder="[placeholder]"
|
|
439
439
|
data-value="[value]"
|
package/elements/layout.js
CHANGED
|
@@ -281,20 +281,19 @@ exports.layout = {
|
|
|
281
281
|
contents: "block+",
|
|
282
282
|
group: 'block',
|
|
283
283
|
html: `<div class="layout
|
|
284
|
-
[width|
|
|
285
|
-
[
|
|
286
|
-
[
|
|
287
|
-
[vertical|?]
|
|
284
|
+
[width|switch:full:fullwidth:contained:ui container]
|
|
285
|
+
[horizontal]
|
|
286
|
+
[vertical]
|
|
288
287
|
[direction]
|
|
289
|
-
[invert
|
|
288
|
+
[invert|alt:inverted]"
|
|
290
289
|
is="element-layout"
|
|
291
|
-
style-margin-block="[margins.block|
|
|
292
|
-
style-margin-inline="[margins.inline|
|
|
293
|
-
style-height="[height|
|
|
290
|
+
style-margin-block="[margins.block|fail:][margins.blockUnits]"
|
|
291
|
+
style-margin-inline="[margins.inline|fail:][margins.inlineUnits]"
|
|
292
|
+
style-height="[height|fail:][heightUnits]"
|
|
294
293
|
data-src="[background.image]"
|
|
295
294
|
data-crop="[background.crop.x];[background.crop.y];[background.crop.width];[background.crop.height];[background.crop.zoom]"
|
|
296
295
|
data-size="[background.size]"
|
|
297
|
-
data-repeat="[background.repeat
|
|
296
|
+
data-repeat="[background.repeat]"
|
|
298
297
|
data-attachment="[background.attachment]"
|
|
299
298
|
data-position="[background.position]"
|
|
300
299
|
></div>`,
|
package/elements/link.js
CHANGED
|
@@ -27,7 +27,7 @@ exports.link = {
|
|
|
27
27
|
inline: true,
|
|
28
28
|
group: "inline",
|
|
29
29
|
tag: 'a:not([block-type]),a[block-type="link"]',
|
|
30
|
-
html: '<a href="[url
|
|
30
|
+
html: '<a href="[url]" class="[button|alt:ui button]"></a>',
|
|
31
31
|
stylesheets: [
|
|
32
32
|
'../lib/components/button.css'
|
|
33
33
|
]
|
package/elements/menu.js
CHANGED
|
@@ -62,7 +62,7 @@ exports.menu_group = {
|
|
|
62
62
|
},
|
|
63
63
|
html: `<element-menu class="[position] menu">
|
|
64
64
|
<div block-content="items"></div>
|
|
65
|
-
<div tabindex="0" class="ui fixed popup item [responsive|eq:popup|
|
|
65
|
+
<div tabindex="0" class="ui fixed popup item [responsive|eq:popup|prune:*]">
|
|
66
66
|
<div class="icon">≡</div>
|
|
67
67
|
<div class="dropdown placer"><div class="menu"></div></div>
|
|
68
68
|
</div>
|
|
@@ -110,7 +110,7 @@ exports.menu_item_link = {
|
|
|
110
110
|
marks: "nolink"
|
|
111
111
|
},
|
|
112
112
|
group: 'menu_item',
|
|
113
|
-
html: '<a class="[labeled
|
|
113
|
+
html: '<a class="[labeled] item" href="[url]">Link</a>'
|
|
114
114
|
};
|
|
115
115
|
|
|
116
116
|
exports.menu_item_block = { ...exports.menu_item_link,
|
|
@@ -140,7 +140,7 @@ exports.menu_item_text = {
|
|
|
140
140
|
nodes: "inline*"
|
|
141
141
|
},
|
|
142
142
|
group: 'menu_item',
|
|
143
|
-
html: '<div class="[labeled
|
|
143
|
+
html: '<div class="[labeled] item">Text</div>'
|
|
144
144
|
};
|
|
145
145
|
|
|
146
146
|
exports.menu_item_dropdown = {
|
|
@@ -177,8 +177,8 @@ exports.menu_item_dropdown = {
|
|
|
177
177
|
}
|
|
178
178
|
},
|
|
179
179
|
group: "menu_item",
|
|
180
|
-
html: `<div tabindex="0" class="ui simple [position] dropdown item [focused
|
|
181
|
-
<div class="title [icon
|
|
180
|
+
html: `<div tabindex="0" class="ui simple [position] dropdown item [focused|and:active]">
|
|
181
|
+
<div class="title [icon|and:caret-icon]" block-content="title">Dropdown</div>
|
|
182
182
|
<div class="menu" block-content="items"></div>
|
|
183
183
|
</div>`,
|
|
184
184
|
stylesheets: [
|
|
@@ -232,8 +232,8 @@ exports.menu_item_popup = {
|
|
|
232
232
|
}
|
|
233
233
|
},
|
|
234
234
|
group: "menu_item",
|
|
235
|
-
html: `<div tabindex="0" class="ui [position] [fixed
|
|
236
|
-
<div class="title [icon
|
|
235
|
+
html: `<div tabindex="0" class="ui [position] [fixed] popup item">
|
|
236
|
+
<div class="title [icon|alt:caret-icon]" block-content="title">Popup</div>
|
|
237
237
|
<div class="placer">
|
|
238
238
|
<div block-content="content"></div>
|
|
239
239
|
</div>
|
package/elements/navigation.js
CHANGED
|
@@ -20,20 +20,7 @@ exports.nav = {
|
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
group: "block",
|
|
23
|
-
html: `<a class="ui icon button [
|
|
24
|
-
<i class="icon [rel]"></i>
|
|
25
|
-
</a>`,
|
|
26
|
-
fuse: function(node, d, scope) {
|
|
27
|
-
let obj = (scope.$links || {})[d.relation] || {};
|
|
28
|
-
if (d.relation == "up") {
|
|
29
|
-
if (obj.length) obj = obj[0];
|
|
30
|
-
}
|
|
31
|
-
node.fuse({
|
|
32
|
-
url: obj.url,
|
|
33
|
-
title: obj.title,
|
|
34
|
-
rel: d.relation,
|
|
35
|
-
}, scope);
|
|
36
|
-
}
|
|
23
|
+
html: `<a class="ui icon button [$links.[relation]|as:array|.first|alt::disabled]" href="[$links.[relation]|as:array|.first.url]" title="[$links.[relation]|as:array|.first.title]"><i class="icon [rel]"></i></a>`
|
|
37
24
|
};
|
|
38
25
|
|
|
39
26
|
exports.scrollLink = {
|
|
@@ -69,9 +56,9 @@ exports.breadcrumb = {
|
|
|
69
56
|
group: "block",
|
|
70
57
|
html: `<nav class="ui breadcrumb">
|
|
71
58
|
<div class="divider"></div>
|
|
72
|
-
<a href="[$links.up
|
|
59
|
+
<a href="[$links.up|nth:-1|at:a::1|repeat:link]" class="section">[link.title]</a>
|
|
73
60
|
<div class="divider"></div>
|
|
74
|
-
<div class="active section">[$page.data.title|
|
|
61
|
+
<div class="active section">[$page.data.title|fail:div::1]</div>
|
|
75
62
|
</nav>`,
|
|
76
63
|
stylesheets: [
|
|
77
64
|
'../lib/components/breadcrumb.css'
|
package/elements/pagination.js
CHANGED
|
@@ -28,7 +28,7 @@ exports.pagination = {
|
|
|
28
28
|
},
|
|
29
29
|
},
|
|
30
30
|
contents: "inline*",
|
|
31
|
-
html: `<a class="ui button pagination" is="element-pagination" data-dir="[dir]" data-fetch="[fetch]">[dir|
|
|
31
|
+
html: `<a class="ui button pagination" is="element-pagination" data-dir="[dir]" data-fetch="[fetch]">[dir|switch:+:Next:-:Prev]</a>`,
|
|
32
32
|
scripts: [
|
|
33
33
|
'../ui/pagination.js'
|
|
34
34
|
]
|
package/elements/paragraph.js
CHANGED
|
@@ -80,7 +80,7 @@ exports.segment = {
|
|
|
80
80
|
contents: "block+",
|
|
81
81
|
group: "block",
|
|
82
82
|
icon: '<b class="icon">Seg</b>',
|
|
83
|
-
html: '<div class="ui [raised
|
|
83
|
+
html: '<div class="ui [raised] [disabled] [inverted] [padded] [compact] [circular] [basic] [attached|switch:both: |post: attached] [align|post: aligned] segment"></div>',
|
|
84
84
|
stylesheets: [
|
|
85
85
|
'../lib/components/segment.css'
|
|
86
86
|
]
|
|
@@ -113,7 +113,7 @@ exports.divider = {
|
|
|
113
113
|
default: false
|
|
114
114
|
}
|
|
115
115
|
},
|
|
116
|
-
html: '<div class="ui divider [ruler
|
|
116
|
+
html: '<div class="ui divider [ruler|or:hidden] [large|alt:section] [clearing] [fitted]"></div>',
|
|
117
117
|
stylesheets: [
|
|
118
118
|
'../lib/components/divider.css'
|
|
119
119
|
]
|
package/elements/sitemap.js
CHANGED
|
@@ -49,18 +49,18 @@ exports.sitemap = {
|
|
|
49
49
|
},
|
|
50
50
|
alias: name,
|
|
51
51
|
context: 'sitemap/ | sitepage/',
|
|
52
|
-
html: `<element-sitepage class="item [leaf
|
|
53
|
-
<div class="title [leaf
|
|
52
|
+
html: `<element-sitepage class="item [leaf|alt::fold]" data-url="[url]" data-index="[index]">
|
|
53
|
+
<div class="title [leaf|alt::caret-icon]">
|
|
54
54
|
<span class="header">[title|or:Untitled]</span>
|
|
55
|
-
<span class="ui mini type label">[$grants.webmaster|
|
|
56
|
-
<span class="ui mini black label">[$grants.webmaster|
|
|
57
|
-
<span class="ui mini orange label">[$grants.webmaster|
|
|
58
|
-
<span class="ui mini red label">[$grants.webmaster|
|
|
55
|
+
<span class="ui mini type label">[$grants.webmaster|prune:*][$type]</span>
|
|
56
|
+
<span class="ui mini black label">[$grants.webmaster|prune:*][nositemap|prune:*]no sitemap</span>
|
|
57
|
+
<span class="ui mini orange label">[$grants.webmaster|prune:*][noindex|prune:*]no index</span>
|
|
58
|
+
<span class="ui mini red label">[$grants.webmaster|prune:*][$lock?.read|fail:*]</span>
|
|
59
59
|
<br>
|
|
60
60
|
<a href="[url]" class="description">[url|or:-]</a>
|
|
61
|
-
<a href="[redirect|
|
|
61
|
+
<a href="[redirect|fail:*]" class="redirection"> ➜ [redirect]</a>
|
|
62
62
|
</div>
|
|
63
|
-
<div class="list content [leaf
|
|
63
|
+
<div class="list content [leaf|not:prune:*]" block-content="children"></div>
|
|
64
64
|
</element-sitepage>`
|
|
65
65
|
};
|
|
66
66
|
}
|
package/elements/sticky.js
CHANGED
|
@@ -21,7 +21,7 @@ exports.sticky = {
|
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
contents: "block+",
|
|
24
|
-
html: '<element-sticky data-collapsed="[collapsed|
|
|
24
|
+
html: '<element-sticky data-collapsed="[collapsed|fail:]" data-position="[position]"></element-sticky>',
|
|
25
25
|
stylesheets: [
|
|
26
26
|
'../ui/sticky.css'
|
|
27
27
|
]
|
|
@@ -43,7 +43,7 @@ exports.header.properties.autohide = {
|
|
|
43
43
|
exports.header.fragments.push({
|
|
44
44
|
attributes: {
|
|
45
45
|
"is": "element-sticky-nav",
|
|
46
|
-
"class": "[collapsed
|
|
46
|
+
"class": "[collapsed] [autohide]"
|
|
47
47
|
}
|
|
48
48
|
});
|
|
49
49
|
exports.header.stylesheets.push('../ui/sticky.css');
|
package/elements/tab.js
CHANGED
|
@@ -20,7 +20,7 @@ exports.tabs = {
|
|
|
20
20
|
title: 'Tabs',
|
|
21
21
|
nodes: "tab+"
|
|
22
22
|
}],
|
|
23
|
-
html: `<element-tabs id="[name|
|
|
23
|
+
html: `<element-tabs id="[name|as:xid]">
|
|
24
24
|
<div class="ui top attached tabular menu" block-content="items"></div>
|
|
25
25
|
<div block-content="tabs"></div>
|
|
26
26
|
</element-tabs>`,
|
package/elements/table.js
CHANGED
|
@@ -52,15 +52,15 @@ exports.table = {
|
|
|
52
52
|
}
|
|
53
53
|
},
|
|
54
54
|
html: `<table class="ui table
|
|
55
|
-
[definition
|
|
55
|
+
[definition]
|
|
56
56
|
[single|?|post: line]
|
|
57
|
-
[unstackable
|
|
58
|
-
[selectable
|
|
59
|
-
[striped
|
|
60
|
-
[celled
|
|
61
|
-
[basic
|
|
62
|
-
[collapsing
|
|
63
|
-
[compact
|
|
57
|
+
[unstackable]
|
|
58
|
+
[selectable]
|
|
59
|
+
[striped]
|
|
60
|
+
[celled]
|
|
61
|
+
[basic]
|
|
62
|
+
[collapsing]
|
|
63
|
+
[compact]"
|
|
64
64
|
></table>`,
|
|
65
65
|
stylesheets: [
|
|
66
66
|
'../lib/components/table.css'
|
|
@@ -171,7 +171,7 @@ exports.table_cell = {
|
|
|
171
171
|
if (dom.matches('.selectable')) d.selectable = true;
|
|
172
172
|
return d;
|
|
173
173
|
},
|
|
174
|
-
html: '<td class="[align|post: aligned] [selectable
|
|
174
|
+
html: '<td class="[align|post: aligned] [selectable]" rowspan="[rowspan]" colspan="[colspan]"></td>'
|
|
175
175
|
};
|
|
176
176
|
|
|
177
177
|
exports.table_head_cell = {
|
|
@@ -206,6 +206,6 @@ exports.table_head_cell = {
|
|
|
206
206
|
contents: "block+",
|
|
207
207
|
tag: 'th',
|
|
208
208
|
inplace: true,
|
|
209
|
-
html: '<th class="[align|post: aligned] [width|
|
|
209
|
+
html: '<th class="[align|post: aligned] [width|as:colnums|post: wide]" rowspan="[rowspan]" colspan="[colspan]"></th>'
|
|
210
210
|
};
|
|
211
211
|
|
package/elements/template.js
CHANGED
package/lib/nouislider.js
CHANGED
|
@@ -959,6 +959,7 @@
|
|
|
959
959
|
else if (handleNumber === options.handles - 1) {
|
|
960
960
|
addClass(handle, options.cssClasses.handleUpper);
|
|
961
961
|
}
|
|
962
|
+
origin.handle = handle;
|
|
962
963
|
return origin;
|
|
963
964
|
}
|
|
964
965
|
// Insert nodes for connect elements
|
|
@@ -1022,6 +1023,31 @@
|
|
|
1022
1023
|
var handleOrigin = scope_Handles[handleNumber];
|
|
1023
1024
|
return handleOrigin.hasAttribute("disabled");
|
|
1024
1025
|
}
|
|
1026
|
+
function disable(handleNumber) {
|
|
1027
|
+
if (handleNumber !== null && handleNumber !== undefined) {
|
|
1028
|
+
scope_Handles[handleNumber].setAttribute("disabled", "");
|
|
1029
|
+
scope_Handles[handleNumber].handle.removeAttribute("tabindex");
|
|
1030
|
+
}
|
|
1031
|
+
else {
|
|
1032
|
+
scope_Target.setAttribute("disabled", "");
|
|
1033
|
+
scope_Handles.forEach(function (handle) {
|
|
1034
|
+
handle.handle.removeAttribute("tabindex");
|
|
1035
|
+
});
|
|
1036
|
+
}
|
|
1037
|
+
}
|
|
1038
|
+
function enable(handleNumber) {
|
|
1039
|
+
if (handleNumber !== null && handleNumber !== undefined) {
|
|
1040
|
+
scope_Handles[handleNumber].removeAttribute("disabled");
|
|
1041
|
+
scope_Handles[handleNumber].handle.setAttribute("tabindex", "0");
|
|
1042
|
+
}
|
|
1043
|
+
else {
|
|
1044
|
+
scope_Target.removeAttribute("disabled");
|
|
1045
|
+
scope_Handles.forEach(function (handle) {
|
|
1046
|
+
handle.removeAttribute("disabled");
|
|
1047
|
+
handle.handle.setAttribute("tabindex", "0");
|
|
1048
|
+
});
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
1025
1051
|
function removeTooltips() {
|
|
1026
1052
|
if (scope_Tooltips) {
|
|
1027
1053
|
removeEvent("update" + INTERNAL_EVENT_NS.tooltips);
|
|
@@ -2199,6 +2225,8 @@
|
|
|
2199
2225
|
set: valueSet,
|
|
2200
2226
|
setHandle: valueSetHandle,
|
|
2201
2227
|
reset: valueReset,
|
|
2228
|
+
disable: disable,
|
|
2229
|
+
enable: enable,
|
|
2202
2230
|
// Exposed for unit testing, don't use this in your application.
|
|
2203
2231
|
__moveHandles: function (upward, proposal, handleNumbers) {
|
|
2204
2232
|
moveHandles(upward, proposal, scope_Locations, handleNumbers);
|
package/package.json
CHANGED
package/ui/accordion.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
class HTMLElementAccordion extends
|
|
1
|
+
class HTMLElementAccordion extends Page.Element {
|
|
2
2
|
handleClick(e) {
|
|
3
3
|
const title = e.target.closest('.title');
|
|
4
4
|
if (!title) return;
|
|
@@ -7,36 +7,18 @@ class HTMLElementAccordion extends VirtualHTMLElement {
|
|
|
7
7
|
const owner = fold.closest('element-accordion');
|
|
8
8
|
if (owner != this) return;
|
|
9
9
|
if (e.target.closest("a[href]") == null) e.preventDefault();
|
|
10
|
-
|
|
10
|
+
this.constructor.toggle(title);
|
|
11
11
|
}
|
|
12
12
|
static toggle(title) {
|
|
13
|
-
const id = title.parentNode.id;
|
|
14
13
|
const content = title.nextElementSibling;
|
|
15
14
|
if (title.matches('.active')) {
|
|
16
|
-
if (id) delete HTMLElementAccordion.folds[id];
|
|
17
15
|
title.classList.remove('active');
|
|
18
16
|
if (content) content.classList.remove('active');
|
|
19
17
|
} else {
|
|
20
|
-
if (id) HTMLElementAccordion.folds[id] = true;
|
|
21
18
|
title.classList.add('active');
|
|
22
19
|
if (content) content.classList.add('active');
|
|
23
20
|
}
|
|
24
21
|
}
|
|
25
|
-
static refreshAll() {
|
|
26
|
-
for (const id of Object.keys(HTMLElementAccordion.folds)) {
|
|
27
|
-
const node = document.getElementById(id);
|
|
28
|
-
if (!node) delete HTMLElementAccordion.folds[id];
|
|
29
|
-
const title = node.querySelector('.title');
|
|
30
|
-
HTMLElementAccordion.toggle(title);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
22
|
}
|
|
34
23
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
Page.setup(() => {
|
|
38
|
-
VirtualHTMLElement.define('element-accordion', HTMLElementAccordion);
|
|
39
|
-
HTMLElementAccordion.refreshAll();
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
Page.patch(() => HTMLElementAccordion.refreshAll());
|
|
24
|
+
Page.define('element-accordion', HTMLElementAccordion);
|
package/ui/consent.css
CHANGED
|
@@ -14,7 +14,7 @@ footer [block-type="consent_form"][data-transient="true"] {
|
|
|
14
14
|
display:none;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
[contenteditable] [block-type="consent_form"][data-transient="true"],
|
|
18
|
-
[block-type="consent_form"][data-transient="true"]
|
|
19
|
-
display:block;
|
|
17
|
+
[contenteditable] [block-focused="last"] > .form[block-type="consent_form"][data-transient="true"],
|
|
18
|
+
.form[block-type="consent_form"][data-transient="true"][block-focused] {
|
|
19
|
+
display: block;
|
|
20
20
|
}
|