@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.
- package/dist/bundled/v2/{OrCheckbox-384760cb.js → OrCheckbox-41d31e45.js} +1 -1
- package/dist/bundled/v2/{OrSelect-617da939.js → OrSelect-43ba3073.js} +4 -8
- package/dist/bundled/v2/{OrTag-d79178d7.js → OrTag-59ab76c5.js} +2 -4
- package/dist/bundled/v2/{OrText-a665b991.js → OrText-15bf85c4.js} +36 -3
- package/dist/bundled/v2/components/index.js +4 -4
- package/dist/bundled/v2/components/or-checkbox-v3/index.js +1 -1
- package/dist/bundled/v2/components/or-select-v3/index.js +3 -3
- package/dist/bundled/v2/components/or-tag-v3/index.js +1 -1
- package/dist/bundled/v2/components/or-text-v3/OrText.vue.d.ts +27 -2
- package/dist/bundled/v2/components/or-text-v3/index.js +1 -1
- package/dist/bundled/v2/index.js +5 -5
- package/dist/bundled/v3/{OrCheckbox.vue_vue_type_script_lang-08f64a02.js → OrCheckbox.vue_vue_type_script_lang-fc067611.js} +1 -1
- package/dist/bundled/v3/{OrSelect.vue_vue_type_script_lang-44a4968b.js → OrSelect.vue_vue_type_script_lang-b50634d8.js} +6 -11
- package/dist/bundled/v3/{OrTag.vue_vue_type_script_lang-2f138d1a.js → OrTag.vue_vue_type_script_lang-4fe7e19f.js} +1 -1
- package/dist/bundled/v3/OrText.vue_vue_type_script_lang-e93438ea.js +93 -0
- package/dist/bundled/v3/components/index.js +4 -4
- package/dist/bundled/v3/components/or-checkbox-v3/index.js +1 -1
- package/dist/bundled/v3/components/or-select-v3/index.js +3 -3
- package/dist/bundled/v3/components/or-tag-v3/index.js +1 -1
- package/dist/bundled/v3/components/or-text-v3/OrText.vue.d.ts +27 -2
- package/dist/bundled/v3/components/or-text-v3/index.js +1 -1
- package/dist/bundled/v3/index.js +25 -28
- package/dist/esm/v2/{OrCheckbox-49d7d6b1.js → OrCheckbox-aa9ca791.js} +1 -1
- package/dist/esm/v2/{OrSelect-1c9d6951.js → OrSelect-d991fe95.js} +4 -8
- package/dist/esm/v2/{OrTag-e6de86c9.js → OrTag-1ed1265c.js} +2 -4
- package/dist/esm/v2/{OrText-b12d0682.js → OrText-91d662a0.js} +36 -3
- package/dist/esm/v2/components/index.js +4 -4
- package/dist/esm/v2/components/or-checkbox-v3/index.js +1 -1
- package/dist/esm/v2/components/or-select-v3/index.js +3 -3
- package/dist/esm/v2/components/or-tag-v3/index.js +1 -1
- package/dist/esm/v2/components/or-text-v3/OrText.vue.d.ts +27 -2
- package/dist/esm/v2/components/or-text-v3/index.js +1 -1
- package/dist/esm/v2/index.js +4 -4
- package/dist/esm/v3/{OrCheckbox-a8388252.js → OrCheckbox-16c1e2f4.js} +1 -1
- package/dist/esm/v3/{OrSelect-9008533e.js → OrSelect-b06bf2d8.js} +5 -10
- package/dist/esm/v3/{OrTag-8a6e7bba.js → OrTag-f66c6142.js} +3 -6
- package/dist/esm/v3/{OrText-6b4f7cd1.js → OrText-a3b00048.js} +36 -3
- package/dist/esm/v3/components/index.js +4 -4
- package/dist/esm/v3/components/or-checkbox-v3/index.js +1 -1
- package/dist/esm/v3/components/or-select-v3/index.js +3 -3
- package/dist/esm/v3/components/or-tag-v3/index.js +1 -1
- package/dist/esm/v3/components/or-text-v3/OrText.vue.d.ts +27 -2
- package/dist/esm/v3/components/or-text-v3/index.js +1 -1
- package/dist/esm/v3/index.js +4 -4
- package/package.json +1 -1
- package/src/components/or-checkbox-v3/styles.ts +0 -1
- package/src/components/or-select-v3/OrSelect.stories3.ts +0 -19
- package/src/components/or-select-v3/OrSelect.vue +1 -3
- package/src/components/or-select-v3/styles.ts +0 -3
- package/src/components/or-tag-v3/OrTag.vue +2 -3
- package/src/components/or-tag-v3/styles.ts +1 -2
- package/src/components/or-text-v3/OrText.stories3.ts +83 -5
- package/src/components/or-text-v3/OrText.vue +37 -3
- package/dist/bundled/v3/OrText.vue_vue_type_script_lang-271fb345.js +0 -60
|
@@ -2,7 +2,7 @@ import { defineComponent, getCurrentInstance, ref, computed, onMounted, watch }
|
|
|
2
2
|
import { D as DropdownClose, a as DropdownOpen } from './dropdown-open-0d314aa4.js';
|
|
3
3
|
import { u as useOverflow } from './useOverflow-af6161c8.js';
|
|
4
4
|
import '@vueuse/core';
|
|
5
|
-
import { _ as __vue_component__$1 } from './OrCheckbox-
|
|
5
|
+
import { _ as __vue_component__$1 } from './OrCheckbox-aa9ca791.js';
|
|
6
6
|
import { _ as __vue_component__$2 } from './OrError-13845bb0.js';
|
|
7
7
|
import { _ as __vue_component__$3 } from './OrExpansionPanel-0a12d957.js';
|
|
8
8
|
import { _ as __vue_component__$4 } from './OrHint-78b399cb.js';
|
|
@@ -12,7 +12,7 @@ import { _ as __vue_component__$6 } from './OrInput-1ddf99ba.js';
|
|
|
12
12
|
import { _ as __vue_component__$8 } from './OrLabel-0945a4d9.js';
|
|
13
13
|
import { _ as __vue_component__$9 } from './OrMenuItem-4f810513.js';
|
|
14
14
|
import { _ as __vue_component__$a } from './OrPopover-b3746279.js';
|
|
15
|
-
import { _ as __vue_component__$b } from './OrTag-
|
|
15
|
+
import { _ as __vue_component__$b } from './OrTag-1ed1265c.js';
|
|
16
16
|
import { n as normalizeComponent } from './normalize-component-6e8e3d80.js';
|
|
17
17
|
|
|
18
18
|
const SelectRoot = [
|
|
@@ -33,9 +33,7 @@ const SelectPlaceholder = [
|
|
|
33
33
|
// Theme
|
|
34
34
|
'theme-foreground-outline', 'dark:theme-foreground-outline-dark',
|
|
35
35
|
// Interactivity
|
|
36
|
-
'select-none'
|
|
37
|
-
// Typography
|
|
38
|
-
'truncate'];
|
|
36
|
+
'select-none'];
|
|
39
37
|
const SelectDropdown = [
|
|
40
38
|
// Overflow
|
|
41
39
|
'overflow-y-auto',
|
|
@@ -367,9 +365,7 @@ var __vue_render__ = function () {
|
|
|
367
365
|
}, {
|
|
368
366
|
"model": _vm.proxyModelValue
|
|
369
367
|
})] : [_vm.proxyModelValue ? [_vm._t("valueTemplate", function () {
|
|
370
|
-
return [
|
|
371
|
-
staticClass: "truncate"
|
|
372
|
-
}, [_vm._v("\n " + _vm._s(_vm.selection.label) + "\n ")])];
|
|
368
|
+
return [_vm._v("\n " + _vm._s(_vm.selection.label) + "\n ")];
|
|
373
369
|
}, {
|
|
374
370
|
"model": _vm.proxyModelValue
|
|
375
371
|
})] : [_c('span', {
|
|
@@ -18,7 +18,7 @@ const TagRoot = [
|
|
|
18
18
|
// Layout
|
|
19
19
|
'layout-inline-row',
|
|
20
20
|
// Box
|
|
21
|
-
'
|
|
21
|
+
'max-w-fit',
|
|
22
22
|
// Shape
|
|
23
23
|
'rounded-full',
|
|
24
24
|
// Spacing
|
|
@@ -121,9 +121,7 @@ var __vue_render__ = function () {
|
|
|
121
121
|
return _vm.$emit('blur', $event);
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
|
-
}, [_c('div', {
|
|
125
|
-
staticClass: "truncate"
|
|
126
|
-
}, [_vm._t("default")], 2), _vm._v(" "), _vm.variant === 'reset' ? [_c('div', {
|
|
124
|
+
}, [_vm._t("default"), _vm._v(" "), _vm.variant === 'reset' ? [_c('div', {
|
|
127
125
|
class: ['layout-row', 'm-[-4px] md:m-[-2px]']
|
|
128
126
|
}, [_c('OrIconButton', {
|
|
129
127
|
attrs: {
|
|
@@ -17,16 +17,31 @@ const RestText = [
|
|
|
17
17
|
// Layout
|
|
18
18
|
'shrink'];
|
|
19
19
|
|
|
20
|
+
/**
|
|
21
|
+
* Use `OrText` component to crop un-wrapped single-line text with ellipsis inside narrow containers.
|
|
22
|
+
* Ellipsis can be placed in the end or in the middle of the text. Convenient for displaying long labels,
|
|
23
|
+
* that have same beginning and differ in the ending part.
|
|
24
|
+
*/
|
|
20
25
|
var script = defineComponent({
|
|
21
26
|
name: 'OrText',
|
|
22
27
|
props: {
|
|
28
|
+
/**
|
|
29
|
+
* Text to crop.
|
|
30
|
+
*/
|
|
23
31
|
text: {
|
|
24
32
|
type: String,
|
|
25
33
|
required: true
|
|
26
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
|
+
*/
|
|
27
42
|
sliceIndex: {
|
|
28
43
|
type: Number,
|
|
29
|
-
default:
|
|
44
|
+
default: 0
|
|
30
45
|
}
|
|
31
46
|
},
|
|
32
47
|
expose: ['root'],
|
|
@@ -37,15 +52,33 @@ var script = defineComponent({
|
|
|
37
52
|
const rootStyles = computed(() => ['or-text', ...TextRoot]);
|
|
38
53
|
const mainTextStyles = computed(() => [...MainText]);
|
|
39
54
|
const restTextStyles = computed(() => [...RestText]);
|
|
55
|
+
/**
|
|
56
|
+
* Preserves whitespace at the last position as <code> </code>
|
|
57
|
+
* @param str A string to escape
|
|
58
|
+
*/
|
|
59
|
+
const escapeLast = str => str && str.slice(0, -1) + '\xa0';
|
|
60
|
+
/**
|
|
61
|
+
* Preserves whitespace at the first position as <code> </code>
|
|
62
|
+
* @param str A string to escape
|
|
63
|
+
*/
|
|
64
|
+
const escapeFirst = str => str && '\xa0' + str.slice(1);
|
|
40
65
|
// State
|
|
41
66
|
const mainText = computed(() => {
|
|
42
67
|
if (props.sliceIndex) {
|
|
43
|
-
|
|
68
|
+
let mainPart = props.text.slice(0, -Math.abs(props.sliceIndex));
|
|
69
|
+
if (mainPart[mainPart.length - 1] === ' ') {
|
|
70
|
+
mainPart = escapeLast(mainPart);
|
|
71
|
+
}
|
|
72
|
+
return mainPart;
|
|
44
73
|
}
|
|
45
74
|
return props.text;
|
|
46
75
|
});
|
|
47
76
|
const restText = computed(() => {
|
|
48
|
-
|
|
77
|
+
let restPart = props.text.slice(mainText.value.length);
|
|
78
|
+
if (restPart[0] === ' ') {
|
|
79
|
+
restPart = escapeFirst(restPart);
|
|
80
|
+
}
|
|
81
|
+
return restPart;
|
|
49
82
|
});
|
|
50
83
|
return {
|
|
51
84
|
root,
|
|
@@ -12,7 +12,7 @@ export { D as DefaultCardCollectionViews, _ as OrCardCollectionV3, d as defaultV
|
|
|
12
12
|
export { _ as OrCardV3 } from '../OrCard-e89c44ef.js';
|
|
13
13
|
export { a as OrCarousel, _ as OrCarouselItem } from '../OrCarouselItem-b2ab81d9.js';
|
|
14
14
|
export { _ as OrCheckbox } from '../OrCheckbox-8ee37e4d.js';
|
|
15
|
-
export { _ as OrCheckboxV3 } from '../OrCheckbox-
|
|
15
|
+
export { _ as OrCheckboxV3 } from '../OrCheckbox-aa9ca791.js';
|
|
16
16
|
export { _ as OrChip } from '../OrChips.vue_rollup-plugin-vue_styles.0-ebb4a1f0.js';
|
|
17
17
|
export { _ as OrChips } from '../OrChips-b84495ca.js';
|
|
18
18
|
export { _ as OrCode, O as OrCodeLanguages } from '../OrCode-bb5da880.js';
|
|
@@ -69,7 +69,7 @@ export { _ as OrSearch } from '../OrSearch-709d1c90.js';
|
|
|
69
69
|
export { _ as OrSearchV3 } from '../OrSearch-09e7d4dc.js';
|
|
70
70
|
export { _ as OrSegmentedControlV3, S as SegmentedControlSize } from '../OrSegmentedControl-7486115b.js';
|
|
71
71
|
export { _ as OrSelect } from '../OrSelect-2898b47a.js';
|
|
72
|
-
export { _ as OrSelectV3 } from '../OrSelect-
|
|
72
|
+
export { _ as OrSelectV3 } from '../OrSelect-d991fe95.js';
|
|
73
73
|
export { _ as OrSidebar, O as OrSidebarSide } from '../OrSidebar-feacf13a.js';
|
|
74
74
|
export { _ as OrSidebarV3 } from '../OrSidebar-6b246de1.js';
|
|
75
75
|
export { O as OrSidebarPlacement } from '../OrSidebarCollapseButton-9178923e.js';
|
|
@@ -86,10 +86,10 @@ export { _ as OrTabV3 } from '../OrTab-1ff87c76.js';
|
|
|
86
86
|
export { _ as OrTabs } from '../OrTabs-12138346.js';
|
|
87
87
|
export { _ as OrTabsV3, T as TabsVariant } from '../OrTabs-6d7d9d7e.js';
|
|
88
88
|
export { _ as OrTag } from '../OrTag-c09e03c1.js';
|
|
89
|
-
export { _ as OrTagV3, a as TagColor, T as TagVariant } from '../OrTag-
|
|
89
|
+
export { _ as OrTagV3, a as TagColor, T as TagVariant } from '../OrTag-1ed1265c.js';
|
|
90
90
|
export { _ as OrTeleport } from '../OrTeleport.vue2-f0c16c71.js';
|
|
91
91
|
export { _ as OrTeleportV3 } from '../OrTeleport.vue2-fb92f29f.js';
|
|
92
|
-
export { _ as OrTextV3 } from '../OrText-
|
|
92
|
+
export { _ as OrTextV3 } from '../OrText-91d662a0.js';
|
|
93
93
|
export { _ as OrTextarea } from '../OrTextarea-43df1192.js';
|
|
94
94
|
export { _ as OrTextareaV3 } from '../OrTextarea-0a64f718.js';
|
|
95
95
|
export { _ as OrTextbox, T as TextboxTypes } from '../OrTextbox-5233e57c.js';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { _ as OrSelectV3 } from '../../OrSelect-
|
|
1
|
+
export { _ as OrSelectV3 } from '../../OrSelect-d991fe95.js';
|
|
2
2
|
export { a as SelectSize } from '../../OrInputBox-53d1f66d.js';
|
|
3
3
|
import 'vue-demi';
|
|
4
4
|
import '../../dropdown-open-0d314aa4.js';
|
|
5
5
|
import '../../useOverflow-af6161c8.js';
|
|
6
6
|
import '@vueuse/core';
|
|
7
|
-
import '../../OrCheckbox-
|
|
7
|
+
import '../../OrCheckbox-aa9ca791.js';
|
|
8
8
|
import '../../useIdAttribute-859439f0.js';
|
|
9
9
|
import '../../OrLabel-0945a4d9.js';
|
|
10
10
|
import '../../normalize-component-6e8e3d80.js';
|
|
@@ -27,4 +27,4 @@ import '../../OrTeleport.vue2-fb92f29f.js';
|
|
|
27
27
|
import 'portal-vue';
|
|
28
28
|
import '../../OrLoader-8f1f3af1.js';
|
|
29
29
|
import '../../OrMenuItem-4f810513.js';
|
|
30
|
-
import '../../OrTag-
|
|
30
|
+
import '../../OrTag-1ed1265c.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { _ as OrTagV3, a as TagColor, T as TagVariant } from '../../OrTag-
|
|
1
|
+
export { _ as OrTagV3, a as TagColor, T as TagVariant } from '../../OrTag-1ed1265c.js';
|
|
2
2
|
import 'vue-demi';
|
|
3
3
|
import '../../OrIconButton-140f940e.js';
|
|
4
4
|
import '../../OrIcon-c434985a.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:
|
|
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:
|
|
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;
|
package/dist/esm/v2/index.js
CHANGED
|
@@ -12,7 +12,7 @@ export { D as DefaultCardCollectionViews, _ as OrCardCollectionV3, d as defaultV
|
|
|
12
12
|
export { _ as OrCardV3 } from './OrCard-e89c44ef.js';
|
|
13
13
|
export { a as OrCarousel, _ as OrCarouselItem } from './OrCarouselItem-b2ab81d9.js';
|
|
14
14
|
export { _ as OrCheckbox } from './OrCheckbox-8ee37e4d.js';
|
|
15
|
-
export { _ as OrCheckboxV3 } from './OrCheckbox-
|
|
15
|
+
export { _ as OrCheckboxV3 } from './OrCheckbox-aa9ca791.js';
|
|
16
16
|
export { _ as OrChip } from './OrChips.vue_rollup-plugin-vue_styles.0-ebb4a1f0.js';
|
|
17
17
|
export { _ as OrChips } from './OrChips-b84495ca.js';
|
|
18
18
|
export { _ as OrCode, O as OrCodeLanguages } from './OrCode-bb5da880.js';
|
|
@@ -69,7 +69,7 @@ export { _ as OrSearch } from './OrSearch-709d1c90.js';
|
|
|
69
69
|
export { _ as OrSearchV3 } from './OrSearch-09e7d4dc.js';
|
|
70
70
|
export { _ as OrSegmentedControlV3, S as SegmentedControlSize } from './OrSegmentedControl-7486115b.js';
|
|
71
71
|
export { _ as OrSelect } from './OrSelect-2898b47a.js';
|
|
72
|
-
export { _ as OrSelectV3 } from './OrSelect-
|
|
72
|
+
export { _ as OrSelectV3 } from './OrSelect-d991fe95.js';
|
|
73
73
|
export { _ as OrSidebar, O as OrSidebarSide } from './OrSidebar-feacf13a.js';
|
|
74
74
|
export { _ as OrSidebarV3 } from './OrSidebar-6b246de1.js';
|
|
75
75
|
export { O as OrSidebarPlacement } from './OrSidebarCollapseButton-9178923e.js';
|
|
@@ -86,10 +86,10 @@ export { _ as OrTabV3 } from './OrTab-1ff87c76.js';
|
|
|
86
86
|
export { _ as OrTabs } from './OrTabs-12138346.js';
|
|
87
87
|
export { _ as OrTabsV3, T as TabsVariant } from './OrTabs-6d7d9d7e.js';
|
|
88
88
|
export { _ as OrTag } from './OrTag-c09e03c1.js';
|
|
89
|
-
export { _ as OrTagV3, a as TagColor, T as TagVariant } from './OrTag-
|
|
89
|
+
export { _ as OrTagV3, a as TagColor, T as TagVariant } from './OrTag-1ed1265c.js';
|
|
90
90
|
export { _ as OrTeleport } from './OrTeleport.vue2-f0c16c71.js';
|
|
91
91
|
export { _ as OrTeleportV3 } from './OrTeleport.vue2-fb92f29f.js';
|
|
92
|
-
export { _ as OrTextV3 } from './OrText-
|
|
92
|
+
export { _ as OrTextV3 } from './OrText-91d662a0.js';
|
|
93
93
|
export { _ as OrTextarea } from './OrTextarea-43df1192.js';
|
|
94
94
|
export { _ as OrTextareaV3 } from './OrTextarea-0a64f718.js';
|
|
95
95
|
export { _ as OrTextbox, T as TextboxTypes } from './OrTextbox-5233e57c.js';
|
|
@@ -2,7 +2,7 @@ import { defineComponent, getCurrentInstance, ref, computed, onMounted, watch }
|
|
|
2
2
|
import { D as DropdownClose, a as DropdownOpen } from './dropdown-open-0d314aa4.js';
|
|
3
3
|
import { u as useOverflow } from './useOverflow-af6161c8.js';
|
|
4
4
|
import '@vueuse/core';
|
|
5
|
-
import { s as script$1 } from './OrCheckbox-
|
|
5
|
+
import { s as script$1 } from './OrCheckbox-16c1e2f4.js';
|
|
6
6
|
import { s as script$2 } from './OrError-19198748.js';
|
|
7
7
|
import { s as script$3 } from './OrExpansionPanel-541cc4c1.js';
|
|
8
8
|
import { s as script$4 } from './OrHint-6863124f.js';
|
|
@@ -12,7 +12,7 @@ import { s as script$6 } from './OrInput-0c07888f.js';
|
|
|
12
12
|
import { s as script$8 } from './OrLabel-f700f9fb.js';
|
|
13
13
|
import { s as script$9 } from './OrMenuItem-de91aded.js';
|
|
14
14
|
import { s as script$a } from './OrPopover-464a5606.js';
|
|
15
|
-
import { s as script$b } from './OrTag-
|
|
15
|
+
import { s as script$b } from './OrTag-f66c6142.js';
|
|
16
16
|
import { resolveComponent, resolveDirective, openBlock, createElementBlock, normalizeClass, createBlock, withCtx, renderSlot, createTextVNode, toDisplayString, createCommentVNode, withDirectives, createElementVNode, Fragment, renderList, createVNode, withModifiers } from 'vue';
|
|
17
17
|
|
|
18
18
|
const SelectRoot = [
|
|
@@ -33,9 +33,7 @@ const SelectPlaceholder = [
|
|
|
33
33
|
// Theme
|
|
34
34
|
'theme-foreground-outline', 'dark:theme-foreground-outline-dark',
|
|
35
35
|
// Interactivity
|
|
36
|
-
'select-none'
|
|
37
|
-
// Typography
|
|
38
|
-
'truncate'];
|
|
36
|
+
'select-none'];
|
|
39
37
|
const SelectDropdown = [
|
|
40
38
|
// Overflow
|
|
41
39
|
'overflow-y-auto',
|
|
@@ -288,9 +286,6 @@ var script = defineComponent({
|
|
|
288
286
|
|
|
289
287
|
const _hoisted_1 = ["id", "tabindex", "disabled"];
|
|
290
288
|
const _hoisted_2 = {
|
|
291
|
-
class: "truncate"
|
|
292
|
-
};
|
|
293
|
-
const _hoisted_3 = {
|
|
294
289
|
class: /*#__PURE__*/normalizeClass(['layout-row'])
|
|
295
290
|
};
|
|
296
291
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
@@ -361,12 +356,12 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
361
356
|
}, [_ctx.proxyModelValue ? renderSlot(_ctx.$slots, "valueTemplate", {
|
|
362
357
|
key: 0,
|
|
363
358
|
model: _ctx.proxyModelValue
|
|
364
|
-
}, () => [
|
|
359
|
+
}, () => [createTextVNode(toDisplayString(_ctx.selection.label), 1 /* TEXT */)]) : (openBlock(), createElementBlock("span", {
|
|
365
360
|
key: 1,
|
|
366
361
|
class: normalizeClass(_ctx.placeholderStyles)
|
|
367
362
|
}, toDisplayString(_ctx.placeholder), 3 /* TEXT, CLASS */))], 64 /* STABLE_FRAGMENT */))], 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_1), _ctx.multiple && _ctx.outerItems.length > 0 ? (openBlock(), createElementBlock(Fragment, {
|
|
368
363
|
key: 0
|
|
369
|
-
}, [createTextVNode(" +" + toDisplayString(_ctx.outerItems.length), 1 /* TEXT */)], 64 /* STABLE_FRAGMENT */)) : createCommentVNode("v-if", true), createElementVNode("div",
|
|
364
|
+
}, [createTextVNode(" +" + toDisplayString(_ctx.outerItems.length), 1 /* TEXT */)], 64 /* STABLE_FRAGMENT */)) : createCommentVNode("v-if", true), createElementVNode("div", _hoisted_2, [createVNode(_component_OrIcon, {
|
|
370
365
|
icon: _ctx.popoverState === 'open' ? 'arrow_drop_up' : 'arrow_drop_down',
|
|
371
366
|
variant: 'outlined'
|
|
372
367
|
}, null, 8 /* PROPS */, ["icon"])]), createVNode(_component_OrPopover, {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, ref, computed, watchPostEffect, unref } from 'vue-demi';
|
|
2
2
|
import { s as script$1 } from './OrIconButton-2a9a6627.js';
|
|
3
|
-
import { resolveComponent, openBlock, createElementBlock, normalizeClass,
|
|
3
|
+
import { resolveComponent, openBlock, createElementBlock, normalizeClass, renderSlot, createVNode, withModifiers, createCommentVNode } from 'vue';
|
|
4
4
|
|
|
5
5
|
var TagVariant;
|
|
6
6
|
(function (TagVariant) {
|
|
@@ -18,7 +18,7 @@ const TagRoot = [
|
|
|
18
18
|
// Layout
|
|
19
19
|
'layout-inline-row',
|
|
20
20
|
// Box
|
|
21
|
-
'
|
|
21
|
+
'max-w-fit',
|
|
22
22
|
// Shape
|
|
23
23
|
'rounded-full',
|
|
24
24
|
// Spacing
|
|
@@ -97,9 +97,6 @@ var script = defineComponent({
|
|
|
97
97
|
|
|
98
98
|
const _hoisted_1 = ["tabindex", "disabled"];
|
|
99
99
|
const _hoisted_2 = {
|
|
100
|
-
class: "truncate"
|
|
101
|
-
};
|
|
102
|
-
const _hoisted_3 = {
|
|
103
100
|
key: 0,
|
|
104
101
|
class: /*#__PURE__*/normalizeClass(['layout-row', 'm-[-4px] md:m-[-2px]'])
|
|
105
102
|
};
|
|
@@ -113,7 +110,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
113
110
|
onClick: _cache[1] || (_cache[1] = $event => _ctx.$emit('click', $event)),
|
|
114
111
|
onFocus: _cache[2] || (_cache[2] = $event => _ctx.$emit('focus', $event)),
|
|
115
112
|
onBlur: _cache[3] || (_cache[3] = $event => _ctx.$emit('blur', $event))
|
|
116
|
-
}, [
|
|
113
|
+
}, [renderSlot(_ctx.$slots, "default"), _ctx.variant === 'reset' ? (openBlock(), createElementBlock("div", _hoisted_2, [createVNode(_component_OrIconButton, {
|
|
117
114
|
icon: 'close',
|
|
118
115
|
color: _ctx.custom ? 'inherit' : _ctx.color,
|
|
119
116
|
disabled: _ctx.disabled,
|
|
@@ -17,16 +17,31 @@ const RestText = [
|
|
|
17
17
|
// Layout
|
|
18
18
|
'shrink'];
|
|
19
19
|
|
|
20
|
+
/**
|
|
21
|
+
* Use `OrText` component to crop un-wrapped single-line text with ellipsis inside narrow containers.
|
|
22
|
+
* Ellipsis can be placed in the end or in the middle of the text. Convenient for displaying long labels,
|
|
23
|
+
* that have same beginning and differ in the ending part.
|
|
24
|
+
*/
|
|
20
25
|
var script = defineComponent({
|
|
21
26
|
name: 'OrText',
|
|
22
27
|
props: {
|
|
28
|
+
/**
|
|
29
|
+
* Text to crop.
|
|
30
|
+
*/
|
|
23
31
|
text: {
|
|
24
32
|
type: String,
|
|
25
33
|
required: true
|
|
26
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
|
+
*/
|
|
27
42
|
sliceIndex: {
|
|
28
43
|
type: Number,
|
|
29
|
-
default:
|
|
44
|
+
default: 0
|
|
30
45
|
}
|
|
31
46
|
},
|
|
32
47
|
expose: ['root'],
|
|
@@ -37,15 +52,33 @@ var script = defineComponent({
|
|
|
37
52
|
const rootStyles = computed(() => ['or-text', ...TextRoot]);
|
|
38
53
|
const mainTextStyles = computed(() => [...MainText]);
|
|
39
54
|
const restTextStyles = computed(() => [...RestText]);
|
|
55
|
+
/**
|
|
56
|
+
* Preserves whitespace at the last position as <code> </code>
|
|
57
|
+
* @param str A string to escape
|
|
58
|
+
*/
|
|
59
|
+
const escapeLast = str => str && str.slice(0, -1) + '\xa0';
|
|
60
|
+
/**
|
|
61
|
+
* Preserves whitespace at the first position as <code> </code>
|
|
62
|
+
* @param str A string to escape
|
|
63
|
+
*/
|
|
64
|
+
const escapeFirst = str => str && '\xa0' + str.slice(1);
|
|
40
65
|
// State
|
|
41
66
|
const mainText = computed(() => {
|
|
42
67
|
if (props.sliceIndex) {
|
|
43
|
-
|
|
68
|
+
let mainPart = props.text.slice(0, -Math.abs(props.sliceIndex));
|
|
69
|
+
if (mainPart[mainPart.length - 1] === ' ') {
|
|
70
|
+
mainPart = escapeLast(mainPart);
|
|
71
|
+
}
|
|
72
|
+
return mainPart;
|
|
44
73
|
}
|
|
45
74
|
return props.text;
|
|
46
75
|
});
|
|
47
76
|
const restText = computed(() => {
|
|
48
|
-
|
|
77
|
+
let restPart = props.text.slice(mainText.value.length);
|
|
78
|
+
if (restPart[0] === ' ') {
|
|
79
|
+
restPart = escapeFirst(restPart);
|
|
80
|
+
}
|
|
81
|
+
return restPart;
|
|
49
82
|
});
|
|
50
83
|
return {
|
|
51
84
|
root,
|
|
@@ -10,7 +10,7 @@ export { D as DefaultCardCollectionViews, s as OrCardCollectionV3, d as defaultV
|
|
|
10
10
|
export { s as OrCardV3 } from '../OrCard-cd6af82e.js';
|
|
11
11
|
export { a as OrCarousel, s as OrCarouselItem } from '../OrCarouselItem-9071b02e.js';
|
|
12
12
|
export { s as OrCheckbox } from '../OrCheckbox-d402975a.js';
|
|
13
|
-
export { s as OrCheckboxV3 } from '../OrCheckbox-
|
|
13
|
+
export { s as OrCheckboxV3 } from '../OrCheckbox-16c1e2f4.js';
|
|
14
14
|
export { s as OrChip, a as OrChips } from '../OrChips-39d4be17.js';
|
|
15
15
|
export { s as OrCode, O as OrCodeLanguages } from '../OrCode-9d6b10da.js';
|
|
16
16
|
export { s as OrCollapse } from '../OrCollapse-445141ab.js';
|
|
@@ -66,7 +66,7 @@ export { s as OrSearch } from '../OrSearch-06c13e14.js';
|
|
|
66
66
|
export { s as OrSearchV3 } from '../OrSearch-e1cc559b.js';
|
|
67
67
|
export { s as OrSegmentedControlV3, S as SegmentedControlSize } from '../OrSegmentedControl-880b4911.js';
|
|
68
68
|
export { s as OrSelect } from '../OrSelect-5c6f0ff8.js';
|
|
69
|
-
export { s as OrSelectV3 } from '../OrSelect-
|
|
69
|
+
export { s as OrSelectV3 } from '../OrSelect-b06bf2d8.js';
|
|
70
70
|
export { s as OrSidebar, O as OrSidebarSide } from '../OrSidebar-375c85a3.js';
|
|
71
71
|
export { s as OrSidebarV3 } from '../OrSidebar-0a32cc49.js';
|
|
72
72
|
export { O as OrSidebarPlacement } from '../OrSidebarCollapseButton-647d2c50.js';
|
|
@@ -83,10 +83,10 @@ export { s as OrTabV3 } from '../OrTab-d3785ea4.js';
|
|
|
83
83
|
export { s as OrTabs } from '../OrTabs-d3812c11.js';
|
|
84
84
|
export { s as OrTabsV3, T as TabsVariant } from '../OrTabs-9949f87b.js';
|
|
85
85
|
export { s as OrTag } from '../OrTag-909a5dc9.js';
|
|
86
|
-
export { s as OrTagV3, a as TagColor, T as TagVariant } from '../OrTag-
|
|
86
|
+
export { s as OrTagV3, a as TagColor, T as TagVariant } from '../OrTag-f66c6142.js';
|
|
87
87
|
export { s as OrTeleport } from '../OrTeleport.vue3-9bce0c02.js';
|
|
88
88
|
export { s as OrTeleportV3 } from '../OrTeleport.vue3-8099178c.js';
|
|
89
|
-
export { s as OrTextV3 } from '../OrText-
|
|
89
|
+
export { s as OrTextV3 } from '../OrText-a3b00048.js';
|
|
90
90
|
export { s as OrTextarea } from '../OrTextarea-1f5c3be1.js';
|
|
91
91
|
export { s as OrTextareaV3 } from '../OrTextarea-42d21f77.js';
|
|
92
92
|
export { s as OrTextbox, T as TextboxTypes } from '../OrTextbox-2a3c67fb.js';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { s as OrSelectV3 } from '../../OrSelect-
|
|
1
|
+
export { s as OrSelectV3 } from '../../OrSelect-b06bf2d8.js';
|
|
2
2
|
export { a as SelectSize } from '../../OrInputBox-2467d7e4.js';
|
|
3
3
|
import 'vue-demi';
|
|
4
4
|
import '../../dropdown-open-0d314aa4.js';
|
|
5
5
|
import '../../useOverflow-af6161c8.js';
|
|
6
6
|
import '@vueuse/core';
|
|
7
|
-
import '../../OrCheckbox-
|
|
7
|
+
import '../../OrCheckbox-16c1e2f4.js';
|
|
8
8
|
import '../../useIdAttribute-859439f0.js';
|
|
9
9
|
import '../../OrLabel-f700f9fb.js';
|
|
10
10
|
import 'vue';
|
|
@@ -26,4 +26,4 @@ import '../../OrOverlay-55f6cf9c.js';
|
|
|
26
26
|
import '../../OrTeleport.vue3-8099178c.js';
|
|
27
27
|
import '../../OrLoader-3a918ce9.js';
|
|
28
28
|
import '../../OrMenuItem-de91aded.js';
|
|
29
|
-
import '../../OrTag-
|
|
29
|
+
import '../../OrTag-f66c6142.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { s as OrTagV3, a as TagColor, T as TagVariant } from '../../OrTag-
|
|
1
|
+
export { s as OrTagV3, a as TagColor, T as TagVariant } from '../../OrTag-f66c6142.js';
|
|
2
2
|
import 'vue-demi';
|
|
3
3
|
import '../../OrIconButton-2a9a6627.js';
|
|
4
4
|
import '../../OrIcon-ea40e58c.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:
|
|
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:
|
|
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;
|
package/dist/esm/v3/index.js
CHANGED
|
@@ -10,7 +10,7 @@ export { D as DefaultCardCollectionViews, s as OrCardCollectionV3, d as defaultV
|
|
|
10
10
|
export { s as OrCardV3 } from './OrCard-cd6af82e.js';
|
|
11
11
|
export { a as OrCarousel, s as OrCarouselItem } from './OrCarouselItem-9071b02e.js';
|
|
12
12
|
export { s as OrCheckbox } from './OrCheckbox-d402975a.js';
|
|
13
|
-
export { s as OrCheckboxV3 } from './OrCheckbox-
|
|
13
|
+
export { s as OrCheckboxV3 } from './OrCheckbox-16c1e2f4.js';
|
|
14
14
|
export { s as OrChip, a as OrChips } from './OrChips-39d4be17.js';
|
|
15
15
|
export { s as OrCode, O as OrCodeLanguages } from './OrCode-9d6b10da.js';
|
|
16
16
|
export { s as OrCollapse } from './OrCollapse-445141ab.js';
|
|
@@ -66,7 +66,7 @@ export { s as OrSearch } from './OrSearch-06c13e14.js';
|
|
|
66
66
|
export { s as OrSearchV3 } from './OrSearch-e1cc559b.js';
|
|
67
67
|
export { s as OrSegmentedControlV3, S as SegmentedControlSize } from './OrSegmentedControl-880b4911.js';
|
|
68
68
|
export { s as OrSelect } from './OrSelect-5c6f0ff8.js';
|
|
69
|
-
export { s as OrSelectV3 } from './OrSelect-
|
|
69
|
+
export { s as OrSelectV3 } from './OrSelect-b06bf2d8.js';
|
|
70
70
|
export { s as OrSidebar, O as OrSidebarSide } from './OrSidebar-375c85a3.js';
|
|
71
71
|
export { s as OrSidebarV3 } from './OrSidebar-0a32cc49.js';
|
|
72
72
|
export { O as OrSidebarPlacement } from './OrSidebarCollapseButton-647d2c50.js';
|
|
@@ -83,10 +83,10 @@ export { s as OrTabV3 } from './OrTab-d3785ea4.js';
|
|
|
83
83
|
export { s as OrTabs } from './OrTabs-d3812c11.js';
|
|
84
84
|
export { s as OrTabsV3, T as TabsVariant } from './OrTabs-9949f87b.js';
|
|
85
85
|
export { s as OrTag } from './OrTag-909a5dc9.js';
|
|
86
|
-
export { s as OrTagV3, a as TagColor, T as TagVariant } from './OrTag-
|
|
86
|
+
export { s as OrTagV3, a as TagColor, T as TagVariant } from './OrTag-f66c6142.js';
|
|
87
87
|
export { s as OrTeleport } from './OrTeleport.vue3-9bce0c02.js';
|
|
88
88
|
export { s as OrTeleportV3 } from './OrTeleport.vue3-8099178c.js';
|
|
89
|
-
export { s as OrTextV3 } from './OrText-
|
|
89
|
+
export { s as OrTextV3 } from './OrText-a3b00048.js';
|
|
90
90
|
export { s as OrTextarea } from './OrTextarea-1f5c3be1.js';
|
|
91
91
|
export { s as OrTextareaV3 } from './OrTextarea-42d21f77.js';
|
|
92
92
|
export { s as OrTextbox, T as TextboxTypes } from './OrTextbox-2a3c67fb.js';
|
package/package.json
CHANGED