@onereach/ui-components 8.16.5-beta.3876.0 → 8.17.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.
Files changed (76) hide show
  1. package/dist/bundled/v2/components/OrCodeV3/OrCode.js +6 -11
  2. package/dist/bundled/v2/components/OrCodeV3/OrCode.vue.d.ts +3 -3
  3. package/dist/bundled/v2/components/OrTagInputV3/OrTagInput.js +31 -15
  4. package/dist/bundled/v2/components/OrTagInputV3/OrTagInput.vue.d.ts +3 -0
  5. package/dist/bundled/v2/components/OrTagsV3/OrTags.js +3 -3
  6. package/dist/bundled/v2/components/OrTagsV3/types.d.ts +5 -4
  7. package/dist/bundled/v2/components/OrTextareaV3/OrTextarea.vue.d.ts +2 -2
  8. package/dist/bundled/v2/index.js +1 -1
  9. package/dist/bundled/v3/components/OrCodeV3/OrCode.js +1 -1
  10. package/dist/bundled/v3/components/OrCodeV3/OrCode.vue.d.ts +3 -4
  11. package/dist/bundled/v3/components/OrCodeV3/index.js +1 -1
  12. package/dist/bundled/v3/components/OrCodeV3/props.js +1 -1
  13. package/dist/bundled/v3/components/OrCodeV3/styles.js +1 -1
  14. package/dist/bundled/v3/components/{OrCodeV3-628f8e28.js → OrCodeV3-7ecb46ca.js} +15 -20
  15. package/dist/bundled/v3/components/OrSelectV3/OrSelect.js +1 -1
  16. package/dist/bundled/v3/components/OrSelectV3/index.js +1 -1
  17. package/dist/bundled/v3/components/OrSelectV3/styles.js +1 -1
  18. package/dist/bundled/v3/components/{OrSelectV3-f212f5c6.js → OrSelectV3-e0de09af.js} +1 -1
  19. package/dist/bundled/v3/components/OrTagInputV3/OrTagInput.js +1 -1
  20. package/dist/bundled/v3/components/OrTagInputV3/OrTagInput.vue.d.ts +2 -0
  21. package/dist/bundled/v3/components/OrTagInputV3/index.js +1 -1
  22. package/dist/bundled/v3/components/OrTagInputV3/styles.js +1 -1
  23. package/dist/bundled/v3/components/{OrTagInputV3-7b240c91.js → OrTagInputV3-e1596983.js} +23 -11
  24. package/dist/bundled/v3/components/OrTagV3/OrTag.js +1 -1
  25. package/dist/bundled/v3/components/OrTagV3/index.js +1 -1
  26. package/dist/bundled/v3/components/OrTagV3/props.js +1 -1
  27. package/dist/bundled/v3/components/OrTagV3/styles.js +1 -1
  28. package/dist/bundled/v3/components/{OrTagV3-43ee9066.js → OrTagV3-045cac0b.js} +1 -1
  29. package/dist/bundled/v3/components/OrTagsV3/OrTags.js +1 -1
  30. package/dist/bundled/v3/components/OrTagsV3/index.js +1 -1
  31. package/dist/bundled/v3/components/OrTagsV3/props.js +1 -1
  32. package/dist/bundled/v3/components/OrTagsV3/styles.js +1 -1
  33. package/dist/bundled/v3/components/OrTagsV3/types.d.ts +5 -4
  34. package/dist/bundled/v3/components/OrTagsV3/utils/castToTag.js +1 -1
  35. package/dist/bundled/v3/components/{OrTagsV3-bbda3acd.js → OrTagsV3-6c4fb22c.js} +10 -4
  36. package/dist/bundled/v3/components/index.js +5 -5
  37. package/dist/bundled/v3/index.js +6 -6
  38. package/dist/esm/v2/{OrCode-4c7bbbd2.js → OrCode-c37dabe7.js} +16 -21
  39. package/dist/esm/v2/{OrSelect-30f5ce68.js → OrSelect-4768c12b.js} +2 -2
  40. package/dist/esm/v2/{OrSelectMultipleControl-de32c83c.js → OrSelectMultipleControl-685d5af4.js} +1 -1
  41. package/dist/esm/v2/{OrTagInput-2642f4d9.js → OrTagInput-c4110c0b.js} +32 -16
  42. package/dist/esm/v2/{OrTags-9d3cf104.js → OrTags-f6434f9b.js} +3 -3
  43. package/dist/esm/v2/components/index.js +5 -5
  44. package/dist/esm/v2/components/or-code-v3/OrCode.vue.d.ts +3 -3
  45. package/dist/esm/v2/components/or-code-v3/index.js +1 -1
  46. package/dist/esm/v2/components/or-select-v3/index.js +3 -3
  47. package/dist/esm/v2/components/or-select-v3/partials/index.js +2 -2
  48. package/dist/esm/v2/components/or-select-v3/partials/or-select-multiple-control/index.js +2 -2
  49. package/dist/esm/v2/components/or-tag-input-v3/OrTagInput.vue.d.ts +3 -0
  50. package/dist/esm/v2/components/or-tag-input-v3/index.js +4 -4
  51. package/dist/esm/v2/components/or-tags-v3/index.js +1 -1
  52. package/dist/esm/v2/components/or-tags-v3/types.d.ts +5 -4
  53. package/dist/esm/v2/components/or-teleport/OrTeleport.vue2.vue.d.ts +2 -2
  54. package/dist/esm/v2/index.js +5 -5
  55. package/dist/esm/v3/{OrCode-37d50c74.js → OrCode-6f8164d5.js} +16 -21
  56. package/dist/esm/v3/{OrSelect-a65c0b08.js → OrSelect-5a22c1da.js} +2 -2
  57. package/dist/esm/v3/{OrSelectMultipleControl-96320988.js → OrSelectMultipleControl-6b5a831d.js} +1 -1
  58. package/dist/esm/v3/{OrTagInput-4cec4018.js → OrTagInput-6e9c7a94.js} +23 -11
  59. package/dist/esm/v3/{OrTags-384a48e3.js → OrTags-801c20ad.js} +9 -3
  60. package/dist/esm/v3/components/index.js +5 -5
  61. package/dist/esm/v3/components/or-code-v3/OrCode.vue.d.ts +3 -4
  62. package/dist/esm/v3/components/or-code-v3/index.js +1 -1
  63. package/dist/esm/v3/components/or-select-v3/index.js +3 -3
  64. package/dist/esm/v3/components/or-select-v3/partials/index.js +2 -2
  65. package/dist/esm/v3/components/or-select-v3/partials/or-select-multiple-control/index.js +2 -2
  66. package/dist/esm/v3/components/or-tag-input-v3/OrTagInput.vue.d.ts +2 -0
  67. package/dist/esm/v3/components/or-tag-input-v3/index.js +4 -4
  68. package/dist/esm/v3/components/or-tags-v3/index.js +1 -1
  69. package/dist/esm/v3/components/or-tags-v3/types.d.ts +5 -4
  70. package/dist/esm/v3/index.js +5 -5
  71. package/package.json +3 -2
  72. package/src/components/or-code-v3/OrCode.vue +8 -22
  73. package/src/components/or-code-v3/partials/OrCodeControl.vue +1 -10
  74. package/src/components/or-tag-input-v3/OrTagInput.vue +23 -12
  75. package/src/components/or-tags-v3/OrTags.vue +5 -3
  76. package/src/components/or-tags-v3/types.ts +7 -4
