@onereach/ui-components 12.0.2-beta.4597.0 → 13.0.1-beta.4601.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.
@@ -113,7 +113,7 @@ var __vue_render__$1 = function () {
113
113
  class: ['grow'],
114
114
  attrs: {
115
115
  "size": 'm',
116
- "invalid": !!_vm.error,
116
+ "invalid": !!_vm.error || !!_vm.$slots.error,
117
117
  "readonly": _vm.readonly,
118
118
  "disabled": _vm.disabled
119
119
  }
@@ -136,13 +136,15 @@ var __vue_render__$1 = function () {
136
136
  directives: [{
137
137
  name: "show",
138
138
  rawName: "v-show",
139
- value: typeof _vm.error === 'string' && _vm.error.length > 0,
140
- expression: "typeof error === 'string' && error.length > 0"
139
+ value: typeof _vm.error === 'string' && _vm.error.length > 0 || _vm.$slots.error,
140
+ expression: "typeof error === 'string' && error.length > 0 || $slots.error"
141
141
  }],
142
142
  attrs: {
143
143
  "disabled": _vm.disabled
144
144
  }
145
- }, [_vm._v("\n " + _vm._s(_vm.error) + "\n ")])], 2);
145
+ }, [_vm._t("error", function () {
146
+ return [_vm._v("\n " + _vm._s(_vm.error) + "\n ")];
147
+ })], 2)], 2);
146
148
  };
147
149
  var __vue_staticRenderFns__$1 = [];
148
150
 
@@ -463,6 +465,12 @@ var __vue_render__ = function () {
463
465
  })];
464
466
  },
465
467
  proxy: true
468
+ }, {
469
+ key: "error",
470
+ fn: function () {
471
+ return [_vm._t("error")];
472
+ },
473
+ proxy: true
466
474
  }], null, true)
467
475
  }), _vm._v(" "), _c('OrModal', {
468
476
  ref: 'modal',
@@ -500,6 +508,12 @@ var __vue_render__ = function () {
500
508
  return [_vm._t("addon")];
501
509
  },
502
510
  proxy: true
511
+ }, {
512
+ key: "error",
513
+ fn: function () {
514
+ return [_vm._t("error")];
515
+ },
516
+ proxy: true
503
517
  }], null, true)
504
518
  })], 1)], 1);
505
519
  };
@@ -1 +1 @@
1
- export { s as default } from '../OrCodeV3-30fbe9db.js';
1
+ export { s as default } from '../OrCodeV3-62c2d85b.js';
@@ -1,2 +1,2 @@
1
- export { C as CodeLanguage, s as OrCodeV3 } from '../OrCodeV3-30fbe9db.js';
1
+ export { C as CodeLanguage, s as OrCodeV3 } from '../OrCodeV3-62c2d85b.js';
2
2
  export { a as EditorState, E as EditorView, h as html, j as javascript, d as json, e as jsonParseLinter, c as lintGutter, l as linter } from '../OrCode-c07b7e92.js';
