@onereach/ui-components 2.69.2-beta.2106.0 → 2.69.2-beta.2108.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-66d37aff.js → OrButton-0e91a808.js} +1 -14
- package/dist/bundled/v2/{OrCardCollection-a9a779ea.js → OrCardCollection-3d1b3b9a.js} +1 -1
- package/dist/bundled/v2/{OrConfirm-e1ca1422.js → OrConfirm-43626f94.js} +2 -2
- package/dist/bundled/v2/{OrInput-8b90e08f.js → OrInput-0a3666aa.js} +18 -11
- package/dist/bundled/v2/{OrInputBox-79ec54ad.js → OrInputBox-dfdcbdce.js} +4 -14
- package/dist/bundled/v2/{OrSearch-9d402f56.js → OrSearch-847c1bab.js} +2 -2
- package/dist/bundled/v2/{OrSelect-ff9e4fbd.js → OrSelect-41c6588d.js} +11 -5
- package/dist/bundled/v2/{OrTextarea-5593fbe9.js → OrTextarea-ff2ba975.js} +2 -1
- package/dist/bundled/v2/components/index.d.ts +0 -1
- package/dist/bundled/v2/components/index.js +9 -9
- package/dist/bundled/v2/components/or-button-v3/OrButton.vue.d.ts +0 -11
- package/dist/bundled/v2/components/or-button-v3/index.js +1 -1
- package/dist/bundled/v2/components/or-card-collection-v3/index.js +4 -3
- package/dist/bundled/v2/components/or-combined-input-v3/OrCombinedInput.stories3.d.ts +27 -0
- package/dist/bundled/v2/components/or-combined-input-v3/OrCombinedInput.vue.d.ts +98 -0
- package/dist/bundled/v2/components/or-combined-input-v3/index.d.ts +2 -0
- package/dist/bundled/v2/components/or-combined-input-v3/index.js +149 -0
- package/dist/bundled/v2/components/or-combined-input-v3/props.d.ts +1 -0
- package/dist/bundled/v2/components/or-combined-input-v3/styles.d.ts +2 -0
- package/dist/bundled/v2/components/or-confirm-v3/index.js +5 -4
- package/dist/bundled/v2/components/or-input-box-v3/index.js +2 -1
- package/dist/bundled/v2/components/or-input-v3/index.js +3 -2
- package/dist/bundled/v2/components/or-search-v3/index.js +4 -3
- package/dist/bundled/v2/components/or-select-v3/OrSelect.vue.d.ts +25 -14
- package/dist/bundled/v2/components/or-select-v3/index.d.ts +0 -1
- package/dist/bundled/v2/components/or-select-v3/index.js +4 -3
- package/dist/bundled/v2/components/or-select-v3/types.d.ts +1 -1
- package/dist/bundled/v2/components/or-textarea-v3/index.js +3 -2
- package/dist/bundled/v2/index.js +10 -10
- package/dist/bundled/v2/props-78496a2d.js +12 -0
- package/dist/bundled/v3/{OrButton.vue_vue_type_script_lang-06d8ead1.js → OrButton.vue_vue_type_script_lang-3718b300.js} +1 -13
- package/dist/bundled/v3/{OrCardCollection.vue_vue_type_script_lang-3993a015.js → OrCardCollection.vue_vue_type_script_lang-fd4d589f.js} +2 -2
- package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-f1b81f00.js → OrConfirm.vue_vue_type_script_lang-338631e0.js} +38 -8
- package/dist/bundled/v3/{OrInput-fa782fc1.js → OrInput-5efc4b9a.js} +17 -14
- package/dist/bundled/v3/{OrInput.vue_vue_type_script_lang-f6d793d3.js → OrInput.vue_vue_type_script_lang-a9f3e530.js} +3 -2
- package/dist/bundled/v3/{OrInputBox-eb54d73d.js → OrInputBox-1b143e00.js} +1 -1
- package/dist/{esm/v2/OrInputBox-4d5a318d.js → bundled/v3/OrInputBox.vue_vue_type_script_lang-70dec655.js} +6 -57
- package/dist/bundled/v3/{OrSearch.vue_vue_type_script_lang-ed78b21f.js → OrSearch.vue_vue_type_script_lang-df09cad8.js} +3 -3
- package/dist/bundled/v3/{OrSelect.vue_vue_type_script_lang-05b03858.js → OrSelect.vue_vue_type_script_lang-cf991ed8.js} +11 -6
- package/dist/bundled/v3/{OrTabs.vue_vue_type_script_lang-61b79a5a.js → OrTabs.vue_vue_type_script_lang-919b2021.js} +36 -10
- package/dist/bundled/v3/{OrTextarea.vue_vue_type_script_lang-8e3531cd.js → OrTextarea.vue_vue_type_script_lang-115a1244.js} +3 -2
- package/dist/bundled/v3/components/index.d.ts +0 -1
- package/dist/bundled/v3/components/index.js +12 -14
- package/dist/bundled/v3/components/or-button-v3/OrButton.vue.d.ts +0 -11
- package/dist/bundled/v3/components/or-button-v3/index.js +1 -1
- package/dist/bundled/v3/components/or-card-collection-v3/index.js +6 -5
- package/dist/bundled/v3/components/or-combined-input-v3/OrCombinedInput.stories3.d.ts +27 -0
- package/dist/bundled/v3/components/or-combined-input-v3/OrCombinedInput.vue.d.ts +98 -0
- package/dist/bundled/v3/components/or-combined-input-v3/index.d.ts +2 -0
- package/dist/bundled/v3/components/or-combined-input-v3/index.js +132 -0
- package/dist/bundled/v3/components/or-combined-input-v3/props.d.ts +1 -0
- package/dist/bundled/v3/components/or-combined-input-v3/styles.d.ts +2 -0
- package/dist/bundled/v3/components/or-confirm-v3/index.js +7 -7
- package/dist/bundled/v3/components/or-input-box-v3/index.js +2 -1
- package/dist/bundled/v3/components/or-input-v3/index.js +4 -3
- package/dist/bundled/v3/components/or-search-v3/index.js +6 -5
- package/dist/bundled/v3/components/or-select-v3/OrSelect.vue.d.ts +25 -14
- package/dist/bundled/v3/components/or-select-v3/index.d.ts +0 -1
- package/dist/bundled/v3/components/or-select-v3/index.js +6 -5
- package/dist/bundled/v3/components/or-select-v3/types.d.ts +1 -1
- package/dist/bundled/v3/components/or-tabs-v3/index.js +1 -2
- package/dist/bundled/v3/components/or-textarea-v3/index.js +4 -3
- package/dist/bundled/v3/index.js +162 -242
- package/dist/bundled/v3/props-78496a2d.js +12 -0
- package/dist/esm/v2/{OrButton-3d4fc9da.js → OrButton-357a5756.js} +1 -14
- package/dist/esm/v2/{OrCardCollection-4f001551.js → OrCardCollection-09e4cb8a.js} +1 -1
- package/dist/esm/v2/{OrConfirm-ba3f8c45.js → OrConfirm-93376443.js} +2 -2
- package/dist/esm/v2/{OrInput-2f16a7ac.js → OrInput-f92456ea.js} +18 -11
- package/dist/esm/v2/OrInputBox-ad7c1875.js +43 -0
- package/dist/{bundled/v3/OrInputBox.vue_vue_type_script_lang-5ee4ee45.js → esm/v2/OrInputBox.vue_rollup-plugin-vue_script-52a54a49.js} +5 -4
- package/dist/esm/v2/{OrSearch-ddb7c1fe.js → OrSearch-4296eecb.js} +2 -2
- package/dist/esm/v2/{OrSelect-651bb83e.js → OrSelect-633a9e09.js} +11 -5
- package/dist/esm/v2/{OrTextarea-6712a150.js → OrTextarea-823d0529.js} +2 -1
- package/dist/esm/v2/components/index.d.ts +0 -1
- package/dist/esm/v2/components/index.js +9 -9
- package/dist/esm/v2/components/or-button-v3/OrButton.vue.d.ts +0 -11
- package/dist/esm/v2/components/or-button-v3/index.js +1 -1
- package/dist/esm/v2/components/or-card-collection-v3/index.js +4 -3
- package/dist/esm/v2/components/or-combined-input-v3/OrCombinedInput.stories3.d.ts +27 -0
- package/dist/esm/v2/components/or-combined-input-v3/OrCombinedInput.vue.d.ts +98 -0
- package/dist/esm/v2/components/or-combined-input-v3/index.d.ts +2 -0
- package/dist/esm/v2/components/or-combined-input-v3/index.js +147 -0
- package/dist/esm/v2/components/or-combined-input-v3/props.d.ts +1 -0
- package/dist/esm/v2/components/or-combined-input-v3/styles.d.ts +2 -0
- package/dist/esm/v2/components/or-confirm-v3/index.js +5 -4
- package/dist/esm/v2/components/or-input-box-v3/index.js +3 -2
- package/dist/esm/v2/components/or-input-v3/index.js +3 -2
- package/dist/esm/v2/components/or-search-v3/index.js +4 -3
- package/dist/esm/v2/components/or-select-v3/OrSelect.vue.d.ts +25 -14
- package/dist/esm/v2/components/or-select-v3/index.d.ts +0 -1
- package/dist/esm/v2/components/or-select-v3/index.js +4 -3
- package/dist/esm/v2/components/or-select-v3/types.d.ts +1 -1
- package/dist/esm/v2/components/or-textarea-v3/index.js +3 -2
- package/dist/esm/v2/index.js +9 -9
- package/dist/esm/v3/{OrButton-970ae320.js → OrButton-f4b9ee51.js} +2 -15
- package/dist/esm/v3/{OrCardCollection-5a0febaf.js → OrCardCollection-37226d46.js} +1 -1
- package/dist/esm/v3/{OrConfirm-7cb2f36b.js → OrConfirm-b27e7221.js} +2 -2
- package/dist/esm/v3/{OrInput-41691fb3.js → OrInput-99776ffe.js} +17 -14
- package/dist/esm/v3/{OrInputBox-5247ab25.js → OrInputBox-36c102a4.js} +2 -2
- package/dist/esm/v3/{OrSearch-cdde55ce.js → OrSearch-188c643f.js} +2 -2
- package/dist/esm/v3/{OrSelect-28a175dc.js → OrSelect-cba3966c.js} +11 -6
- package/dist/esm/v3/{OrTextarea-bb9ef3f2.js → OrTextarea-b3ecc40d.js} +1 -1
- package/dist/esm/v3/components/index.d.ts +0 -1
- package/dist/esm/v3/components/index.js +8 -9
- package/dist/esm/v3/components/or-button-v3/OrButton.vue.d.ts +0 -11
- package/dist/esm/v3/components/or-button-v3/index.js +1 -1
- package/dist/esm/v3/components/or-card-collection-v3/index.js +3 -3
- package/dist/esm/v3/components/or-combined-input-v3/OrCombinedInput.stories3.d.ts +27 -0
- package/dist/esm/v3/components/or-combined-input-v3/OrCombinedInput.vue.d.ts +98 -0
- package/dist/esm/v3/components/or-combined-input-v3/index.d.ts +2 -0
- package/dist/esm/v3/components/or-combined-input-v3/index.js +132 -0
- package/dist/esm/v3/components/or-combined-input-v3/props.d.ts +1 -0
- package/dist/esm/v3/components/or-combined-input-v3/styles.d.ts +2 -0
- package/dist/esm/v3/components/or-confirm-v3/index.js +4 -4
- package/dist/esm/v3/components/or-input-box-v3/index.js +1 -1
- package/dist/esm/v3/components/or-input-v3/index.js +2 -2
- package/dist/esm/v3/components/or-search-v3/index.js +3 -3
- package/dist/esm/v3/components/or-select-v3/OrSelect.vue.d.ts +25 -14
- package/dist/esm/v3/components/or-select-v3/index.d.ts +0 -1
- package/dist/esm/v3/components/or-select-v3/index.js +3 -3
- package/dist/esm/v3/components/or-select-v3/types.d.ts +1 -1
- package/dist/esm/v3/components/or-textarea-v3/index.js +2 -2
- package/dist/esm/v3/index.js +8 -9
- package/package.json +2 -2
- package/src/components/index.ts +0 -1
- package/src/components/or-button-v3/OrButton.stories3.ts +0 -4
- package/src/components/or-button-v3/OrButton.vue +0 -6
- package/src/components/or-button-v3/styles.ts +1 -15
- package/src/components/or-combined-input-v3/OrCombinedInput.docs.mdx +7 -0
- package/src/components/or-combined-input-v3/OrCombinedInput.stories3.ts +202 -0
- package/src/components/or-combined-input-v3/OrCombinedInput.vue +134 -0
- package/src/components/or-combined-input-v3/index.ts +2 -0
- package/src/components/or-combined-input-v3/props.ts +1 -0
- package/src/components/or-combined-input-v3/styles.ts +25 -0
- package/src/components/or-input-box-v3/styles.ts +3 -3
- package/src/components/or-input-v3/OrInput.vue +28 -22
- package/src/components/or-select-v3/OrSelect.stories3.ts +4 -0
- package/src/components/or-select-v3/OrSelect.vue +9 -3
- package/src/components/or-select-v3/index.ts +0 -1
- package/src/components/or-select-v3/types.ts +1 -1
- package/dist/bundled/v2/OrPagination-354e9abd.js +0 -296
- package/dist/bundled/v2/components/or-pagination-v3/OrPagination.stories3.d.ts +0 -12
- package/dist/bundled/v2/components/or-pagination-v3/OrPagination.vue.d.ts +0 -110
- package/dist/bundled/v2/components/or-pagination-v3/index.d.ts +0 -2
- package/dist/bundled/v2/components/or-pagination-v3/index.js +0 -20
- package/dist/bundled/v2/components/or-pagination-v3/styles.d.ts +0 -3
- package/dist/bundled/v2/components/or-pagination-v3/types.d.ts +0 -4
- package/dist/bundled/v3/OrButton-9640286b.js +0 -34
- package/dist/bundled/v3/OrMenu-f26e8e55.js +0 -29
- package/dist/bundled/v3/OrPagination.vue_vue_type_script_lang-ff22b11c.js +0 -180
- package/dist/bundled/v3/components/or-pagination-v3/OrPagination.stories3.d.ts +0 -12
- package/dist/bundled/v3/components/or-pagination-v3/OrPagination.vue.d.ts +0 -110
- package/dist/bundled/v3/components/or-pagination-v3/index.d.ts +0 -2
- package/dist/bundled/v3/components/or-pagination-v3/index.js +0 -22
- package/dist/bundled/v3/components/or-pagination-v3/styles.d.ts +0 -3
- package/dist/bundled/v3/components/or-pagination-v3/types.d.ts +0 -4
- package/dist/esm/v2/OrPagination-a56eb93b.js +0 -296
- package/dist/esm/v2/components/or-pagination-v3/OrPagination.stories3.d.ts +0 -12
- package/dist/esm/v2/components/or-pagination-v3/OrPagination.vue.d.ts +0 -110
- package/dist/esm/v2/components/or-pagination-v3/index.d.ts +0 -2
- package/dist/esm/v2/components/or-pagination-v3/index.js +0 -18
- package/dist/esm/v2/components/or-pagination-v3/styles.d.ts +0 -3
- package/dist/esm/v2/components/or-pagination-v3/types.d.ts +0 -4
- package/dist/esm/v3/OrPagination-d351a13b.js +0 -257
- package/dist/esm/v3/components/or-pagination-v3/OrPagination.stories3.d.ts +0 -12
- package/dist/esm/v3/components/or-pagination-v3/OrPagination.vue.d.ts +0 -110
- package/dist/esm/v3/components/or-pagination-v3/index.d.ts +0 -2
- package/dist/esm/v3/components/or-pagination-v3/index.js +0 -17
- package/dist/esm/v3/components/or-pagination-v3/styles.d.ts +0 -3
- package/dist/esm/v3/components/or-pagination-v3/types.d.ts +0 -4
- package/src/components/or-pagination-v3/OrPagination.docs.mdx +0 -7
- package/src/components/or-pagination-v3/OrPagination.stories3.ts +0 -87
- package/src/components/or-pagination-v3/OrPagination.vue +0 -260
- package/src/components/or-pagination-v3/index.ts +0 -2
- package/src/components/or-pagination-v3/styles.ts +0 -30
- package/src/components/or-pagination-v3/types.ts +0 -4
|
@@ -1,34 +0,0 @@
|
|
|
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";
|
|
@@ -1,29 +0,0 @@
|
|
|
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";
|
|
@@ -1,180 +0,0 @@
|
|
|
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 };
|
|
@@ -1,12 +0,0 @@
|
|
|
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>)>;
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import { PropType } from 'vue-demi';
|
|
2
|
-
import { PaginationModel } from './types';
|
|
3
|
-
declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
4
|
-
root: import("@vue/composition-api").Ref<HTMLElement | undefined>;
|
|
5
|
-
limitButton: import("@vue/composition-api").Ref<import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
|
|
6
|
-
[x: string]: ((...args: any[]) => any) | null;
|
|
7
|
-
} | string[], {} & {}, {
|
|
8
|
-
[x: number]: string;
|
|
9
|
-
} | {}, true> | undefined>;
|
|
10
|
-
limitButtonRoot: import("@vue/composition-api").ComputedRef<undefined>;
|
|
11
|
-
limitMenu: import("@vue/composition-api").Ref<import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
|
|
12
|
-
[x: string]: ((...args: any[]) => any) | null;
|
|
13
|
-
} | string[], {} & {}, {
|
|
14
|
-
[x: number]: string;
|
|
15
|
-
} | {}, true> | undefined>;
|
|
16
|
-
limitMenuRoot: import("@vue/composition-api").ComputedRef<undefined>;
|
|
17
|
-
rootStyles: import("@vue/composition-api").ComputedRef<(string | undefined)[]>;
|
|
18
|
-
offsetControlStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
19
|
-
limitControlStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
20
|
-
proxyModelValue: import("@vue/composition-api").WritableComputedRef<PaginationModel>;
|
|
21
|
-
currentLimit: import("@vue/composition-api").WritableComputedRef<number>;
|
|
22
|
-
currentOffset: import("@vue/composition-api").WritableComputedRef<number>;
|
|
23
|
-
currentPage: import("@vue/composition-api").WritableComputedRef<number>;
|
|
24
|
-
firstPage: import("@vue/composition-api").ComputedRef<number>;
|
|
25
|
-
lastPage: import("@vue/composition-api").ComputedRef<number>;
|
|
26
|
-
buttonGroup: import("@vue/composition-api").ComputedRef<(string | number)[]>;
|
|
27
|
-
toPreviousPage: () => void;
|
|
28
|
-
toNextPage: () => void;
|
|
29
|
-
toPage: (page: number) => void;
|
|
30
|
-
}> & import("@vue/composition-api").Data, {}, {}, {
|
|
31
|
-
modelValue: {
|
|
32
|
-
type: PropType<PaginationModel>;
|
|
33
|
-
default: PaginationModel;
|
|
34
|
-
};
|
|
35
|
-
value: {
|
|
36
|
-
type: PropType<PaginationModel>;
|
|
37
|
-
default: PaginationModel;
|
|
38
|
-
};
|
|
39
|
-
length: {
|
|
40
|
-
type: NumberConstructor;
|
|
41
|
-
required: true;
|
|
42
|
-
};
|
|
43
|
-
pageSizeOptions: {
|
|
44
|
-
type: PropType<number[]>;
|
|
45
|
-
default: number[];
|
|
46
|
-
};
|
|
47
|
-
}, import("@vue/composition-api").ExtractPropTypes<{
|
|
48
|
-
modelValue: {
|
|
49
|
-
type: PropType<PaginationModel>;
|
|
50
|
-
default: PaginationModel;
|
|
51
|
-
};
|
|
52
|
-
value: {
|
|
53
|
-
type: PropType<PaginationModel>;
|
|
54
|
-
default: PaginationModel;
|
|
55
|
-
};
|
|
56
|
-
length: {
|
|
57
|
-
type: NumberConstructor;
|
|
58
|
-
required: true;
|
|
59
|
-
};
|
|
60
|
-
pageSizeOptions: {
|
|
61
|
-
type: PropType<number[]>;
|
|
62
|
-
default: number[];
|
|
63
|
-
};
|
|
64
|
-
}>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
|
|
65
|
-
length: number;
|
|
66
|
-
modelValue: PaginationModel;
|
|
67
|
-
value: PaginationModel;
|
|
68
|
-
pageSizeOptions: number[];
|
|
69
|
-
} & {} & {
|
|
70
|
-
[x: string & `on${string}`]: ((...args: any[]) => any) | undefined;
|
|
71
|
-
}, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
72
|
-
root: import("@vue/composition-api").Ref<HTMLElement | undefined>;
|
|
73
|
-
limitButton: import("@vue/composition-api").Ref<import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
|
|
74
|
-
[x: string]: ((...args: any[]) => any) | null;
|
|
75
|
-
} | string[], {} & {}, {
|
|
76
|
-
[x: number]: string;
|
|
77
|
-
} | {}, true> | undefined>;
|
|
78
|
-
limitButtonRoot: import("@vue/composition-api").ComputedRef<undefined>;
|
|
79
|
-
limitMenu: import("@vue/composition-api").Ref<import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
|
|
80
|
-
[x: string]: ((...args: any[]) => any) | null;
|
|
81
|
-
} | string[], {} & {}, {
|
|
82
|
-
[x: number]: string;
|
|
83
|
-
} | {}, true> | undefined>;
|
|
84
|
-
limitMenuRoot: import("@vue/composition-api").ComputedRef<undefined>;
|
|
85
|
-
rootStyles: import("@vue/composition-api").ComputedRef<(string | undefined)[]>;
|
|
86
|
-
offsetControlStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
87
|
-
limitControlStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
88
|
-
proxyModelValue: import("@vue/composition-api").WritableComputedRef<PaginationModel>;
|
|
89
|
-
currentLimit: import("@vue/composition-api").WritableComputedRef<number>;
|
|
90
|
-
currentOffset: import("@vue/composition-api").WritableComputedRef<number>;
|
|
91
|
-
currentPage: import("@vue/composition-api").WritableComputedRef<number>;
|
|
92
|
-
firstPage: import("@vue/composition-api").ComputedRef<number>;
|
|
93
|
-
lastPage: import("@vue/composition-api").ComputedRef<number>;
|
|
94
|
-
buttonGroup: import("@vue/composition-api").ComputedRef<(string | number)[]>;
|
|
95
|
-
toPreviousPage: () => void;
|
|
96
|
-
toNextPage: () => void;
|
|
97
|
-
toPage: (page: number) => void;
|
|
98
|
-
}>, import("@vue/composition-api").Data, {}, {}, {}, {}, string[], {
|
|
99
|
-
length: number;
|
|
100
|
-
modelValue: PaginationModel;
|
|
101
|
-
value: PaginationModel;
|
|
102
|
-
pageSizeOptions: number[];
|
|
103
|
-
} & {} & {
|
|
104
|
-
[x: string & `on${string}`]: ((...args: any[]) => any) | undefined;
|
|
105
|
-
}, {
|
|
106
|
-
modelValue: PaginationModel;
|
|
107
|
-
value: PaginationModel;
|
|
108
|
-
pageSizeOptions: number[];
|
|
109
|
-
}, true>);
|
|
110
|
-
export default _default;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export { s as OrPaginationV3 } from '../../OrPagination.vue_vue_type_script_lang-ff22b11c.js';
|
|
2
|
-
import 'vue';
|
|
3
|
-
import '../../OrButton-9640286b.js';
|
|
4
|
-
import '../../OrButton.vue_vue_type_script_lang-06d8ead1.js';
|
|
5
|
-
import '../../OrLoader-c4bbef2f.js';
|
|
6
|
-
import '../../OrLoader.vue_vue_type_script_lang-5405040c.js';
|
|
7
|
-
import '../../useClassAttribute-00888f78.js';
|
|
8
|
-
import '../../OrIcon-d878b768.js';
|
|
9
|
-
import '../../OrIcon.vue_vue_type_script_lang-a119a715.js';
|
|
10
|
-
import '../../OrMenu-f26e8e55.js';
|
|
11
|
-
import '../../OrMenu.vue_vue_type_script_lang-2446a69a.js';
|
|
12
|
-
import '../../OrPopover-c462ce77.js';
|
|
13
|
-
import '../../OrPopover.vue_vue_type_script_lang-54c7b11c.js';
|
|
14
|
-
import '../../floating-ui.dom.esm-83eba816.js';
|
|
15
|
-
import '@vueuse/core';
|
|
16
|
-
import '../../OrBottomSheet.vue_vue_type_script_lang-6fb49de9.js';
|
|
17
|
-
import '../../OrOverlay.vue_vue_type_script_lang-cb3aad0c.js';
|
|
18
|
-
import '../../OrTeleport.vue3.vue_vue_type_script_lang-4dc70cf1.js';
|
|
19
|
-
import '../../useElevation-c8d5d3ba.js';
|
|
20
|
-
import '../../useResponsive-9d397e2a.js';
|
|
21
|
-
import '../../OrMenuItem-4feaba6c.js';
|
|
22
|
-
import '../../OrMenuItem.vue_vue_type_script_lang-0ffaef05.js';
|