@@ -17,8 +17,8 @@ import { s as script$9 } from './OrInput-2810a760.js';
17
17
  import { s as script$b } from './OrLabel-40af976e.js';
18
18
  import { s as script$c } from './OrMenuItem-2928ba60.js';
19
19
  import { s as script$d } from './OrPopover-88b8aa2a.js';
20
- import { T as TagsOverflow } from './OrTags-384a48e3.js';
21
- import { s as script$1 } from './OrSelectMultipleControl-96320988.js';
20
+ import { T as TagsOverflow } from './OrTags-801c20ad.js';
21
+ import { s as script$1 } from './OrSelectMultipleControl-6b5a831d.js';
22
22
  import { s as script$2 } from './OrSelectSingleControl-5e78d499.js';
23
23
  import './OrSelectPlaceholder-10e3bf5e.js';
24
24
  import { resolveComponent, resolveDirective, openBlock, createElementBlock, normalizeClass, createBlock, withCtx, renderSlot, createTextVNode, toDisplayString, createCommentVNode, withDirectives, createElementVNode, withModifiers, createVNode, Fragment, renderList, vShow } from 'vue';
@@ -5,7 +5,7 @@ import { i as isEqualValue } from './isEqualValue-f8bf73d9.js';
5
5
  import { u as useProxyModelValue } from './useProxyModelValue-940010d2.js';
6
6
  import '@onereach/styles/tailwind/plugins/core';
7
7
  import '@onereach/styles/tailwind.config.json';
8
- import { s as script$3, T as TagsOverflow } from './OrTags-384a48e3.js';
8
+ import { s as script$3, T as TagsOverflow } from './OrTags-801c20ad.js';
9
9
  import { s as script$1 } from './OrSelectPlaceholder-10e3bf5e.js';
10
10
  import { i as isEmptyValue } from './isEmptyValue-fd56a6e4.js';
11
11
  import { s as script$2 } from './OrSelectControlInput-3297e30d.js';
@@ -1,5 +1,5 @@
1
- import { defineComponent, ref, toRefs, computed, reactive, watch, nextTick } from 'vue-demi';
2
1
  import { onClickOutside } from '@vueuse/core';
2
+ import { defineComponent, ref, toRefs, computed, reactive, watch, nextTick } from 'vue-demi';
3
3
  import { a as useIdAttribute, u as useControlAttributes } from './useIdAttribute-859439f0.js';
4
4
  import './dom-aecadd9a.js';
5
5
  import { u as useProxyModelValue } from './useProxyModelValue-940010d2.js';
@@ -11,7 +11,8 @@ import { s as script$2 } from './OrHint-55d3de35.js';
11
11
  import { s as script$3 } from './OrIconButton-13fd3f96.js';
12
12
  import { s as script$4 } from './OrInputBox-8c1a29dd.js';
13
13
  import { s as script$5 } from './OrLabel-40af976e.js';
14
- import { s as script$6, T as TagsOverflow } from './OrTags-384a48e3.js';
14
+ import { a as TagColor } from './OrTag-ccb7734c.js';
15
+ import { s as script$6, T as TagsOverflow } from './OrTags-801c20ad.js';
15
16
  import { resolveComponent, openBlock, createElementBlock, normalizeClass, createBlock, withCtx, renderSlot, createTextVNode, toDisplayString, createCommentVNode, createVNode, createSlots, createElementVNode, withDirectives, mergeProps, withKeys, vModelDynamic, vShow } from 'vue';
