@onereach/ui-components 8.16.4 → 8.16.5-beta.3872.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 (58) hide show
  1. package/dist/bundled/v2/components/OrTagInputV3/OrTagInput.js +31 -15
  2. package/dist/bundled/v2/components/OrTagInputV3/OrTagInput.vue.d.ts +3 -0
  3. package/dist/bundled/v2/components/OrTagsV3/OrTags.js +3 -3
  4. package/dist/bundled/v2/components/OrTagsV3/types.d.ts +5 -4
  5. package/dist/bundled/v2/index.js +1 -1
  6. package/dist/bundled/v3/components/OrSelectV3/OrSelect.js +1 -1
  7. package/dist/bundled/v3/components/OrSelectV3/index.js +1 -1
  8. package/dist/bundled/v3/components/OrSelectV3/styles.js +1 -1
  9. package/dist/bundled/v3/components/{OrSelectV3-f212f5c6.js → OrSelectV3-e0de09af.js} +1 -1
  10. package/dist/bundled/v3/components/OrTagInputV3/OrTagInput.js +1 -1
  11. package/dist/bundled/v3/components/OrTagInputV3/OrTagInput.vue.d.ts +2 -0
  12. package/dist/bundled/v3/components/OrTagInputV3/index.js +1 -1
  13. package/dist/bundled/v3/components/OrTagInputV3/styles.js +1 -1
  14. package/dist/bundled/v3/components/{OrTagInputV3-7b240c91.js → OrTagInputV3-e1596983.js} +23 -11
  15. package/dist/bundled/v3/components/OrTagV3/OrTag.js +1 -1
  16. package/dist/bundled/v3/components/OrTagV3/index.js +1 -1
  17. package/dist/bundled/v3/components/OrTagV3/props.js +1 -1
  18. package/dist/bundled/v3/components/OrTagV3/styles.js +1 -1
  19. package/dist/bundled/v3/components/{OrTagV3-43ee9066.js → OrTagV3-045cac0b.js} +1 -1
  20. package/dist/bundled/v3/components/OrTagsV3/OrTags.js +1 -1
  21. package/dist/bundled/v3/components/OrTagsV3/index.js +1 -1
  22. package/dist/bundled/v3/components/OrTagsV3/props.js +1 -1
  23. package/dist/bundled/v3/components/OrTagsV3/styles.js +1 -1
  24. package/dist/bundled/v3/components/OrTagsV3/types.d.ts +5 -4
  25. package/dist/bundled/v3/components/OrTagsV3/utils/castToTag.js +1 -1
  26. package/dist/bundled/v3/components/{OrTagsV3-bbda3acd.js → OrTagsV3-6c4fb22c.js} +10 -4
  27. package/dist/bundled/v3/components/index.js +4 -4
  28. package/dist/bundled/v3/index.js +5 -5
  29. package/dist/esm/v2/{OrSelect-30f5ce68.js → OrSelect-4768c12b.js} +2 -2
  30. package/dist/esm/v2/{OrSelectMultipleControl-de32c83c.js → OrSelectMultipleControl-685d5af4.js} +1 -1
  31. package/dist/esm/v2/{OrTagInput-2642f4d9.js → OrTagInput-c4110c0b.js} +32 -16
  32. package/dist/esm/v2/{OrTags-9d3cf104.js → OrTags-f6434f9b.js} +3 -3
  33. package/dist/esm/v2/components/index.js +4 -4
  34. package/dist/esm/v2/components/or-select-v3/index.js +3 -3
  35. package/dist/esm/v2/components/or-select-v3/partials/index.js +2 -2
  36. package/dist/esm/v2/components/or-select-v3/partials/or-select-multiple-control/index.js +2 -2
  37. package/dist/esm/v2/components/or-tag-input-v3/OrTagInput.vue.d.ts +3 -0
  38. package/dist/esm/v2/components/or-tag-input-v3/index.js +4 -4
  39. package/dist/esm/v2/components/or-tags-v3/index.js +1 -1
  40. package/dist/esm/v2/components/or-tags-v3/types.d.ts +5 -4
  41. package/dist/esm/v2/index.js +4 -4
  42. package/dist/esm/v3/{OrSelect-a65c0b08.js → OrSelect-5a22c1da.js} +2 -2
  43. package/dist/esm/v3/{OrSelectMultipleControl-96320988.js → OrSelectMultipleControl-6b5a831d.js} +1 -1
  44. package/dist/esm/v3/{OrTagInput-4cec4018.js → OrTagInput-6e9c7a94.js} +23 -11
  45. package/dist/esm/v3/{OrTags-384a48e3.js → OrTags-801c20ad.js} +9 -3
  46. package/dist/esm/v3/components/index.js +4 -4
  47. package/dist/esm/v3/components/or-select-v3/index.js +3 -3
  48. package/dist/esm/v3/components/or-select-v3/partials/index.js +2 -2
  49. package/dist/esm/v3/components/or-select-v3/partials/or-select-multiple-control/index.js +2 -2
  50. package/dist/esm/v3/components/or-tag-input-v3/OrTagInput.vue.d.ts +2 -0
  51. package/dist/esm/v3/components/or-tag-input-v3/index.js +4 -4
  52. package/dist/esm/v3/components/or-tags-v3/index.js +1 -1
  53. package/dist/esm/v3/components/or-tags-v3/types.d.ts +5 -4
  54. package/dist/esm/v3/index.js +4 -4
  55. package/package.json +2 -3
  56. package/src/components/or-tag-input-v3/OrTagInput.vue +23 -12
  57. package/src/components/or-tags-v3/OrTags.vue +5 -3
  58. package/src/components/or-tags-v3/types.ts +7 -4
