@onereach/ui-components 17.4.0-beta.4895.0 → 17.4.0-beta.4897.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 (39) hide show
  1. package/dist/bundled/v2/{OrInlineInput-ceaf40fa.js → OrInlineInput-c43aa80f.js} +32 -10
  2. package/dist/bundled/v2/components/OrInlineInputV3/OrInlineInput.js +1 -1
  3. package/dist/bundled/v2/components/OrInlineInputV3/OrInlineInput.vue.d.ts +10 -0
  4. package/dist/bundled/v2/components/OrInlineInputV3/index.js +1 -1
  5. package/dist/bundled/v2/components/OrTextV3/OrText.js +19 -3
  6. package/dist/bundled/v2/components/OrTextV3/OrText.vue.d.ts +7 -2
  7. package/dist/bundled/v2/components/index.js +1 -1
  8. package/dist/bundled/v2/index.js +2 -2
  9. package/dist/bundled/v3/components/OrInlineInputV3/OrInlineInput.js +1 -1
  10. package/dist/bundled/v3/components/OrInlineInputV3/OrInlineInput.vue.d.ts +10 -0
  11. package/dist/bundled/v3/components/OrInlineInputV3/index.js +1 -1
  12. package/dist/bundled/v3/components/OrInlineInputV3/styles.js +1 -1
  13. package/dist/bundled/v3/components/{OrInlineInputV3-51563d74.js → OrInlineInputV3-31f5a991.js} +31 -10
  14. package/dist/bundled/v3/components/OrTextV3/OrText.js +1 -1
  15. package/dist/bundled/v3/components/OrTextV3/OrText.vue.d.ts +7 -2
  16. package/dist/bundled/v3/components/OrTextV3/index.js +1 -1
  17. package/dist/bundled/v3/components/OrTextV3/styles.js +1 -1
  18. package/dist/bundled/v3/components/{OrTextV3-f2e88ff5.js → OrTextV3-ca17d46d.js} +18 -4
  19. package/dist/bundled/v3/components/index.js +2 -2
  20. package/dist/bundled/v3/index.js +2 -2
  21. package/dist/esm/v2/{OrInlineInput-44ac1903.js → OrInlineInput-36e8dbba.js} +32 -10
  22. package/dist/esm/v2/{OrText-cab6adea.js → OrText-4dc3abff.js} +19 -3
  23. package/dist/esm/v2/components/index.js +2 -2
  24. package/dist/esm/v2/components/or-inline-input-v3/OrInlineInput.vue.d.ts +10 -0
  25. package/dist/esm/v2/components/or-inline-input-v3/index.js +2 -1
  26. package/dist/esm/v2/components/or-text-v3/OrText.vue.d.ts +7 -2
  27. package/dist/esm/v2/components/or-text-v3/index.js +1 -1
  28. package/dist/esm/v2/index.js +2 -2
  29. package/dist/esm/v3/{OrInlineInput-e6f41721.js → OrInlineInput-89e9f620.js} +31 -10
  30. package/dist/esm/v3/{OrText-ea114c19.js → OrText-f1dbba5f.js} +18 -4
  31. package/dist/esm/v3/components/index.js +2 -2
  32. package/dist/esm/v3/components/or-inline-input-v3/OrInlineInput.vue.d.ts +10 -0
  33. package/dist/esm/v3/components/or-inline-input-v3/index.js +2 -1
  34. package/dist/esm/v3/components/or-text-v3/OrText.vue.d.ts +7 -2
  35. package/dist/esm/v3/components/or-text-v3/index.js +1 -1
  36. package/dist/esm/v3/index.js +2 -2
  37. package/package.json +2 -2
  38. package/src/components/or-inline-input-v3/OrInlineInput.vue +28 -5
  39. package/src/components/or-text-v3/OrText.vue +20 -1
@@ -1,9 +1,10 @@
1
1
  import { defineComponent, reactive, ref, computed, toRef, watch, nextTick } from 'vue-demi';
2
2
  import { InlineInput, InlineInputControl, InlineInputAction, InlineInputActionSizes } from './components/OrInlineInputV3/styles.js';
3
3
  import __vue_component__$1 from './components/OrErrorV3/OrError.js';
4
- import __vue_component__$2 from './components/OrHintV3/OrHint.js';
5
- import __vue_component__$3 from './components/OrIconButtonV3/OrIconButton.js';
6
- import __vue_component__$4 from './components/OrInlineInputBoxV3/OrInlineInputBox.js';
4
+ import __vue_component__$2 from './components/OrTextV3/OrText.js';
5
+ import __vue_component__$3 from './components/OrHintV3/OrHint.js';
6
+ import __vue_component__$4 from './components/OrIconButtonV3/OrIconButton.js';
7
+ import __vue_component__$5 from './components/OrInlineInputBoxV3/OrInlineInputBox.js';
7
8
  import { InlineInputBoxSize } from './components/OrInlineInputBoxV3/props.js';
8
9
  import { useIdAttribute } from './hooks/useIdAttribute.js';
9
10
  import { useControlAttributes } from './hooks/useControlAttributes.js';