@@ -1 +1 @@
1
- export { C as CodeLanguage } from '../OrCodeV3-30fbe9db.js';
1
+ export { C as CodeLanguage } from '../OrCodeV3-62c2d85b.js';
@@ -1 +1 @@
1
- export { a as Code, c as CodeControl, b as CodeControlRoot, d as CodeModal } from '../OrCodeV3-30fbe9db.js';
1
+ export { a as Code, c as CodeControl, b as CodeControlRoot, d as CodeModal } from '../OrCodeV3-62c2d85b.js';
@@ -126,7 +126,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
126
126
  }, 8 /* PROPS */, ["control-id", "required", "disabled"]), createVNode(_component_OrInputBox, {
127
127
  class: normalizeClass(['grow']),
128
128
  size: 'm',
129
- invalid: !!_ctx.error,
129
+ invalid: !!_ctx.error || !!_ctx.$slots.error,
130
130
  readonly: _ctx.readonly,
131
131
  disabled: _ctx.disabled
132
132
  }, {
@@ -144,9 +144,9 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
144
144
  }, 8 /* PROPS */, ["disabled"])), [[vShow, !_ctx.error]]) : createCommentVNode("v-if", true), withDirectives(createVNode(_component_OrError, {
145
145
  disabled: _ctx.disabled
146
146
  }, {
147
- default: withCtx(() => [createTextVNode(toDisplayString(_ctx.error), 1 /* TEXT */)]),
148
- _: 1 /* STABLE */
149
- }, 8 /* PROPS */, ["disabled"]), [[vShow, typeof _ctx.error === 'string' && _ctx.error.length > 0]])], 2 /* CLASS */);
147
+ default: withCtx(() => [renderSlot(_ctx.$slots, "error", {}, () => [createTextVNode(toDisplayString(_ctx.error), 1 /* TEXT */)])]),
148
+ _: 3 /* FORWARDED */
149
+ }, 8 /* PROPS */, ["disabled"]), [[vShow, typeof _ctx.error === 'string' && _ctx.error.length > 0 || _ctx.$slots.error]])], 2 /* CLASS */);
150
150
  }
151
151
 
152
152
  script$1.render = render$1;
@@ -430,6 +430,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
430
430
  onClick: _cache[0] || (_cache[0] = withModifiers($event => _ctx.openFullscreen(), ["stop"]))
431
431
  })) : createCommentVNode("v-if", true)])]),
432
432
  hint: withCtx(() => [renderSlot(_ctx.$slots, "hint", {}, () => [createTextVNode(toDisplayString(_ctx.hint), 1 /* TEXT */)])]),
433
+ error: withCtx(() => [renderSlot(_ctx.$slots, "error")]),
433
434
  _: 3 /* FORWARDED */
434
435
  }, 8 /* PROPS */, ["control-id", "label", "hint", "error", "disabled", "readonly"]), createVNode(_component_OrModal, {
435
436
  ref: 'modal',
@@ -446,6 +447,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
446
447
  readonly: _ctx.readonly
447
448
  }, {
448
449
  addon: withCtx(() => [renderSlot(_ctx.$slots, "addon")]),
450
+ error: withCtx(() => [renderSlot(_ctx.$slots, "error")]),
449
451
  _: 3 /* FORWARDED */
450
452
  }, 8 /* PROPS */, ["control-id", "hint", "error", "disabled", "readonly"])]),
451
453
  _: 2 /* DYNAMIC */
@@ -17,7 +17,7 @@ export { s as OrCheckboxTreeV3 } from './OrCheckboxTreeV3-06e82baa.js';
17
17
  export { s as OrCheckboxV3 } from './OrCheckboxV3-bf94f74d.js';
18
18
  export { s as OrChip, a as OrChips } from './OrChips-c5c296ba.js';
19
19
  export { a as EditorState, E as EditorView, q as OrCode, O as OrCodeLanguages, b as basicSetup, h as html, j as javascript, d as json, e as jsonParseLinter, c as lintGutter, l as linter } from './OrCode-c07b7e92.js';
20
- export { C as CodeLanguage, s as OrCodeV3 } from './OrCodeV3-30fbe9db.js';
20
+ export { C as CodeLanguage, s as OrCodeV3 } from './OrCodeV3-62c2d85b.js';
21
21
  export { default as OrCollapse } from './OrCollapse/OrCollapse.js';
22
22
  export { s as OrColorPicker, h as amber, n as black, b as blue, m as blueGrey, k as brown, c as cyan, j as deepOrange, d as deepPurple, g as green, i as indigo, l as lightBlue, e as lightGreen, f as lime, o as orange, p as pink, a as purple, r as red, t as teal, w as white, y as yellow } from './OrColorPicker-349b3842.js';
23
23
  export { s as OrCombinedInputV3 } from './OrCombinedInputV3-ceff5a22.js';
@@ -10,7 +10,7 @@ export { C as CardPadding, s as OrCardV3 } from './components/OrCardV3-a0e51677.
10
10
  export { default as OrCheckboxGroupV3 } from './components/OrCheckboxGroupV3/OrCheckboxGroup.js';
