@pageboard/html 0.12.13 → 0.12.14

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/embed.js CHANGED
@@ -40,8 +40,8 @@ exports.embed = {
40
40
  };
41
41
  },
42
42
  tag: 'iframe,element-embed',
43
- html: `<element-embed data-src="[url]" data-query="[query|as:query]" id="[id]">
44
- <a aria-hidden="true" class="linkable" href="[$loc.pathname][$loc.search][id|pre:%23]">[linkable|prune:*]#</a>
43
+ html: `<element-embed data-src="[url|url:query:query]" id="[id]">
44
+ <a aria-hidden="true" class="linkable" href="[$loc|as:url|set:hash:[id]]">[linkable|prune:*]#</a>
45
45
  <iframe loading="lazy" allowfullscreen frameborder="0" scrolling="no"></iframe>
46
46
  </element-embed>`,
47
47
  scripts: [
package/elements/form.js CHANGED
@@ -47,7 +47,7 @@ exports.query_form = {
47
47
  contents: 'block+',
48
48
  tag: 'form[method="get"]',
49
49
  html: `<form is="element-form" method="get" name="[name]"
50
- action="[redirection|urltpl:url:parameters]"
50
+ action="[redirection.url][redirection.parameters|as:query]"
51
51
  autocomplete="off" class="ui form"></form>`,
52
52
  stylesheets: [
53
53
  '../lib/components/form.css',
@@ -346,18 +346,13 @@ exports.input_radio = {
346
346
  format: "singleline",
347
347
  $helper: 'element-property'
348
348
  },
349
- checked: {
350
- title: "Checked",
351
- type: "boolean",
352
- default: false
353
- },
354
349
  value: {
355
350
  title: "Value",
356
351
  type: "string",
357
352
  format: "singleline"
358
353
  },
359
- disabled: {
360
- title: "Disabled",
354
+ checked: {
355
+ title: "Checked",
361
356
  type: "boolean",
362
357
  default: false
363
358
  },
@@ -365,14 +360,25 @@ exports.input_radio = {
365
360
  title: 'Required',
366
361
  type: 'boolean',
367
362
  default: false
363
+ },
364
+ disabled: {
365
+ title: "Disabled",
366
+ type: "boolean",
367
+ default: false
368
+ },
369
+ button: {
370
+ title: 'Button',
371
+ description:'hide radio toggle opacity',
372
+ type: "boolean",
373
+ default: false
368
374
  }
369
375
  },
370
376
  contents: {
371
377
  id: 'label',
372
378
  nodes: 'inline*'
373
379
  },
374
- html: `<div class="field">
375
- <div class="ui radio checkbox">
380
+ html: `<div class="field [button]">
381
+ <div class="ui radio [button|alt::checkbox]">
376
382
  <input type="radio" disabled="[disabled]" required="[required]"
377
383
  name="[name]" value="[value|or:]" checked="[checked]"
378
384
  id="for-[name][value|pre:-]" />
@@ -380,7 +386,8 @@ exports.input_radio = {
380
386
  </div>
381
387
  </div>`,
382
388
  stylesheets: [
383
- '../lib/components/checkbox.css'
389
+ '../lib/components/checkbox.css',
390
+ '../ui/input_radio.css'
384
391
  ]
385
392
  };
386
393
 
@@ -58,6 +58,19 @@ exports.layout = {
58
58
  title: "Row"
59
59
  }]
60
60
  },
61
+ wrap: {
62
+ title: 'Wrap',
63
+ anyOf: [{
64
+ type: 'null',
65
+ title: 'No wrap'
66
+ }, {
67
+ const: 'wrap',
68
+ title: 'Wrap'
69
+ }, {
70
+ const: 'wrap-reverse',
71
+ title: 'Reverse'
72
+ }]
73
+ },
61
74
  width: {
62
75
  title: 'Width',
63
76
  anyOf: [{
@@ -293,6 +306,7 @@ exports.layout = {
293
306
  [width|switch:full:fullwidth:contained:ui container]
294
307
  [horizontal]
295
308
  [vertical]
309
+ [wrap]
296
310
  [direction]
297
311
  [background.invert|alt:inverted]"
298
312
  is="element-layout"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pageboard/html",
3
- "version": "0.12.13",
3
+ "version": "0.12.14",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "repository": {
package/ui/embed.js CHANGED
@@ -1,7 +1,6 @@
1
1
  class HTMLElementEmbed extends Page.Element {
2
2
  static defaults = {
3
3
  src: null,
4
- query: null,
5
4
  hash: null
6
5
  };
7
6
  static revealRatio = 0.2;
@@ -0,0 +1,15 @@
1
+ .field.button > .radio > input {
2
+ display:none;
3
+ }
4
+ .field.button > .radio > input + label {
5
+ opacity:0.7;
6
+ padding: 0.5em;
7
+ display: block;
8
+ position: relative;
9
+ }
10
+ .field.button > .radio > input + label:hover {
11
+ opacity:1;
12
+ }
13
+ .field.button > .radio > input:checked + label {
14
+ opacity:1;
15
+ }
package/ui/layout.css CHANGED
@@ -1,7 +1,16 @@
1
- .layout,
2
- .ui.container.layout {
1
+ .layout {
2
+ display:flex;
3
3
  flex: 0 0 auto;
4
+ }
5
+ .ui.container.layout {
4
6
  display:flex;
7
+ flex: 1 0 auto;
8
+ }
9
+ .layout.wrap {
10
+ flex-wrap:wrap;
11
+ }
12
+ .layout.wrap-reverse {
13
+ flex-wrap:wrap-reverse;
5
14
  }
6
15
  .layout.column {
7
16
  flex-direction: column;