@onereach/ui-components 2.74.8-beta.2336.0 → 2.74.8-beta.2338.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 (54) hide show
  1. package/dist/bundled/v2/{OrCheckbox-384760cb.js → OrCheckbox-41d31e45.js} +1 -1
  2. package/dist/bundled/v2/{OrSelect-617da939.js → OrSelect-43ba3073.js} +4 -8
  3. package/dist/bundled/v2/{OrTag-d79178d7.js → OrTag-59ab76c5.js} +2 -4
  4. package/dist/bundled/v2/{OrText-a665b991.js → OrText-15bf85c4.js} +36 -3
  5. package/dist/bundled/v2/components/index.js +4 -4
  6. package/dist/bundled/v2/components/or-checkbox-v3/index.js +1 -1
  7. package/dist/bundled/v2/components/or-select-v3/index.js +3 -3
  8. package/dist/bundled/v2/components/or-tag-v3/index.js +1 -1
  9. package/dist/bundled/v2/components/or-text-v3/OrText.vue.d.ts +27 -2
  10. package/dist/bundled/v2/components/or-text-v3/index.js +1 -1
  11. package/dist/bundled/v2/index.js +5 -5
  12. package/dist/bundled/v3/{OrCheckbox.vue_vue_type_script_lang-08f64a02.js → OrCheckbox.vue_vue_type_script_lang-fc067611.js} +1 -1
  13. package/dist/bundled/v3/{OrSelect.vue_vue_type_script_lang-44a4968b.js → OrSelect.vue_vue_type_script_lang-b50634d8.js} +6 -11
  14. package/dist/bundled/v3/{OrTag.vue_vue_type_script_lang-2f138d1a.js → OrTag.vue_vue_type_script_lang-4fe7e19f.js} +1 -1
  15. package/dist/bundled/v3/OrText.vue_vue_type_script_lang-e93438ea.js +93 -0
  16. package/dist/bundled/v3/components/index.js +4 -4
  17. package/dist/bundled/v3/components/or-checkbox-v3/index.js +1 -1
  18. package/dist/bundled/v3/components/or-select-v3/index.js +3 -3
  19. package/dist/bundled/v3/components/or-tag-v3/index.js +1 -1
  20. package/dist/bundled/v3/components/or-text-v3/OrText.vue.d.ts +27 -2
  21. package/dist/bundled/v3/components/or-text-v3/index.js +1 -1
  22. package/dist/bundled/v3/index.js +25 -28
  23. package/dist/esm/v2/{OrCheckbox-49d7d6b1.js → OrCheckbox-aa9ca791.js} +1 -1
  24. package/dist/esm/v2/{OrSelect-1c9d6951.js → OrSelect-d991fe95.js} +4 -8
  25. package/dist/esm/v2/{OrTag-e6de86c9.js → OrTag-1ed1265c.js} +2 -4
  26. package/dist/esm/v2/{OrText-b12d0682.js → OrText-91d662a0.js} +36 -3
  27. package/dist/esm/v2/components/index.js +4 -4
  28. package/dist/esm/v2/components/or-checkbox-v3/index.js +1 -1
  29. package/dist/esm/v2/components/or-select-v3/index.js +3 -3
  30. package/dist/esm/v2/components/or-tag-v3/index.js +1 -1
  31. package/dist/esm/v2/components/or-text-v3/OrText.vue.d.ts +27 -2
  32. package/dist/esm/v2/components/or-text-v3/index.js +1 -1
  33. package/dist/esm/v2/index.js +4 -4
  34. package/dist/esm/v3/{OrCheckbox-a8388252.js → OrCheckbox-16c1e2f4.js} +1 -1
  35. package/dist/esm/v3/{OrSelect-9008533e.js → OrSelect-b06bf2d8.js} +5 -10
  36. package/dist/esm/v3/{OrTag-8a6e7bba.js → OrTag-f66c6142.js} +3 -6
  37. package/dist/esm/v3/{OrText-6b4f7cd1.js → OrText-a3b00048.js} +36 -3
  38. package/dist/esm/v3/components/index.js +4 -4
  39. package/dist/esm/v3/components/or-checkbox-v3/index.js +1 -1
  40. package/dist/esm/v3/components/or-select-v3/index.js +3 -3
  41. package/dist/esm/v3/components/or-tag-v3/index.js +1 -1
  42. package/dist/esm/v3/components/or-text-v3/OrText.vue.d.ts +27 -2
  43. package/dist/esm/v3/components/or-text-v3/index.js +1 -1
  44. package/dist/esm/v3/index.js +4 -4
  45. package/package.json +1 -1
  46. package/src/components/or-checkbox-v3/styles.ts +0 -1
  47. package/src/components/or-select-v3/OrSelect.stories3.ts +0 -19
  48. package/src/components/or-select-v3/OrSelect.vue +1 -3
  49. package/src/components/or-select-v3/styles.ts +0 -3
  50. package/src/components/or-tag-v3/OrTag.vue +2 -3
  51. package/src/components/or-tag-v3/styles.ts +1 -2
  52. package/src/components/or-text-v3/OrText.stories3.ts +83 -5
  53. package/src/components/or-text-v3/OrText.vue +37 -3
  54. package/dist/bundled/v3/OrText.vue_vue_type_script_lang-271fb345.js +0 -60
