@onereach/ui-components 21.2.0 → 21.3.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/esm/components/{OrEditorTabsV3-cbe58a9e.js → OrEditorTabsV3-856e42f1.js} +49 -22
- package/dist/esm/components/index.js +1 -1
- package/dist/esm/components/or-data-grid-v3/index.js +1 -1
- package/dist/esm/components/or-editor-tabs-v3/OrEditorTabs.vue.d.ts +1 -1
- package/dist/esm/components/or-editor-tabs-v3/index.js +2 -2
- package/dist/esm/components/or-editor-tabs-v3/styles.d.ts +1 -0
- package/dist/esm/components/or-select-v3/index.js +1 -1
- package/dist/esm/index.js +1 -1
- package/package.json +4 -4
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { defineComponent, ref, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, renderSlot, Fragment, createVNode, withModifiers, createCommentVNode, createElementVNode, toRef, watch, renderList, createBlock, withCtx, toDisplayString, createTextVNode } from 'vue';
|
|
2
|
-
import { useScroll } from '@vueuse/core';
|
|
3
2
|
import { b as i, j as isVue2, r as re, l as u, n as ne } from './OrAutocompleteV3-961163d0.js';
|
|
4
3
|
import { OrIconButtonV3 as script$2 } from './or-icon-button-v3/index.js';
|
|
5
4
|
import { OrIconV3 as script$3 } from './or-icon-v3/index.js';
|
|
@@ -21,15 +20,19 @@ const EditorTabsItem = [
|
|
|
21
20
|
// Box
|
|
22
21
|
'md:max-w-[240px]',
|
|
23
22
|
// Spacing
|
|
24
|
-
'px-md', 'py-
|
|
23
|
+
'px-md', 'py-[7px]', 'gap-sm',
|
|
25
24
|
// Typography
|
|
26
25
|
'typography-caption-regular',
|
|
26
|
+
// Border
|
|
27
|
+
'border-b-1', 'border-outline-variant', 'dark:border-outline-variant-dark', 'selected:border-b-[theme(backgroundColor.surface-1)]', 'dark:selected:border-b-[theme(backgroundColor.surface-1-dark)]',
|
|
27
28
|
// Theme
|
|
28
29
|
'theme-foreground-outline', 'dark:theme-foreground-outline-dark',
|
|
29
30
|
// Theme (hover)
|
|
30
31
|
'hover:theme-foreground-primary', 'dark:hover:theme-foreground-primary-dark',
|
|
31
32
|
// Theme (selected)
|
|
32
|
-
'selected:theme-foreground-primary', 'dark:selected:theme-foreground-primary-dark', 'selected:theme-background-surface-1', 'dark:selected:theme-background-surface-1-dark'
|
|
33
|
+
'selected:theme-foreground-primary', 'dark:selected:theme-foreground-primary-dark', 'selected:theme-background-surface-1', 'dark:selected:theme-background-surface-1-dark',
|
|
34
|
+
// FIX
|
|
35
|
+
'pb-[9px]'];
|
|
33
36
|
|
|
34
37
|
var script$1 = defineComponent({
|
|
35
38
|
name: 'OrEditorTabsItem',
|
|
@@ -102,7 +105,22 @@ const EditorTabsHeader = [
|
|
|
102
105
|
// Layout
|
|
103
106
|
'layout-row',
|
|
104
107
|
// Theme
|
|
105
|
-
'
|
|
108
|
+
'border-b-1', 'theme-border-outline-variant', 'dark:theme-border-outline-variant-dark',
|
|
109
|
+
// Box
|
|
110
|
+
'w-full',
|
|
111
|
+
// FIX
|
|
112
|
+
'mb-[-1px]'
|
|
113
|
+
// adds border between tab and '+' button
|
|
114
|
+
// 'theme-divider-outline-variant',
|
|
115
|
+
// 'dark:theme-divider-outline-variant-dark',
|
|
116
|
+
];
|
|
117
|
+
const EditorTabsAddButton = [
|
|
118
|
+
// Box
|
|
119
|
+
'md:grow', '!max-w-full', '!p-sm',
|
|
120
|
+
// Border
|
|
121
|
+
'border-l-1', 'border-r-1 md:border-r-0',
|
|
122
|
+
// Theme
|
|
123
|
+
'border-outline-variant dark:border-outline-variant-dark'];
|
|
106
124
|
const EditorTabsHeaderTabs = [
|
|
107
125
|
// Layout
|
|
108
126
|
'layout-row grow md:grow-0',
|
|
@@ -172,6 +190,7 @@ var script = defineComponent({
|
|
|
172
190
|
const headerStyles = computed(() => [...EditorTabsHeader]);
|
|
173
191
|
const headerTabsStyles = computed(() => [...EditorTabsHeaderTabs, ...EditorTabsHeaderTabsOverflows[props.overflow]]);
|
|
174
192
|
const contentStyles = computed(() => [...EditorTabsContent]);
|
|
193
|
+
const addButtonStyles = computed(() => [...EditorTabsAddButton]);
|
|
175
194
|
// State
|
|
176
195
|
const proxyModelValue = re(toRef(props, 'modelValue'), context.emit);
|
|
177
196
|
const selectedItem = computed(() => {
|
|
@@ -180,7 +199,9 @@ var script = defineComponent({
|
|
|
180
199
|
watch(selectedItem, value => {
|
|
181
200
|
var _a, _b, _c;
|
|
182
201
|
if (value) {
|
|
183
|
-
(_c = (_b = (_a = editorTabsItems.value) === null || _a === void 0 ? void 0 : _a[props.items.indexOf(value)]) === null || _b === void 0 ? void 0 : _b.root) === null || _c === void 0 ? void 0 : _c.scrollIntoView(
|
|
202
|
+
(_c = (_b = (_a = editorTabsItems.value) === null || _a === void 0 ? void 0 : _a[props.items.indexOf(value)]) === null || _b === void 0 ? void 0 : _b.root) === null || _c === void 0 ? void 0 : _c.scrollIntoView({
|
|
203
|
+
block: 'nearest'
|
|
204
|
+
});
|
|
184
205
|
}
|
|
185
206
|
}, {
|
|
186
207
|
flush: 'post'
|
|
@@ -189,13 +210,6 @@ var script = defineComponent({
|
|
|
189
210
|
return props.items.filter(item => item.value !== proxyModelValue.value);
|
|
190
211
|
});
|
|
191
212
|
const showOverflowMenu = ref(false);
|
|
192
|
-
const {
|
|
193
|
-
x: headerTabsScroll
|
|
194
|
-
} = useScroll(headerTabs);
|
|
195
|
-
// Handlers
|
|
196
|
-
function onWheel(event) {
|
|
197
|
-
headerTabsScroll.value = headerTabsScroll.value + event.deltaY;
|
|
198
|
-
}
|
|
199
213
|
// Methods
|
|
200
214
|
function open() {
|
|
201
215
|
context.emit('open');
|
|
@@ -232,11 +246,11 @@ var script = defineComponent({
|
|
|
232
246
|
headerStyles,
|
|
233
247
|
headerTabsStyles,
|
|
234
248
|
contentStyles,
|
|
249
|
+
addButtonStyles,
|
|
235
250
|
proxyModelValue,
|
|
236
251
|
selectedItem,
|
|
237
252
|
overflowItems,
|
|
238
253
|
showOverflowMenu,
|
|
239
|
-
onWheel,
|
|
240
254
|
open,
|
|
241
255
|
close,
|
|
242
256
|
isDesktop,
|
|
@@ -269,11 +283,10 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
269
283
|
class: normalizeClass(_ctx.headerStyles)
|
|
270
284
|
}, [createElementVNode("div", {
|
|
271
285
|
ref: 'headerTabs',
|
|
272
|
-
class: normalizeClass(_ctx.headerTabsStyles)
|
|
273
|
-
|
|
274
|
-
}, [_ctx.isDesktop ? (openBlock(true), createElementBlock(Fragment, {
|
|
286
|
+
class: normalizeClass(_ctx.headerTabsStyles)
|
|
287
|
+
}, [_ctx.isDesktop ? (openBlock(), createElementBlock(Fragment, {
|
|
275
288
|
key: 0
|
|
276
|
-
}, renderList(_ctx.items, item => {
|
|
289
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.items, item => {
|
|
277
290
|
return openBlock(), createBlock(_component_OrEditorTabsItem, {
|
|
278
291
|
ref_for: true,
|
|
279
292
|
ref: 'editorTabsItems',
|
|
@@ -289,29 +302,43 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
289
302
|
}, () => [createElementVNode("div", _hoisted_1, toDisplayString(item.label), 1 /* TEXT */)])]),
|
|
290
303
|
_: 2 /* DYNAMIC */
|
|
291
304
|
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["close-button", "selected", "disabled", "onClick", "onClose"]);
|
|
292
|
-
}), 128 /* KEYED_FRAGMENT */))
|
|
305
|
+
}), 128 /* KEYED_FRAGMENT */)), _ctx.addButton && _ctx.overflow == 'wrap' ? (openBlock(), createBlock(_component_OrEditorTabsItem, {
|
|
306
|
+
key: 0,
|
|
307
|
+
"close-button": false,
|
|
308
|
+
class: normalizeClass(_ctx.addButtonStyles),
|
|
309
|
+
onClick: _cache[0] || (_cache[0] = $event => _ctx.open())
|
|
310
|
+
}, {
|
|
311
|
+
default: withCtx(() => [createVNode(_component_OrIcon, {
|
|
312
|
+
icon: 'add',
|
|
313
|
+
size: 'm',
|
|
314
|
+
class: "md:my-[1px]"
|
|
315
|
+
})]),
|
|
316
|
+
_: 1 /* STABLE */
|
|
317
|
+
}, 8 /* PROPS */, ["class"])) : createCommentVNode("v-if", true)], 64 /* STABLE_FRAGMENT */)) : createCommentVNode("v-if", true), _ctx.isMobile && _ctx.selectedItem ? (openBlock(), createBlock(_component_OrEditorTabsItem, {
|
|
293
318
|
key: 1,
|
|
294
319
|
class: normalizeClass(['grow']),
|
|
295
320
|
"close-button": _ctx.closeButton && !_ctx.selectedItem.pinned,
|
|
296
321
|
selected: true,
|
|
297
322
|
disabled: _ctx.selectedItem.disabled,
|
|
298
|
-
onClose: _cache[
|
|
323
|
+
onClose: _cache[1] || (_cache[1] = $event => _ctx.close(_ctx.selectedItem))
|
|
299
324
|
}, {
|
|
300
325
|
default: withCtx(() => [renderSlot(_ctx.$slots, `${_ctx.selectedItem.value}-label`, {
|
|
301
326
|
label: _ctx.selectedItem.label
|
|
302
327
|
}, () => [createElementVNode("div", _hoisted_2, toDisplayString(_ctx.selectedItem.label), 1 /* TEXT */)])]),
|
|
303
328
|
_: 3 /* FORWARDED */
|
|
304
|
-
}, 8 /* PROPS */, ["close-button", "disabled"])) : createCommentVNode("v-if", true)],
|
|
329
|
+
}, 8 /* PROPS */, ["close-button", "disabled"])) : createCommentVNode("v-if", true)], 2 /* CLASS */), _ctx.addButton && (_ctx.overflow == 'scroll' || _ctx.isMobile) ? (openBlock(), createBlock(_component_OrEditorTabsItem, {
|
|
305
330
|
key: 0,
|
|
306
331
|
"close-button": false,
|
|
332
|
+
class: normalizeClass(_ctx.addButtonStyles),
|
|
307
333
|
onClick: _cache[2] || (_cache[2] = $event => _ctx.open())
|
|
308
334
|
}, {
|
|
309
335
|
default: withCtx(() => [createVNode(_component_OrIcon, {
|
|
310
336
|
icon: 'add',
|
|
311
|
-
size: 'm'
|
|
337
|
+
size: 'm',
|
|
338
|
+
class: "md:my-[1px]"
|
|
312
339
|
})]),
|
|
313
340
|
_: 1 /* STABLE */
|
|
314
|
-
})) : createCommentVNode("v-if", true), _ctx.isMobile && _ctx.items.length > 1 ? (openBlock(), createElementBlock(Fragment, {
|
|
341
|
+
}, 8 /* PROPS */, ["class"])) : createCommentVNode("v-if", true), _ctx.isMobile && _ctx.items.length > 1 ? (openBlock(), createElementBlock(Fragment, {
|
|
315
342
|
key: 1
|
|
316
343
|
}, [createVNode(_component_OrEditorTabsItem, {
|
|
317
344
|
"close-button": false,
|
|
@@ -26,7 +26,7 @@ export { OrDateTimeFormatV3 } from './or-date-time-format-v3/index.js';
|
|
|
26
26
|
export { a as OrDateTimePickerDateControl, b as OrDateTimePickerDateSelect, c as OrDateTimePickerMobileControl, d as OrDateTimePickerMonthSelect, e as OrDateTimePickerPopoverFooter, g as OrDateTimePickerPopoverHeader, l as OrDateTimePickerTimeControl, m as OrDateTimePickerTimeSelect, s as OrDateTimePickerV3, f as formatDate, i as formatMobileDate, n as formatMobileTime, k as formatTime, h as getCurrentDate, j as getNextMonthDate, o as scrollToElementWithinContainer } from './OrDateTimePickerV3-7b24568c.js';
|
|
27
27
|
export { DrawerPlacement, OrDrawerV3 } from './or-drawer-v3/index.js';
|
|
28
28
|
export { DropAreaSize, OrDropAreaV3, approximateFileSize } from './or-drop-area-v3/index.js';
|
|
29
|
-
export { E as EditorTabsOverflow, s as OrEditorTabsV3 } from './OrEditorTabsV3-
|
|
29
|
+
export { E as EditorTabsOverflow, s as OrEditorTabsV3 } from './OrEditorTabsV3-856e42f1.js';
|
|
30
30
|
export { EmptyStateSize, OrEmptyStateV3 } from './or-empty-state-v3/index.js';
|
|
31
31
|
export { OrErrorTagV3 } from './or-error-tag-v3/index.js';
|
|
32
32
|
export { OrErrorV3 } from './or-error-v3/index.js';
|
|
@@ -37,7 +37,7 @@ import '../or-tags-v3/index.js';
|
|
|
37
37
|
import '../or-button-v3/index.js';
|
|
38
38
|
import '../or-tag-v3/index.js';
|
|
39
39
|
import '../or-menu-v3/index.js';
|
|
40
|
-
import '../OrEditorTabsV3-
|
|
40
|
+
import '../OrEditorTabsV3-856e42f1.js';
|
|
41
41
|
import '../or-expansion-panel-v3/index.js';
|
|
42
42
|
import '../or-indicator-v3/index.js';
|
|
43
43
|
import 'lodash/range';
|
|
@@ -30,11 +30,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
30
30
|
headerStyles: import("vue").ComputedRef<string[]>;
|
|
31
31
|
headerTabsStyles: import("vue").ComputedRef<string[]>;
|
|
32
32
|
contentStyles: import("vue").ComputedRef<string[]>;
|
|
33
|
+
addButtonStyles: import("vue").ComputedRef<string[]>;
|
|
33
34
|
proxyModelValue: import("@onereach/ui-components-common/hooks").UseProxyModelValueReturn<EditorTabsModelValue>;
|
|
34
35
|
selectedItem: import("vue").ComputedRef<EditorTabsItem | undefined>;
|
|
35
36
|
overflowItems: import("vue").ComputedRef<EditorTabsItem[]>;
|
|
36
37
|
showOverflowMenu: import("vue").Ref<boolean>;
|
|
37
|
-
onWheel: (event: WheelEvent) => void;
|
|
38
38
|
open: () => void;
|
|
39
39
|
close: (item: EditorTabsItem) => void;
|
|
40
40
|
isDesktop: import("vue").ComputedRef<boolean>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { E as EditorTabsOverflow, s as OrEditorTabsV3 } from '../OrEditorTabsV3-
|
|
1
|
+
export { E as EditorTabsOverflow, s as OrEditorTabsV3 } from '../OrEditorTabsV3-856e42f1.js';
|
|
2
2
|
import 'vue';
|
|
3
|
-
import '@vueuse/core';
|
|
4
3
|
import '../OrAutocompleteV3-961163d0.js';
|
|
4
|
+
import '@vueuse/core';
|
|
5
5
|
import '@onereach/styles/screens.json';
|
|
6
6
|
import '@onereach/styles/tailwind.config.json';
|
|
7
7
|
import '../or-error-v3/index.js';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { EditorTabsOverflow } from './props';
|
|
2
2
|
export declare const EditorTabs: string[];
|
|
3
3
|
export declare const EditorTabsHeader: string[];
|
|
4
|
+
export declare const EditorTabsAddButton: string[];
|
|
4
5
|
export declare const EditorTabsHeaderTabs: string[];
|
|
5
6
|
export declare const EditorTabsHeaderTabsOverflows: Record<EditorTabsOverflow, string[]>;
|
|
6
7
|
export declare const EditorTabsContent: string[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, ref, toRefs, computed, withDirectives, openBlock, createElementBlock, normalizeStyle, normalizeClass, vModelDynamic, renderSlot, watch, resolveComponent, createVNode, createSlots, withCtx, createTextVNode, toDisplayString, createElementVNode, vShow, createBlock, createCommentVNode, Fragment, getCurrentInstance, resolveDirective, withModifiers, renderList } from 'vue';
|
|
2
2
|
import { r as re, l as u, F as Ft, m as d, $ as $t, s, f as c, n as ne, H as Ht, P as Pt } from '../OrAutocompleteV3-961163d0.js';
|
|
3
|
-
import { l } from '../OrEditorTabsV3-
|
|
3
|
+
import { l } from '../OrEditorTabsV3-856e42f1.js';
|
|
4
4
|
import { useFocus } from '@vueuse/core';
|
|
5
5
|
import { OrTagsV3 as script$5, TagsOverflow } from '../or-tags-v3/index.js';
|
|
6
6
|
import { OrTooltipV3 as script$6 } from '../or-tooltip-v3/index.js';
|
package/dist/esm/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { w as CODE_BACKSPACE, x as CODE_BREAK, y as CODE_DELETE, z as CODE_DOWN, A as CODE_END, B as CODE_ENTER, C as CODE_ESC, E as CODE_HOME, I as CODE_LEFT, L as CODE_PAGEDOWN, O as CODE_PAGEUP, U as CODE_RIGHT, Q as CODE_SPACE, V as CODE_UP, S as DATE_FORMAT, T as DateFormat, s as DropdownClose, f as DropdownOpen, W as HSL_LIMITS, Y as LOCALE, v as OrAutocompleteV3, Z as PLACEMENT_BOTTOM_END, _ as PLACEMENT_BOTTOM_START, a0 as PLACEMENT_LEFT_END, a1 as PLACEMENT_LEFT_START, a2 as PLACEMENT_RIGHT_END, a3 as PLACEMENT_RIGHT_START, a4 as PLACEMENT_TOP_END, a5 as PLACEMENT_TOP_START, a6 as RX_ABBREVIATION_FROM_STRING, a7 as RX_ARRAY_NOTATION, a8 as RX_BV_PREFIX, a9 as RX_DATE, aa as RX_DATE_SPLIT, ab as RX_DIGITS, ac as RX_ENCODED_COMMA, ad as RX_ENCODE_REVERSE, ae as RX_EXTENSION, af as RX_HASH, ag as RX_HASH_ID, ah as RX_HREF, ai as RX_HTML_TAGS, aj as RX_HYPHENATE, ak as RX_LONG_COLOR, al as RX_LOWER_UPPER, am as RX_NUMBER, an as RX_PLUS, ao as RX_QUERY_START, ap as RX_REGEXP_REPLACE, aq as RX_SHORT_COLOR, ar as RX_SPACES, as as RX_SPACE_SPLIT, at as RX_STAR, au as RX_START_SPACE_WORD, av as RX_TIME, aw as RX_TRIM_LEFT, ax as RX_TRIM_RIGHT, ay as RX_UNDERSCORE, az as RX_UN_KEBAB, aA as TIME_FORMAT, h as TimeFormat, P as exclude, aB as extractCssVarName, X as flattenDeep, aC as generateColorFromString, i as generateHslFromString, aD as getAbbreviation, aE as getHashOfString, aF as getPageElevations, aG as hexToRgb, D as hslToColorString, H as include, p as isAncestor, c as isArray, aH as isDescendant, $ as isEmpty, m as isEqual, l as isNil, aI as isNull, aJ as isNumber, R as isObject, aK as isString, b as isUndefined, aL as isVisible, aM as normalize, M as pxToRem, aN as requestAF, aO as rgbToHex, F as toArray, k as useControlAttributes, G as useDateFormat, J as useDateMask, K as useElevation, N as useIdAttribute, e as useLocale, q as useOverflow, t as usePopoverState, r as useProxyModelValue, n as useResponsive, u as useTheme, g as useTimeFormat, o as useTimeMask, aP as useToggle, d as useValidationAttributes } from './components/OrAutocompleteV3-961163d0.js';
|
|
2
|
-
export { E as EditorTabsOverflow, s as OrEditorTabsV3, a as getItemByValue, m as getItemsByValue, l as searchItemsByLabel } from './components/OrEditorTabsV3-
|
|
2
|
+
export { E as EditorTabsOverflow, s as OrEditorTabsV3, a as getItemByValue, m as getItemsByValue, l as searchItemsByLabel } from './components/OrEditorTabsV3-856e42f1.js';
|
|
3
3
|
export { a as OrDateTimePickerDateControl, b as OrDateTimePickerDateSelect, c as OrDateTimePickerMobileControl, d as OrDateTimePickerMonthSelect, e as OrDateTimePickerPopoverFooter, g as OrDateTimePickerPopoverHeader, l as OrDateTimePickerTimeControl, m as OrDateTimePickerTimeSelect, s as OrDateTimePickerV3, p as Spacing, f as formatDate, i as formatMobileDate, n as formatMobileTime, k as formatTime, h as getCurrentDate, j as getNextMonthDate, o as scrollToElementWithinContainer } from './components/OrDateTimePickerV3-7b24568c.js';
|
|
4
4
|
export { AvatarColor, AvatarSize, OrAvatarV3 } from './components/or-avatar-v3/index.js';
|
|
5
5
|
export { OrButtonGroupV3 } from './components/or-button-group-v3/index.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onereach/ui-components",
|
|
3
|
-
"version": "21.
|
|
3
|
+
"version": "21.3.0",
|
|
4
4
|
"description": "Vue components library for v3",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"@codemirror/view": "^6",
|
|
46
46
|
"@floating-ui/dom": "1.5.3",
|
|
47
47
|
"@lezer/highlight": "*",
|
|
48
|
-
"@onereach/styles": "^21.
|
|
49
|
-
"@onereach/ui-components-common": "^21.
|
|
48
|
+
"@onereach/styles": "^21.3.0",
|
|
49
|
+
"@onereach/ui-components-common": "^21.3.0",
|
|
50
50
|
"@splidejs/splide": "4.0.6",
|
|
51
51
|
"@tiptap/core": "2.0.3",
|
|
52
52
|
"@tiptap/extension-blockquote": "2.0.3",
|
|
@@ -103,5 +103,5 @@
|
|
|
103
103
|
"access": "public"
|
|
104
104
|
},
|
|
105
105
|
"npmUnpacked": "4.15.2",
|
|
106
|
-
"gitHead": "
|
|
106
|
+
"gitHead": "0562fbf641d1e41aa2243922423a78e07b11fc4e"
|
|
107
107
|
}
|