@@ -1 +1 @@
1
- export { s as default } from '../OrSelectV3-f212f5c6.js';
1
+ export { s as default } from '../OrSelectV3-e0de09af.js';
@@ -1,2 +1,2 @@
1
- export { s as OrSelectV3 } from '../OrSelectV3-f212f5c6.js';
1
+ export { s as OrSelectV3 } from '../OrSelectV3-e0de09af.js';
2
2
  export { I as SelectSize } from '../OrInputBoxV3-ddd117f0.js';
@@ -1 +1 @@
1
- export { S as Select, a as SelectControl, c as SelectDropdown, d as SelectDropdownDefault, e as SelectDropdownFlipped, f as SelectDropdownItem, g as SelectNoSearchResults, b as SelectSearchControl } from '../OrSelectV3-f212f5c6.js';
1
+ export { S as Select, a as SelectControl, c as SelectDropdown, d as SelectDropdownDefault, e as SelectDropdownFlipped, f as SelectDropdownItem, g as SelectNoSearchResults, b as SelectSearchControl } from '../OrSelectV3-e0de09af.js';
@@ -4,7 +4,7 @@ import { defineComponent, ref, computed, toRefs, watch, getCurrentInstance, onMo
4
4
  import { isEmptyValue } from '../utils/isEmptyValue.js';
5
5
  import { n as useFocus } from './OrBottomSheetV3-66815f6f.js';
6
6
  import { useProxyModelValue } from '../hooks/useProxyModelValue.js';
7
- import { s as script$5, T as TagsOverflow } from './OrTagsV3-bbda3acd.js';
7
+ import { s as script$5, T as TagsOverflow } from './OrTagsV3-6c4fb22c.js';
8
8
  import { isEqualValue } from '../utils/isEqualValue.js';
9
9
  import { s as script$6 } from './OrCheckboxV3-7d36a9a8.js';
10
10
  import { s as script$7 } from './OrErrorV3-f61387d6.js';
@@ -1 +1 @@
1
- export { s as default } from '../OrTagInputV3-7b240c91.js';
1
+ export { s as default } from '../OrTagInputV3-e1596983.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,2 +1,2 @@
1
- export { s as OrTagInputV3 } from '../OrTagInputV3-7b240c91.js';
1
+ export { s as OrTagInputV3 } from '../OrTagInputV3-e1596983.js';
2
2
  export { I as TagInputSize } from '../OrInputBoxV3-ddd117f0.js';
@@ -1 +1 @@
1
- export { T as TagInput, a as TagInputControl, b as TagInputItem } from '../OrTagInputV3-7b240c91.js';
1
+ export { T as TagInput, a as TagInputControl, b as TagInputItem } from '../OrTagInputV3-e1596983.js';
@@ -1,13 +1,14 @@
1
1
  import { resolveComponent, openBlock, createElementBlock, normalizeClass, createBlock, withCtx, renderSlot, createTextVNode, toDisplayString, createCommentVNode, createVNode, createSlots, createElementVNode, withDirectives, mergeProps, withKeys, vModelDynamic, vShow } from 'vue';
2
2
  import { s as styleInject } from './OrAvatar-28d247a6.js';
3
3
  import { s as script$4 } from './OrInputBoxV3-ddd117f0.js';
4
- import { defineComponent, ref, toRefs, computed, reactive, watch, nextTick } from 'vue-demi';
5
4
  import { o as onClickOutside } from './OrBottomSheetV3-66815f6f.js';
5
+ import { defineComponent, ref, toRefs, computed, reactive, watch, nextTick } from 'vue-demi';
6
6
  import { s as script$1 } from './OrErrorV3-f61387d6.js';
7
7
  import { s as script$2 } from './OrHintV3-1fcfaa19.js';
8
8
  import { s as script$3 } from './OrIconButtonV3-aa18f25c.js';
9
9
  import { s as script$5 } from './OrLabelV3-28f7ac2c.js';
10
- import { s as script$6, T as TagsOverflow } from './OrTagsV3-bbda3acd.js';
10
+ import { s as script$6, T as TagsOverflow } from './OrTagsV3-6c4fb22c.js';
11
+ import { T as TagColor } from './OrTagV3-045cac0b.js';
11
12
  import { useIdAttribute } from '../hooks/useIdAttribute.js';
12
13
  import { useControlAttributes } from '../hooks/useControlAttributes.js';
13
14
  import { useValidationAttributes } from '../hooks/useValidationAttributes.js';
@@ -118,6 +119,15 @@ var script = defineComponent({
118
119
  const activated = ref(false);
119
120
  const proxyModelValue = useProxyModelValue(modelValue, context.emit);
120
121
  const draftModelValue = ref('');
122
+ const tagsItems = computed(() => {
123
+ return proxyModelValue.value.map(item => ({
124
+ label: item,
125
+ value: item,
126
+ tagProps: {
127
+ color: item === draftModelValue.value ? TagColor.Danger : TagColor.Default
128
+ }
129
+ }));
130
+ });
121
131
  const currentLength = computed(() => {
122
132
  var _a, _b;
123
133
  return (_b = (_a = proxyModelValue.value) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;
@@ -154,8 +164,7 @@ var script = defineComponent({
154
164
  context.emit('focus');
155
165
  }
156
166
  function add() {
157
- var _a;
158
- const newItem = (_a = draftModelValue.value) === null || _a === void 0 ? void 0 : _a.trim();
167
+ const newItem = draftModelValue.value;
159
168
  if (!newItem) return;
160
169
  if (proxyModelValue.value.includes(newItem)) return;
161
170
  if (maxLength.value && currentLength.value >= maxLength.value) return;
@@ -194,6 +203,7 @@ var script = defineComponent({
194
203
  controlAttributes,
195
204
  proxyModelValue,
196
205
  draftModelValue,
206
+ tagsItems,
197
207
  currentLength,
198
208
  maxLength,
199
209
  activated,
@@ -242,19 +252,19 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
242
252
  _: 3 /* FORWARDED */
243
253
  }, 8 /* PROPS */, ["control-id", "required", "disabled"])) : createCommentVNode("v-if", true), createVNode(_component_OrInputBox, {
244
254
  ref: "inputBox",
255
+ class: normalizeClass(['interactivity-select']),
245
256
  variant: _ctx.disableDefaultStyles ? 'unstyled' : 'styled',
246
- "force-state": _ctx.activated ? 'focus-within' : undefined,
247
- class: "cursor-text",
248
257
  invalid: !!_ctx.error,
249
258
  readonly: _ctx.readonly,
250
259
  disabled: _ctx.disabled,
251
- tabindex: "0",
260
+ tabindex: 0,
261
+ "force-state": _ctx.activated ? 'focus-within' : undefined,
252
262
  onFocus: _ctx.activate
253
263
  }, createSlots({
254
264
  default: withCtx(() => [createVNode(_component_OrTags, {
255
265
  ref: "tags",
256
- items: _ctx.proxyModelValue,
257
- class: "grow",
266
+ class: normalizeClass(['grow']),
267
+ items: _ctx.tagsItems,
258
268
  disabled: _ctx.disabled,
259
269
  "tag-props": {
260
270
  variant: _ctx.readonly || _ctx.disabled ? 'tag' : 'reset',
@@ -284,7 +294,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
284
294
  onFocus: _cache[4] || (_cache[4] = function () {
285
295
  return _ctx.activate && _ctx.activate(...arguments);
286
296
  })
287
- }), null, 16 /* FULL_PROPS */, _hoisted_2), [[vModelDynamic, _ctx.draftModelValue]])])]),
297
+ }), null, 16 /* FULL_PROPS */, _hoisted_2), [[vModelDynamic, _ctx.draftModelValue, void 0, {
298
+ trim: true
299
+ }]])])]),
288
300
  key: "0"