11
11
  export { s as OrChip, a as OrChips } from './components/OrChips-c5c296ba.js';
12
12
  export { a as EditorState, E as EditorView, q as OrCode, O as OrCodeLanguages, b as basicSetup, h as html, j as javascript, d as json, e as jsonParseLinter, c as lintGutter, l as linter } from './components/OrCode-c07b7e92.js';
13
- export { C as CodeLanguage, s as OrCodeV3 } from './components/OrCodeV3-30fbe9db.js';
13
+ export { C as CodeLanguage, s as OrCodeV3 } from './components/OrCodeV3-62c2d85b.js';
14
14
  export { s as OrColorPicker, h as amber, n as black, b as blue, m as blueGrey, k as brown, c as cyan, j as deepOrange, d as deepPurple, g as green, i as indigo, l as lightBlue, e as lightGreen, f as lime, o as orange, p as pink, a as purple, r as red, t as teal, w as white, y as yellow } from './components/OrColorPicker-349b3842.js';
15
15
  export { s as OrCombinedInputV3 } from './components/OrCombinedInputV3-ceff5a22.js';
16
16
  export { s as OrConfirm } from './components/OrConfirm-eb6bdad9.js';
@@ -144,7 +144,7 @@ var __vue_render__$1 = function () {
144
144
  class: ['grow'],
145
145
  attrs: {
146
146
  "size": 'm',
147
- "invalid": !!_vm.error,
147
+ "invalid": !!_vm.error || !!_vm.$slots.error,
148
148
  "readonly": _vm.readonly,
149
149
  "disabled": _vm.disabled
150
150
  }
@@ -167,13 +167,15 @@ var __vue_render__$1 = function () {
167
167
  directives: [{
168
168
  name: "show",
169
169
  rawName: "v-show",
170
- value: typeof _vm.error === 'string' && _vm.error.length > 0,
171
- expression: "typeof error === 'string' && error.length > 0"
170
+ value: typeof _vm.error === 'string' && _vm.error.length > 0 || _vm.$slots.error,
171
+ expression: "typeof error === 'string' && error.length > 0 || $slots.error"
172
172
  }],
173
173
  attrs: {
174
174
  "disabled": _vm.disabled
175
175
  }
176
- }, [_vm._v("\n " + _vm._s(_vm.error) + "\n ")])], 2);
176
+ }, [_vm._t("error", function () {
177
+ return [_vm._v("\n " + _vm._s(_vm.error) + "\n ")];
178
+ })], 2)], 2);
177
179
  };
178
180
  var __vue_staticRenderFns__$1 = [];
179
181
 
@@ -503,6 +505,12 @@ var __vue_render__ = function () {
503
505
  })];
504
506
  },
505
507
  proxy: true
508
+ }, {
509
+ key: "error",
510
+ fn: function () {
511
+ return [_vm._t("error")];
512
+ },
513
+ proxy: true
506
514
  }], null, true)
507
515
  }), _vm._v(" "), _c('OrModal', {
508
516
  ref: 'modal',
@@ -540,6 +548,12 @@ var __vue_render__ = function () {
540
548
  return [_vm._t("addon")];
541
549
  },
542
550
  proxy: true
551
+ }, {
552
+ key: "error",
553
+ fn: function () {
554
+ return [_vm._t("error")];
555
+ },
556
+ proxy: true
543
557
  }], null, true)
544
558
  })], 1)], 1);
545
559
  };
@@ -25,7 +25,7 @@ export { lintGutter, linter } from '@codemirror/lint';
25
25
  export { javascript } from '@codemirror/lang-javascript';
26
26
  export { json, jsonParseLinter } from '@codemirror/lang-json';
27
27
  export { html } from '@codemirror/lang-html';
28
- export { C as CodeLanguage, _ as OrCodeV3 } from '../OrCode-faf9e1b7.js';
28
+ export { C as CodeLanguage, _ as OrCodeV3 } from '../OrCode-c275067a.js';
29
29
  export { EditorView } from '@codemirror/view';