16
17
  import { s as styleInject } from './style-inject.es-4c6f2515.js';
17
18
 
@@ -120,6 +121,15 @@ var script = defineComponent({
120
121
  const activated = ref(false);
121
122
  const proxyModelValue = useProxyModelValue(modelValue, context.emit);
122
123
  const draftModelValue = ref('');
124
+ const tagsItems = computed(() => {
125
+ return proxyModelValue.value.map(item => ({
126
+ label: item,
127
+ value: item,
128
+ tagProps: {
129
+ color: item === draftModelValue.value ? TagColor.Danger : TagColor.Default
130
+ }
131
+ }));
132
+ });
123
133
  const currentLength = computed(() => {
124
134
  var _a, _b;
125
135
  return (_b = (_a = proxyModelValue.value) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;
@@ -156,8 +166,7 @@ var script = defineComponent({
156
166
  context.emit('focus');
157
167
  }
158
168
  function add() {
159
- var _a;
160
- const newItem = (_a = draftModelValue.value) === null || _a === void 0 ? void 0 : _a.trim();
169
+ const newItem = draftModelValue.value;
161
170
  if (!newItem) return;
162
171
  if (proxyModelValue.value.includes(newItem)) return;
163
172
  if (maxLength.value && currentLength.value >= maxLength.value) return;
@@ -196,6 +205,7 @@ var script = defineComponent({
196
205
  controlAttributes,
197
206
  proxyModelValue,
198
207
  draftModelValue,
208
+ tagsItems,
199
209
  currentLength,
200
210
  maxLength,
201
211
  activated,
@@ -244,19 +254,19 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
244
254
  _: 3 /* FORWARDED */
245
255
  }, 8 /* PROPS */, ["control-id", "required", "disabled"])) : createCommentVNode("v-if", true), createVNode(_component_OrInputBox, {
246
256
  ref: "inputBox",
257
+ class: normalizeClass(['interactivity-select']),
247
258
  variant: _ctx.disableDefaultStyles ? 'unstyled' : 'styled',
248
- "force-state": _ctx.activated ? 'focus-within' : undefined,
249
- class: "cursor-text",
250
259
  invalid: !!_ctx.error,
251
260
  readonly: _ctx.readonly,
252
261
  disabled: _ctx.disabled,
253
- tabindex: "0",
262
+ tabindex: 0,
263
+ "force-state": _ctx.activated ? 'focus-within' : undefined,
254
264
  onFocus: _ctx.activate
255
265
  }, createSlots({
256
266
  default: withCtx(() => [createVNode(_component_OrTags, {
257
267
  ref: "tags",
258
- items: _ctx.proxyModelValue,
259
- class: "grow",
268
+ class: normalizeClass(['grow']),
269
+ items: _ctx.tagsItems,
260
270
  disabled: _ctx.disabled,
261
271
  "tag-props": {
262
272
  variant: _ctx.readonly || _ctx.disabled ? 'tag' : 'reset',
@@ -286,7 +296,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
286
296
  onFocus: _cache[4] || (_cache[4] = function () {
287
297
  return _ctx.activate && _ctx.activate(...arguments);
288
298
  })
289
- }), null, 16 /* FULL_PROPS */, _hoisted_2), [[vModelDynamic, _ctx.draftModelValue]])])]),
299
+ }), null, 16 /* FULL_PROPS */, _hoisted_2), [[vModelDynamic, _ctx.draftModelValue, void 0, {
300
+ trim: true
301
+ }]])])]),
290
302
  key: "0"
291
303
  } : undefined]), 1032 /* PROPS, DYNAMIC_SLOTS */, ["items", "disabled", "tag-props", "overflow"])]),
292
304
  _: 2 /* DYNAMIC */
@@ -300,7 +312,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
300
312
  onClick: _cache[6] || (_cache[6] = $event => _ctx.reset())
301
313
  }, null, 8 /* PROPS */, ["disabled"])) : createCommentVNode("v-if", true)]),
302
314
  key: "0"