@@ -10,7 +10,7 @@ const CheckboxRoot = [
10
10
  'gap-sm+ md:gap-sm'];
11
11
  const CheckboxControl = [
12
12
  // Layout
13
- 'layout-row justify-center', 'shrink-0',
13
+ 'layout-row justify-center',
14
14
  // Box
15
15
  'w-md+ md:w-md', 'h-md+ md:h-md',
16
16
  // Shape
@@ -1,5 +1,5 @@
1
1
  import { resolveComponent, openBlock, createElementBlock, normalizeClass, withDirectives, createElementVNode, mergeProps, vModelDynamic, createBlock, withCtx, renderSlot, createTextVNode, toDisplayString, createCommentVNode, withModifiers, createVNode, vShow, defineComponent, getCurrentInstance, ref, computed, onMounted, watch } from 'vue';
2
- import { s as script$1 } from './OrCheckbox.vue_vue_type_script_lang-08f64a02.js';
2
+ import { s as script$1 } from './OrCheckbox.vue_vue_type_script_lang-fc067611.js';
3
3
  import { s as styleInject } from './style-inject.es-4c6f2515.js';
4
4
  import './OrHint-5d5e4d99.js';
5
5
  import { s as script$2 } from './OrExpansionPanel.vue_vue_type_script_lang-cd3b6d36.js';
@@ -9,7 +9,7 @@ import './OrInputBox-358d4856.js';
9
9
  import './OrLabel-c556887e.js';
10
10
  import './OrMenuItem-1917f51a.js';
11
11
  import './OrPopover-f9a1d5d7.js';
12
- import { s as script$3 } from './OrTag.vue_vue_type_script_lang-2f138d1a.js';
12
+ import { s as script$3 } from './OrTag.vue_vue_type_script_lang-4fe7e19f.js';
13
13
  import { D as DropdownClose, a as DropdownOpen } from './dropdown-open-293d2de2.js';
14
14
  import { u as useOverflow } from './useOverflow-6dce216b.js';
15
15
  import { s as script$4 } from './OrError.vue_vue_type_script_lang-53648a65.js';
@@ -64,7 +64,7 @@ const _hoisted_1$1 = ["disabled"];
64
64
  const _hoisted_2$1 = {
65
65
  class: /*#__PURE__*/normalizeClass(['layout-row', 'justify-between'])
66
66
  };
67
- const _hoisted_3$1 = ["tabindex", "disabled"];
67
+ const _hoisted_3 = ["tabindex", "disabled"];
68
68
  function render$1(_ctx, _cache, $props, $setup, $data, $options) {
69
69
  const _component_OrIcon = resolveComponent("OrIcon");
70
70
  return openBlock(), createElementBlock("div", {
@@ -80,7 +80,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
80
80
  class: normalizeClass([_ctx.expanded ? 'rotate-0' : 'rotate-[-90deg]']),
81
81
  icon: 'expand_more',
82
82
  variant: 'filled-bold'
83
- }, null, 8 /* PROPS */, ["class"]), createTextVNode(" " + toDisplayString(_ctx.label), 1 /* TEXT */)], 10 /* CLASS, PROPS */, _hoisted_3$1), createElementVNode("div", {
83
+ }, null, 8 /* PROPS */, ["class"]), createTextVNode(" " + toDisplayString(_ctx.label), 1 /* TEXT */)], 10 /* CLASS, PROPS */, _hoisted_3), createElementVNode("div", {
84
84
  class: normalizeClass(_ctx.addonStyles)
85
85
  }, [renderSlot(_ctx.$slots, "addon")], 2 /* CLASS */)]), withDirectives(createElementVNode("div", null, [renderSlot(_ctx.$slots, "default")], 512 /* NEED_PATCH */), [[vShow, _ctx.expanded]])], 10 /* CLASS, PROPS */, _hoisted_1$1);