@@ -22,9 +23,10 @@ var script = defineComponent({
22
23
  name: 'OrInlineInput',
23
24
  components: {
24
25
  OrError: __vue_component__$1,
25
- OrHint: __vue_component__$2,
26
- OrIconButton: __vue_component__$3,
27
- OrInlineInputBox: __vue_component__$4
26
+ OrText: __vue_component__$2,
27
+ OrHint: __vue_component__$3,
28
+ OrIconButton: __vue_component__$4,
29
+ OrInlineInputBox: __vue_component__$5
28
30
  },
29
31
  model: {
30
32
  prop: 'modelValue',
@@ -58,6 +60,10 @@ var script = defineComponent({
58
60
  saveOnBlur: {
59
61
  type: Boolean,
60
62
  default: false
63
+ },
64
+ sliceIndex: {
65
+ type: Number,
66
+ default: 0
61
67
  }
62
68
  },
63
69
  emits: ['update:modelValue', 'input', 'keydown', 'keyup', 'focus', 'blur', 'apply', 'reset'],
@@ -92,6 +98,12 @@ var script = defineComponent({
92
98
  function onFocus() {
93
99
  activated.value = true;
94
100
  }
101
+ function onTextClick() {
102
+ if (!activated.value) {
103
+ activated.value = true;
104
+ }
105
+ nextTick(() => focus());
106
+ }
95
107
  function onBlur() {
96
108
  if (props.saveOnBlur) {
97
109
  apply();
@@ -134,6 +146,7 @@ var script = defineComponent({
134
146
  maxLength,
135
147
  onFocus,
136
148
  onBlur,
149
+ onTextClick,
137
150
  apply,
138
151
  reset,
139
152
  focus,
@@ -142,7 +155,7 @@ var script = defineComponent({
142
155
  }
143
156
  });
144
157
 
145
- var css_248z = "input[data-v-f607fecc]{min-width:0;background:0 0;outline:0}input[type=number][data-v-f607fecc]::-webkit-inner-spin-button{display:none}input[type=search][data-v-f607fecc]::-webkit-search-cancel-button{display:none}";
158
+ var css_248z = "input[data-v-47b48fa6]{min-width:0;background:0 0;outline:0}input[type=number][data-v-47b48fa6]::-webkit-inner-spin-button{display:none}input[type=search][data-v-47b48fa6]::-webkit-search-cancel-button{display:none}";
146
159
  styleInject(css_248z);
147
160
 
148
161
  /* script */
@@ -163,7 +176,7 @@ var __vue_render__ = function () {
163
176
  "invalid": !!_vm.error,
164
177
  "activated": _vm.activated
165
178
  }
166
- }, [_c('input', _vm._b({
179
+ }, [_vm.activated || !_vm.draft ? _c('input', _vm._b({
167
180
  directives: [{
168
181
  name: "model",
169
182
  rawName: "v-model.trim",
@@ -209,7 +222,16 @@ var __vue_render__ = function () {
209
222
  return _vm.$forceUpdate();
210
223
  }]
211
224
  }
212
- }, 'input', _vm.attributes, false))]), _vm._v(" "), _vm.activated && !_vm.saveOnBlur ? [_c('div', {
225
+ }, 'input', _vm.attributes, false)) : _c('OrText', {
226
+ class: _vm.controlStyles,
227
+ attrs: {
228
+ "text": _vm.draft.toString(),
229
+ "slice-index": _vm.sliceIndex
230
+ },
231
+ on: {
232
+ "click": _vm.onTextClick
233
+ }
234
+ })], 1), _vm._v(" "), _vm.activated && !_vm.saveOnBlur ? [_c('div', {
213
235
  class: _vm.actionStyles
214
236
  }, [_c('OrIconButton', {
215
237
  attrs: {
@@ -270,7 +292,7 @@ var __vue_staticRenderFns__ = [];
270
292
  /* style */
271
293
  const __vue_inject_styles__ = undefined;
272
294
  /* scoped */
273
- const __vue_scope_id__ = "data-v-f607fecc";
295
+ const __vue_scope_id__ = "data-v-47b48fa6";
274
296
  /* module identifier */
275
297
  const __vue_module_identifier__ = undefined;
276
298
  /* functional template */
@@ -1,2 +1,2 @@
1
- export { _ as default } from '../../OrInlineInput-ceaf40fa.js';
1
+ export { _ as default } from '../../OrInlineInput-c43aa80f.js';
2
2
  import '../../normalize-component-6e8e3d80.js';
@@ -30,6 +30,10 @@ declare const _default: import("vue-demi").DefineComponent<{
30
30
  type: BooleanConstructor;
31
31
  default: boolean;
32
32
  };
33
+ sliceIndex: {
34
+ type: NumberConstructor;
35
+ default: number;
36
+ };
33
37
  }, {
34
38
  attributes: {
35
39
  required: boolean | undefined;
@@ -56,6 +60,7 @@ declare const _default: import("vue-demi").DefineComponent<{
56
60
  maxLength: import("vue-demi").ComputedRef<number | undefined>;
57
61
  onFocus: () => void;
58
62
  onBlur: () => void;
63
+ onTextClick: () => void;
59
64
  apply: () => void;
60
65
  reset: () => void;
61
66
  focus: () => void;
@@ -89,6 +94,10 @@ declare const _default: import("vue-demi").DefineComponent<{
89
94
  type: BooleanConstructor;
90
95
  default: boolean;
91
96
  };
97
+ sliceIndex: {
98
+ type: NumberConstructor;
99
+ default: number;
100
+ };
92
101
  }>> & {
93
102
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
94
103
  onInput?: ((...args: any[]) => any) | undefined;
@@ -106,5 +115,6 @@ declare const _default: import("vue-demi").DefineComponent<{
106
115
  hint: string;
107
116
  error: string | boolean;
108
117
  saveOnBlur: boolean;
118
+ sliceIndex: number;
109
119
  }>;
110
120
  export default _default;
@@ -1 +1 @@
1
- export { I as InlineInputType, _ as OrInlineInputV3 } from '../../OrInlineInput-ceaf40fa.js';
1
+ export { I as InlineInputType, _ as OrInlineInputV3 } from '../../OrInlineInput-c43aa80f.js';
@@ -29,8 +29,11 @@ var script = defineComponent({
29
29
  default: 0
30
30
  }
31
31
  },
32
+ emits: ['focus', 'click'],
32
33
  expose: ['root'],
33
- setup(props) {
34
+ setup(props, {
35
+ emit
36
+ }) {
34
37
  // Refs
35
38
  const root = ref();
36
39
  // Styles
@@ -65,13 +68,22 @@ var script = defineComponent({
65
68
  }
66
69
  return restPart;
67
70
  });
71
+ // Methods
72
+ function onFocus(event) {
73
+ emit('focus', event);
74
+ }
75
+ function onClick(event) {
76
+ emit('click', event);
77
+ }
68
78
  return {
69
79
  root,
70
80
  rootStyles,
71
81
  mainTextStyles,
72
82
  restTextStyles,
73
83
  mainText,
74
- restText
84
+ restText,
85
+ onFocus,
86
+ onClick
75
87
  };
76
88
  }
77
89
  });
@@ -86,7 +98,11 @@ var __vue_render__ = function () {
86
98
  var _c = _vm._self._c || _h;
87
99
  return _c('div', {
88
100
  ref: 'root',
89
- class: _vm.rootStyles
101
+ class: _vm.rootStyles,
102
+ on: {
103
+ "focus": _vm.onFocus,
104
+ "click": _vm.onClick
105
+ }
90
106
  }, [_c('div', {
91
107
  class: _vm.mainTextStyles
92
108
  }, [_vm._v("\n " + _vm._s(_vm.mainText) + "\n ")]), _vm._v(" "), _c('div', {
@@ -29,7 +29,9 @@ declare const _default: import("vue-demi").DefineComponent<{
29
29
  restTextStyles: import("vue-demi").ComputedRef<string[]>;
30
30
  mainText: import("vue-demi").ComputedRef<string>;
31
31
  restText: import("vue-demi").ComputedRef<string>;
32
- }, unknown, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, {}, string, import("vue-demi").VNodeProps & import("vue-demi").AllowedComponentProps & import("vue-demi").ComponentCustomProps, Readonly<import("vue-demi").ExtractPropTypes<{
32
+ onFocus: (event: MouseEvent) => void;
33
+ onClick: (event: MouseEvent) => void;
34
+ }, unknown, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, ("focus" | "click")[], "focus" | "click", import("vue-demi").VNodeProps & import("vue-demi").AllowedComponentProps & import("vue-demi").ComponentCustomProps, Readonly<import("vue-demi").ExtractPropTypes<{
33
35
  /**
34
36
  * Text to crop.
35
37
  */
@@ -48,7 +50,10 @@ declare const _default: import("vue-demi").DefineComponent<{
48
50
  type: NumberConstructor;
49
51
  default: number;
50
52
  };
51
- }>>, {
53
+ }>> & {
54
+ onFocus?: ((...args: any[]) => any) | undefined;
55
+ onClick?: ((...args: any[]) => any) | undefined;
56
+ }, {
52
57
  sliceIndex: number;
53
58
  }>;
54
59
  export default _default;
@@ -94,7 +94,7 @@ export { default as OrIconV3 } from './OrIconV3/OrIcon.js';
94
94
  export { IconSize, IconVariant } from './OrIconV3/props.js';
95
95
  export { default as OrInlineInputBoxV3 } from './OrInlineInputBoxV3/OrInlineInputBox.js';
96
96
  export { InlineInputBoxSize } from './OrInlineInputBoxV3/props.js';
97
- export { I as InlineInputType, _ as OrInlineInputV3 } from '../OrInlineInput-ceaf40fa.js';
97
+ export { I as InlineInputType, _ as OrInlineInputV3 } from '../OrInlineInput-c43aa80f.js';
98
98
  export { default as OrInlineTextEdit } from './OrInlineTextEdit/OrInlineTextEdit.js';
99
99
  export { InlineTextEditTrimmingTypes, InlineTextEditTypes } from './OrInlineTextEdit/constants.js';
100
100
  export { default as OrInlineTextareaV3 } from './OrInlineTextareaV3/OrInlineTextarea.js';
@@ -32,7 +32,7 @@ export { default as OrEmptyStateV3 } from './components/OrEmptyStateV3/OrEmptySt
32
32
  export { default as OrErrorTagV3 } from './components/OrErrorTagV3/OrErrorTag.js';
33
33
  export { default as OrFabV3 } from './components/OrFabV3/OrFab.js';
34
34
  export { default as OrFilterV3 } from './components/OrFilterV3/OrFilter.js';
35
- export { I as InlineInputType, _ as OrInlineInputV3 } from './OrInlineInput-ceaf40fa.js';
35
+ export { I as InlineInputType, _ as OrInlineInputV3 } from './OrInlineInput-c43aa80f.js';
36
36
  export { default as OrInlineTextEdit } from './components/OrInlineTextEdit/OrInlineTextEdit.js';
37
37
  export { default as OrInlineTextareaV3 } from './components/OrInlineTextareaV3/OrInlineTextarea.js';
38
38
  export { default as OrLinkV3 } from './components/OrLinkV3/OrLink.js';
@@ -71,7 +71,6 @@ export { default as OrTab } from './components/OrTab/OrTab.js';
71
71
  export { default as OrTabs } from './components/OrTabs/OrTabs.js';
72
72
  export { default as OrTabsV3 } from './components/OrTabsV3/OrTabs.js';
73
73
  export { default as OrTag } from './components/OrTag/OrTag.js';
74
- export { default as OrTextV3 } from './components/OrTextV3/OrText.js';
75
74
  export { default as OrTextarea } from './components/OrTextarea/OrTextarea.js';
76
75
  export { default as OrTextareaV3 } from './components/OrTextareaV3/OrTextarea.js';
77
76
  export { default as OrTextbox } from './components/OrTextbox/OrTextbox.js';
@@ -203,6 +202,7 @@ export { default as OrTagsV3 } from './components/OrTagsV3/OrTags.js';
203
202
  export { TagsOverflow } from './components/OrTagsV3/props.js';
204
203
  export { default as OrTeleport } from './components/OrTeleport/OrTeleport.js';
205
204
  export { default as OrTeleportV3 } from './components/OrTeleportV3/OrTeleport.js';
205
+ export { default as OrTextV3 } from './components/OrTextV3/OrText.js';
206
206
  export { TextboxTypes } from './components/OrTextbox/constants.js';
207
207
  export { default as OrToast } from './components/OrToast/OrToast.js';
208
208
  export { default as useQueue } from './components/OrToast/composable/useQueue.js';
@@ -1 +1 @@
1
- export { s as default } from '../OrInlineInputV3-51563d74.js';
1
+ export { s as default } from '../OrInlineInputV3-31f5a991.js';
@@ -30,6 +30,10 @@ declare const _default: import("vue-demi").DefineComponent<{
30
30
  type: BooleanConstructor;
31
31
  default: boolean;
32
32
  };
33
+ sliceIndex: {
34
+ type: NumberConstructor;
35
+ default: number;
36
+ };
33
37
  }, {
34
38
  attributes: {
35
39
  required: boolean | undefined;
@@ -56,6 +60,7 @@ declare const _default: import("vue-demi").DefineComponent<{
56
60
  maxLength: import("vue-demi").ComputedRef<number | undefined>;
57
61
  onFocus: () => void;
58
62
  onBlur: () => void;
63
+ onTextClick: () => void;
59
64
  apply: () => void;
60
65
  reset: () => void;
61
66
  focus: () => void;
@@ -89,6 +94,10 @@ declare const _default: import("vue-demi").DefineComponent<{
89
94
  type: BooleanConstructor;
90
95
  default: boolean;
91
96
  };
97
+ sliceIndex: {
98
+ type: NumberConstructor;
99
+ default: number;
100
+ };
92
101
  }>> & {
93
102
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
94
103
  onInput?: ((...args: any[]) => any) | undefined;
@@ -106,5 +115,6 @@ declare const _default: import("vue-demi").DefineComponent<{
106
115
  hint: string;
107
116
  error: string | boolean;
108
117
  saveOnBlur: boolean;
118
+ sliceIndex: number;
109
119
  }>;
110
120
  export default _default;
@@ -1 +1 @@
1
- export { I as InlineInputType, s as OrInlineInputV3 } from '../OrInlineInputV3-51563d74.js';
1
+ export { I as InlineInputType, s as OrInlineInputV3 } from '../OrInlineInputV3-31f5a991.js';
@@ -1,2 +1,2 @@
1
1
  import '../OrInlineInputBoxV3-71cfa047.js';
2
- export { a as InlineInput, c as InlineInputAction, d as InlineInputActionSizes, b as InlineInputControl } from '../OrInlineInputV3-51563d74.js';
2
+ export { a as InlineInput, c as InlineInputAction, d as InlineInputActionSizes, b as InlineInputControl } from '../OrInlineInputV3-31f5a991.js';
@@ -1,10 +1,11 @@
1
- import { resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, createVNode, withCtx, withDirectives, mergeProps, vModelDynamic, withModifiers, createCommentVNode, createBlock, createSlots, renderSlot, createTextVNode, toDisplayString, vShow } from 'vue';
1
+ import { resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, createVNode, withCtx, withDirectives, mergeProps, vModelDynamic, createBlock, withModifiers, createCommentVNode, createSlots, renderSlot, createTextVNode, toDisplayString, vShow } from 'vue';
2
2
  import { s as styleInject } from './OrAvatar-640daf7d.js';
3
3
  import { defineComponent, reactive, ref, computed, toRef, watch, nextTick } from 'vue-demi';
4
- import { I as InlineInputBoxSize, s as script$4 } from './OrInlineInputBoxV3-71cfa047.js';
4
+ import { I as InlineInputBoxSize, s as script$5 } from './OrInlineInputBoxV3-71cfa047.js';
5
5
  import { s as script$1 } from './OrErrorV3-b04d76aa.js';
6
- import { s as script$2 } from './OrHintV3-c8ac5975.js';
7
- import { s as script$3 } from './OrIconButtonV3-8792db31.js';
6
+ import { s as script$2 } from './OrTextV3-ca17d46d.js';
7
+ import { s as script$3 } from './OrHintV3-c8ac5975.js';
8
+ import { s as script$4 } from './OrIconButtonV3-8792db31.js';
8
9
  import { useIdAttribute } from '../hooks/useIdAttribute.js';
9
10
  import { useControlAttributes } from '../hooks/useControlAttributes.js';
10
11
  import { useValidationAttributes } from '../hooks/useValidationAttributes.js';
@@ -51,9 +52,10 @@ var script = defineComponent({
51
52
  name: 'OrInlineInput',
52
53
  components: {
53
54
  OrError: script$1,
54
- OrHint: script$2,
55
- OrIconButton: script$3,
56
- OrInlineInputBox: script$4
55
+ OrText: script$2,
56
+ OrHint: script$3,
57
+ OrIconButton: script$4,
58
+ OrInlineInputBox: script$5
57
59
  },
58
60
  model: {
59
61
  prop: 'modelValue',
@@ -87,6 +89,10 @@ var script = defineComponent({
87
89
  saveOnBlur: {
88
90
  type: Boolean,
89
91
  default: false
92
+ },
93
+ sliceIndex: {
94
+ type: Number,
95
+ default: 0
90
96
  }
91
97
  },
92
98
  emits: ['update:modelValue', 'input', 'keydown', 'keyup', 'focus', 'blur', 'apply', 'reset'],
@@ -121,6 +127,12 @@ var script = defineComponent({
121
127
  function onFocus() {
122
128
  activated.value = true;
123
129
  }
130
+ function onTextClick() {
131
+ if (!activated.value) {
132
+ activated.value = true;
133
+ }
134
+ nextTick(() => focus());
135
+ }
124
136
  function onBlur() {
125
137
  if (props.saveOnBlur) {
126
138
  apply();
@@ -163,6 +175,7 @@ var script = defineComponent({
163
175
  maxLength,
164
176
  onFocus,
165
177
  onBlur,
178
+ onTextClick,
166
179
  apply,
167
180
  reset,
168
181
  focus,
@@ -176,6 +189,7 @@ const _hoisted_1 = {
176
189
  };
177
190
  const _hoisted_2 = ["type", "placeholder", "activated"];
178
191
  function render(_ctx, _cache, $props, $setup, $data, $options) {
192
+ const _component_OrText = resolveComponent("OrText");
179
193
  const _component_OrInlineInputBox = resolveComponent("OrInlineInputBox");
180
194
  const _component_OrIconButton = resolveComponent("OrIconButton");
181
195
  const _component_OrHint = resolveComponent("OrHint");
@@ -188,7 +202,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
188
202
  invalid: !!_ctx.error,
189
203
  activated: _ctx.activated
190
204
  }, {
191
- default: withCtx(() => [withDirectives(createElementVNode("input", mergeProps({
205
+ default: withCtx(() => [_ctx.activated || !_ctx.draft ? withDirectives((openBlock(), createElementBlock("input", mergeProps({
206
+ key: 0,
192
207
  ref: 'control'
193
208
  }, _ctx.attributes, {
194
209
  "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => _ctx.draft = $event),
@@ -207,9 +222,15 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
207
222
  _ctx.$emit('blur', $event);
208
223
  _ctx.onBlur();
209
224
  })
210
- }), null, 16 /* FULL_PROPS */, _hoisted_2), [[vModelDynamic, _ctx.draft, void 0, {
225
+ }), null, 16 /* FULL_PROPS */, _hoisted_2)), [[vModelDynamic, _ctx.draft, void 0, {
211
226
  trim: true
212
- }]])]),
227
+ }]]) : (openBlock(), createBlock(_component_OrText, {
228
+ key: 1,
229
+ text: _ctx.draft.toString(),
230
+ "slice-index": _ctx.sliceIndex,
231
+ class: normalizeClass(_ctx.controlStyles),
232
+ onClick: _ctx.onTextClick
233
+ }, null, 8 /* PROPS */, ["text", "slice-index", "class", "onClick"]))]),
213
234
  _: 1 /* STABLE */
214
235
  }, 8 /* PROPS */, ["size", "invalid", "activated"]), _ctx.activated && !_ctx.saveOnBlur ? (openBlock(), createElementBlock("div", {
215
236
  key: 0,
@@ -1 +1 @@
1
- export { s as default } from '../OrTextV3-f2e88ff5.js';
1
+ export { s as default } from '../OrTextV3-ca17d46d.js';
@@ -29,7 +29,9 @@ declare const _default: import("vue-demi").DefineComponent<{
29
29
  restTextStyles: import("vue-demi").ComputedRef<string[]>;
30
30
  mainText: import("vue-demi").ComputedRef<string>;
31
31
  restText: import("vue-demi").ComputedRef<string>;
32
- }, unknown, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, {}, string, import("vue-demi").VNodeProps & import("vue-demi").AllowedComponentProps & import("vue-demi").ComponentCustomProps, Readonly<import("vue-demi").ExtractPropTypes<{
32
+ onFocus: (event: MouseEvent) => void;
33
+ onClick: (event: MouseEvent) => void;
34
+ }, unknown, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, ("focus" | "click")[], "focus" | "click", import("vue-demi").VNodeProps & import("vue-demi").AllowedComponentProps & import("vue-demi").ComponentCustomProps, Readonly<import("vue-demi").ExtractPropTypes<{
33
35
  /**
34
36
  * Text to crop.
35
37
  */
@@ -48,7 +50,10 @@ declare const _default: import("vue-demi").DefineComponent<{
48
50
  type: NumberConstructor;
49
51
  default: number;
50
52
  };
51
- }>>, {
53
+ }>> & {
54
+ onFocus?: ((...args: any[]) => any) | undefined;
55
+ onClick?: ((...args: any[]) => any) | undefined;
56
+ }, {
52
57
  sliceIndex: number;
53
58
  }>;
54
59
  export default _default;
@@ -1 +1 @@
1
- export { s as OrTextV3 } from '../OrTextV3-f2e88ff5.js';
1
+ export { s as OrTextV3 } from '../OrTextV3-ca17d46d.js';
@@ -1 +1 @@
1
- export { M as MainText, R as RestText, T as TextRoot } from '../OrTextV3-f2e88ff5.js';
1
+ export { M as MainText, R as RestText, T as TextRoot } from '../OrTextV3-ca17d46d.js';
@@ -44,8 +44,11 @@ var script = defineComponent({
44
44
  default: 0
45
45
  }
46
46
  },
47
+ emits: ['focus', 'click'],
47
48
  expose: ['root'],
48
- setup(props) {
49
+ setup(props, {
50
+ emit
51
+ }) {
49
52
  // Refs
50
53
  const root = ref();
51
54
  // Styles
@@ -80,13 +83,22 @@ var script = defineComponent({
80
83
  }
81
84
  return restPart;
82
85
  });
86
+ // Methods
87
+ function onFocus(event) {
88
+ emit('focus', event);
89
+ }
90
+ function onClick(event) {
91
+ emit('click', event);
92
+ }
83
93
  return {
84
94
  root,
85
95
  rootStyles,
86
96
  mainTextStyles,
87
97
  restTextStyles,
88
98
  mainText,
89
- restText
99
+ restText,
100
+ onFocus,
101
+ onClick
90
102
  };
91
103
  }
92
104
  });
@@ -94,12 +106,14 @@ var script = defineComponent({
94
106
  function render(_ctx, _cache, $props, $setup, $data, $options) {
95
107
  return openBlock(), createElementBlock("div", {
96
108
  ref: 'root',
97
- class: normalizeClass(_ctx.rootStyles)
109
+ class: normalizeClass(_ctx.rootStyles),
110
+ onFocus: _cache[0] || (_cache[0] = (...args) => _ctx.onFocus && _ctx.onFocus(...args)),
111
+ onClick: _cache[1] || (_cache[1] = (...args) => _ctx.onClick && _ctx.onClick(...args))
98
112
  }, [createElementVNode("div", {
99
113
  class: normalizeClass(_ctx.mainTextStyles)
100
114
  }, toDisplayString(_ctx.mainText), 3 /* TEXT, CLASS */), createElementVNode("div", {
101
115
  class: normalizeClass(_ctx.restTextStyles)
102
- }, toDisplayString(_ctx.restText), 3 /* TEXT, CLASS */)], 2 /* CLASS */);
116
+ }, toDisplayString(_ctx.restText), 3 /* TEXT, CLASS */)], 34 /* CLASS, NEED_HYDRATION */);
103
117
  }
104
118
 
105
119
  script.render = render;
@@ -51,7 +51,7 @@ export { OrIcon, OrIconColors, OrIconType } from './OrIcon/index.js';
51
51
  export { I as IconButtonColor, s as OrIconButtonV3 } from './OrIconButtonV3-8792db31.js';
52
52
  export { I as IconSize, a as IconVariant, s as OrIconV3 } from './OrIconV3-b5c97ea7.js';
53
53
  export { I as InlineInputBoxSize, s as OrInlineInputBoxV3 } from './OrInlineInputBoxV3-71cfa047.js';
54
- export { I as InlineInputType, s as OrInlineInputV3 } from './OrInlineInputV3-51563d74.js';
54
+ export { I as InlineInputType, s as OrInlineInputV3 } from './OrInlineInputV3-31f5a991.js';
55
55
  export { InlineTextEditTrimmingTypes, InlineTextEditTypes, OrInlineTextEdit } from './OrInlineTextEdit/index.js';
56
56
  export { s as OrInlineTextareaV3 } from './OrInlineTextareaV3-f1c61121.js';
57
57
  export { default as OrInput } from './OrInput/OrInput.js';
@@ -116,7 +116,7 @@ export { s as OrTagV3, T as TagColor, a as TagVariant } from './OrTagV3-abe42237
116
116
  export { s as OrTagsV3, T as TagsOverflow } from './OrTagsV3-979aa458.js';
117
117
  export { s as OrTeleport } from './OrTeleport-5a34b07f.js';
118
118
  export { default as OrTeleportV3 } from './OrTeleportV3/OrTeleport.js';
119
- export { s as OrTextV3 } from './OrTextV3-f2e88ff5.js';
119
+ export { s as OrTextV3 } from './OrTextV3-ca17d46d.js';
120
120
  export { default as OrTextarea } from './OrTextarea/OrTextarea.js';
121
121
  export { s as OrTextareaV3 } from './OrTextareaV3-d145ef2d.js';
122
122
  export { OrTextbox, TextboxTypes } from './OrTextbox/index.js';
@@ -28,7 +28,7 @@ export { E as EmptyStateSize, s as OrEmptyStateV3 } from './components/OrEmptySt
28
28
  export { s as OrErrorTagV3 } from './components/OrErrorTagV3-1b00b9d5.js';
29
29
  export { F as FabColor, s as OrFabV3 } from './components/OrFabV3-86cf1da1.js';
30
30
  export { s as OrFilterV3 } from './components/OrFilterV3-34e6b845.js';
31
- export { I as InlineInputType, s as OrInlineInputV3 } from './components/OrInlineInputV3-51563d74.js';
31
+ export { I as InlineInputType, s as OrInlineInputV3 } from './components/OrInlineInputV3-31f5a991.js';
32
32
  export { InlineTextEditTrimmingTypes, InlineTextEditTypes, OrInlineTextEdit } from './components/OrInlineTextEdit/index.js';
33
33
  export { s as OrInlineTextareaV3 } from './components/OrInlineTextareaV3-f1c61121.js';
34
34
  export { L as LinkColor, s as OrLinkV3 } from './components/OrLinkV3-56763fd9.js';
@@ -61,7 +61,6 @@ export { default as OrTab } from './components/OrTab/OrTab.js';
61
61
  export { default as OrTabs } from './components/OrTabs/OrTabs.js';
62
62
  export { s as OrTabsV3, T as TabsVariant } from './components/OrTabsV3-b7ff2cef.js';
63
63
  export { default as OrTag } from './components/OrTag/OrTag.js';
64
- export { s as OrTextV3 } from './components/OrTextV3-f2e88ff5.js';
65
64
  export { default as OrTextarea } from './components/OrTextarea/OrTextarea.js';
66
65
  export { s as OrTextareaV3 } from './components/OrTextareaV3-d145ef2d.js';
67
66
  export { OrTextbox, TextboxTypes } from './components/OrTextbox/index.js';
@@ -126,6 +125,7 @@ export { s as OrTagV3, T as TagColor, a as TagVariant } from './components/OrTag
126
125
  export { s as OrTagsV3, T as TagsOverflow } from './components/OrTagsV3-979aa458.js';
127
126
  export { s as OrTeleport } from './components/OrTeleport-5a34b07f.js';
128
127
  export { default as OrTeleportV3 } from './components/OrTeleportV3/OrTeleport.js';
128
+ export { s as OrTextV3 } from './components/OrTextV3-ca17d46d.js';
129
129
  export { s as OrTimePickerV3 } from './components/OrTimePickerV3-90b57473.js';
130
130
  export { OrTooltip, OrTooltipContent } from './components/OrTooltip/index.js';
131
131
  export { s as OrTooltipV3 } from './components/OrTooltipV3-39318e8a.js';
@@ -8,9 +8,10 @@ import '@onereach/styles/screens.json';
8
8
  import '@onereach/styles/tailwind.config.json';
9
9
  import { u as useValidationAttributes } from './useValidationAttributes-257954f3.js';
10
10
  import { _ as __vue_component__$1 } from './OrError-b25d782d.js';
11
- import { _ as __vue_component__$2 } from './OrHint-2fe1157b.js';
12
- import { _ as __vue_component__$3 } from './OrIconButton-786f390f.js';
13
- import { I as InlineInputBoxSize, _ as __vue_component__$4 } from './OrInlineInputBox-5d5ae227.js';
11
+ import { _ as __vue_component__$3 } from './OrHint-2fe1157b.js';
12
+ import { _ as __vue_component__$4 } from './OrIconButton-786f390f.js';
13
+ import { I as InlineInputBoxSize, _ as __vue_component__$5 } from './OrInlineInputBox-5d5ae227.js';
14
+ import { _ as __vue_component__$2 } from './OrText-4dc3abff.js';
14
15
  import { s as styleInject } from './style-inject.es-4c6f2515.js';
15
16
  import { n as normalizeComponent } from './normalize-component-6e8e3d80.js';
16
17
 
@@ -55,9 +56,10 @@ var script = defineComponent({
55
56
  name: 'OrInlineInput',
56
57
  components: {
57
58
  OrError: __vue_component__$1,
58
- OrHint: __vue_component__$2,
59
- OrIconButton: __vue_component__$3,
60
- OrInlineInputBox: __vue_component__$4
59
+ OrText: __vue_component__$2,
60
+ OrHint: __vue_component__$3,
61
+ OrIconButton: __vue_component__$4,
62
+ OrInlineInputBox: __vue_component__$5
61
63
  },
62
64
  model: {
63
65
  prop: 'modelValue',
@@ -91,6 +93,10 @@ var script = defineComponent({
91
93
  saveOnBlur: {
92
94
  type: Boolean,
93
95
  default: false
96
+ },
97
+ sliceIndex: {
98
+ type: Number,
99
+ default: 0
94
100
  }
95
101
  },
96
102
  emits: ['update:modelValue', 'input', 'keydown', 'keyup', 'focus', 'blur', 'apply', 'reset'],
@@ -125,6 +131,12 @@ var script = defineComponent({
125
131
  function onFocus() {
126
132
  activated.value = true;
127
133
  }
134
+ function onTextClick() {
135
+ if (!activated.value) {
136
+ activated.value = true;
137
+ }
138
+ nextTick(() => focus());
139
+ }
128
140
  function onBlur() {
129
141
  if (props.saveOnBlur) {
130
142
  apply();
@@ -167,6 +179,7 @@ var script = defineComponent({
167
179
  maxLength,
168
180
  onFocus,
169
181
  onBlur,
182
+ onTextClick,
170
183
  apply,
171
184
  reset,
172
185
  focus,
@@ -175,7 +188,7 @@ var script = defineComponent({
175
188
  }
176
189
  });
177
190
 
178
- var css_248z = "input[data-v-f607fecc]{min-width:0;background:0 0;outline:0}input[type=number][data-v-f607fecc]::-webkit-inner-spin-button{display:none}input[type=search][data-v-f607fecc]::-webkit-search-cancel-button{display:none}";
191
+ var css_248z = "input[data-v-47b48fa6]{min-width:0;background:0 0;outline:0}input[type=number][data-v-47b48fa6]::-webkit-inner-spin-button{display:none}input[type=search][data-v-47b48fa6]::-webkit-search-cancel-button{display:none}";
179
192
  styleInject(css_248z);
180
193
 
181
194
  /* script */
@@ -196,7 +209,7 @@ var __vue_render__ = function () {
196
209
  "invalid": !!_vm.error,
197
210
  "activated": _vm.activated
198
211
  }
199
- }, [_c('input', _vm._b({
212
+ }, [_vm.activated || !_vm.draft ? _c('input', _vm._b({
200
213
  directives: [{
201
214
  name: "model",
202
215
  rawName: "v-model.trim",
@@ -242,7 +255,16 @@ var __vue_render__ = function () {
242
255
  return _vm.$forceUpdate();
243
256
  }]
244
257
  }
245
- }, 'input', _vm.attributes, false))]), _vm._v(" "), _vm.activated && !_vm.saveOnBlur ? [_c('div', {
258
+ }, 'input', _vm.attributes, false)) : _c('OrText', {
259
+ class: _vm.controlStyles,
260
+ attrs: {
261
+ "text": _vm.draft.toString(),
262
+ "slice-index": _vm.sliceIndex
263
+ },
264
+ on: {
265
+ "click": _vm.onTextClick
266
+ }
267
+ })], 1), _vm._v(" "), _vm.activated && !_vm.saveOnBlur ? [_c('div', {
246
268
  class: _vm.actionStyles
247
269
  }, [_c('OrIconButton', {
248
270
  attrs: {
@@ -303,7 +325,7 @@ var __vue_staticRenderFns__ = [];
303
325
  /* style */
304
326
  const __vue_inject_styles__ = undefined;
305
327
  /* scoped */
306
- const __vue_scope_id__ = "data-v-f607fecc";
328
+ const __vue_scope_id__ = "data-v-47b48fa6";
307
329
  /* module identifier */
308
330
  const __vue_module_identifier__ = undefined;
309
331
  /* functional template */
@@ -44,8 +44,11 @@ var script = defineComponent({
44
44
  default: 0
45
45
  }
46
46
  },
47
+ emits: ['focus', 'click'],
47
48
  expose: ['root'],
48
- setup(props) {
49
+ setup(props, {
50
+ emit
51
+ }) {
49
52
  // Refs
50
53
  const root = ref();
51
54
  // Styles
@@ -80,13 +83,22 @@ var script = defineComponent({
80
83
  }
81
84
  return restPart;
82
85
  });
86
+ // Methods
87
+ function onFocus(event) {
88
+ emit('focus', event);
89
+ }
90
+ function onClick(event) {
91
+ emit('click', event);
92
+ }
83
93
  return {
84
94
  root,
85
95
  rootStyles,
86
96
  mainTextStyles,
87
97
  restTextStyles,
88
98
  mainText,
89
- restText
99
+ restText,
100
+ onFocus,
101
+ onClick
90
102
  };
91
103
  }
92
104
  });
@@ -101,7 +113,11 @@ var __vue_render__ = function () {
101
113
  var _c = _vm._self._c || _h;
102
114
  return _c('div', {
103
115
  ref: 'root',
104
- class: _vm.rootStyles
116
+ class: _vm.rootStyles,
117
+ on: {
118
+ "focus": _vm.onFocus,
119
+ "click": _vm.onClick
120
+ }
105
121
  }, [_c('div', {
106
122
  class: _vm.mainTextStyles
107
123
  }, [_vm._v("\n " + _vm._s(_vm.mainText) + "\n ")]), _vm._v(" "), _c('div', {
@@ -67,7 +67,7 @@ export { _ as OrIcon, O as OrIconColors, a as OrIconType } from '../OrIcon-9ca8a
67
67
  export { I as IconButtonColor, _ as OrIconButtonV3 } from '../OrIconButton-786f390f.js';
68
68
  export { a as IconSize, I as IconVariant, _ as OrIconV3 } from '../OrIcon-0a14dafc.js';
69
69
  export { I as InlineInputBoxSize, _ as OrInlineInputBoxV3 } from '../OrInlineInputBox-5d5ae227.js';
70
- export { I as InlineInputType, _ as OrInlineInputV3 } from '../OrInlineInput-44ac1903.js';
70
+ export { I as InlineInputType, _ as OrInlineInputV3 } from '../OrInlineInput-36e8dbba.js';
71
71
  export { a as InlineTextEditTrimmingTypes, I as InlineTextEditTypes, _ as OrInlineTextEdit } from '../OrInlineTextEdit-39be2a6b.js';
72
72
  export { _ as OrInlineTextareaV3 } from '../OrInlineTextarea-b5a2d058.js';
73
73
  export { _ as OrInput } from '../OrInput-3999ffd3.js';
@@ -141,7 +141,7 @@ export { _ as OrTagV3, a as TagColor, T as TagVariant } from '../OrTag-4f64164e.
141
141
  export { _ as OrTagsV3, T as TagsOverflow } from '../OrTags-4b35fccf.js';
142
142
  export { _ as OrTeleport } from '../OrTeleport.vue2-f0c16c71.js';
143
143
  export { _ as OrTeleportV3 } from '../OrTeleport.vue2-424c7f33.js';
144
- export { _ as OrTextV3 } from '../OrText-cab6adea.js';
144
+ export { _ as OrTextV3 } from '../OrText-4dc3abff.js';
145
145
  export { _ as OrTextarea } from '../OrTextarea-62ad6213.js';
146
146
  export { _ as OrTextareaV3 } from '../OrTextarea-c5cadeb1.js';
147
147
  export { _ as OrTextbox, T as TextboxTypes } from '../OrTextbox-45f6d684.js';
@@ -30,6 +30,10 @@ declare const _default: import("vue-demi").DefineComponent<{
30
30
  type: BooleanConstructor;
31
31
  default: boolean;
32
32
  };
33
+ sliceIndex: {
34
+ type: NumberConstructor;
35
+ default: number;
36
+ };
33
37
  }, {
34
38
  attributes: {
35
39
  required: boolean | undefined;
@@ -56,6 +60,7 @@ declare const _default: import("vue-demi").DefineComponent<{
56
60
  maxLength: import("vue-demi").ComputedRef<number | undefined>;
57
61
  onFocus: () => void;
58
62
  onBlur: () => void;
63
+ onTextClick: () => void;
59
64
  apply: () => void;
60
65
  reset: () => void;
61
66
  focus: () => void;
@@ -89,6 +94,10 @@ declare const _default: import("vue-demi").DefineComponent<{
89
94
  type: BooleanConstructor;
90
95
  default: boolean;
91
96
  };
97
+ sliceIndex: {
98
+ type: NumberConstructor;
99
+ default: number;
100
+ };
92
101
  }>> & {
93
102
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
94
103
  onInput?: ((...args: any[]) => any) | undefined;
@@ -106,5 +115,6 @@ declare const _default: import("vue-demi").DefineComponent<{
106
115
  hint: string;
107
116
  error: string | boolean;
108
117
  saveOnBlur: boolean;
118
+ sliceIndex: number;
109
119
  }>;
110
120
  export default _default;
@@ -1,4 +1,4 @@
1
- export { I as InlineInputType, _ as OrInlineInputV3 } from '../../OrInlineInput-44ac1903.js';
1
+ export { I as InlineInputType, _ as OrInlineInputV3 } from '../../OrInlineInput-36e8dbba.js';
2
2
  import 'vue-demi';
3
3
  import '../../useIdAttribute-3a339b79.js';
4
4
  import '../../TimeFormat-a7f5565b.js';
@@ -30,4 +30,5 @@ import '../../useTheme-dc76b423.js';
30
30
  import '../../isPrevented-b1764210.js';
31
31
  import '../../isAncestor-2973d4f4.js';
32
32
  import '../../OrInlineInputBox-5d5ae227.js';
33
+ import '../../OrText-4dc3abff.js';
33
34
  import '../../style-inject.es-4c6f2515.js';
@@ -29,7 +29,9 @@ declare const _default: import("vue-demi").DefineComponent<{
29
29
  restTextStyles: import("vue-demi").ComputedRef<string[]>;
30
30
  mainText: import("vue-demi").ComputedRef<string>;
31
31
  restText: import("vue-demi").ComputedRef<string>;
32
- }, unknown, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, {}, string, import("vue-demi").VNodeProps & import("vue-demi").AllowedComponentProps & import("vue-demi").ComponentCustomProps, Readonly<import("vue-demi").ExtractPropTypes<{
32
+ onFocus: (event: MouseEvent) => void;
33
+ onClick: (event: MouseEvent) => void;
34
+ }, unknown, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, ("focus" | "click")[], "focus" | "click", import("vue-demi").VNodeProps & import("vue-demi").AllowedComponentProps & import("vue-demi").ComponentCustomProps, Readonly<import("vue-demi").ExtractPropTypes<{
33
35
  /**
34
36
  * Text to crop.
35
37
  */
@@ -48,7 +50,10 @@ declare const _default: import("vue-demi").DefineComponent<{
48
50
  type: NumberConstructor;
49
51
  default: number;
50
52
  };
51
- }>>, {
53
+ }>> & {
54
+ onFocus?: ((...args: any[]) => any) | undefined;
55
+ onClick?: ((...args: any[]) => any) | undefined;
56
+ }, {
52
57
  sliceIndex: number;
53
58
  }>;
54
59
  export default _default;
@@ -1,3 +1,3 @@
1
- export { _ as OrTextV3 } from '../../OrText-cab6adea.js';
1
+ export { _ as OrTextV3 } from '../../OrText-4dc3abff.js';
2
2
  import 'vue-demi';
3
3
  import '../../normalize-component-6e8e3d80.js';
@@ -67,7 +67,7 @@ export { _ as OrIcon, O as OrIconColors, a as OrIconType } from './OrIcon-9ca8a3
67
67
  export { I as IconButtonColor, _ as OrIconButtonV3 } from './OrIconButton-786f390f.js';
68
68
  export { a as IconSize, I as IconVariant, _ as OrIconV3 } from './OrIcon-0a14dafc.js';
69
69
  export { I as InlineInputBoxSize, _ as OrInlineInputBoxV3 } from './OrInlineInputBox-5d5ae227.js';
70
- export { I as InlineInputType, _ as OrInlineInputV3 } from './OrInlineInput-44ac1903.js';
70
+ export { I as InlineInputType, _ as OrInlineInputV3 } from './OrInlineInput-36e8dbba.js';
71
71
  export { a as InlineTextEditTrimmingTypes, I as InlineTextEditTypes, _ as OrInlineTextEdit } from './OrInlineTextEdit-39be2a6b.js';
72
72
  export { _ as OrInlineTextareaV3 } from './OrInlineTextarea-b5a2d058.js';
73
73
  export { _ as OrInput } from './OrInput-3999ffd3.js';
@@ -141,7 +141,7 @@ export { _ as OrTagV3, a as TagColor, T as TagVariant } from './OrTag-4f64164e.j
141
141
  export { _ as OrTagsV3, T as TagsOverflow } from './OrTags-4b35fccf.js';
142
142
  export { _ as OrTeleport } from './OrTeleport.vue2-f0c16c71.js';
143
143
  export { _ as OrTeleportV3 } from './OrTeleport.vue2-424c7f33.js';
144
- export { _ as OrTextV3 } from './OrText-cab6adea.js';
144
+ export { _ as OrTextV3 } from './OrText-4dc3abff.js';
145
145
  export { _ as OrTextarea } from './OrTextarea-62ad6213.js';
146
146
  export { _ as OrTextareaV3 } from './OrTextarea-c5cadeb1.js';
147
147
  export { _ as OrTextbox, T as TextboxTypes } from './OrTextbox-45f6d684.js';
@@ -8,10 +8,11 @@ import '@onereach/styles/screens.json';
8
8
  import '@onereach/styles/tailwind.config.json';
9
9
  import { u as useValidationAttributes } from './useValidationAttributes-257954f3.js';
10
10
  import { s as script$1 } from './OrError-331220bc.js';
11
- import { s as script$2 } from './OrHint-262c8217.js';
12
- import { s as script$3 } from './OrIconButton-7b74089e.js';
13
- import { I as InlineInputBoxSize, s as script$4 } from './OrInlineInputBox-5d0bb348.js';
14
- import { resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, createVNode, withCtx, withDirectives, mergeProps, vModelDynamic, withModifiers, createCommentVNode, createBlock, createSlots, renderSlot, createTextVNode, toDisplayString, vShow } from 'vue';
11
+ import { s as script$3 } from './OrHint-262c8217.js';
12
+ import { s as script$4 } from './OrIconButton-7b74089e.js';
13
+ import { I as InlineInputBoxSize, s as script$5 } from './OrInlineInputBox-5d0bb348.js';
14
+ import { s as script$2 } from './OrText-f1dbba5f.js';
15
+ import { resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, createVNode, withCtx, withDirectives, mergeProps, vModelDynamic, createBlock, withModifiers, createCommentVNode, createSlots, renderSlot, createTextVNode, toDisplayString, vShow } from 'vue';
15
16
  import { s as styleInject } from './style-inject.es-4c6f2515.js';
16
17
 
17
18
  const InlineInput = [
@@ -55,9 +56,10 @@ var script = defineComponent({
55
56
  name: 'OrInlineInput',
56
57
  components: {
57
58
  OrError: script$1,
58
- OrHint: script$2,
59
- OrIconButton: script$3,
60
- OrInlineInputBox: script$4
59
+ OrText: script$2,
60
+ OrHint: script$3,
61
+ OrIconButton: script$4,
62
+ OrInlineInputBox: script$5
61
63
  },
62
64
  model: {
63
65
  prop: 'modelValue',
@@ -91,6 +93,10 @@ var script = defineComponent({
91
93
  saveOnBlur: {
92
94
  type: Boolean,
93
95
  default: false
96
+ },
97
+ sliceIndex: {
98
+ type: Number,
99
+ default: 0
94
100
  }
95
101
  },
96
102
  emits: ['update:modelValue', 'input', 'keydown', 'keyup', 'focus', 'blur', 'apply', 'reset'],
@@ -125,6 +131,12 @@ var script = defineComponent({
125
131
  function onFocus() {
126
132
  activated.value = true;
127
133
  }
134
+ function onTextClick() {
135
+ if (!activated.value) {
136
+ activated.value = true;
137
+ }
138
+ nextTick(() => focus());
139
+ }
128
140
  function onBlur() {
129
141
  if (props.saveOnBlur) {
130
142
  apply();
@@ -167,6 +179,7 @@ var script = defineComponent({
167
179
  maxLength,
168
180
  onFocus,
169
181
  onBlur,
182
+ onTextClick,
170
183
  apply,
171
184
  reset,
172
185
  focus,
@@ -180,6 +193,7 @@ const _hoisted_1 = {
180
193
  };
181
194
  const _hoisted_2 = ["type", "placeholder", "activated"];
182
195
  function render(_ctx, _cache, $props, $setup, $data, $options) {
196
+ const _component_OrText = resolveComponent("OrText");
183
197
  const _component_OrInlineInputBox = resolveComponent("OrInlineInputBox");
184
198
  const _component_OrIconButton = resolveComponent("OrIconButton");
185
199
  const _component_OrHint = resolveComponent("OrHint");
@@ -192,7 +206,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
192
206
  invalid: !!_ctx.error,
193
207
  activated: _ctx.activated
194
208
  }, {
195
- default: withCtx(() => [withDirectives(createElementVNode("input", mergeProps({
209
+ default: withCtx(() => [_ctx.activated || !_ctx.draft ? withDirectives((openBlock(), createElementBlock("input", mergeProps({
210
+ key: 0,
196
211
  ref: 'control'
197
212
  }, _ctx.attributes, {
198
213
  "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => _ctx.draft = $event),
@@ -211,9 +226,15 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
211
226
  _ctx.$emit('blur', $event);
212
227
  _ctx.onBlur();
213
228
  })
214
- }), null, 16 /* FULL_PROPS */, _hoisted_2), [[vModelDynamic, _ctx.draft, void 0, {
229
+ }), null, 16 /* FULL_PROPS */, _hoisted_2)), [[vModelDynamic, _ctx.draft, void 0, {
215
230
  trim: true
216
- }]])]),
231
+ }]]) : (openBlock(), createBlock(_component_OrText, {
232
+ key: 1,
233
+ text: _ctx.draft.toString(),
234
+ "slice-index": _ctx.sliceIndex,
235
+ class: normalizeClass(_ctx.controlStyles),
236
+ onClick: _ctx.onTextClick
237
+ }, null, 8 /* PROPS */, ["text", "slice-index", "class", "onClick"]))]),
217
238
  _: 1 /* STABLE */
218
239
  }, 8 /* PROPS */, ["size", "invalid", "activated"]), _ctx.activated && !_ctx.saveOnBlur ? (openBlock(), createElementBlock("div", {
219
240
  key: 0,
@@ -44,8 +44,11 @@ var script = defineComponent({
44
44
  default: 0
45
45
  }
46
46
  },
47
+ emits: ['focus', 'click'],
47
48
  expose: ['root'],
48
- setup(props) {
49
+ setup(props, {
50
+ emit
51
+ }) {
49
52
  // Refs
50
53
  const root = ref();
51
54
  // Styles
@@ -80,13 +83,22 @@ var script = defineComponent({
80
83
  }
81
84
  return restPart;
82
85
  });
86
+ // Methods
87
+ function onFocus(event) {
88
+ emit('focus', event);
89
+ }
90
+ function onClick(event) {
91
+ emit('click', event);
92
+ }
83
93
  return {
84
94
  root,
85
95
  rootStyles,
86
96
  mainTextStyles,
87
97
  restTextStyles,
88
98
  mainText,
89
- restText
99
+ restText,
100
+ onFocus,
101
+ onClick
90
102
  };
91
103
  }
92
104
  });
@@ -94,12 +106,14 @@ var script = defineComponent({
94
106
  function render(_ctx, _cache, $props, $setup, $data, $options) {
95
107
  return openBlock(), createElementBlock("div", {
96
108
  ref: 'root',
97
- class: normalizeClass(_ctx.rootStyles)
109
+ class: normalizeClass(_ctx.rootStyles),
110
+ onFocus: _cache[0] || (_cache[0] = (...args) => _ctx.onFocus && _ctx.onFocus(...args)),
111
+ onClick: _cache[1] || (_cache[1] = (...args) => _ctx.onClick && _ctx.onClick(...args))
98
112
  }, [createElementVNode("div", {
99
113
  class: normalizeClass(_ctx.mainTextStyles)
100
114
  }, toDisplayString(_ctx.mainText), 3 /* TEXT, CLASS */), createElementVNode("div", {
101
115
  class: normalizeClass(_ctx.restTextStyles)
102
- }, toDisplayString(_ctx.restText), 3 /* TEXT, CLASS */)], 2 /* CLASS */);
116
+ }, toDisplayString(_ctx.restText), 3 /* TEXT, CLASS */)], 34 /* CLASS, NEED_HYDRATION */);
103
117
  }
104
118
 
105
119
  script.render = render;
@@ -65,7 +65,7 @@ export { s as OrIcon, O as OrIconColors, a as OrIconType } from '../OrIcon-22d7a
65
65
  export { I as IconButtonColor, s as OrIconButtonV3 } from '../OrIconButton-7b74089e.js';
66
66
  export { a as IconSize, I as IconVariant, s as OrIconV3 } from '../OrIcon-9aff520e.js';
67
67
  export { I as InlineInputBoxSize, s as OrInlineInputBoxV3 } from '../OrInlineInputBox-5d0bb348.js';
68
- export { I as InlineInputType, s as OrInlineInputV3 } from '../OrInlineInput-e6f41721.js';
68
+ export { I as InlineInputType, s as OrInlineInputV3 } from '../OrInlineInput-89e9f620.js';
69
69
  export { a as InlineTextEditTrimmingTypes, I as InlineTextEditTypes, s as OrInlineTextEdit } from '../OrInlineTextEdit-5c305893.js';
70
70
  export { s as OrInlineTextareaV3 } from '../OrInlineTextarea-9e13d859.js';
71
71
  export { s as OrInput } from '../OrInput-fb39bee1.js';
@@ -137,7 +137,7 @@ export { s as OrTagV3, a as TagColor, T as TagVariant } from '../OrTag-6eea8803.
137
137
  export { s as OrTagsV3, T as TagsOverflow } from '../OrTags-660ca32e.js';
138
138
  export { s as OrTeleport } from '../OrTeleport.vue3-9bce0c02.js';
139
139
  export { s as OrTeleportV3 } from '../OrTeleport.vue3-8099178c.js';
140
- export { s as OrTextV3 } from '../OrText-ea114c19.js';
140
+ export { s as OrTextV3 } from '../OrText-f1dbba5f.js';
141
141
  export { s as OrTextarea } from '../OrTextarea-b16e1a72.js';
142
142
  export { s as OrTextareaV3 } from '../OrTextarea-f5f71e8a.js';
143
143
  export { s as OrTextbox, T as TextboxTypes } from '../OrTextbox-20cc3bac.js';
@@ -30,6 +30,10 @@ declare const _default: import("vue-demi").DefineComponent<{
30
30
  type: BooleanConstructor;
31
31
  default: boolean;
32
32
  };
33
+ sliceIndex: {
34
+ type: NumberConstructor;
35
+ default: number;
36
+ };
33
37
  }, {
34
38
  attributes: {
35
39
  required: boolean | undefined;
@@ -56,6 +60,7 @@ declare const _default: import("vue-demi").DefineComponent<{
56
60
  maxLength: import("vue-demi").ComputedRef<number | undefined>;
57
61
  onFocus: () => void;
58
62
  onBlur: () => void;
63
+ onTextClick: () => void;
59
64
  apply: () => void;
60
65
  reset: () => void;
61
66
  focus: () => void;
@@ -89,6 +94,10 @@ declare const _default: import("vue-demi").DefineComponent<{
89
94
  type: BooleanConstructor;
90
95
  default: boolean;
91
96
  };
97
+ sliceIndex: {
98
+ type: NumberConstructor;
99
+ default: number;
100
+ };
92
101
  }>> & {
93
102
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
94
103
  onInput?: ((...args: any[]) => any) | undefined;
@@ -106,5 +115,6 @@ declare const _default: import("vue-demi").DefineComponent<{
106
115
  hint: string;
107
116
  error: string | boolean;
108
117
  saveOnBlur: boolean;
118
+ sliceIndex: number;
109
119
  }>;
110
120
  export default _default;
@@ -1,4 +1,4 @@
1
- export { I as InlineInputType, s as OrInlineInputV3 } from '../../OrInlineInput-e6f41721.js';
1
+ export { I as InlineInputType, s as OrInlineInputV3 } from '../../OrInlineInput-89e9f620.js';
2
2
  import 'vue-demi';
3
3
  import '../../useIdAttribute-3a339b79.js';
4
4
  import '../../TimeFormat-a7f5565b.js';
@@ -29,4 +29,5 @@ import '../../useTheme-dc76b423.js';
29
29
  import '../../isPrevented-b1764210.js';
30
30
  import '../../isAncestor-2973d4f4.js';
31
31
  import '../../OrInlineInputBox-5d0bb348.js';
32
+ import '../../OrText-f1dbba5f.js';
32
33
  import '../../style-inject.es-4c6f2515.js';
@@ -29,7 +29,9 @@ declare const _default: import("vue-demi").DefineComponent<{
29
29
  restTextStyles: import("vue-demi").ComputedRef<string[]>;
30
30
  mainText: import("vue-demi").ComputedRef<string>;
31
31
  restText: import("vue-demi").ComputedRef<string>;
32
- }, unknown, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, {}, string, import("vue-demi").VNodeProps & import("vue-demi").AllowedComponentProps & import("vue-demi").ComponentCustomProps, Readonly<import("vue-demi").ExtractPropTypes<{
32
+ onFocus: (event: MouseEvent) => void;
33
+ onClick: (event: MouseEvent) => void;
34
+ }, unknown, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, ("focus" | "click")[], "focus" | "click", import("vue-demi").VNodeProps & import("vue-demi").AllowedComponentProps & import("vue-demi").ComponentCustomProps, Readonly<import("vue-demi").ExtractPropTypes<{
33
35
  /**
34
36
  * Text to crop.
35
37
  */
@@ -48,7 +50,10 @@ declare const _default: import("vue-demi").DefineComponent<{
48
50
  type: NumberConstructor;
49
51
  default: number;
50
52
  };
51
- }>>, {
53
+ }>> & {
54
+ onFocus?: ((...args: any[]) => any) | undefined;
55
+ onClick?: ((...args: any[]) => any) | undefined;
56
+ }, {
52
57
  sliceIndex: number;
53
58
  }>;
54
59
  export default _default;
@@ -1,3 +1,3 @@
1
- export { s as OrTextV3 } from '../../OrText-ea114c19.js';
1
+ export { s as OrTextV3 } from '../../OrText-f1dbba5f.js';
2
2
  import 'vue-demi';
3
3
  import 'vue';
@@ -65,7 +65,7 @@ export { s as OrIcon, O as OrIconColors, a as OrIconType } from './OrIcon-22d7ae
65
65
  export { I as IconButtonColor, s as OrIconButtonV3 } from './OrIconButton-7b74089e.js';
66
66
  export { a as IconSize, I as IconVariant, s as OrIconV3 } from './OrIcon-9aff520e.js';
67
67
  export { I as InlineInputBoxSize, s as OrInlineInputBoxV3 } from './OrInlineInputBox-5d0bb348.js';
68
- export { I as InlineInputType, s as OrInlineInputV3 } from './OrInlineInput-e6f41721.js';
68
+ export { I as InlineInputType, s as OrInlineInputV3 } from './OrInlineInput-89e9f620.js';
69
69
  export { a as InlineTextEditTrimmingTypes, I as InlineTextEditTypes, s as OrInlineTextEdit } from './OrInlineTextEdit-5c305893.js';
70
70
  export { s as OrInlineTextareaV3 } from './OrInlineTextarea-9e13d859.js';
71
71
  export { s as OrInput } from './OrInput-fb39bee1.js';
@@ -137,7 +137,7 @@ export { s as OrTagV3, a as TagColor, T as TagVariant } from './OrTag-6eea8803.j
137
137
  export { s as OrTagsV3, T as TagsOverflow } from './OrTags-660ca32e.js';
138
138
  export { s as OrTeleport } from './OrTeleport.vue3-9bce0c02.js';
139
139
  export { s as OrTeleportV3 } from './OrTeleport.vue3-8099178c.js';
140
- export { s as OrTextV3 } from './OrText-ea114c19.js';
140
+ export { s as OrTextV3 } from './OrText-f1dbba5f.js';
141
141
  export { s as OrTextarea } from './OrTextarea-b16e1a72.js';
142
142
  export { s as OrTextareaV3 } from './OrTextarea-f5f71e8a.js';
143
143
  export { s as OrTextbox, T as TextboxTypes } from './OrTextbox-20cc3bac.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onereach/ui-components",
3
- "version": "17.4.0-beta.4895.0",
3
+ "version": "17.4.0-beta.4897.0",
4
4
  "npmUnpacked": "4.15.2",
5
5
  "description": "Vue components library for v2/3",
6
6
  "sideEffects": false,
@@ -40,7 +40,7 @@
40
40
  "@codemirror/lang-json": "6.0.1",
41
41
  "@codemirror/lang-markdown": "6.1.1",
42
42
  "@floating-ui/dom": "1.5.3",
43
- "@onereach/styles": "^17.3.0",
43
+ "@onereach/styles": "^17.3.1",
44
44
  "@splidejs/splide": "4.0.6",
45
45
  "@tiptap/core": "2.0.3",
46
46
  "@tiptap/extension-blockquote": "2.0.3",
@@ -10,6 +10,7 @@
10
10
  :activated="activated"
11
11
  >
12
12
  <input
13
+ v-if="activated || !draft"
13
14
  :ref="'control'"
14
15
  v-bind="attributes"
15
16
  v-model.trim="draft"
@@ -23,6 +24,13 @@
23
24
  @focus="$emit('focus', $event); onFocus()"
24
25
  @blur="$emit('blur', $event); onBlur()"
25
26
  >
27
+ <OrText
28
+ v-else
29
+ :text="draft.toString()"
30
+ :slice-index="sliceIndex"
31
+ :class="controlStyles"
32
+ @click="onTextClick"
33
+ />
26
34
  </OrInlineInputBox>
27
35
 
28
36
  <template v-if="activated && !saveOnBlur">
@@ -77,7 +85,8 @@ import { OrErrorV3 as OrError } from '../or-error-v3';
77
85
  import { OrHintV3 as OrHint } from '../or-hint-v3';
78
86
  import { OrIconButtonV3 as OrIconButton } from '../or-icon-button-v3';
79
87
  import { InlineInputBoxSize, OrInlineInputBoxV3 as OrInlineInputBox } from '../or-inline-input-box-v3';
80
- import { InlineInput, InlineInputAction, InlineInputActionSizes, InlineInputControl } from './styles';
88
+ import { OrTextV3 as OrText } from '../or-text-v3';
89
+ import * as Styles from './styles';
81
90
  import { InlineInputModelValue, InlineInputType } from './types';
82
91
 
83
92
  export default defineComponent({
@@ -85,6 +94,7 @@ export default defineComponent({
85
94
 
86
95
  components: {
87
96
  OrError,
97
+ OrText,
88
98
  OrHint,
89
99
  OrIconButton,
90
100
  OrInlineInputBox,
@@ -130,6 +140,11 @@ export default defineComponent({
130
140
  type: Boolean,
131
141
  default: false,
132
142
  },
143
+
144
+ sliceIndex: {
145
+ type: Number,
146
+ default: 0,
147
+ },
133
148
  },
134
149
 
135
150
  emits: [
@@ -166,18 +181,18 @@ export default defineComponent({
166
181
 
167
182
  const rootStyles = computed(() => [
168
183
  'or-inline-input-v3',
169
- ...InlineInput,
184
+ ...Styles.InlineInput,
170
185
  ]);
171
186
 
172
187
  const control = ref<HTMLInputElement>();
173
188
 
174
189
  const controlStyles = computed(() => [
175
- ...InlineInputControl,
190
+ ...Styles.InlineInputControl,
176
191
  ]);
177
192
 
178
193
  const actionStyles = computed(() => [
179
- ...InlineInputAction,
180
- ...InlineInputActionSizes[props.size],
194
+ ...Styles.InlineInputAction,
195
+ ...Styles.InlineInputActionSizes[props.size],
181
196
  ]);
182
197
 
183
198
  // State
@@ -203,6 +218,13 @@ export default defineComponent({
203
218
  activated.value = true;
204
219
  }
205
220
 
221
+ function onTextClick(): void {
222
+ if (!activated.value) {
223
+ activated.value = true;
224
+ }
225
+ nextTick(() => focus());
226
+ }
227
+
206
228
  function onBlur(): void {
207
229
  if (props.saveOnBlur) {
208
230
  apply();
@@ -257,6 +279,7 @@ export default defineComponent({
257
279
 
258
280
  onFocus,
259
281
  onBlur,
282
+ onTextClick,
260
283
 
261
284
  apply,
262
285
  reset,
@@ -2,6 +2,8 @@
2
2
  <div
3
3
  :ref="'root'"
4
4
  :class="rootStyles"
5
+ @focus="onFocus"
6
+ @click="onClick"
5
7
  >
6
8
  <div :class="mainTextStyles">
7
9
  {{ mainText }}
@@ -47,11 +49,16 @@ export default defineComponent({
47
49
  },
48
50
  },
49
51
 
52
+ emits: [
53
+ 'focus',
54
+ 'click',
55
+ ],
56
+
50
57
  expose: [
51
58
  'root',
52
59
  ],
53
60
 
54
- setup(props) {
61
+ setup(props, { emit }) {
55
62
  // Refs
56
63
  const root = ref<HTMLElement>();
57
64
 
@@ -106,6 +113,16 @@ export default defineComponent({
106
113
  return restPart;
107
114
  });
108
115
 
116
+ // Methods
117
+ function onFocus(event: MouseEvent): void {
118
+ emit('focus', event);
119
+ }
120
+
121
+ function onClick(event: MouseEvent): void {
122
+ emit('click', event);
123
+ }
124
+
125
+
109
126
  return {
110
127
  root,
111
128
  rootStyles,
@@ -113,6 +130,8 @@ export default defineComponent({
113
130
  restTextStyles,
114
131
  mainText,
115
132
  restText,
133
+ onFocus,
134
+ onClick,
116
135
  };
117
136
  },
118
137
  });