30
30
  export { EditorState } from '@codemirror/state';
31
31
  export { _ as OrCollapse } from '../OrCollapse-8f62d508.js';
@@ -1,4 +1,4 @@
1
- export { C as CodeLanguage, _ as OrCodeV3 } from '../../OrCode-faf9e1b7.js';
1
+ export { C as CodeLanguage, _ as OrCodeV3 } from '../../OrCode-c275067a.js';
2
2
  export { lintGutter, linter } from '@codemirror/lint';
3
3
  export { javascript } from '@codemirror/lang-javascript';
4
4
  export { json, jsonParseLinter } from '@codemirror/lang-json';
@@ -25,7 +25,7 @@ export { lintGutter, linter } from '@codemirror/lint';
25
25
  export { javascript } from '@codemirror/lang-javascript';
26
26
  export { json, jsonParseLinter } from '@codemirror/lang-json';
27
27
  export { html } from '@codemirror/lang-html';
28
- export { C as CodeLanguage, _ as OrCodeV3 } from './OrCode-faf9e1b7.js';
28
+ export { C as CodeLanguage, _ as OrCodeV3 } from './OrCode-c275067a.js';
29
29
  export { EditorView } from '@codemirror/view';
30
30
  export { EditorState } from '@codemirror/state';
31
31
  export { _ as OrCollapse } from './OrCollapse-8f62d508.js';
@@ -132,7 +132,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
132
132
  }, 8 /* PROPS */, ["control-id", "required", "disabled"]), createVNode(_component_OrInputBox, {
133
133
  class: normalizeClass(['grow']),
134
134
  size: 'm',
135
- invalid: !!_ctx.error,
135
+ invalid: !!_ctx.error || !!_ctx.$slots.error,
136
136
  readonly: _ctx.readonly,
137
137
  disabled: _ctx.disabled
138
138
  }, {
@@ -150,9 +150,9 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
150
150
  }, 8 /* PROPS */, ["disabled"])), [[vShow, !_ctx.error]]) : createCommentVNode("v-if", true), withDirectives(createVNode(_component_OrError, {
151
151
  disabled: _ctx.disabled
152
152
  }, {
153
- default: withCtx(() => [createTextVNode(toDisplayString(_ctx.error), 1 /* TEXT */)]),
154
- _: 1 /* STABLE */
155
- }, 8 /* PROPS */, ["disabled"]), [[vShow, typeof _ctx.error === 'string' && _ctx.error.length > 0]])], 2 /* CLASS */);
153
+ default: withCtx(() => [renderSlot(_ctx.$slots, "error", {}, () => [createTextVNode(toDisplayString(_ctx.error), 1 /* TEXT */)])]),
154
+ _: 3 /* FORWARDED */
155
+ }, 8 /* PROPS */, ["disabled"]), [[vShow, typeof _ctx.error === 'string' && _ctx.error.length > 0 || _ctx.$slots.error]])], 2 /* CLASS */);
156
156
  }
157
157
 
158
158
  script$1.render = render$1;
@@ -436,6 +436,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
436
436
  onClick: _cache[0] || (_cache[0] = withModifiers($event => _ctx.openFullscreen(), ["stop"]))
437
437
  })) : createCommentVNode("v-if", true)])]),
438
438
  hint: withCtx(() => [renderSlot(_ctx.$slots, "hint", {}, () => [createTextVNode(toDisplayString(_ctx.hint), 1 /* TEXT */)])]),
439
+ error: withCtx(() => [renderSlot(_ctx.$slots, "error")]),
439
440
  _: 3 /* FORWARDED */
440
441
  }, 8 /* PROPS */, ["control-id", "label", "hint", "error", "disabled", "readonly"]), createVNode(_component_OrModal, {
441
442
  ref: 'modal',
@@ -452,6 +453,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
452
453
  readonly: _ctx.readonly
453
454
  }, {
454
455
  addon: withCtx(() => [renderSlot(_ctx.$slots, "addon")]),
456
+ error: withCtx(() => [renderSlot(_ctx.$slots, "error")]),
455
457
  _: 3 /* FORWARDED */
456
458
  }, 8 /* PROPS */, ["control-id", "hint", "error", "disabled", "readonly"])]),
