@onereach/ui-components 2.74.8-beta.2339.0 → 2.74.8
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/{OrDateTimePicker-18587a06.js → OrDateTimePicker-24a56fd2.js} +2 -4
- package/dist/bundled/v2/{OrText-a665b991.js → OrText-15bf85c4.js} +36 -3
- package/dist/bundled/v2/components/index.js +2 -2
- package/dist/bundled/v2/components/or-date-time-picker/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 +3 -3
- package/dist/bundled/v3/OrText.vue_vue_type_script_lang-e93438ea.js +93 -0
- package/dist/bundled/v3/components/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 +4 -6
- package/dist/esm/v2/{OrDateTimePicker-d8cb0e8d.js → OrDateTimePicker-e1ea0a9a.js} +2 -4
- package/dist/esm/v2/{OrText-b12d0682.js → OrText-91d662a0.js} +36 -3
- package/dist/esm/v2/components/index.js +2 -2
- package/dist/esm/v2/components/or-date-time-picker/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 +2 -2
- package/dist/esm/v3/{OrDateTimePicker-c4af17e3.js → OrDateTimePicker-63f22d1b.js} +1 -3
- package/dist/esm/v3/{OrText-6b4f7cd1.js → OrText-a3b00048.js} +36 -3
- package/dist/esm/v3/components/index.js +2 -2
- package/dist/esm/v3/components/or-date-time-picker/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 +2 -2
- package/package.json +3 -2
- package/src/components/or-date-time-picker/OrDateTimePicker.vue +0 -11
- 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
|
@@ -484,7 +484,7 @@ var script = defineComponent({
|
|
|
484
484
|
}
|
|
485
485
|
});
|
|
486
486
|
|
|
487
|
-
var css_248z = "@keyframes spinAround-data-v-
|
|
487
|
+
var css_248z = "@keyframes spinAround-data-v-2cd46aea{from{transform:rotate(0)}to{transform:rotate(359deg)}}@keyframes fade-data-v-2cd46aea{from{opacity:1}to{opacity:0}}.or-date-time-picker[data-v-2cd46aea]{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start}.or-date-time-picker.is-fullwidth[data-v-2cd46aea]{width:100%!important}.or-date-time-picker.is-date-type[data-v-2cd46aea]{width:7.125rem}.or-date-time-picker.is-time-type[data-v-2cd46aea]{width:7.125rem}.or-date-time-picker.is-date-time-type[data-v-2cd46aea]{width:11.25rem}.or-date-time-picker .or-label[data-v-2cd46aea]{margin-bottom:var(--s-1)}.or-date-time-picker-info[data-v-2cd46aea]{display:flex;align-items:flex-start;justify-content:space-between;padding-top:var(--s-2)}.or-date-time-picker-input-wrapper[data-v-2cd46aea]{position:relative;width:100%;height:2.25rem;border:1px solid var(--c-neutral-2);border-radius:var(--s-2);background-color:var(--c-neutral-1);padding:.625rem;font-size:var(--fs-1);line-height:1rem;transition-timing-function:var(--t-func);transition-duration:var(--t-duration);transition-property:border-color,background-color,-webkit-box-shadow}.or-date-time-picker-input-wrapper[data-v-2cd46aea]:not(.is-readonly):hover{background-color:var(--c-neutral-0);cursor:pointer}.or-date-time-picker-input-wrapper.is-disabled[data-v-2cd46aea],.or-date-time-picker-input-wrapper[data-v-2cd46aea]:disabled{cursor:not-allowed;background-color:var(--c-neutral-2);border-color:var(--c-neutral-2)}.or-date-time-picker-input-wrapper.has-error[data-v-2cd46aea]{border-color:var(--c-error)}@media (hover:hover) and (pointer:fine){.or-date-time-picker-input-wrapper.has-error[data-v-2cd46aea]:not(.or-date-time-picker-input-wrapper.has-error.is-loading):not(.or-date-time-picker-input-wrapper.has-error.is-disabled):not(.or-date-time-picker-input-wrapper.has-error.is-readonly):not(.or-date-time-picker-input-wrapper.has-error:disabled):not(.or-date-time-picker-input-wrapper.has-error.is-focused):not(.or-date-time-picker-input-wrapper.has-error:active):hover{border-color:var(--c-error-darken-3)}}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.or-date-time-picker-input-wrapper.has-error[data-v-2cd46aea]:not(.or-date-time-picker-input-wrapper.has-error.is-loading):not(.or-date-time-picker-input-wrapper.has-error.is-disabled):not(.or-date-time-picker-input-wrapper.has-error.is-readonly):not(.or-date-time-picker-input-wrapper.has-error:disabled):not(.or-date-time-picker-input-wrapper.has-error.is-focused):not(.or-date-time-picker-input-wrapper.has-error:active):hover{border-color:var(--c-error-darken-3)}}.or-date-time-picker-input-wrapper.has-error[data-v-2cd46aea]:not(:disabled):not(.is-readonly):not(.is-loading):focus{border-color:var(--c-error-darken-5)}.or-date-time-picker-input-wrapper.has-error.is-disabled[data-v-2cd46aea],.or-date-time-picker-input-wrapper.has-error[data-v-2cd46aea]:disabled{cursor:not-allowed;border-color:var(--c-error-lighten-20)}.or-date-time-picker-input-wrapper .placeholder[data-v-2cd46aea],.or-date-time-picker-input-wrapper .value[data-v-2cd46aea]{width:100%;display:flex;flex-direction:row;justify-content:space-between;white-space:nowrap;transition-timing-function:var(--t-func);transition-duration:var(--t-duration);transition-property:opacity}.or-date-time-picker-input-wrapper .placeholder[data-v-2cd46aea]{color:var(--c-neutral-4);user-select:none}.content[data-v-2cd46aea]{border:1px solid var(--c-neutral-2);border-radius:var(--s-2);display:flex;flex-direction:column;background-color:var(--c-neutral-0);text-align:center}.content .picker-header[data-v-2cd46aea]{padding:var(--s-4) var(--s-3);display:flex;flex-direction:row;justify-content:space-between;gap:var(--s-3);font-weight:700;font-size:var(--fs-1);text-align:center;color:var(--c-neutral-6)}.content .picker-header-centered[data-v-2cd46aea]{margin:auto}.content .calendar[data-v-2cd46aea]{padding:0 var(--s-3) var(--s-3);font-size:var(--fs-0);line-height:.875rem}.content .calendar-week-days[data-v-2cd46aea]{color:var(--c-neutral-4);display:flex;flex-direction:row;justify-content:space-between;margin-bottom:var(--s-1)}.content .calendar-week-days>*[data-v-2cd46aea]{width:var(--s-6)}.content .calendar-days[data-v-2cd46aea]{display:flex;flex-direction:column;gap:var(--s-2)}.content .calendar-days-row[data-v-2cd46aea]{display:flex;flex-direction:row;justify-content:space-around;gap:var(--s-2)}.content .time-footer[data-v-2cd46aea]{width:100%;line-height:var(--s-6);text-align:center;display:inline-flex;flex-direction:row;justify-content:space-between;border-top:1px solid var(--c-neutral-2)}.content .time-footer-input[data-v-2cd46aea]{text-align:center;border:none;font-size:var(--fs-0)}.content .time-footer-input[data-v-2cd46aea]:focus-visible{outline:0;background-color:var(--c-neutral-2)}.content .time-table[data-v-2cd46aea]{display:flex;flex-direction:row;gap:var(--s-4)}.content .time-table-column[data-v-2cd46aea]{display:flex;flex-direction:column}.content .time-table-column-time[data-v-2cd46aea]{padding:0 var(--s-3) var(--s-3);display:flex;flex-direction:column;gap:var(--s-2)}.content .time-table-column-time-row[data-v-2cd46aea]{display:flex;flex-direction:row;justify-content:space-around;gap:var(--s-2)}";
|
|
488
488
|
styleInject(css_248z);
|
|
489
489
|
|
|
490
490
|
/* script */
|
|
@@ -650,7 +650,6 @@ var __vue_render__ = function () {
|
|
|
650
650
|
}],
|
|
651
651
|
staticClass: "time-footer-input",
|
|
652
652
|
attrs: {
|
|
653
|
-
"type": "number",
|
|
654
653
|
"placeholder": "00"
|
|
655
654
|
},
|
|
656
655
|
domProps: {
|
|
@@ -673,7 +672,6 @@ var __vue_render__ = function () {
|
|
|
673
672
|
}],
|
|
674
673
|
staticClass: "time-footer-input",
|
|
675
674
|
attrs: {
|
|
676
|
-
"type": "number",
|
|
677
675
|
"placeholder": "00"
|
|
678
676
|
},
|
|
679
677
|
domProps: {
|
|
@@ -746,7 +744,7 @@ var __vue_staticRenderFns__ = [];
|
|
|
746
744
|
/* style */
|
|
747
745
|
const __vue_inject_styles__ = undefined;
|
|
748
746
|
/* scoped */
|
|
749
|
-
const __vue_scope_id__ = "data-v-
|
|
747
|
+
const __vue_scope_id__ = "data-v-2cd46aea";
|
|
750
748
|
/* module identifier */
|
|
751
749
|
const __vue_module_identifier__ = undefined;
|
|
752
750
|
/* functional template */
|
|
@@ -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,
|
|
@@ -20,7 +20,7 @@ export { _ as OrCollapse } from '../OrCollapse-b6ab5b38.js';
|
|
|
20
20
|
export { _ as OrColorPicker, h as amber, n as black, b as blue, m as blueGrey, k as brown, c as cyan, j as deepOrange, d as deepPurple, g as green, i as indigo, l as lightBlue, e as lightGreen, f as lime, o as orange, p as pink, a as purple, r as red, t as teal, w as white, y as yellow } from '../OrColorPicker-6d3066b0.js';
|
|
21
21
|
export { _ as OrConfirm } from '../OrConfirm-b6ef7bdf.js';
|
|
22
22
|
export { C as ConfirmType, _ as OrConfirmV3 } from '../OrConfirm-15e27711.js';
|
|
23
|
-
export { D as DEFAULT_TEXT, _ as OrDateTimePicker, a as OrDateTimePickerItemTypes, O as OrDateTimePickerTypes } from '../OrDateTimePicker-
|
|
23
|
+
export { D as DEFAULT_TEXT, _ as OrDateTimePicker, a as OrDateTimePickerItemTypes, O as OrDateTimePickerTypes } from '../OrDateTimePicker-e1ea0a9a.js';
|
|
24
24
|
export { _ as OrError } from '../OrError-efc74907.js';
|
|
25
25
|
export { _ as OrErrorTagV3 } from '../OrErrorTag-7cd5dc68.js';
|
|
26
26
|
export { _ as OrErrorV3 } from '../OrError-13845bb0.js';
|
|
@@ -89,7 +89,7 @@ export { _ as OrTag } from '../OrTag-c09e03c1.js';
|
|
|
89
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,4 +1,4 @@
|
|
|
1
|
-
export { D as DEFAULT_TEXT, _ as OrDateTimePicker, a as OrDateTimePickerItemTypes, O as OrDateTimePickerTypes } from '../../OrDateTimePicker-
|
|
1
|
+
export { D as DEFAULT_TEXT, _ as OrDateTimePicker, a as OrDateTimePickerItemTypes, O as OrDateTimePickerTypes } from '../../OrDateTimePicker-e1ea0a9a.js';
|
|
2
2
|
import 'lodash';
|
|
3
3
|
import 'vue-demi';
|
|
4
4
|
import '@vueuse/core';
|
|
@@ -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
|
@@ -20,7 +20,7 @@ export { _ as OrCollapse } from './OrCollapse-b6ab5b38.js';
|
|
|
20
20
|
export { _ as OrColorPicker, h as amber, n as black, b as blue, m as blueGrey, k as brown, c as cyan, j as deepOrange, d as deepPurple, g as green, i as indigo, l as lightBlue, e as lightGreen, f as lime, o as orange, p as pink, a as purple, r as red, t as teal, w as white, y as yellow } from './OrColorPicker-6d3066b0.js';
|
|
21
21
|
export { _ as OrConfirm } from './OrConfirm-b6ef7bdf.js';
|
|
22
22
|
export { C as ConfirmType, _ as OrConfirmV3 } from './OrConfirm-15e27711.js';
|
|
23
|
-
export { D as DEFAULT_TEXT, _ as OrDateTimePicker, a as OrDateTimePickerItemTypes, O as OrDateTimePickerTypes } from './OrDateTimePicker-
|
|
23
|
+
export { D as DEFAULT_TEXT, _ as OrDateTimePicker, a as OrDateTimePickerItemTypes, O as OrDateTimePickerTypes } from './OrDateTimePicker-e1ea0a9a.js';
|
|
24
24
|
export { _ as OrError } from './OrError-efc74907.js';
|
|
25
25
|
export { _ as OrErrorTagV3 } from './OrErrorTag-7cd5dc68.js';
|
|
26
26
|
export { _ as OrErrorV3 } from './OrError-13845bb0.js';
|
|
@@ -89,7 +89,7 @@ export { _ as OrTag } from './OrTag-c09e03c1.js';
|
|
|
89
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';
|
|
@@ -630,12 +630,10 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
630
630
|
}), 128 /* KEYED_FRAGMENT */))]);
|
|
631
631
|
}), 128 /* KEYED_FRAGMENT */))])]), _ctx.isShowTime ? (openBlock(), createElementBlock("div", _hoisted_14, [withDirectives(createElementVNode("input", {
|
|
632
632
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = $event => _ctx.inputHours = $event),
|
|
633
|
-
type: "number",
|
|
634
633
|
class: "time-footer-input",
|
|
635
634
|
placeholder: "00"
|
|
636
635
|
}, null, 512 /* NEED_PATCH */), [[vModelText, _ctx.inputHours]]), _hoisted_15, withDirectives(createElementVNode("input", {
|
|
637
636
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = $event => _ctx.inputMinutes = $event),
|
|
638
|
-
type: "number",
|
|
639
637
|
class: "time-footer-input",
|
|
640
638
|
placeholder: "00"
|
|
641
639
|
}, null, 512 /* NEED_PATCH */), [[vModelText, _ctx.inputMinutes]])])) : createCommentVNode("v-if", true)], 64 /* STABLE_FRAGMENT */)) : (openBlock(), createElementBlock("div", _hoisted_16, [createElementVNode("div", _hoisted_17, [createElementVNode("div", _hoisted_18, [createElementVNode("span", _hoisted_19, toDisplayString(_ctx.translations.hours), 1 /* TEXT */)]), createElementVNode("div", _hoisted_20, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.hours, (row, index) => {
|
|
@@ -670,7 +668,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
670
668
|
}, 8 /* PROPS */, ["trigger"])) : createCommentVNode("v-if", true)], 2 /* CLASS */);
|
|
671
669
|
}
|
|
672
670
|
|
|
673
|
-
var css_248z = "/**\n * A simple way to manage mobile breakpoints described in https://davidwalsh.name/write-media-queries-sass.\n * Can be further extended using following approach https://rimdev.io/making-media-query-mixins-with-sass/\n */\n@keyframes spinAround-733cf0b2 {\nfrom {\n transform: rotate(0);\n}\nto {\n transform: rotate(359deg);\n}\n}\n@keyframes fade-733cf0b2 {\nfrom {\n opacity: 1;\n}\nto {\n opacity: 0;\n}\n}\n.or-date-time-picker[data-v-733cf0b2] {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n justify-content: flex-start;\n}\n.or-date-time-picker.is-fullwidth[data-v-733cf0b2] {\n width: 100% !important;\n}\n.or-date-time-picker.is-date-type[data-v-733cf0b2] {\n width: 7.125rem;\n}\n.or-date-time-picker.is-time-type[data-v-733cf0b2] {\n width: 7.125rem;\n}\n.or-date-time-picker.is-date-time-type[data-v-733cf0b2] {\n width: 11.25rem;\n}\n.or-date-time-picker .or-label[data-v-733cf0b2] {\n margin-bottom: var(--s-1);\n}\n.or-date-time-picker-info[data-v-733cf0b2] {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n padding-top: var(--s-2);\n}\n.or-date-time-picker-input-wrapper[data-v-733cf0b2] {\n position: relative;\n width: 100%;\n height: 2.25rem;\n border: 1px solid var(--c-neutral-2);\n border-radius: var(--s-2);\n background-color: var(--c-neutral-1);\n padding: 0.625rem;\n font-size: var(--fs-1);\n line-height: 1rem;\n transition-timing-function: var(--t-func);\n transition-duration: var(--t-duration);\n transition-property: border-color, background-color, -webkit-box-shadow;\n}\n.or-date-time-picker-input-wrapper[data-v-733cf0b2]:not(.is-readonly):hover {\n background-color: var(--c-neutral-0);\n cursor: pointer;\n}\n.or-date-time-picker-input-wrapper[data-v-733cf0b2]:disabled, .or-date-time-picker-input-wrapper.is-disabled[data-v-733cf0b2] {\n cursor: not-allowed;\n background-color: var(--c-neutral-2);\n border-color: var(--c-neutral-2);\n}\n.or-date-time-picker-input-wrapper.has-error[data-v-733cf0b2] {\n border-color: var(--c-error);\n}\n@media (hover: hover) and (pointer: fine) {\n.or-date-time-picker-input-wrapper.has-error[data-v-733cf0b2]:not(.or-date-time-picker-input-wrapper.has-error.is-loading):not(.or-date-time-picker-input-wrapper.has-error.is-disabled):not(.or-date-time-picker-input-wrapper.has-error.is-readonly):not(.or-date-time-picker-input-wrapper.has-error:disabled):not(.or-date-time-picker-input-wrapper.has-error.is-focused):not(.or-date-time-picker-input-wrapper.has-error:active):hover {\n border-color: var(--c-error-darken-3);\n}\n}\n@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {\n.or-date-time-picker-input-wrapper.has-error[data-v-733cf0b2]:not(.or-date-time-picker-input-wrapper.has-error.is-loading):not(.or-date-time-picker-input-wrapper.has-error.is-disabled):not(.or-date-time-picker-input-wrapper.has-error.is-readonly):not(.or-date-time-picker-input-wrapper.has-error:disabled):not(.or-date-time-picker-input-wrapper.has-error.is-focused):not(.or-date-time-picker-input-wrapper.has-error:active):hover {\n border-color: var(--c-error-darken-3);\n}\n}\n.or-date-time-picker-input-wrapper.has-error[data-v-733cf0b2]:not(:disabled):not(.is-readonly):not(.is-loading):focus {\n border-color: var(--c-error-darken-5);\n}\n.or-date-time-picker-input-wrapper.has-error[data-v-733cf0b2]:disabled, .or-date-time-picker-input-wrapper.has-error.is-disabled[data-v-733cf0b2] {\n cursor: not-allowed;\n border-color: var(--c-error-lighten-20);\n}\n.or-date-time-picker-input-wrapper .placeholder[data-v-733cf0b2],\n.or-date-time-picker-input-wrapper .value[data-v-733cf0b2] {\n width: 100%;\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n white-space: nowrap;\n transition-timing-function: var(--t-func);\n transition-duration: var(--t-duration);\n transition-property: opacity;\n}\n.or-date-time-picker-input-wrapper .placeholder[data-v-733cf0b2] {\n color: var(--c-neutral-4);\n user-select: none;\n}\n.content[data-v-733cf0b2] {\n border: 1px solid var(--c-neutral-2);\n border-radius: var(--s-2);\n display: flex;\n flex-direction: column;\n background-color: var(--c-neutral-0);\n text-align: center;\n}\n.content .picker-header[data-v-733cf0b2] {\n padding: var(--s-4) var(--s-3);\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n gap: var(--s-3);\n font-weight: bold;\n font-size: var(--fs-1);\n text-align: center;\n color: var(--c-neutral-6);\n}\n.content .picker-header-centered[data-v-733cf0b2] {\n margin: auto;\n}\n.content .calendar[data-v-733cf0b2] {\n padding: 0 var(--s-3) var(--s-3);\n font-size: var(--fs-0);\n line-height: 0.875rem;\n}\n.content .calendar-week-days[data-v-733cf0b2] {\n color: var(--c-neutral-4);\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n margin-bottom: var(--s-1);\n}\n.content .calendar-week-days > *[data-v-733cf0b2] {\n width: var(--s-6);\n}\n.content .calendar-days[data-v-733cf0b2] {\n display: flex;\n flex-direction: column;\n gap: var(--s-2);\n}\n.content .calendar-days-row[data-v-733cf0b2] {\n display: flex;\n flex-direction: row;\n justify-content: space-around;\n gap: var(--s-2);\n}\n.content .time-footer[data-v-733cf0b2] {\n width: 100%;\n line-height: var(--s-6);\n text-align: center;\n display: inline-flex;\n flex-direction: row;\n justify-content: space-between;\n border-top: 1px solid var(--c-neutral-2);\n}\n.content .time-footer
|
|
671
|
+
var css_248z = "/**\n * A simple way to manage mobile breakpoints described in https://davidwalsh.name/write-media-queries-sass.\n * Can be further extended using following approach https://rimdev.io/making-media-query-mixins-with-sass/\n */\n@keyframes spinAround-733cf0b2 {\nfrom {\n transform: rotate(0);\n}\nto {\n transform: rotate(359deg);\n}\n}\n@keyframes fade-733cf0b2 {\nfrom {\n opacity: 1;\n}\nto {\n opacity: 0;\n}\n}\n.or-date-time-picker[data-v-733cf0b2] {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n justify-content: flex-start;\n}\n.or-date-time-picker.is-fullwidth[data-v-733cf0b2] {\n width: 100% !important;\n}\n.or-date-time-picker.is-date-type[data-v-733cf0b2] {\n width: 7.125rem;\n}\n.or-date-time-picker.is-time-type[data-v-733cf0b2] {\n width: 7.125rem;\n}\n.or-date-time-picker.is-date-time-type[data-v-733cf0b2] {\n width: 11.25rem;\n}\n.or-date-time-picker .or-label[data-v-733cf0b2] {\n margin-bottom: var(--s-1);\n}\n.or-date-time-picker-info[data-v-733cf0b2] {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n padding-top: var(--s-2);\n}\n.or-date-time-picker-input-wrapper[data-v-733cf0b2] {\n position: relative;\n width: 100%;\n height: 2.25rem;\n border: 1px solid var(--c-neutral-2);\n border-radius: var(--s-2);\n background-color: var(--c-neutral-1);\n padding: 0.625rem;\n font-size: var(--fs-1);\n line-height: 1rem;\n transition-timing-function: var(--t-func);\n transition-duration: var(--t-duration);\n transition-property: border-color, background-color, -webkit-box-shadow;\n}\n.or-date-time-picker-input-wrapper[data-v-733cf0b2]:not(.is-readonly):hover {\n background-color: var(--c-neutral-0);\n cursor: pointer;\n}\n.or-date-time-picker-input-wrapper[data-v-733cf0b2]:disabled, .or-date-time-picker-input-wrapper.is-disabled[data-v-733cf0b2] {\n cursor: not-allowed;\n background-color: var(--c-neutral-2);\n border-color: var(--c-neutral-2);\n}\n.or-date-time-picker-input-wrapper.has-error[data-v-733cf0b2] {\n border-color: var(--c-error);\n}\n@media (hover: hover) and (pointer: fine) {\n.or-date-time-picker-input-wrapper.has-error[data-v-733cf0b2]:not(.or-date-time-picker-input-wrapper.has-error.is-loading):not(.or-date-time-picker-input-wrapper.has-error.is-disabled):not(.or-date-time-picker-input-wrapper.has-error.is-readonly):not(.or-date-time-picker-input-wrapper.has-error:disabled):not(.or-date-time-picker-input-wrapper.has-error.is-focused):not(.or-date-time-picker-input-wrapper.has-error:active):hover {\n border-color: var(--c-error-darken-3);\n}\n}\n@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {\n.or-date-time-picker-input-wrapper.has-error[data-v-733cf0b2]:not(.or-date-time-picker-input-wrapper.has-error.is-loading):not(.or-date-time-picker-input-wrapper.has-error.is-disabled):not(.or-date-time-picker-input-wrapper.has-error.is-readonly):not(.or-date-time-picker-input-wrapper.has-error:disabled):not(.or-date-time-picker-input-wrapper.has-error.is-focused):not(.or-date-time-picker-input-wrapper.has-error:active):hover {\n border-color: var(--c-error-darken-3);\n}\n}\n.or-date-time-picker-input-wrapper.has-error[data-v-733cf0b2]:not(:disabled):not(.is-readonly):not(.is-loading):focus {\n border-color: var(--c-error-darken-5);\n}\n.or-date-time-picker-input-wrapper.has-error[data-v-733cf0b2]:disabled, .or-date-time-picker-input-wrapper.has-error.is-disabled[data-v-733cf0b2] {\n cursor: not-allowed;\n border-color: var(--c-error-lighten-20);\n}\n.or-date-time-picker-input-wrapper .placeholder[data-v-733cf0b2],\n.or-date-time-picker-input-wrapper .value[data-v-733cf0b2] {\n width: 100%;\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n white-space: nowrap;\n transition-timing-function: var(--t-func);\n transition-duration: var(--t-duration);\n transition-property: opacity;\n}\n.or-date-time-picker-input-wrapper .placeholder[data-v-733cf0b2] {\n color: var(--c-neutral-4);\n user-select: none;\n}\n.content[data-v-733cf0b2] {\n border: 1px solid var(--c-neutral-2);\n border-radius: var(--s-2);\n display: flex;\n flex-direction: column;\n background-color: var(--c-neutral-0);\n text-align: center;\n}\n.content .picker-header[data-v-733cf0b2] {\n padding: var(--s-4) var(--s-3);\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n gap: var(--s-3);\n font-weight: bold;\n font-size: var(--fs-1);\n text-align: center;\n color: var(--c-neutral-6);\n}\n.content .picker-header-centered[data-v-733cf0b2] {\n margin: auto;\n}\n.content .calendar[data-v-733cf0b2] {\n padding: 0 var(--s-3) var(--s-3);\n font-size: var(--fs-0);\n line-height: 0.875rem;\n}\n.content .calendar-week-days[data-v-733cf0b2] {\n color: var(--c-neutral-4);\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n margin-bottom: var(--s-1);\n}\n.content .calendar-week-days > *[data-v-733cf0b2] {\n width: var(--s-6);\n}\n.content .calendar-days[data-v-733cf0b2] {\n display: flex;\n flex-direction: column;\n gap: var(--s-2);\n}\n.content .calendar-days-row[data-v-733cf0b2] {\n display: flex;\n flex-direction: row;\n justify-content: space-around;\n gap: var(--s-2);\n}\n.content .time-footer[data-v-733cf0b2] {\n width: 100%;\n line-height: var(--s-6);\n text-align: center;\n display: inline-flex;\n flex-direction: row;\n justify-content: space-between;\n border-top: 1px solid var(--c-neutral-2);\n}\n.content .time-footer-input[data-v-733cf0b2] {\n text-align: center;\n border: none;\n font-size: var(--fs-0);\n}\n.content .time-footer-input[data-v-733cf0b2]:focus-visible {\n outline: none;\n background-color: var(--c-neutral-2);\n}\n.content .time-table[data-v-733cf0b2] {\n display: flex;\n flex-direction: row;\n gap: var(--s-4);\n}\n.content .time-table-column[data-v-733cf0b2] {\n display: flex;\n flex-direction: column;\n}\n.content .time-table-column-time[data-v-733cf0b2] {\n padding: 0 var(--s-3) var(--s-3);\n display: flex;\n flex-direction: column;\n gap: var(--s-2);\n}\n.content .time-table-column-time-row[data-v-733cf0b2] {\n display: flex;\n flex-direction: row;\n justify-content: space-around;\n gap: var(--s-2);\n}";
|
|
674
672
|
styleInject(css_248z);
|
|
675
673
|
|
|
676
674
|
script.render = render;
|
|
@@ -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,
|
|
@@ -17,7 +17,7 @@ export { s as OrCollapse } from '../OrCollapse-445141ab.js';
|
|
|
17
17
|
export { s as OrColorPicker, h as amber, n as black, b as blue, m as blueGrey, k as brown, c as cyan, j as deepOrange, d as deepPurple, g as green, i as indigo, l as lightBlue, e as lightGreen, f as lime, o as orange, p as pink, a as purple, r as red, t as teal, w as white, y as yellow } from '../OrColorPicker-53890a6e.js';
|
|
18
18
|
export { s as OrConfirm } from '../OrConfirm-02ae9c60.js';
|
|
19
19
|
export { C as ConfirmType, s as OrConfirmV3 } from '../OrConfirm-dbf267cd.js';
|
|
20
|
-
export { D as DEFAULT_TEXT, s as OrDateTimePicker, a as OrDateTimePickerItemTypes, O as OrDateTimePickerTypes } from '../OrDateTimePicker-
|
|
20
|
+
export { D as DEFAULT_TEXT, s as OrDateTimePicker, a as OrDateTimePickerItemTypes, O as OrDateTimePickerTypes } from '../OrDateTimePicker-63f22d1b.js';
|
|
21
21
|
export { s as OrError } from '../OrError-f90296db.js';
|
|
22
22
|
export { s as OrErrorTagV3 } from '../OrErrorTag-0025b17c.js';
|
|
23
23
|
export { s as OrErrorV3 } from '../OrError-19198748.js';
|
|
@@ -86,7 +86,7 @@ export { s as OrTag } from '../OrTag-909a5dc9.js';
|
|
|
86
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,4 +1,4 @@
|
|
|
1
|
-
export { D as DEFAULT_TEXT, s as OrDateTimePicker, a as OrDateTimePickerItemTypes, O as OrDateTimePickerTypes } from '../../OrDateTimePicker-
|
|
1
|
+
export { D as DEFAULT_TEXT, s as OrDateTimePicker, a as OrDateTimePickerItemTypes, O as OrDateTimePickerTypes } from '../../OrDateTimePicker-63f22d1b.js';
|
|
2
2
|
import 'lodash';
|
|
3
3
|
import 'vue-demi';
|
|
4
4
|
import '@vueuse/core';
|
|
@@ -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
|
@@ -17,7 +17,7 @@ export { s as OrCollapse } from './OrCollapse-445141ab.js';
|
|
|
17
17
|
export { s as OrColorPicker, h as amber, n as black, b as blue, m as blueGrey, k as brown, c as cyan, j as deepOrange, d as deepPurple, g as green, i as indigo, l as lightBlue, e as lightGreen, f as lime, o as orange, p as pink, a as purple, r as red, t as teal, w as white, y as yellow } from './OrColorPicker-53890a6e.js';
|
|
18
18
|
export { s as OrConfirm } from './OrConfirm-02ae9c60.js';
|
|
19
19
|
export { C as ConfirmType, s as OrConfirmV3 } from './OrConfirm-dbf267cd.js';
|
|
20
|
-
export { D as DEFAULT_TEXT, s as OrDateTimePicker, a as OrDateTimePickerItemTypes, O as OrDateTimePickerTypes } from './OrDateTimePicker-
|
|
20
|
+
export { D as DEFAULT_TEXT, s as OrDateTimePicker, a as OrDateTimePickerItemTypes, O as OrDateTimePickerTypes } from './OrDateTimePicker-63f22d1b.js';
|
|
21
21
|
export { s as OrError } from './OrError-f90296db.js';
|
|
22
22
|
export { s as OrErrorTagV3 } from './OrErrorTag-0025b17c.js';
|
|
23
23
|
export { s as OrErrorV3 } from './OrError-19198748.js';
|
|
@@ -86,7 +86,7 @@ export { s as OrTag } from './OrTag-909a5dc9.js';
|
|
|
86
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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onereach/ui-components",
|
|
3
|
-
"version": "2.74.8
|
|
3
|
+
"version": "2.74.8",
|
|
4
4
|
"description": "Vue components library for v2/3",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./dist/auto/index.js",
|
|
@@ -124,5 +124,6 @@
|
|
|
124
124
|
"default": "./dist/bundled/v3/components/*/index.js"
|
|
125
125
|
},
|
|
126
126
|
"./package.json": "./package.json"
|
|
127
|
-
}
|
|
127
|
+
},
|
|
128
|
+
"gitHead": "daf6e9f278b97d4e36889093f41f2c03aafb5404"
|
|
128
129
|
}
|
|
@@ -152,14 +152,12 @@
|
|
|
152
152
|
>
|
|
153
153
|
<input
|
|
154
154
|
v-model="inputHours"
|
|
155
|
-
type="number"
|
|
156
155
|
class="time-footer-input"
|
|
157
156
|
placeholder="00"
|
|
158
157
|
>
|
|
159
158
|
<span>:</span>
|
|
160
159
|
<input
|
|
161
160
|
v-model="inputMinutes"
|
|
162
|
-
type="number"
|
|
163
161
|
class="time-footer-input"
|
|
164
162
|
placeholder="00"
|
|
165
163
|
>
|
|
@@ -811,15 +809,6 @@ export default defineComponent({
|
|
|
811
809
|
justify-content: space-between;
|
|
812
810
|
border-top: 1px solid $c-neutral-2;
|
|
813
811
|
|
|
814
|
-
input::-webkit-outer-spin-button,
|
|
815
|
-
input::-webkit-inner-spin-button {
|
|
816
|
-
-webkit-appearance: none;
|
|
817
|
-
margin: 0;
|
|
818
|
-
}
|
|
819
|
-
input[type='number'] {
|
|
820
|
-
-moz-appearance:textfield;
|
|
821
|
-
}
|
|
822
|
-
|
|
823
812
|
&-input {
|
|
824
813
|
text-align: center;
|
|
825
814
|
border: none;
|
|
@@ -34,13 +34,91 @@ const Template: StoryFn<typeof OrText> = (args) => ({
|
|
|
34
34
|
},
|
|
35
35
|
|
|
36
36
|
template: `
|
|
37
|
-
<
|
|
37
|
+
<div class="w-2/5 mx-auto px-md bg-surface-2 dark:bg-surface-2-dark">
|
|
38
|
+
<OrText v-bind="args" />
|
|
39
|
+
</div>
|
|
38
40
|
`,
|
|
39
41
|
});
|
|
40
42
|
|
|
41
|
-
export const
|
|
42
|
-
|
|
43
|
-
Text.args = {
|
|
43
|
+
export const Default = Template.bind({});
|
|
44
|
+
Default.args = {
|
|
44
45
|
// Props
|
|
45
|
-
text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt
|
|
46
|
+
text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt \
|
|
47
|
+
ut labore et dolore magna aliqua.',
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export const MiddleCrop = Template.bind({});
|
|
51
|
+
MiddleCrop.args = {
|
|
52
|
+
...Default.args,
|
|
53
|
+
sliceIndex: 12,
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export const TooFarLeft = Template.bind({});
|
|
57
|
+
TooFarLeft.args = {
|
|
58
|
+
...Default.args,
|
|
59
|
+
sliceIndex: 120,
|
|
60
|
+
};
|
|
61
|
+
TooFarLeft.parameters = {
|
|
62
|
+
docs: {
|
|
63
|
+
description: {
|
|
64
|
+
story: 'Caution. If `sliceIndex` is greater than the visible part length, \
|
|
65
|
+
then beginning part with ellipsis is not displayed and ending part overflows the container.',
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export const ComplexContainer: StoryFn<typeof OrText> = (args) => ({
|
|
71
|
+
components: {
|
|
72
|
+
OrText,
|
|
73
|
+
},
|
|
74
|
+
|
|
75
|
+
setup() {
|
|
76
|
+
return { args };
|
|
77
|
+
},
|
|
78
|
+
|
|
79
|
+
template: `
|
|
80
|
+
<div class="w-full">
|
|
81
|
+
<h3 class="typography-headline-3 mb-md">Flex container side effect</h3>
|
|
82
|
+
<div class="w-[300px] flex bg-surface-2 dark:bg-surface-2-dark">
|
|
83
|
+
<!-- fixed part -->
|
|
84
|
+
<div class="w-[20px]" />
|
|
85
|
+
<!-- growing part -->
|
|
86
|
+
<div class="grow px-md">
|
|
87
|
+
<OrText v-bind="args" />
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
<h3 class="typography-headline-3 my-md">Solution with a wrapper</h3>
|
|
91
|
+
<div class="w-[300px] flex bg-surface-2 dark:bg-surface-2-dark">
|
|
92
|
+
<!-- fixed part -->
|
|
93
|
+
<div class="w-[20px]" />
|
|
94
|
+
<!-- growing part -->
|
|
95
|
+
<div class="grow px-md min-w-0">
|
|
96
|
+
<OrText v-bind="args" />
|
|
97
|
+
</div>
|
|
98
|
+
</div>
|
|
99
|
+
<h3 class="typography-headline-3 my-md">Solution without a wrapper</h3>
|
|
100
|
+
<div class="w-[300px] flex bg-surface-2 dark:bg-surface-2-dark">
|
|
101
|
+
<!-- fixed part -->
|
|
102
|
+
<div class="w-[20px]" />
|
|
103
|
+
<!-- growing part -->
|
|
104
|
+
<OrText v-bind="args" class="grow px-md min-w-0" />
|
|
105
|
+
</div>
|
|
106
|
+
</div>
|
|
107
|
+
`,
|
|
108
|
+
});
|
|
109
|
+
ComplexContainer.storyName = 'Growing Flex Container';
|
|
110
|
+
ComplexContainer.args = {
|
|
111
|
+
...Default.args,
|
|
112
|
+
sliceIndex: 12,
|
|
113
|
+
};
|
|
114
|
+
ComplexContainer.parameters = {
|
|
115
|
+
docs: {
|
|
116
|
+
description: {
|
|
117
|
+
story: 'In a special case when OrText is placed inside a variable width container,\
|
|
118
|
+
such as a flexbox growing block, or when it is itself a growing flexbox item,\
|
|
119
|
+
there is a problem for a browser to proper calculate the cropping position.\
|
|
120
|
+
As a solution place a `min-width: 0;` style (tailwind class `min-w-0`)\
|
|
121
|
+
to the growing item - container or the OrText itself.',
|
|
122
|
+
},
|
|
123
|
+
},
|
|
46
124
|
};
|