@onereach/ui-components 2.69.1 → 2.69.2-beta.2106.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/{OrButton-0e91a808.js → OrButton-66d37aff.js} +14 -1
- package/dist/bundled/v2/{OrConfirm-18c534df.js → OrConfirm-e1ca1422.js} +1 -1
- package/dist/bundled/v2/OrPagination-354e9abd.js +296 -0
- package/dist/bundled/v2/{OrSelect-b20a9be0.js → OrSelect-ff9e4fbd.js} +3 -3
- package/dist/bundled/v2/components/index.d.ts +1 -0
- package/dist/bundled/v2/components/index.js +4 -3
- package/dist/bundled/v2/components/or-button-v3/OrButton.vue.d.ts +11 -0
- package/dist/bundled/v2/components/or-button-v3/index.js +1 -1
- package/dist/bundled/v2/components/or-confirm-v3/index.js +2 -2
- package/dist/bundled/v2/components/or-pagination-v3/OrPagination.stories3.d.ts +12 -0
- package/dist/bundled/v2/components/or-pagination-v3/OrPagination.vue.d.ts +110 -0
- package/dist/bundled/v2/components/or-pagination-v3/index.d.ts +2 -0
- package/dist/bundled/v2/components/or-pagination-v3/index.js +20 -0
- package/dist/bundled/v2/components/or-pagination-v3/styles.d.ts +3 -0
- package/dist/bundled/v2/components/or-pagination-v3/types.d.ts +4 -0
- package/dist/bundled/v2/components/or-select-v3/OrSelect.vue.d.ts +14 -14
- package/dist/bundled/v2/components/or-select-v3/index.d.ts +1 -0
- package/dist/bundled/v2/components/or-select-v3/index.js +1 -1
- package/dist/bundled/v2/components/or-select-v3/types.d.ts +1 -1
- package/dist/bundled/v2/index.js +5 -4
- package/dist/bundled/v3/OrButton-9640286b.js +34 -0
- package/dist/bundled/v3/{OrButton.vue_vue_type_script_lang-3718b300.js → OrButton.vue_vue_type_script_lang-06d8ead1.js} +13 -1
- package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-289b5600.js → OrConfirm.vue_vue_type_script_lang-f1b81f00.js} +6 -36
- package/dist/bundled/v3/OrMenu-f26e8e55.js +29 -0
- package/dist/bundled/v3/OrPagination.vue_vue_type_script_lang-ff22b11c.js +180 -0
- package/dist/bundled/v3/{OrSelect.vue_vue_type_script_lang-15285ce4.js → OrSelect.vue_vue_type_script_lang-05b03858.js} +2 -2
- package/dist/bundled/v3/{OrTabs.vue_vue_type_script_lang-919b2021.js → OrTabs.vue_vue_type_script_lang-61b79a5a.js} +10 -36
- package/dist/bundled/v3/components/index.d.ts +1 -0
- package/dist/bundled/v3/components/index.js +7 -4
- package/dist/bundled/v3/components/or-button-v3/OrButton.vue.d.ts +11 -0
- package/dist/bundled/v3/components/or-button-v3/index.js +1 -1
- package/dist/bundled/v3/components/or-confirm-v3/index.js +3 -2
- package/dist/bundled/v3/components/or-pagination-v3/OrPagination.stories3.d.ts +12 -0
- package/dist/bundled/v3/components/or-pagination-v3/OrPagination.vue.d.ts +110 -0
- package/dist/bundled/v3/components/or-pagination-v3/index.d.ts +2 -0
- package/dist/bundled/v3/components/or-pagination-v3/index.js +22 -0
- package/dist/bundled/v3/components/or-pagination-v3/styles.d.ts +3 -0
- package/dist/bundled/v3/components/or-pagination-v3/types.d.ts +4 -0
- package/dist/bundled/v3/components/or-select-v3/OrSelect.vue.d.ts +14 -14
- package/dist/bundled/v3/components/or-select-v3/index.d.ts +1 -0
- package/dist/bundled/v3/components/or-select-v3/index.js +1 -1
- package/dist/bundled/v3/components/or-select-v3/types.d.ts +1 -1
- package/dist/bundled/v3/components/or-tabs-v3/index.js +2 -1
- package/dist/bundled/v3/index.js +234 -152
- package/dist/esm/v2/{OrButton-357a5756.js → OrButton-3d4fc9da.js} +14 -1
- package/dist/esm/v2/{OrConfirm-b0b2e43c.js → OrConfirm-ba3f8c45.js} +1 -1
- package/dist/esm/v2/OrPagination-a56eb93b.js +296 -0
- package/dist/esm/v2/{OrSelect-f0ff5a85.js → OrSelect-651bb83e.js} +3 -3
- package/dist/esm/v2/components/index.d.ts +1 -0
- package/dist/esm/v2/components/index.js +4 -3
- package/dist/esm/v2/components/or-button-v3/OrButton.vue.d.ts +11 -0
- package/dist/esm/v2/components/or-button-v3/index.js +1 -1
- package/dist/esm/v2/components/or-confirm-v3/index.js +2 -2
- package/dist/esm/v2/components/or-pagination-v3/OrPagination.stories3.d.ts +12 -0
- package/dist/esm/v2/components/or-pagination-v3/OrPagination.vue.d.ts +110 -0
- package/dist/esm/v2/components/or-pagination-v3/index.d.ts +2 -0
- package/dist/esm/v2/components/or-pagination-v3/index.js +18 -0
- package/dist/esm/v2/components/or-pagination-v3/styles.d.ts +3 -0
- package/dist/esm/v2/components/or-pagination-v3/types.d.ts +4 -0
- package/dist/esm/v2/components/or-select-v3/OrSelect.vue.d.ts +14 -14
- package/dist/esm/v2/components/or-select-v3/index.d.ts +1 -0
- package/dist/esm/v2/components/or-select-v3/index.js +1 -1
- package/dist/esm/v2/components/or-select-v3/types.d.ts +1 -1
- package/dist/esm/v2/index.js +4 -3
- package/dist/esm/v3/{OrButton-f4b9ee51.js → OrButton-970ae320.js} +15 -2
- package/dist/esm/v3/{OrConfirm-906427ef.js → OrConfirm-7cb2f36b.js} +1 -1
- package/dist/esm/v3/OrPagination-d351a13b.js +257 -0
- package/dist/esm/v3/{OrSelect-7e813982.js → OrSelect-28a175dc.js} +3 -3
- package/dist/esm/v3/components/index.d.ts +1 -0
- package/dist/esm/v3/components/index.js +4 -3
- package/dist/esm/v3/components/or-button-v3/OrButton.vue.d.ts +11 -0
- package/dist/esm/v3/components/or-button-v3/index.js +1 -1
- package/dist/esm/v3/components/or-confirm-v3/index.js +2 -2
- package/dist/esm/v3/components/or-pagination-v3/OrPagination.stories3.d.ts +12 -0
- package/dist/esm/v3/components/or-pagination-v3/OrPagination.vue.d.ts +110 -0
- package/dist/esm/v3/components/or-pagination-v3/index.d.ts +2 -0
- package/dist/esm/v3/components/or-pagination-v3/index.js +17 -0
- package/dist/esm/v3/components/or-pagination-v3/styles.d.ts +3 -0
- package/dist/esm/v3/components/or-pagination-v3/types.d.ts +4 -0
- package/dist/esm/v3/components/or-select-v3/OrSelect.vue.d.ts +14 -14
- package/dist/esm/v3/components/or-select-v3/index.d.ts +1 -0
- package/dist/esm/v3/components/or-select-v3/index.js +1 -1
- package/dist/esm/v3/components/or-select-v3/types.d.ts +1 -1
- package/dist/esm/v3/index.js +4 -3
- package/package.json +2 -3
- package/src/components/index.ts +1 -0
- package/src/components/or-button-v3/OrButton.stories3.ts +4 -0
- package/src/components/or-button-v3/OrButton.vue +6 -0
- package/src/components/or-button-v3/styles.ts +15 -1
- package/src/components/or-pagination-v3/OrPagination.docs.mdx +7 -0
- package/src/components/or-pagination-v3/OrPagination.stories3.ts +87 -0
- package/src/components/or-pagination-v3/OrPagination.vue +260 -0
- package/src/components/or-pagination-v3/index.ts +2 -0
- package/src/components/or-pagination-v3/styles.ts +30 -0
- package/src/components/or-pagination-v3/types.ts +4 -0
- package/src/components/or-select-v3/OrSelect.vue +3 -3
- package/src/components/or-select-v3/index.ts +1 -0
- package/src/components/or-select-v3/types.ts +1 -1
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { s as script } from './OrButton.vue_vue_type_script_lang-06d8ead1.js';
|
|
2
|
+
import { resolveComponent, openBlock, createElementBlock, mergeProps, createElementVNode, normalizeClass, renderSlot, createBlock, Fragment, createTextVNode, toDisplayString, createCommentVNode } from 'vue';
|
|
3
|
+
|
|
4
|
+
const _hoisted_1 = ["type", "activated", "disabled"];
|
|
5
|
+
const _hoisted_2 = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: /*#__PURE__*/normalizeClass(['absolute'])
|
|
8
|
+
};
|
|
9
|
+
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
10
|
+
const _component_OrLoader = resolveComponent("OrLoader");
|
|
11
|
+
return openBlock(), createElementBlock("button", mergeProps({
|
|
12
|
+
ref: "root"
|
|
13
|
+
}, _ctx.$attrs, {
|
|
14
|
+
class: _ctx.rootStyles,
|
|
15
|
+
type: _ctx.type,
|
|
16
|
+
activated: _ctx.activated ? '' : null,
|
|
17
|
+
disabled: _ctx.disabled,
|
|
18
|
+
onClick: _cache[0] || (_cache[0] = $event => _ctx.$emit('click', $event)),
|
|
19
|
+
onFocus: _cache[1] || (_cache[1] = $event => _ctx.$emit('focus', $event)),
|
|
20
|
+
onBlur: _cache[2] || (_cache[2] = $event => _ctx.$emit('blur', $event))
|
|
21
|
+
}), [createElementVNode("div", {
|
|
22
|
+
class: normalizeClass(['contents', _ctx.loading && 'invisible'])
|
|
23
|
+
}, [renderSlot(_ctx.$slots, "default")], 2 /* CLASS */), _ctx.loading ? (openBlock(), createElementBlock("div", _hoisted_2, [_ctx.variant !== 'link' ? (openBlock(), createBlock(_component_OrLoader, {
|
|
24
|
+
key: 0,
|
|
25
|
+
variant: 'circular',
|
|
26
|
+
color: 'inherit',
|
|
27
|
+
size: 's'
|
|
28
|
+
})) : (openBlock(), createElementBlock(Fragment, {
|
|
29
|
+
key: 1
|
|
30
|
+
}, [createTextVNode(toDisplayString(_ctx.loadingText) + "… ", 1 /* TEXT */)], 64 /* STABLE_FRAGMENT */))])) : createCommentVNode("v-if", true)], 16 /* FULL_PROPS */, _hoisted_1);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
script.render = render;
|
|
34
|
+
script.__file = "src/components/or-button-v3/OrButton.vue";
|
|
@@ -76,7 +76,15 @@ const ButtonRootColors = {
|
|
|
76
76
|
'danger-link': [
|
|
77
77
|
// Theme
|
|
78
78
|
'theme-preset-4-error', 'dark:theme-preset-4-error-dark'],
|
|
79
|
-
'inherit-link': [
|
|
79
|
+
'inherit-link': [
|
|
80
|
+
// Typography
|
|
81
|
+
'typography-caption-regular',
|
|
82
|
+
// Typography (activated)
|
|
83
|
+
'activated:typography-caption-bold',
|
|
84
|
+
// Theme
|
|
85
|
+
'theme-foreground-inherit', 'dark:theme-foreground-inherit',
|
|
86
|
+
// Theme (activated)
|
|
87
|
+
'activated:theme-foreground-default', 'dark:activated:theme-foreground-default-dark']
|
|
80
88
|
};
|
|
81
89
|
|
|
82
90
|
var script = defineComponent({
|
|
@@ -98,6 +106,10 @@ var script = defineComponent({
|
|
|
98
106
|
type: String,
|
|
99
107
|
default: ButtonColor.Primary
|
|
100
108
|
},
|
|
109
|
+
activated: {
|
|
110
|
+
type: Boolean,
|
|
111
|
+
default: false
|
|
112
|
+
},
|
|
101
113
|
disabled: {
|
|
102
114
|
type: Boolean,
|
|
103
115
|
default: false
|
|
@@ -1,43 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineComponent, ref, computed, watch } from 'vue';
|
|
2
2
|
import { useMagicKeys, whenever } from '@vueuse/core';
|
|
3
3
|
import { l as logicAnd } from './index-01519e46.js';
|
|
4
4
|
import './OrBottomSheet.vue_vue_type_script_lang-6fb49de9.js';
|
|
5
|
-
import
|
|
5
|
+
import './OrButton-9640286b.js';
|
|
6
6
|
import './OrInput-fa782fc1.js';
|
|
7
|
-
import { s as script$2 } from './
|
|
7
|
+
import { s as script$2, a as ButtonColor } from './OrButton.vue_vue_type_script_lang-06d8ead1.js';
|
|
8
|
+
import { s as script$1 } from './OrOverlay.vue_vue_type_script_lang-cb3aad0c.js';
|
|
8
9
|
import { s as script$3 } from './OrInput.vue_vue_type_script_lang-f6d793d3.js';
|
|
9
10
|
|
|
10
|
-
const _hoisted_1 = ["type", "disabled"];
|
|
11
|
-
const _hoisted_2 = {
|
|
12
|
-
key: 0,
|
|
13
|
-
class: /*#__PURE__*/normalizeClass(['absolute'])
|
|
14
|
-
};
|
|
15
|
-
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
16
|
-
const _component_OrLoader = resolveComponent("OrLoader");
|
|
17
|
-
return openBlock(), createElementBlock("button", mergeProps({
|
|
18
|
-
ref: "root"
|
|
19
|
-
}, _ctx.$attrs, {
|
|
20
|
-
class: _ctx.rootStyles,
|
|
21
|
-
type: _ctx.type,
|
|
22
|
-
disabled: _ctx.disabled,
|
|
23
|
-
onClick: _cache[0] || (_cache[0] = $event => _ctx.$emit('click', $event)),
|
|
24
|
-
onFocus: _cache[1] || (_cache[1] = $event => _ctx.$emit('focus', $event)),
|
|
25
|
-
onBlur: _cache[2] || (_cache[2] = $event => _ctx.$emit('blur', $event))
|
|
26
|
-
}), [createElementVNode("div", {
|
|
27
|
-
class: normalizeClass(['contents', _ctx.loading && 'invisible'])
|
|
28
|
-
}, [renderSlot(_ctx.$slots, "default")], 2 /* CLASS */), _ctx.loading ? (openBlock(), createElementBlock("div", _hoisted_2, [_ctx.variant !== 'link' ? (openBlock(), createBlock(_component_OrLoader, {
|
|
29
|
-
key: 0,
|
|
30
|
-
variant: 'circular',
|
|
31
|
-
color: 'inherit',
|
|
32
|
-
size: 's'
|
|
33
|
-
})) : (openBlock(), createElementBlock(Fragment, {
|
|
34
|
-
key: 1
|
|
35
|
-
}, [createTextVNode(toDisplayString(_ctx.loadingText) + "… ", 1 /* TEXT */)], 64 /* STABLE_FRAGMENT */))])) : createCommentVNode("v-if", true)], 16 /* FULL_PROPS */, _hoisted_1);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
script$1.render = render;
|
|
39
|
-
script$1.__file = "src/components/or-button-v3/OrButton.vue";
|
|
40
|
-
|
|
41
11
|
var ConfirmType;
|
|
42
12
|
(function (ConfirmType) {
|
|
43
13
|
ConfirmType["D"] = "d";
|
|
@@ -89,8 +59,8 @@ const ConfirmFooterButtons = [
|
|
|
89
59
|
var script = defineComponent({
|
|
90
60
|
name: 'OrConfirm',
|
|
91
61
|
components: {
|
|
92
|
-
OrOverlay: script$
|
|
93
|
-
OrButton: script$
|
|
62
|
+
OrOverlay: script$1,
|
|
63
|
+
OrButton: script$2,
|
|
94
64
|
OrInput: script$3
|
|
95
65
|
},
|
|
96
66
|
props: {
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { s as script } from './OrMenu.vue_vue_type_script_lang-2446a69a.js';
|
|
2
|
+
import { resolveComponent, openBlock, createElementBlock, mergeProps, createVNode, withCtx, createElementVNode, normalizeClass, withModifiers, renderSlot } from 'vue';
|
|
3
|
+
|
|
4
|
+
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
5
|
+
const _component_OrPopover = resolveComponent("OrPopover");
|
|
6
|
+
return openBlock(), createElementBlock("div", mergeProps({
|
|
7
|
+
ref: "root"
|
|
8
|
+
}, _ctx.$attrs, {
|
|
9
|
+
class: _ctx.rootStyles
|
|
10
|
+
}), [createVNode(_component_OrPopover, {
|
|
11
|
+
ref: "popover",
|
|
12
|
+
variant: 'auto',
|
|
13
|
+
trigger: _ctx.trigger,
|
|
14
|
+
placement: _ctx.placement,
|
|
15
|
+
"full-width": false,
|
|
16
|
+
"disable-default-styles": false,
|
|
17
|
+
"onUpdate:state": _cache[1] || (_cache[1] = $event => _ctx.$emit('update:state', $event))
|
|
18
|
+
}, {
|
|
19
|
+
default: withCtx(() => [createElementVNode("div", {
|
|
20
|
+
class: normalizeClass(_ctx.bodyStyles),
|
|
21
|
+
onClick: _cache[0] || (_cache[0] = withModifiers((...args) => _ctx.onClick && _ctx.onClick(...args), ["stop"]))
|
|
22
|
+
}, [renderSlot(_ctx.$slots, "default")], 2 /* CLASS */)]),
|
|
23
|
+
|
|
24
|
+
_: 3 /* FORWARDED */
|
|
25
|
+
}, 8 /* PROPS */, ["trigger", "placement"])], 16 /* FULL_PROPS */);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
script.render = render;
|
|
29
|
+
script.__file = "src/components/or-menu-v3/OrMenu.vue";
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import { defineComponent, ref, computed } from 'vue';
|
|
2
|
+
import './OrButton-9640286b.js';
|
|
3
|
+
import './OrIcon-d878b768.js';
|
|
4
|
+
import './OrMenu-f26e8e55.js';
|
|
5
|
+
import './OrMenuItem-4feaba6c.js';
|
|
6
|
+
import { u as useClassAttribute } from './useClassAttribute-00888f78.js';
|
|
7
|
+
import { s as script$1 } from './OrButton.vue_vue_type_script_lang-06d8ead1.js';
|
|
8
|
+
import { s as script$2 } from './OrIcon.vue_vue_type_script_lang-a119a715.js';
|
|
9
|
+
import { s as script$3 } from './OrMenu.vue_vue_type_script_lang-2446a69a.js';
|
|
10
|
+
import { s as script$4 } from './OrMenuItem.vue_vue_type_script_lang-0ffaef05.js';
|
|
11
|
+
|
|
12
|
+
const PaginationRoot = [
|
|
13
|
+
// Layout
|
|
14
|
+
'layout-row',
|
|
15
|
+
// Spacing
|
|
16
|
+
'gap-xl',
|
|
17
|
+
// Typography
|
|
18
|
+
'typography-caption-regular',
|
|
19
|
+
// Theme
|
|
20
|
+
'theme-foreground-outline', 'dark:theme-foreground-outline-dark'];
|
|
21
|
+
const PaginationOffsetControl = [
|
|
22
|
+
// Layout
|
|
23
|
+
'layout-row',
|
|
24
|
+
// Spacing
|
|
25
|
+
'gap-md'];
|
|
26
|
+
const PaginationLimitControl = [
|
|
27
|
+
// Layout
|
|
28
|
+
'layout-row',
|
|
29
|
+
// Spacing
|
|
30
|
+
'gap-sm'];
|
|
31
|
+
|
|
32
|
+
var script = defineComponent({
|
|
33
|
+
name: 'OrPagination',
|
|
34
|
+
components: {
|
|
35
|
+
OrButton: script$1,
|
|
36
|
+
OrIcon: script$2,
|
|
37
|
+
OrMenu: script$3,
|
|
38
|
+
OrMenuItem: script$4
|
|
39
|
+
},
|
|
40
|
+
inheritAttrs: false,
|
|
41
|
+
props: {
|
|
42
|
+
modelValue: {
|
|
43
|
+
type: Object,
|
|
44
|
+
default: {}
|
|
45
|
+
},
|
|
46
|
+
value: {
|
|
47
|
+
type: Object,
|
|
48
|
+
default: {}
|
|
49
|
+
},
|
|
50
|
+
length: {
|
|
51
|
+
type: Number,
|
|
52
|
+
required: true
|
|
53
|
+
},
|
|
54
|
+
pageSizeOptions: {
|
|
55
|
+
type: Array,
|
|
56
|
+
default: [50, 20, 10, 5]
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
emits: ['update:modelValue', 'input'],
|
|
60
|
+
expose: ['root'],
|
|
61
|
+
setup(props, context) {
|
|
62
|
+
// Refs
|
|
63
|
+
const root = ref();
|
|
64
|
+
const limitButton = ref();
|
|
65
|
+
const limitButtonRoot = computed(() => {
|
|
66
|
+
var _a;
|
|
67
|
+
return (_a = limitButton.value) === null || _a === void 0 ? void 0 : _a.root;
|
|
68
|
+
});
|
|
69
|
+
const limitMenu = ref();
|
|
70
|
+
const limitMenuRoot = computed(() => {
|
|
71
|
+
var _a;
|
|
72
|
+
return (_a = limitMenu.value) === null || _a === void 0 ? void 0 : _a.root;
|
|
73
|
+
});
|
|
74
|
+
// Styles
|
|
75
|
+
const classAttribute = useClassAttribute();
|
|
76
|
+
const rootStyles = computed(() => ['or-pagination', ...PaginationRoot, classAttribute.value]);
|
|
77
|
+
const offsetControlStyles = computed(() => [...PaginationOffsetControl]);
|
|
78
|
+
const limitControlStyles = computed(() => [...PaginationLimitControl]);
|
|
79
|
+
// State
|
|
80
|
+
const proxyModelValue = computed({
|
|
81
|
+
get: () => {
|
|
82
|
+
var _a;
|
|
83
|
+
return (_a = props.modelValue) !== null && _a !== void 0 ? _a : props.value; // TODO: Remove Vue 2 fallback
|
|
84
|
+
},
|
|
85
|
+
|
|
86
|
+
set: value => {
|
|
87
|
+
context.emit('input', value);
|
|
88
|
+
context.emit('update:modelValue', value);
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
const currentLimit = computed({
|
|
92
|
+
get: () => {
|
|
93
|
+
var _a;
|
|
94
|
+
return (_a = proxyModelValue.value.limit) !== null && _a !== void 0 ? _a : props.pageSizeOptions[0];
|
|
95
|
+
},
|
|
96
|
+
set: value => {
|
|
97
|
+
proxyModelValue.value = {
|
|
98
|
+
limit: value,
|
|
99
|
+
offset: currentOffset.value
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
const currentOffset = computed({
|
|
104
|
+
get: () => {
|
|
105
|
+
var _a;
|
|
106
|
+
return (_a = proxyModelValue.value.offset) !== null && _a !== void 0 ? _a : 0;
|
|
107
|
+
},
|
|
108
|
+
set: value => {
|
|
109
|
+
proxyModelValue.value = {
|
|
110
|
+
limit: currentLimit.value,
|
|
111
|
+
offset: value
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
const currentPage = computed({
|
|
116
|
+
get: () => {
|
|
117
|
+
return Math.floor(currentOffset.value / currentLimit.value) + 1;
|
|
118
|
+
},
|
|
119
|
+
set: value => {
|
|
120
|
+
currentOffset.value = (value - 1) * currentLimit.value;
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
const firstPage = computed(() => {
|
|
124
|
+
return 1;
|
|
125
|
+
});
|
|
126
|
+
const lastPage = computed(() => {
|
|
127
|
+
return Math.ceil(props.length / currentLimit.value);
|
|
128
|
+
});
|
|
129
|
+
const buttonGroup = computed(() => {
|
|
130
|
+
return Array.from({
|
|
131
|
+
length: lastPage.value
|
|
132
|
+
}, (_, index) => index + 1).map(page => {
|
|
133
|
+
switch (true) {
|
|
134
|
+
case page > firstPage.value && page < currentPage.value - 1:
|
|
135
|
+
case page > currentPage.value + 1 && page < lastPage.value:
|
|
136
|
+
return '…';
|
|
137
|
+
default:
|
|
138
|
+
return page;
|
|
139
|
+
}
|
|
140
|
+
}).reduce((accumulator, page) => {
|
|
141
|
+
if (accumulator[accumulator.length - 1] === page) {
|
|
142
|
+
return accumulator;
|
|
143
|
+
}
|
|
144
|
+
return [...accumulator, page];
|
|
145
|
+
}, []);
|
|
146
|
+
});
|
|
147
|
+
// Functions
|
|
148
|
+
function toPreviousPage() {
|
|
149
|
+
currentPage.value = currentPage.value - 1;
|
|
150
|
+
}
|
|
151
|
+
function toNextPage() {
|
|
152
|
+
currentPage.value = currentPage.value + 1;
|
|
153
|
+
}
|
|
154
|
+
function toPage(page) {
|
|
155
|
+
currentPage.value = page;
|
|
156
|
+
}
|
|
157
|
+
return {
|
|
158
|
+
root,
|
|
159
|
+
limitButton,
|
|
160
|
+
limitButtonRoot,
|
|
161
|
+
limitMenu,
|
|
162
|
+
limitMenuRoot,
|
|
163
|
+
rootStyles,
|
|
164
|
+
offsetControlStyles,
|
|
165
|
+
limitControlStyles,
|
|
166
|
+
proxyModelValue,
|
|
167
|
+
currentLimit,
|
|
168
|
+
currentOffset,
|
|
169
|
+
currentPage,
|
|
170
|
+
firstPage,
|
|
171
|
+
lastPage,
|
|
172
|
+
buttonGroup,
|
|
173
|
+
toPreviousPage,
|
|
174
|
+
toNextPage,
|
|
175
|
+
toPage
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
export { script as s };
|
|
@@ -182,11 +182,11 @@ var script = defineComponent({
|
|
|
182
182
|
default: []
|
|
183
183
|
},
|
|
184
184
|
modelValue: {
|
|
185
|
-
type: [String, Array],
|
|
185
|
+
type: [String, Number, Array],
|
|
186
186
|
default: undefined
|
|
187
187
|
},
|
|
188
188
|
value: {
|
|
189
|
-
type: [String, Array],
|
|
189
|
+
type: [String, Number, Array],
|
|
190
190
|
default: undefined
|
|
191
191
|
},
|
|
192
192
|
multiple: {
|
|
@@ -1,40 +1,14 @@
|
|
|
1
1
|
import { useResizeObserver } from '@vueuse/core';
|
|
2
|
-
import {
|
|
2
|
+
import { openBlock, createElementBlock, mergeProps, renderSlot, defineComponent, ref, computed, reactive, watch, nextTick, onMounted } from 'vue';
|
|
3
3
|
import './OrIcon-d878b768.js';
|
|
4
|
-
import
|
|
4
|
+
import './OrMenu-f26e8e55.js';
|
|
5
5
|
import './OrMenuItem-4feaba6c.js';
|
|
6
|
-
import { s as script$
|
|
6
|
+
import { s as script$1 } from './OrTab.vue_vue_type_script_lang-134ad9d1.js';
|
|
7
7
|
import { u as useClassAttribute } from './useClassAttribute-00888f78.js';
|
|
8
|
-
import { s as script$
|
|
8
|
+
import { s as script$2 } from './OrIcon.vue_vue_type_script_lang-a119a715.js';
|
|
9
|
+
import { s as script$3 } from './OrMenu.vue_vue_type_script_lang-2446a69a.js';
|
|
9
10
|
import { s as script$4 } from './OrMenuItem.vue_vue_type_script_lang-0ffaef05.js';
|
|
10
11
|
|
|
11
|
-
function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
12
|
-
const _component_OrPopover = resolveComponent("OrPopover");
|
|
13
|
-
return openBlock(), createElementBlock("div", mergeProps({
|
|
14
|
-
ref: "root"
|
|
15
|
-
}, _ctx.$attrs, {
|
|
16
|
-
class: _ctx.rootStyles
|
|
17
|
-
}), [createVNode(_component_OrPopover, {
|
|
18
|
-
ref: "popover",
|
|
19
|
-
variant: 'auto',
|
|
20
|
-
trigger: _ctx.trigger,
|
|
21
|
-
placement: _ctx.placement,
|
|
22
|
-
"full-width": false,
|
|
23
|
-
"disable-default-styles": false,
|
|
24
|
-
"onUpdate:state": _cache[1] || (_cache[1] = $event => _ctx.$emit('update:state', $event))
|
|
25
|
-
}, {
|
|
26
|
-
default: withCtx(() => [createElementVNode("div", {
|
|
27
|
-
class: normalizeClass(_ctx.bodyStyles),
|
|
28
|
-
onClick: _cache[0] || (_cache[0] = withModifiers((...args) => _ctx.onClick && _ctx.onClick(...args), ["stop"]))
|
|
29
|
-
}, [renderSlot(_ctx.$slots, "default")], 2 /* CLASS */)]),
|
|
30
|
-
|
|
31
|
-
_: 3 /* FORWARDED */
|
|
32
|
-
}, 8 /* PROPS */, ["trigger", "placement"])], 16 /* FULL_PROPS */);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
script$1.render = render$1;
|
|
36
|
-
script$1.__file = "src/components/or-menu-v3/OrMenu.vue";
|
|
37
|
-
|
|
38
12
|
const _hoisted_1 = ["selected"];
|
|
39
13
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
40
14
|
return openBlock(), createElementBlock("div", mergeProps({
|
|
@@ -49,8 +23,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
49
23
|
}), [renderSlot(_ctx.$slots, "default")], 16 /* FULL_PROPS */, _hoisted_1);
|
|
50
24
|
}
|
|
51
25
|
|
|
52
|
-
script$
|
|
53
|
-
script$
|
|
26
|
+
script$1.render = render;
|
|
27
|
+
script$1.__file = "src/components/or-tab-v3/OrTab.vue";
|
|
54
28
|
|
|
55
29
|
var TabsVariant;
|
|
56
30
|
(function (TabsVariant) {
|
|
@@ -79,10 +53,10 @@ const TabsRootVariants = {
|
|
|
79
53
|
var script = defineComponent({
|
|
80
54
|
name: 'OrTabs',
|
|
81
55
|
components: {
|
|
82
|
-
OrIcon: script$
|
|
83
|
-
OrMenu: script$
|
|
56
|
+
OrIcon: script$2,
|
|
57
|
+
OrMenu: script$3,
|
|
84
58
|
OrMenuItem: script$4,
|
|
85
|
-
OrTab: script$
|
|
59
|
+
OrTab: script$1
|
|
86
60
|
},
|
|
87
61
|
inheritAttrs: false,
|
|
88
62
|
props: {
|
|
@@ -52,6 +52,7 @@ export * from './or-notification-v3';
|
|
|
52
52
|
export * from './or-overflow-menu';
|
|
53
53
|
export * from './or-overlay';
|
|
54
54
|
export * from './or-overlay-v3';
|
|
55
|
+
export * from './or-pagination-v3';
|
|
55
56
|
export * from './or-popover-v3';
|
|
56
57
|
export * from './or-progress';
|
|
57
58
|
export * from './or-progress-v3';
|
|
@@ -5,7 +5,7 @@ export { s as OrButton, a as OrButtonColors, b as OrButtonSizes, O as OrButtonVi
|
|
|
5
5
|
export { s as OrButtonV2 } from '../OrButton.vue_vue_type_script_lang-ffc66d00.js';
|
|
6
6
|
export { s as OrIconButton } from '../OrIconButton.vue_vue_type_script_lang-40547ab0.js';
|
|
7
7
|
export { a as BUTTON_COLOR, c as BUTTON_LOADER_TYPE, b as BUTTON_SIZE, B as BUTTON_TYPE, I as ICON_BUTTON_TYPE } from '../constants-c5d1139f.js';
|
|
8
|
-
export { a as ButtonColor, b as ButtonType, B as ButtonVariant, s as OrButtonV3 } from '../OrButton.vue_vue_type_script_lang-
|
|
8
|
+
export { a as ButtonColor, b as ButtonType, B as ButtonVariant, s as OrButtonV3 } from '../OrButton.vue_vue_type_script_lang-06d8ead1.js';
|
|
9
9
|
export { s as OrCard } from '../OrCard.vue_vue_type_script_lang-90ba001b.js';
|
|
10
10
|
export { C as CARD_COLLECTION_LAYOUT, s as OrCardCollection } from '../OrCardCollection.vue_vue_type_script_lang-d8124dda.js';
|
|
11
11
|
export { C as CardCollectionView, s as OrCardCollectionV3 } from '../OrCardCollection.vue_vue_type_script_lang-3993a015.js';
|
|
@@ -19,7 +19,7 @@ export { s as OrCode, O as OrCodeLanguages } from '../OrCode.vue_vue_type_script
|
|
|
19
19
|
export { s as OrCollapse } from '../OrCollapse.vue_vue_type_script_lang-65cbb754.js';
|
|
20
20
|
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.vue_vue_type_script_lang-4141378d.js';
|
|
21
21
|
export { s as OrConfirm } from '../OrConfirm.vue_vue_type_script_lang-0f16fc67.js';
|
|
22
|
-
export { C as ConfirmType, s as OrConfirmV3 } from '../OrConfirm.vue_vue_type_script_lang-
|
|
22
|
+
export { C as ConfirmType, s as OrConfirmV3 } from '../OrConfirm.vue_vue_type_script_lang-f1b81f00.js';
|
|
23
23
|
export { D as DEFAULT_TEXT, s as OrDateTimePicker, a as OrDateTimePickerItemTypes, O as OrDateTimePickerTypes } from '../OrDateTimePicker.vue_vue_type_script_lang-7bfe5005.js';
|
|
24
24
|
export { s as OrError } from '../OrError.vue_vue_type_script_lang-7c39e012.js';
|
|
25
25
|
export { s as OrErrorTagV3 } from '../OrErrorTag.vue_vue_type_script_lang-4828c387.js';
|
|
@@ -58,6 +58,7 @@ export { N as NotificationVariant, s as OrNotificationV3 } from '../OrNotificati
|
|
|
58
58
|
export { s as OrOverflowMenu } from '../OrOverflowMenu.vue_vue_type_script_lang-0397533d.js';
|
|
59
59
|
export { s as OrOverlay } from '../OrOverlay.vue_vue_type_script_lang-b9bf5e50.js';
|
|
60
60
|
export { s as OrOverlayV3 } from '../OrOverlay.vue_vue_type_script_lang-cb3aad0c.js';
|
|
61
|
+
export { s as OrPaginationV3 } from '../OrPagination.vue_vue_type_script_lang-ff22b11c.js';
|
|
61
62
|
export { s as OrProgress, O as OrProgressColors, a as OrProgressTypes } from '../OrProgress.vue_vue_type_script_lang-3f9ec654.js';
|
|
62
63
|
export { s as OrProgressV3, P as ProgressColor, a as ProgressType } from '../OrProgress.vue_vue_type_script_lang-a73c0acf.js';
|
|
63
64
|
export { s as OrRadio } from '../OrRadio.vue_vue_type_script_lang-c956b54b.js';
|
|
@@ -66,7 +67,7 @@ export { s as OrRadioV3 } from '../OrRadio.vue_vue_type_script_lang-2e666a56.js'
|
|
|
66
67
|
export { s as OrSearchV3 } from '../OrSearch.vue_vue_type_script_lang-ed78b21f.js';
|
|
67
68
|
export { s as OrSegmentedControlV3, S as SegmentedControlSize } from '../OrSegmentedControl.vue_vue_type_script_lang-579406f5.js';
|
|
68
69
|
export { s as OrSelect } from '../OrSelect.vue_vue_type_script_lang-26c0a70a.js';
|
|
69
|
-
export { s as OrSelectV3 } from '../OrSelect.vue_vue_type_script_lang-
|
|
70
|
+
export { s as OrSelectV3 } from '../OrSelect.vue_vue_type_script_lang-05b03858.js';
|
|
70
71
|
export { s as OrSidebar, O as OrSidebarSide } from '../OrSidebar.vue_vue_type_script_lang-7c55ac0a.js';
|
|
71
72
|
export { O as OrSidebarPlacement, s as OrSidebarV3 } from '../OrSidebar.vue_vue_type_script_lang-ce0b152c.js';
|
|
72
73
|
export { s as OrSkeletonCircle, a as OrSkeletonRect, b as OrSkeletonText, O as OrSkeletonTextSizes } from '../OrSkeletonText.vue_vue_type_script_lang-f3f989c3.js';
|
|
@@ -80,7 +81,7 @@ export { s as OrTab } from '../OrTab.vue_vue_type_script_lang-de7c7063.js';
|
|
|
80
81
|
export { s as OrTabHeaderItem } from '../OrTabHeaderItem.vue_vue_type_script_lang-e1f29563.js';
|
|
81
82
|
export { s as OrTabV3 } from '../OrTab.vue_vue_type_script_lang-134ad9d1.js';
|
|
82
83
|
export { s as OrTabs } from '../OrTabs.vue_vue_type_script_lang-40e2a6e9.js';
|
|
83
|
-
export { s as OrTabsV3, T as TabsVariant } from '../OrTabs.vue_vue_type_script_lang-
|
|
84
|
+
export { s as OrTabsV3, T as TabsVariant } from '../OrTabs.vue_vue_type_script_lang-61b79a5a.js';
|
|
84
85
|
export { s as OrTag } from '../OrTag.vue_vue_type_script_lang-8c526c11.js';
|
|
85
86
|
export { s as OrTagV3, a as TagColor, T as TagVariant } from '../OrTag.vue_vue_type_script_lang-92d9fb12.js';
|
|
86
87
|
export { s as OrTeleport } from '../OrTeleportVue3-012351e1.js';
|
|
@@ -117,6 +118,7 @@ import '../dom-d21d0a92.js';
|
|
|
117
118
|
import '../OrFloating-b6672a37.js';
|
|
118
119
|
import '../index-01519e46.js';
|
|
119
120
|
import '../OrButton-ec723bb7.js';
|
|
121
|
+
import '../OrButton-9640286b.js';
|
|
120
122
|
import '../OrCollapse-63e83681.js';
|
|
121
123
|
import '../OrIcon-d878b768.js';
|
|
122
124
|
import '../floating-ui.dom.esm-83eba816.js';
|
|
@@ -128,6 +130,7 @@ import '../v4-cf8987a3.js';
|
|
|
128
130
|
import '../OrPopover-c462ce77.js';
|
|
129
131
|
import '../useResponsive-9d397e2a.js';
|
|
130
132
|
import '../useElevation-c8d5d3ba.js';
|
|
133
|
+
import '../OrMenu-f26e8e55.js';
|
|
131
134
|
import '../OrMenuItem-4feaba6c.js';
|
|
132
135
|
import '../dropdown-open-293d2de2.js';
|
|
133
136
|
import '../useOverflow-6dce216b.js';
|
|
@@ -16,6 +16,10 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
16
16
|
type: PropType<ButtonColor>;
|
|
17
17
|
default: ButtonColor;
|
|
18
18
|
};
|
|
19
|
+
activated: {
|
|
20
|
+
type: BooleanConstructor;
|
|
21
|
+
default: boolean;
|
|
22
|
+
};
|
|
19
23
|
disabled: {
|
|
20
24
|
type: BooleanConstructor;
|
|
21
25
|
default: boolean;
|
|
@@ -41,6 +45,10 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
41
45
|
type: PropType<ButtonColor>;
|
|
42
46
|
default: ButtonColor;
|
|
43
47
|
};
|
|
48
|
+
activated: {
|
|
49
|
+
type: BooleanConstructor;
|
|
50
|
+
default: boolean;
|
|
51
|
+
};
|
|
44
52
|
disabled: {
|
|
45
53
|
type: BooleanConstructor;
|
|
46
54
|
default: boolean;
|
|
@@ -54,6 +62,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
54
62
|
default: string;
|
|
55
63
|
};
|
|
56
64
|
}>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
|
|
65
|
+
activated: boolean;
|
|
57
66
|
type: ButtonType;
|
|
58
67
|
variant: ButtonVariant;
|
|
59
68
|
color: ButtonColor;
|
|
@@ -66,6 +75,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
66
75
|
root: import("@vue/composition-api").Ref<HTMLButtonElement | undefined>;
|
|
67
76
|
rootStyles: import("@vue/composition-api").ComputedRef<(string | false | undefined)[]>;
|
|
68
77
|
}>, import("@vue/composition-api").Data, {}, {}, {}, {}, string[], {
|
|
78
|
+
activated: boolean;
|
|
69
79
|
type: ButtonType;
|
|
70
80
|
variant: ButtonVariant;
|
|
71
81
|
color: ButtonColor;
|
|
@@ -75,6 +85,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
75
85
|
} & {} & {
|
|
76
86
|
[x: string & `on${string}`]: ((...args: any[]) => any) | undefined;
|
|
77
87
|
}, {
|
|
88
|
+
activated: boolean;
|
|
78
89
|
type: ButtonType;
|
|
79
90
|
variant: ButtonVariant;
|
|
80
91
|
color: ButtonColor;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { a as ButtonColor, b as ButtonType, B as ButtonVariant, s as OrButtonV3 } from '../../OrButton.vue_vue_type_script_lang-
|
|
1
|
+
export { a as ButtonColor, b as ButtonType, B as ButtonVariant, s as OrButtonV3 } from '../../OrButton.vue_vue_type_script_lang-06d8ead1.js';
|
|
2
2
|
import 'vue';
|
|
3
3
|
import '../../OrLoader-c4bbef2f.js';
|
|
4
4
|
import '../../OrLoader.vue_vue_type_script_lang-5405040c.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as ConfirmType, s as OrConfirmV3 } from '../../OrConfirm.vue_vue_type_script_lang-
|
|
1
|
+
export { C as ConfirmType, s as OrConfirmV3 } from '../../OrConfirm.vue_vue_type_script_lang-f1b81f00.js';
|
|
2
2
|
import 'vue';
|
|
3
3
|
import '@vueuse/core';
|
|
4
4
|
import '../../index-01519e46.js';
|
|
@@ -7,7 +7,8 @@ import '../../OrOverlay.vue_vue_type_script_lang-cb3aad0c.js';
|
|
|
7
7
|
import '../../OrTeleport.vue3.vue_vue_type_script_lang-4dc70cf1.js';
|
|
8
8
|
import '../../useClassAttribute-00888f78.js';
|
|
9
9
|
import '../../useElevation-c8d5d3ba.js';
|
|
10
|
-
import '../../OrButton
|
|
10
|
+
import '../../OrButton-9640286b.js';
|
|
11
|
+
import '../../OrButton.vue_vue_type_script_lang-06d8ead1.js';
|
|
11
12
|
import '../../OrLoader-c4bbef2f.js';
|
|
12
13
|
import '../../OrLoader.vue_vue_type_script_lang-5405040c.js';
|
|
13
14
|
import '../../OrInput-fa782fc1.js';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Meta, StoryFn } from '@storybook/vue3';
|
|
2
|
+
declare const _default: Meta<import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<unknown>, import("@vue/composition-api").MethodOptions, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").ComponentPropsOptions<import("@vue/composition-api").Data>, import("@vue/composition-api").ExtractPropTypes<import("@vue/composition-api").ComponentPropsOptions<import("@vue/composition-api").Data>>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
|
|
3
|
+
[x: string]: ((...args: any[]) => any) | null;
|
|
4
|
+
} | string[], {} & {}, {
|
|
5
|
+
[x: number]: string;
|
|
6
|
+
} | {}, true>)>;
|
|
7
|
+
export default _default;
|
|
8
|
+
export declare const Default: StoryFn<import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<unknown>, import("@vue/composition-api").MethodOptions, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").ComponentPropsOptions<import("@vue/composition-api").Data>, import("@vue/composition-api").ExtractPropTypes<import("@vue/composition-api").ComponentPropsOptions<import("@vue/composition-api").Data>>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
|
|
9
|
+
[x: string]: ((...args: any[]) => any) | null;
|
|
10
|
+
} | string[], {} & {}, {
|
|
11
|
+
[x: number]: string;
|
|
12
|
+
} | {}, true>)>;
|