86
86
  }
@@ -90,9 +90,6 @@ script$2.__file = "src/components/or-expansion-panel-v3/OrExpansionPanel.vue";
90
90
 
91
91
  const _hoisted_1 = ["tabindex", "disabled"];
92
92
  const _hoisted_2 = {
93
- class: "truncate"
94
- };
95
- const _hoisted_3 = {
96
93
  key: 0,
97
94
  class: /*#__PURE__*/normalizeClass(['layout-row', 'm-[-4px] md:m-[-2px]'])
98
95
  };
@@ -106,7 +103,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
106
103
  onClick: _cache[1] || (_cache[1] = $event => _ctx.$emit('click', $event)),
107
104
  onFocus: _cache[2] || (_cache[2] = $event => _ctx.$emit('focus', $event)),
108
105
  onBlur: _cache[3] || (_cache[3] = $event => _ctx.$emit('blur', $event))
109
- }, [createElementVNode("div", _hoisted_2, [renderSlot(_ctx.$slots, "default")]), _ctx.variant === 'reset' ? (openBlock(), createElementBlock("div", _hoisted_3, [createVNode(_component_OrIconButton, {
106
+ }, [renderSlot(_ctx.$slots, "default"), _ctx.variant === 'reset' ? (openBlock(), createElementBlock("div", _hoisted_2, [createVNode(_component_OrIconButton, {
110
107
  icon: 'close',
111
108
  color: _ctx.custom ? 'inherit' : _ctx.color,
112
109
  disabled: _ctx.disabled,
@@ -135,9 +132,7 @@ const SelectPlaceholder = [
135
132
  // Theme
136
133
  'theme-foreground-outline', 'dark:theme-foreground-outline-dark',
137
134
  // Interactivity
138
- 'select-none',
139
- // Typography
140
- 'truncate'];
135
+ 'select-none'];
141
136
  const SelectDropdown = [
142
137
  // Overflow
143
138
  'overflow-y-auto',
@@ -18,7 +18,7 @@ const TagRoot = [
18
18
  // Layout
19
19
  'layout-inline-row',
20
20
  // Box
21
- 'w-fit', 'max-w-full',
21
+ 'max-w-fit',
22
22
  // Shape
23
23
  'rounded-full',
24
24
  // Spacing
@@ -0,0 +1,93 @@
1
+ import { defineComponent, ref, computed } from 'vue';
2
+
3
+ const TextRoot = [
4
+ // Layout
5
+ 'inline-flex',
6
+ // Box
7
+ 'max-w-full',
8
+ // Typography
9
+ 'whitespace-nowrap'];
10
+ const MainText = [
11
+ // Layout
12
+ 'overflow-hidden',
13
+ // Typography
14
+ 'text-ellipsis'];
15
+ const RestText = [
16
+ // Layout
17
+ 'shrink'];
18
+
19
+ /**
20
+ * Use `OrText` component to crop un-wrapped single-line text with ellipsis inside narrow containers.
21
+ * Ellipsis can be placed in the end or in the middle of the text. Convenient for displaying long labels,
22
+ * that have same beginning and differ in the ending part.
23
+ */
24
+ var script = defineComponent({
25
+ name: 'OrText',
26
+ props: {
27
+ /**
28
+ * Text to crop.
29
+ */
30
+ text: {
31
+ type: String,
32
+ required: true
33
+ },
34
+ /**
35
+ * The index counted from the end of the string where ellipsis will be placed.
36
+ * Defines how many ending characters will remain visible.
37
+ * By default, ellipsis is placed in the end of the line.
38
+ *
39
+ * Note: Negative values behave same as corresponding positives still counting from the end of the line.
40
+ */
41
+ sliceIndex: {
42
+ type: Number,
43
+ default: 0
44
+ }
45
+ },
46
+ expose: ['root'],
47
+ setup(props) {
48
+ // Refs
49
+ const root = ref();
50
+ // Styles
51
+ const rootStyles = computed(() => ['or-text', ...TextRoot]);
52
+ const mainTextStyles = computed(() => [...MainText]);
53
+ const restTextStyles = computed(() => [...RestText]);
54
+ /**
55
+ * Preserves whitespace at the last position as <code>&nbsp;</code>
56
+ * @param str A string to escape
57
+ */
58
+ const escapeLast = str => str && str.slice(0, -1) + '\xa0';
59
+ /**
60
+ * Preserves whitespace at the first position as <code>&nbsp;</code>
61
+ * @param str A string to escape
62
+ */
63
+ const escapeFirst = str => str && '\xa0' + str.slice(1);
64
+ // State
65
+ const mainText = computed(() => {
66
+ if (props.sliceIndex) {
67
+ let mainPart = props.text.slice(0, -Math.abs(props.sliceIndex));
68
+ if (mainPart[mainPart.length - 1] === ' ') {
69
+ mainPart = escapeLast(mainPart);
70
+ }
71
+ return mainPart;
72
+ }
73
+ return props.text;
74
+ });
75
+ const restText = computed(() => {
76
+ let restPart = props.text.slice(mainText.value.length);
77
+ if (restPart[0] === ' ') {
78
+ restPart = escapeFirst(restPart);
79
+ }
80
+ return restPart;
81
+ });
82
+ return {
83
+ root,
84
+ rootStyles,
85
+ mainTextStyles,
86
+ restTextStyles,
87
+ mainText,
88
+ restText
89
+ };
90
+ }
91
+ });
92
+
93
+ export { script as s };
@@ -12,7 +12,7 @@ export { D as DefaultCardCollectionViews, s as OrCardCollectionV3, d as defaultV
12
12
  export { s as OrCardV3 } from '../OrCard.vue_vue_type_script_lang-b6685a34.js';
13
13
  export { a as OrCarousel, s as OrCarouselItem } from '../OrCarouselItem.vue_vue_type_script_lang-ef9fec58.js';
14
14
  export { s as OrCheckbox } from '../OrCheckbox.vue_vue_type_script_lang-00e3371f.js';
15
- export { s as OrCheckboxV3 } from '../OrCheckbox.vue_vue_type_script_lang-08f64a02.js';
15
+ export { s as OrCheckboxV3 } from '../OrCheckbox.vue_vue_type_script_lang-fc067611.js';
16
16
  export { s as OrChip } from '../OrChip-7324118c.js';
17
17
  export { s as OrChips } from '../OrChips.vue_vue_type_script_lang-54842d4d.js';
18
18
  export { s as OrCode, O as OrCodeLanguages } from '../OrCode.vue_vue_type_script_lang-fb43d35a.js';
@@ -69,7 +69,7 @@ export { s as OrSearch } from '../OrSearch.vue_vue_type_script_lang-b39b93b8.js'
69
69
  export { s as OrSearchV3 } from '../OrSearch.vue_vue_type_script_lang-409490d8.js';
70
70
  export { s as OrSegmentedControlV3, S as SegmentedControlSize } from '../OrSegmentedControl.vue_vue_type_script_lang-38a00b68.js';
71
71
  export { s as OrSelect } from '../OrSelect.vue_vue_type_script_lang-131ba34b.js';
72
- export { s as OrSelectV3 } from '../OrSelect.vue_vue_type_script_lang-44a4968b.js';
72
+ export { s as OrSelectV3 } from '../OrSelect.vue_vue_type_script_lang-b50634d8.js';
73
73
  export { s as OrSidebar, O as OrSidebarSide } from '../OrSidebar.vue_vue_type_script_lang-7c55ac0a.js';
74
74
  export { s as OrSidebarV3 } from '../OrSidebar.vue_vue_type_script_lang-b5adff07.js';
75
75
  export { O as OrSidebarPlacement } from '../OrSidebarCollapseButton.vue_vue_type_script_lang-ddb36366.js';
@@ -86,10 +86,10 @@ export { s as OrTabV3 } from '../OrTab.vue_vue_type_script_lang-f791efa0.js';
86
86
  export { s as OrTabs } from '../OrTabs.vue_vue_type_script_lang-40e2a6e9.js';
87
87
  export { s as OrTabsV3, T as TabsVariant } from '../OrTabs.vue_vue_type_script_lang-7a2b137a.js';
88
88
  export { s as OrTag } from '../OrTag.vue_vue_type_script_lang-823edbfe.js';
89
- export { s as OrTagV3, a as TagColor, T as TagVariant } from '../OrTag.vue_vue_type_script_lang-2f138d1a.js';
89
+ export { s as OrTagV3, a as TagColor, T as TagVariant } from '../OrTag.vue_vue_type_script_lang-4fe7e19f.js';
90
90
  export { s as OrTeleport } from '../OrTeleport.vue3-12636ac0.js';
91
91
  export { s as OrTeleportV3 } from '../OrTeleport.vue3.vue_vue_type_script_lang-4dc70cf1.js';
92
- export { s as OrTextV3 } from '../OrText.vue_vue_type_script_lang-271fb345.js';
92
+ export { s as OrTextV3 } from '../OrText.vue_vue_type_script_lang-e93438ea.js';
93
93
  export { s as OrTextarea } from '../OrTextarea.vue_vue_type_script_lang-69ea22e9.js';
94
94
  export { s as OrTextareaV3 } from '../OrTextarea.vue_vue_type_script_lang-de99a858.js';
95
95
  export { s as OrTextbox, T as TextboxTypes } from '../OrTextbox.vue_vue_type_script_lang-245d8bf2.js';
@@ -1,4 +1,4 @@
1
- export { s as OrCheckboxV3 } from '../../OrCheckbox.vue_vue_type_script_lang-08f64a02.js';
1
+ export { s as OrCheckboxV3 } from '../../OrCheckbox.vue_vue_type_script_lang-fc067611.js';
2
2
  import 'vue';
3
3
  import '../../OrLabel-c556887e.js';
4
4
  import '../../OrLabel.vue_vue_type_script_lang-191d2304.js';
@@ -1,7 +1,7 @@
1
- export { s as OrSelectV3 } from '../../OrSelect.vue_vue_type_script_lang-44a4968b.js';
1
+ export { s as OrSelectV3 } from '../../OrSelect.vue_vue_type_script_lang-b50634d8.js';
2
2
  export { a as SelectSize } from '../../OrInputBox.vue_vue_type_script_lang-b387d4ba.js';
3
3
  import 'vue';
4
- import '../../OrCheckbox.vue_vue_type_script_lang-08f64a02.js';
4
+ import '../../OrCheckbox.vue_vue_type_script_lang-fc067611.js';
5
5
  import '../../OrLabel-c556887e.js';
6
6
  import '../../OrLabel.vue_vue_type_script_lang-191d2304.js';
7
7
  import '../../useIdAttribute-b2e42f31.js';
@@ -32,6 +32,6 @@ import '../../OrLoader.vue_vue_type_script_lang-8fc03499.js';
32
32
  import '../../useValidationAttributes-5428d8fa.js';
33
33
  import '../../OrMenuItem-1917f51a.js';
34
34
  import '../../OrMenuItem.vue_vue_type_script_lang-0b643c00.js';
35
- import '../../OrTag.vue_vue_type_script_lang-2f138d1a.js';
35
+ import '../../OrTag.vue_vue_type_script_lang-4fe7e19f.js';
36
36
  import '../../dropdown-open-293d2de2.js';
37
37
  import '../../useOverflow-6dce216b.js';
@@ -1,4 +1,4 @@
1
- export { s as OrTagV3, a as TagColor, T as TagVariant } from '../../OrTag.vue_vue_type_script_lang-2f138d1a.js';
1
+ export { s as OrTagV3, a as TagColor, T as TagVariant } from '../../OrTag.vue_vue_type_script_lang-4fe7e19f.js';
2
2
  import 'vue';
3
3
  import '../../OrIconButton-a2091425.js';
4
4
  import '../../OrIconButton.vue_vue_type_script_lang-14871105.js';
@@ -6,22 +6,42 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
6
6
  mainText: import("@vue/composition-api").ComputedRef<string>;
7
7
  restText: import("@vue/composition-api").ComputedRef<string>;
8
8
  }> & import("@vue/composition-api").Data, {}, {}, {
9
+ /**
10
+ * Text to crop.
11
+ */
9
12
  text: {
10
13
  type: StringConstructor;
11
14
  required: true;
12
15
  };
16
+ /**
17
+ * The index counted from the end of the string where ellipsis will be placed.
18
+ * Defines how many ending characters will remain visible.
19
+ * By default, ellipsis is placed in the end of the line.
20
+ *
21
+ * Note: Negative values behave same as corresponding positives still counting from the end of the line.
22
+ */
13
23
  sliceIndex: {
14
24
  type: NumberConstructor;
15
- default: undefined;
25
+ default: number;
16
26
  };
17
27
  }, import("@vue/composition-api").ExtractPropTypes<{
28
+ /**
29
+ * Text to crop.
30
+ */
18
31
  text: {
19
32
  type: StringConstructor;
20
33
  required: true;
21
34
  };
35
+ /**
36
+ * The index counted from the end of the string where ellipsis will be placed.
37
+ * Defines how many ending characters will remain visible.
38
+ * By default, ellipsis is placed in the end of the line.
39
+ *
40
+ * Note: Negative values behave same as corresponding positives still counting from the end of the line.
41
+ */
22
42
  sliceIndex: {
23
43
  type: NumberConstructor;
24
- default: undefined;
44
+ default: number;
25
45
  };
26
46
  }>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
27
47
  text: string;
@@ -39,4 +59,9 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
39
59
  } & {}, {
40
60
  sliceIndex: number;
41
61
  }, true>);
62
+ /**
63
+ * Use `OrText` component to crop un-wrapped single-line text with ellipsis inside narrow containers.
64
+ * Ellipsis can be placed in the end or in the middle of the text. Convenient for displaying long labels,
65
+ * that have same beginning and differ in the ending part.
66
+ */
42
67
  export default _default;
@@ -1,2 +1,2 @@
1
- export { s as OrTextV3 } from '../../OrText.vue_vue_type_script_lang-271fb345.js';
1
+ export { s as OrTextV3 } from '../../OrText.vue_vue_type_script_lang-e93438ea.js';
2
2
  import 'vue';