457
459
  _: 2 /* DYNAMIC */
@@ -23,7 +23,7 @@ export { lintGutter, linter } from '@codemirror/lint';
23
23
  export { javascript } from '@codemirror/lang-javascript';
24
24
  export { json, jsonParseLinter } from '@codemirror/lang-json';
25
25
  export { html } from '@codemirror/lang-html';
26
- export { C as CodeLanguage, s as OrCodeV3 } from '../OrCode-73a17bd1.js';
26
+ export { C as CodeLanguage, s as OrCodeV3 } from '../OrCode-bf5e9ceb.js';
27
27
  export { EditorView } from '@codemirror/view';
28
28
  export { EditorState } from '@codemirror/state';
29
29
  export { s as OrCollapse } from '../OrCollapse-fdd7efab.js';
@@ -1,4 +1,4 @@
1
- export { C as CodeLanguage, s as OrCodeV3 } from '../../OrCode-73a17bd1.js';
1
+ export { C as CodeLanguage, s as OrCodeV3 } from '../../OrCode-bf5e9ceb.js';
2
2
  export { lintGutter, linter } from '@codemirror/lint';
3
3
  export { javascript } from '@codemirror/lang-javascript';
4
4
  export { json, jsonParseLinter } from '@codemirror/lang-json';
@@ -23,7 +23,7 @@ export { lintGutter, linter } from '@codemirror/lint';
23
23
  export { javascript } from '@codemirror/lang-javascript';
24
24
  export { json, jsonParseLinter } from '@codemirror/lang-json';
25
25
  export { html } from '@codemirror/lang-html';
26
- export { C as CodeLanguage, s as OrCodeV3 } from './OrCode-73a17bd1.js';
26
+ export { C as CodeLanguage, s as OrCodeV3 } from './OrCode-bf5e9ceb.js';
27
27
  export { EditorView } from '@codemirror/view';
28
28
  export { EditorState } from '@codemirror/state';
29
29
  export { s as OrCollapse } from './OrCollapse-fdd7efab.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onereach/ui-components",
3
- "version": "12.0.2-beta.4597.0",
3
+ "version": "13.0.1-beta.4601.0",
4
4
  "npmUnpacked": "4.15.2",
5
5
  "description": "Vue components library for v2/3",
6
6
  "sideEffects": false,
@@ -33,6 +33,9 @@
33
33
  {{ hint }}
34
34
  </slot>
35
35
  </template>
36
+ <template v-slot:error>
37
+ <slot name="error" />
38
+ </template>
36
39
  </OrCodeControl>
37
40
 
38
41
  <OrModal
@@ -57,6 +60,9 @@
57
60
  <template v-slot:addon>
58
61
  <slot name="addon" />
59
62
  </template>
63
+ <template v-slot:error>
64
+ <slot name="error" />
65
+ </template>
60
66
  </OrCodeControl>
61
67
 
62
68
  <template
@@ -21,7 +21,7 @@
21
21
  <OrInputBox
22
22
  :class="['grow']"
23
23
  :size="'m'"
24
- :invalid="!!error"
24
+ :invalid="!!error || !!$slots.error"
25
25
  :readonly="readonly"
26
26
  :disabled="disabled"
27
27
  >
@@ -43,10 +43,12 @@
43
43
  </template>
44
44
 
45
45
  <OrError
46
- v-show="typeof error === 'string' && error.length > 0"
46
+ v-show="typeof error === 'string' && error.length > 0 || $slots.error"
47
47
  :disabled="disabled"
48
48
  >
49
- {{ error }}
49
+ <slot name="error">
50
+ {{ error }}
51
+ </slot>
50
52
  </OrError>
51
53
  </div>
52
54
  </template>