289
301
  } : undefined]), 1032 /* PROPS, DYNAMIC_SLOTS */, ["items", "disabled", "tag-props", "overflow"])]),
290
302
  _: 2 /* DYNAMIC */
@@ -298,7 +310,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
298
310
  onClick: _cache[6] || (_cache[6] = $event => _ctx.reset())
299
311
  }, null, 8 /* PROPS */, ["disabled"])) : createCommentVNode("v-if", true)]),
300
312
  key: "0"
301
- } : 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, {
313
+ } : 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, {
302
314
  key: 0,
303
315
  disabled: _ctx.disabled
304
316
  }, createSlots({
@@ -1 +1 @@
1
- export { s as default } from '../OrTagV3-43ee9066.js';
1
+ export { s as default } from '../OrTagV3-045cac0b.js';
@@ -1 +1 @@
1
- export { s as OrTagV3, a as TagColor, T as TagVariant } from '../OrTagV3-43ee9066.js';
1
+ export { s as OrTagV3, T as TagColor, a as TagVariant } from '../OrTagV3-045cac0b.js';
@@ -1 +1 @@
1
- export { a as TagColor, T as TagVariant } from '../OrTagV3-43ee9066.js';
1
+ export { T as TagColor, a as TagVariant } from '../OrTagV3-045cac0b.js';
@@ -1 +1 @@
1
- export { b as Tag, d as TagColors, c as TagVariants } from '../OrTagV3-43ee9066.js';
1
+ export { b as Tag, d as TagColors, c as TagVariants } from '../OrTagV3-045cac0b.js';
@@ -120,4 +120,4 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
120
120
  script.render = render;
121
121
  script.__file = "src/components/or-tag-v3/OrTag.vue";
122
122
 
123
- export { TagVariant as T, TagColor as a, Tag as b, TagVariants as c, TagColors as d, script as s };
123
+ export { TagColor as T, TagVariant as a, Tag as b, TagVariants as c, TagColors as d, script as s };
@@ -1 +1 @@
1
- export { s as default } from '../OrTagsV3-bbda3acd.js';
1
+ export { s as default } from '../OrTagsV3-6c4fb22c.js';
@@ -1 +1 @@
1
- export { s as OrTagsV3, T as TagsOverflow } from '../OrTagsV3-bbda3acd.js';
1
+ export { s as OrTagsV3, T as TagsOverflow } from '../OrTagsV3-6c4fb22c.js';
@@ -1 +1 @@
1
- export { T as TagsOverflow } from '../OrTagsV3-bbda3acd.js';
1
+ export { T as TagsOverflow } from '../OrTagsV3-6c4fb22c.js';
@@ -1 +1 @@
1
- export { a as Tags, b as TagsContainer, c as TagsContainerOverflows, d as TagsOverflowButton, e as TagsOverflowPopover } from '../OrTagsV3-bbda3acd.js';
1
+ export { a as Tags, b as TagsContainer, c as TagsContainerOverflows, d as TagsOverflowButton, e as TagsOverflowPopover } from '../OrTagsV3-6c4fb22c.js';
@@ -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
+ };
@@ -1 +1 @@
1
- export { f as castToTagObject } from '../../OrTagsV3-bbda3acd.js';
1
+ export { f as castToTagObject } from '../../OrTagsV3-6c4fb22c.js';
@@ -2,7 +2,7 @@ import { resolveComponent, openBlock, createElementBlock, normalizeClass, Fragme
2
2
  import { defineComponent, ref, toRefs, computed, nextTick } from 'vue-demi';
3
3
  import { s as script$1 } from './OrButtonV3-529c4206.js';
4
4
  import { s as script$2 } from './OrPopoverV3-a7d181a4.js';
5
- import { s as script$3 } from './OrTagV3-43ee9066.js';
5
+ import { s as script$3 } from './OrTagV3-045cac0b.js';
6
6
  import { useOverflow } from '../hooks/useOverflow.js';
7
7
 
8
8
  var TagsOverflow;
@@ -183,9 +183,12 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
183
183
  ref: "container",
184
184
  class: normalizeClass(_ctx.containerStyles)
185
185
  }, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.localItems, item => {
186
- return openBlock(), createBlock(_component_OrTag, mergeProps(_ctx.tagProps, {
186
+ return openBlock(), createBlock(_component_OrTag, mergeProps({
187
+ ..._ctx.tagProps,
188
+ ...item.tagProps
189
+ }, {
187
190
  key: item.value,
188
- class: "max-w-full",
191
+ class: ['max-w-full'],
189
192
  onReset: $event => _ctx.$emit('reset', item.value)
190
193
  }), {
191
194
  default: withCtx(() => [createTextVNode(toDisplayString(item.label), 1 /* TEXT */)]),
@@ -217,7 +220,10 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
217
220
  default: withCtx(() => [createElementVNode("div", {
218
221
  class: normalizeClass(_ctx.overflowPopoverStyles)
219
222
  }, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.overflowItems, item => {
220
- return openBlock(), createBlock(_component_OrTag, mergeProps(_ctx.tagProps, {
223
+ return openBlock(), createBlock(_component_OrTag, mergeProps({
224
+ ..._ctx.tagProps,
225
+ ...item.tagProps
226
+ }, {
221
227
  key: item.value,
222
228
  onReset: $event => _ctx.$emit('reset', item.value)
223
229
  }), {
@@ -85,7 +85,7 @@ export { default as OrSearch } from './OrSearch/OrSearch.js';
85
85
  export { OrSearchV3 } from './OrSearchV3/index.js';
86
86
  export { s as OrSegmentedControlV3, S as SegmentedControlSize } from './OrSegmentedControlV3-56862f95.js';
87
87
  export { s as OrSelect } from './OrSelect-ab9e3084.js';
88
- export { s as OrSelectV3 } from './OrSelectV3-f212f5c6.js';
88
+ export { s as OrSelectV3 } from './OrSelectV3-e0de09af.js';
89
89
  export { OrSidebar, OrSidebarSide } from './OrSidebar/index.js';
90
90
  export { S as OrSidebarPlacement, s as OrSidebarV3, S as SidebarPlacement } from './OrSidebarV3-682b0424.js';
91
91
  export { s as OrSkeletonCircle, a as OrSkeletonRect, b as OrSkeletonText, O as OrSkeletonTextSizes } from './OrSkeleton-6b7c940e.js';
@@ -102,9 +102,9 @@ export { s as OrTabV3 } from './OrTabV3-9dbd8ad9.js';
102
102
  export { default as OrTabs } from './OrTabs/OrTabs.js';
103
103
  export { s as OrTabsV3, T as TabsVariant } from './OrTabsV3-04c6d108.js';
104
104
  export { default as OrTag } from './OrTag/OrTag.js';
105
- export { s as OrTagInputV3 } from './OrTagInputV3-7b240c91.js';
106
- export { s as OrTagV3, a as TagColor, T as TagVariant } from './OrTagV3-43ee9066.js';
107
- export { s as OrTagsV3, T as TagsOverflow } from './OrTagsV3-bbda3acd.js';
105
+ export { s as OrTagInputV3 } from './OrTagInputV3-e1596983.js';
106
+ export { s as OrTagV3, T as TagColor, a as TagVariant } from './OrTagV3-045cac0b.js';
107
+ export { s as OrTagsV3, T as TagsOverflow } from './OrTagsV3-6c4fb22c.js';
108
108
  export { s as OrTeleport } from './OrTeleport-5a34b07f.js';
109
109
  export { default as OrTeleportV3 } from './OrTeleportV3/OrTeleport.js';
110
110
  export { s as OrTextV3 } from './OrTextV3-ff806d55.js';