303
- } : undefined]), 1032 /* PROPS, DYNAMIC_SLOTS */, ["variant", "force-state", "invalid", "readonly", "disabled", "onFocus"]), withDirectives(createElementVNode("div", _hoisted_3, [_ctx.hint || _ctx.maxLength ? (openBlock(), createBlock(_component_OrHint, {
315
+ } : undefined]), 1032 /* PROPS, DYNAMIC_SLOTS */, ["variant", "invalid", "readonly", "disabled", "force-state", "onFocus"]), withDirectives(createElementVNode("div", _hoisted_3, [_ctx.hint || _ctx.maxLength ? (openBlock(), createBlock(_component_OrHint, {
304
316
  key: 0,
305
317
  disabled: _ctx.disabled
306
318
  }, createSlots({
@@ -186,9 +186,12 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
186
186
  ref: "container",
187
187
  class: normalizeClass(_ctx.containerStyles)
188
188
  }, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.localItems, item => {
189
- return openBlock(), createBlock(_component_OrTag, mergeProps(_ctx.tagProps, {
189
+ return openBlock(), createBlock(_component_OrTag, mergeProps({
190
+ ..._ctx.tagProps,
191
+ ...item.tagProps
192
+ }, {
190
193
  key: item.value,
191
- class: "max-w-full",
194
+ class: ['max-w-full'],
192
195
  onReset: $event => _ctx.$emit('reset', item.value)
193
196
  }), {
194
197
  default: withCtx(() => [createTextVNode(toDisplayString(item.label), 1 /* TEXT */)]),
@@ -220,7 +223,10 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
220
223
  default: withCtx(() => [createElementVNode("div", {
221
224
  class: normalizeClass(_ctx.overflowPopoverStyles)
222
225
  }, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.overflowItems, item => {
223
- return openBlock(), createBlock(_component_OrTag, mergeProps(_ctx.tagProps, {
226
+ return openBlock(), createBlock(_component_OrTag, mergeProps({
227
+ ..._ctx.tagProps,
228
+ ...item.tagProps
229
+ }, {
224
230
  key: item.value,
225
231
  onReset: $event => _ctx.$emit('reset', item.value)
226
232
  }), {
@@ -22,7 +22,7 @@ export { lintGutter, linter } from '@codemirror/lint';
22
22
  export { javascript } from '@codemirror/lang-javascript';
23
23
  export { json, jsonParseLinter } from '@codemirror/lang-json';
24
24
  export { html } from '@codemirror/lang-html';
25
- export { C as CodeLanguage, s as OrCodeV3 } from '../OrCode-37d50c74.js';
25
+ export { C as CodeLanguage, s as OrCodeV3 } from '../OrCode-6f8164d5.js';
26
26
  export { EditorView } from '@codemirror/view';
27
27
  export { EditorState } from '@codemirror/state';
28
28
  export { s as OrCollapse } from '../OrCollapse-d7c0afae.js';
@@ -98,7 +98,7 @@ export { s as OrSearch } from '../OrSearch-aa57d4e8.js';
98
98
  export { s as OrSearchV3 } from '../OrSearch-fccacdba.js';
99
99
  export { s as OrSegmentedControlV3, S as SegmentedControlSize } from '../OrSegmentedControl-adbf7f4e.js';
100
100
  export { s as OrSelect } from '../OrSelect-a366e668.js';
101
- export { s as OrSelectV3 } from '../OrSelect-a65c0b08.js';
101
+ export { s as OrSelectV3 } from '../OrSelect-5a22c1da.js';
102
102
  export { s as OrSidebar, O as OrSidebarSide } from '../OrSidebar-4ab42b93.js';
103
103
  export { S as OrSidebarPlacement, s as OrSidebarV3, S as SidebarPlacement } from '../OrSidebar-62009372.js';
104
104
  export { s as OrSkeletonCircle } from '../OrSkeletonCircle-66e175a0.js';
@@ -120,9 +120,9 @@ export { s as OrTabV3 } from '../OrTab-42be32d1.js';
120
120
  export { s as OrTabs } from '../OrTabs-3da3ea89.js';
121
121
  export { s as OrTabsV3, T as TabsVariant } from '../OrTabs-e53980aa.js';
122
122
  export { s as OrTag } from '../OrTag-bc8177a4.js';
123
- export { s as OrTagInputV3 } from '../OrTagInput-4cec4018.js';
123
+ export { s as OrTagInputV3 } from '../OrTagInput-6e9c7a94.js';
124
124
  export { s as OrTagV3, a as TagColor, T as TagVariant } from '../OrTag-ccb7734c.js';
125
- export { s as OrTagsV3, T as TagsOverflow } from '../OrTags-384a48e3.js';
125
+ export { s as OrTagsV3, T as TagsOverflow } from '../OrTags-801c20ad.js';
126
126
  export { s as OrTeleport } from '../OrTeleport.vue3-9bce0c02.js';
127
127
  export { s as OrTeleportV3 } from '../OrTeleport.vue3-bf77eed4.js';
128
128
  export { s as OrTextV3 } from '../OrText-d54c951d.js';
@@ -199,7 +199,7 @@ import '../codemirrorView-020fe885.js';
199
199
  import 'prosemirror-state';
200
200
  import 'prosemirror-commands';
201
201
  import 'lodash/keyBy';
202
- import '../OrSelectMultipleControl-96320988.js';
202
+ import '../OrSelectMultipleControl-6b5a831d.js';
203
203
  import '../isEqualValue-f8bf73d9.js';
204
204
  import '../OrSelectPlaceholder-10e3bf5e.js';
205
205
  import '../OrSelectControlInput-3297e30d.js';
@@ -1,6 +1,6 @@
1
1
  import { PropType } from 'vue-demi';
2
- import { Extension } from '@codemirror/state';
3
2
  import { EditorView } from '@codemirror/view';
3
+ import { Extension } from '@codemirror/state';
4
4
  import { CodeLanguage } from './props';
5
5
  declare const _default: import("vue-demi").DefineComponent<{
6
6
  modelValue: {
@@ -44,8 +44,8 @@ declare const _default: import("vue-demi").DefineComponent<{
44
44
  default: boolean;
45
45
  };
46
46
  }, {
47
- root: import("vue-demi").Ref<HTMLElement | undefined>;
48
47
  editorView: EditorView;
48
+ root: import("vue-demi").Ref<HTMLElement | undefined>;
49
49
  control: import("vue-demi").Ref<any>;
50
50
  fullscreenControl: import("vue-demi").Ref<any>;
51
51
  modal: import("vue-demi").Ref<any>;
@@ -69,7 +69,7 @@ declare const _default: import("vue-demi").DefineComponent<{
69
69
  focus: () => void;
70
70
  blur: () => void;
71
71
  openFullscreen: () => void;
72
- }, unknown, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, ("update:modelValue" | "input" | "keydown" | "keyup" | "focus" | "blur")[], "update:modelValue" | "input" | "keydown" | "keyup" | "focus" | "blur", import("vue-demi").VNodeProps & import("vue-demi").AllowedComponentProps & import("vue-demi").ComponentCustomProps, Readonly<import("vue-demi").ExtractPropTypes<{
72
+ }, unknown, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, ("update:modelValue" | "keydown" | "keyup" | "focus" | "blur")[], "update:modelValue" | "keydown" | "keyup" | "focus" | "blur", import("vue-demi").VNodeProps & import("vue-demi").AllowedComponentProps & import("vue-demi").ComponentCustomProps, Readonly<import("vue-demi").ExtractPropTypes<{
73
73
  modelValue: {
74
74
  type: StringConstructor;
75
75
  default: undefined;
@@ -112,7 +112,6 @@ declare const _default: import("vue-demi").DefineComponent<{
112
112
  };
113
113
  }>> & {
114
114
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
115
- onInput?: ((...args: any[]) => any) | undefined;
116
115
  onKeydown?: ((...args: any[]) => any) | undefined;
117
116
  onKeyup?: ((...args: any[]) => any) | undefined;
118
117
  onFocus?: ((...args: any[]) => any) | undefined;
@@ -1,4 +1,4 @@
1
- export { C as CodeLanguage, s as OrCodeV3 } from '../../OrCode-37d50c74.js';
1
+ export { C as CodeLanguage, s as OrCodeV3 } from '../../OrCode-6f8164d5.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';
@@ -1,4 +1,4 @@
1
- export { s as OrSelectV3 } from '../../OrSelect-a65c0b08.js';
1
+ export { s as OrSelectV3 } from '../../OrSelect-5a22c1da.js';
2
2
  export { I as SelectSize } from '../../OrInputBox-8c1a29dd.js';
3
3
  import 'vue-demi';
4
4
  import '../../dropdown-open-06d651cf.js';
@@ -34,11 +34,11 @@ import '../../OrInput-2810a760.js';
34
34
  import '../../useValidationAttributes-d1abbe34.js';
35
35
  import '../../OrLoader-b7d415dd.js';
36
36
  import '../../OrMenuItem-2928ba60.js';
37
- import '../../OrTags-384a48e3.js';
37
+ import '../../OrTags-801c20ad.js';
38
38
  import '../../useOverflow-e91d2314.js';
39
39
  import '../../OrButton-a881b13b.js';
40
40
  import '../../OrTag-ccb7734c.js';
41
- import '../../OrSelectMultipleControl-96320988.js';
41
+ import '../../OrSelectMultipleControl-6b5a831d.js';
42
42
  import '../../isEqualValue-f8bf73d9.js';
43
43
  import '../../OrSelectPlaceholder-10e3bf5e.js';
44
44
  import '../../OrSelectControlInput-3297e30d.js';
@@ -1,4 +1,4 @@
1
- export { s as OrSelectMultipleControl } from '../../../OrSelectMultipleControl-96320988.js';
1
+ export { s as OrSelectMultipleControl } from '../../../OrSelectMultipleControl-6b5a831d.js';
2
2
  export { s as OrSelectSingleControl } from '../../../OrSelectSingleControl-5e78d499.js';
3
3
  export { s as OrSelectPlaceholder } from '../../../OrSelectPlaceholder-10e3bf5e.js';
4
4
  import 'vue-demi';
@@ -10,7 +10,7 @@ import '../../../isEqualValue-f8bf73d9.js';
10
10
  import '../../../useProxyModelValue-940010d2.js';
11
11
  import '@onereach/styles/tailwind/plugins/core';
12
12
  import '@onereach/styles/tailwind.config.json';
13
- import '../../../OrTags-384a48e3.js';
13
+ import '../../../OrTags-801c20ad.js';
14
14
  import '../../../useOverflow-e91d2314.js';
15
15
  import '../../../OrButton-a881b13b.js';
16
16
  import '../../../OrLoader-b7d415dd.js';
@@ -1,4 +1,4 @@
1
- export { s as OrSelectMultipleControl } from '../../../../OrSelectMultipleControl-96320988.js';
1
+ export { s as OrSelectMultipleControl } from '../../../../OrSelectMultipleControl-6b5a831d.js';
2
2
  import 'vue-demi';
3
3
  import '@vueuse/core';
4
4
  import '../../../../dom-aecadd9a.js';
@@ -8,7 +8,7 @@ import '../../../../isEqualValue-f8bf73d9.js';
8
8
  import '../../../../useProxyModelValue-940010d2.js';
9
9
  import '@onereach/styles/tailwind/plugins/core';
10
10
  import '@onereach/styles/tailwind.config.json';
11
- import '../../../../OrTags-384a48e3.js';
11
+ import '../../../../OrTags-801c20ad.js';
12
12
  import '../../../../useOverflow-e91d2314.js';
13
13
  import '../../../../OrButton-a881b13b.js';
14
14
  import '../../../../OrLoader-b7d415dd.js';
@@ -1,5 +1,6 @@
1
1
  import { PropType } from 'vue-demi';
2
2
  import { TagsOverflow } from '../or-tags-v3';
3
+ import { TagObject } from '../or-tags-v3/types';
3
4
  declare const _default: import("vue-demi").DefineComponent<{
4
5
  modelValue: {
5
6
  type: PropType<string[]>;
@@ -71,6 +72,7 @@ declare const _default: import("vue-demi").DefineComponent<{
71
72
  };
72
73
  proxyModelValue: import("../../hooks").UseProxyModelValueReturn<string[]>;
73
74
  draftModelValue: import("vue-demi").Ref<string>;
75
+ tagsItems: import("vue-demi").ComputedRef<TagObject[]>;
74
76
  currentLength: import("vue-demi").ComputedRef<number>;
75
77
  maxLength: import("vue-demi").ComputedRef<number | undefined>;
76
78
  activated: import("vue-demi").Ref<boolean>;
@@ -1,7 +1,7 @@
1
- export { s as OrTagInputV3 } from '../../OrTagInput-4cec4018.js';
1
+ export { s as OrTagInputV3 } from '../../OrTagInput-6e9c7a94.js';
2
2
  export { I as TagInputSize } from '../../OrInputBox-8c1a29dd.js';
3
- import 'vue-demi';
4
3
  import '@vueuse/core';
4
+ import 'vue-demi';
5
5
  import '../../useIdAttribute-859439f0.js';
6
6
  import '../../dom-aecadd9a.js';
7
7
  import 'lodash/isElement';
@@ -26,9 +26,9 @@ import '../../OrOverlay-d00d79f1.js';
26
26
  import '../../OrTeleport.vue3-bf77eed4.js';
27
27
  import '../../useTheme-0ef25778.js';
28
28
  import '../../OrLabel-40af976e.js';
29
- import '../../OrTags-384a48e3.js';
29
+ import '../../OrTag-ccb7734c.js';
30
+ import '../../OrTags-801c20ad.js';
30
31
  import '../../useOverflow-e91d2314.js';
31
32
  import '../../OrButton-a881b13b.js';
32
33
  import '../../OrLoader-b7d415dd.js';
33
- import '../../OrTag-ccb7734c.js';
34
34
  import '../../style-inject.es-4c6f2515.js';
@@ -1,4 +1,4 @@
1
- export { s as OrTagsV3, T as TagsOverflow } from '../../OrTags-384a48e3.js';
1
+ export { s as OrTagsV3, T as TagsOverflow } from '../../OrTags-801c20ad.js';
2
2
  import 'vue-demi';
3
3
  import '../../useOverflow-e91d2314.js';
4
4
  import '@vueuse/core';
@@ -1,6 +1,7 @@
1
- export type SimpleTag = string;
2
- export type Tag = SimpleTag | TagObject;
3
- export interface TagObject {
1
+ import { OrTag } from '../or-tag';
2
+ export type Tag = string | TagObject;
3
+ export type TagObject = {
4
4
  label: string;
5
5
  value: string | number | object;
6
- }
6
+ tagProps?: InstanceType<typeof OrTag>['$props'];
7
+ };
@@ -22,7 +22,7 @@ export { lintGutter, linter } from '@codemirror/lint';
22
22
  export { javascript } from '@codemirror/lang-javascript';
23
23
  export { json, jsonParseLinter } from '@codemirror/lang-json';
24
24
  export { html } from '@codemirror/lang-html';
25
- export { C as CodeLanguage, s as OrCodeV3 } from './OrCode-37d50c74.js';
25
+ export { C as CodeLanguage, s as OrCodeV3 } from './OrCode-6f8164d5.js';
26
26
  export { EditorView } from '@codemirror/view';
27
27
  export { EditorState } from '@codemirror/state';
28
28
  export { s as OrCollapse } from './OrCollapse-d7c0afae.js';
@@ -98,7 +98,7 @@ export { s as OrSearch } from './OrSearch-aa57d4e8.js';
98
98
  export { s as OrSearchV3 } from './OrSearch-fccacdba.js';
99
99
  export { s as OrSegmentedControlV3, S as SegmentedControlSize } from './OrSegmentedControl-adbf7f4e.js';
100
100
  export { s as OrSelect } from './OrSelect-a366e668.js';
101
- export { s as OrSelectV3 } from './OrSelect-a65c0b08.js';
101
+ export { s as OrSelectV3 } from './OrSelect-5a22c1da.js';
102
102
  export { s as OrSidebar, O as OrSidebarSide } from './OrSidebar-4ab42b93.js';
103
103
  export { S as OrSidebarPlacement, s as OrSidebarV3, S as SidebarPlacement } from './OrSidebar-62009372.js';
104
104
  export { s as OrSkeletonCircle } from './OrSkeletonCircle-66e175a0.js';
@@ -120,9 +120,9 @@ export { s as OrTabV3 } from './OrTab-42be32d1.js';
120
120
  export { s as OrTabs } from './OrTabs-3da3ea89.js';
121
121
  export { s as OrTabsV3, T as TabsVariant } from './OrTabs-e53980aa.js';
122
122
  export { s as OrTag } from './OrTag-bc8177a4.js';
123
- export { s as OrTagInputV3 } from './OrTagInput-4cec4018.js';
123
+ export { s as OrTagInputV3 } from './OrTagInput-6e9c7a94.js';
124
124
  export { s as OrTagV3, a as TagColor, T as TagVariant } from './OrTag-ccb7734c.js';
125
- export { s as OrTagsV3, T as TagsOverflow } from './OrTags-384a48e3.js';
125
+ export { s as OrTagsV3, T as TagsOverflow } from './OrTags-801c20ad.js';
126
126
  export { s as OrTeleport } from './OrTeleport.vue3-9bce0c02.js';
127
127
  export { s as OrTeleportV3 } from './OrTeleport.vue3-bf77eed4.js';
128
128
  export { s as OrTextV3 } from './OrText-d54c951d.js';
@@ -201,7 +201,7 @@ import './codemirrorView-020fe885.js';
201
201
  import 'prosemirror-state';
202
202
  import 'prosemirror-commands';
203
203
  import 'lodash/keyBy';
204
- import './OrSelectMultipleControl-96320988.js';
204
+ import './OrSelectMultipleControl-6b5a831d.js';
205
205
  import './OrSelectPlaceholder-10e3bf5e.js';
206
206
  import './OrSelectControlInput-3297e30d.js';
207
207
  import './OrSelectSingleControl-5e78d499.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onereach/ui-components",
3
- "version": "8.16.5-beta.3876.0",
3
+ "version": "8.17.0",
4
4
  "npmUnpacked": "4.15.2",
5
5
  "description": "Vue components library for v2/3",
6
6
  "sideEffects": false,
@@ -176,5 +176,6 @@
176
176
  "default": "./dist/bundled/v3/components/*/index.js"
177
177
  },
178
178
  "./package.json": "./package.json"
179
- }
179
+ },
180
+ "gitHead": "5f3a231f61caf830f2a12a9c0f4d77674cd78053"
180
181
  }
@@ -24,16 +24,16 @@
24
24
  </div>
25
25
  </template>
26
26
  </OrCodeControl>
27
-
28
27
  <OrModal
29
28
  ref="modal"
29
+ size="l"
30
30
  :additional-styles="modalStyles"
31
- :size="'l'"
32
31
  >
33
- <template v-slot:header>
32
+ <template
33
+ v-slot:header
34
+ >
34
35
  {{ label }}
35
36
  </template>
36
-
37
37
  <OrCodeControl
38
38
  ref="fullscreenControl"
39
39
  :control-id="controlAttributes.id"
@@ -46,7 +46,6 @@
46
46
  <slot name="addon" />
47
47
  </template>
48
48
  </OrCodeControl>
49
-
50
49
  <template
51
50
  v-if="$slots.modalFooter"
52
51
  v-slot:footer
@@ -64,17 +63,17 @@ import { useControlAttributes, useIdAttribute, useProxyModelValue, useTheme, use
64
63
  /* Codemirror core */
65
64
  import { basicSetup } from 'codemirror';
66
65
 
67
- import { indentWithTab } from '@codemirror/commands';
68
- import { Compartment, EditorState, Extension } from '@codemirror/state';
69
66
  import { EditorView, keymap } from '@codemirror/view';
67
+ import { indentWithTab } from '@codemirror/commands';
68
+ import { EditorState, Extension, Compartment } from '@codemirror/state';
70
69
 
71
70
  /* Components */
72
71
  import { OrIconButtonV3 as OrIconButton } from '../or-icon-button-v3';
73
72
  import { OrModalV3 as OrModal } from '../or-modal-v3';
74
73
 
75
- import OrCodeControl from './partials/OrCodeControl.vue';
76
74
  import { CodeLanguage } from './props';
77
75
  import { Code, CodeControl, CodeModal } from './styles';
76
+ import OrCodeControl from './partials/OrCodeControl.vue';
78
77
 
79
78
  export default defineComponent({
80
79
  components: {
@@ -144,7 +143,6 @@ export default defineComponent({
144
143
  emits: [
145
144
  'update:modelValue',
146
145
 
147
- 'input',
148
146
  'keydown',
149
147
  'keyup',
150
148
  'focus',
@@ -153,7 +151,6 @@ export default defineComponent({
153
151
 
154
152
  expose: [
155
153
  'root',
156
-
157
154
  'editorView',
158
155
  'control',
159
156
  'fullscreenControl',
@@ -245,10 +242,6 @@ export default defineComponent({
245
242
  EditorView.editable.of(!props.disabled),
246
243
 
247
244
  EditorView.domEventHandlers({
248
- input: (event) => {
249
- context.emit('input', event);
250
- },
251
-
252
245
  keydown: (event) => {
253
246
  context.emit('keydown', event);
254
247
  },
@@ -268,8 +261,6 @@ export default defineComponent({
268
261
 
269
262
  EditorView.theme({
270
263
  '&': {
271
- overflow: 'hidden',
272
-
273
264
  color: theme.textColor['on-background'],
274
265
  backgroundColor: theme.backgroundColor['background'],
275
266
  },
@@ -289,8 +280,6 @@ export default defineComponent({
289
280
  color: theme.textColor['on-background'],
290
281
  backgroundColor: theme.backgroundColor['primary-opacity-0-12'],
291
282
  borderColor: theme.borderColor['outline'],
292
-
293
- backdropFilter: 'blur(2px)',
294
283
  },
295
284
 
296
285
  '.cm-activeLineGutter, .cm-activeLine': {
@@ -301,7 +290,6 @@ export default defineComponent({
301
290
 
302
291
  const state = EditorState.create({
303
292
  doc: proxyModelValue.value,
304
-
305
293
  extensions: [
306
294
  ...defaultExtensions,
307
295
  languageExtensionCompartment.of([]),
@@ -311,7 +299,6 @@ export default defineComponent({
311
299
 
312
300
  const editorView = new EditorView({
313
301
  state,
314
-
315
302
  dispatch: (transaction) => {
316
303
  editorView.update([
317
304
  transaction,
@@ -336,7 +323,6 @@ export default defineComponent({
336
323
  to: editorView!.state.doc.length,
337
324
  insert: modelValue,
338
325
  },
339
-
340
326
  selection: selection.ranges.some((range) => range.to > modelValue.length) ? { anchor: modelValue.length } : selection,
341
327
  });
342
328
  });
@@ -377,8 +363,8 @@ export default defineComponent({
377
363
  });
378
364
 
379
365
  return {
380
- root,
381
366
  editorView,
367
+ root,
382
368
  control,
383
369
  fullscreenControl,
384
370
  modal,
@@ -50,7 +50,6 @@
50
50
  </div>
51
51
  </div>
52
52
  </template>
53
-
54
53
  <script lang="ts">
55
54
  import { computed, ref, defineComponent } from 'vue-demi';
56
55
  import { OrErrorV3 as OrError } from '../../or-error-v3';
@@ -102,15 +101,7 @@ export default defineComponent({
102
101
  default: undefined,
103
102
  },
104
103
  },
105
-
106
- expose: [
107
- 'root',
108
- 'control',
109
-
110
- 'focus',
111
- 'blur',
112
- ],
113
-
104
+ expose: ['root', 'control', 'focus', 'blur'],
114
105
  setup() {
115
106
  // Refs
116
107
  const root = ref<HTMLElement>();
@@ -20,24 +20,21 @@
20
20
 
21
21
  <OrInputBox
22
22
  ref="inputBox"
23
+ :class="['interactivity-select']"
23
24
  :variant="disableDefaultStyles ? 'unstyled' : 'styled'"
24
- :force-state="activated ? 'focus-within': undefined"
25
- class="cursor-text"
26
25
  :invalid="!!error"
27
26
  :readonly="readonly"
28
27
  :disabled="disabled"
29
- tabindex="0"
28
+ :tabindex="0"
29
+ :force-state="activated ? 'focus-within': undefined"
30
30
  @focus="activate"
31
31
  >
32
32
  <OrTags
33
33
  ref="tags"
34
- :items="proxyModelValue"
35
- class="grow"
34
+ :class="['grow']"
35
+ :items="tagsItems"
36
36
  :disabled="disabled"
37
- :tag-props="{
38
- variant: readonly || disabled ? 'tag' : 'reset',
39
- disabled: disabled
40
- }"
37
+ :tag-props="{ variant: readonly || disabled ? 'tag' : 'reset', disabled }"
41
38
  :overflow="overflow"
42
39
  @reset="remove($event)"
43
40
  >
@@ -48,7 +45,7 @@
48
45
  <div class="inline-flex w-fit max-w-full">
49
46
  <input
50
47
  ref="control"
51
- v-model="draftModelValue"
48
+ v-model.trim="draftModelValue"
52
49
  v-bind="controlAttributes"
53
50
  :class="controlStyles"
54
51
  :style="controlInlineStyles"
@@ -120,15 +117,17 @@
120
117
  </template>
121
118
 
122
119
  <script lang="ts">
123
- import { PropType, computed, defineComponent, reactive, ref, toRefs, nextTick, watch } from 'vue-demi';
124
120
  import { MaybeElementRef, onClickOutside } from '@vueuse/core';
121
+ import { PropType, computed, defineComponent, nextTick, reactive, ref, toRefs, watch } from 'vue-demi';
125
122
  import { useControlAttributes, useIdAttribute, useProxyModelValue, useValidationAttributes } from '../../hooks';
126
123
  import { OrErrorV3 as OrError } from '../or-error-v3';
127
124
  import { OrHintV3 as OrHint } from '../or-hint-v3';
128
125
  import { OrIconButtonV3 as OrIconButton } from '../or-icon-button-v3';
129
126
  import { OrInputBoxV3 as OrInputBox } from '../or-input-box-v3';
130
127
  import { OrLabelV3 as OrLabel } from '../or-label-v3';
128
+ import { TagColor } from '../or-tag-v3';
131
129
  import { OrTagsV3 as OrTags, TagsOverflow } from '../or-tags-v3';
130
+ import { TagObject } from '../or-tags-v3/types';
132
131
  import { TagInput, TagInputControl, TagInputItem } from './styles';
133
132
 
134
133
  export default defineComponent({
@@ -256,6 +255,17 @@ export default defineComponent({
256
255
  const proxyModelValue = useProxyModelValue(modelValue, context.emit);
257
256
  const draftModelValue = ref<string>('');
258
257
 
258
+ const tagsItems = computed(() => {
259
+ return proxyModelValue.value.map((item) => ({
260
+ label: item,
261
+ value: item,
262
+
263
+ tagProps: {
264
+ color: item === draftModelValue.value ? TagColor.Danger : TagColor.Default,
265
+ },
266
+ } as TagObject));
267
+ });
268
+
259
269
  const currentLength = computed(() => proxyModelValue.value?.length ?? 0);
260
270
  const maxLength = computed(() => controlAttributes.maxlength);
261
271
 
@@ -299,7 +309,7 @@ export default defineComponent({
299
309
  }
300
310
 
301
311
  function add(): void {
302
- const newItem = draftModelValue.value?.trim();
312
+ const newItem = draftModelValue.value;
303
313
 
304
314
  if (!newItem) return;
305
315
  if (proxyModelValue.value.includes(newItem)) return;
@@ -343,6 +353,7 @@ export default defineComponent({
343
353
  controlAttributes,
344
354
  proxyModelValue,
345
355
  draftModelValue,
356
+ tagsItems,
346
357
  currentLength,
347
358
  maxLength,
348
359
  activated,