@onereach/ui-components 2.69.1-beta.2090.0 → 2.69.1-beta.2095.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.
Files changed (142) hide show
  1. package/dist/bundled/v2/{OrButton-0e91a808.js → OrButton-66d37aff.js} +14 -1
  2. package/dist/bundled/v2/{OrCard-29116e1f.js → OrCard-58a1ba3e.js} +2 -2
  3. package/dist/bundled/v2/OrCardCollection-a9a779ea.js +228 -0
  4. package/dist/bundled/v2/{OrConfirm-18c534df.js → OrConfirm-e1ca1422.js} +1 -1
  5. package/dist/bundled/v2/OrPagination-354e9abd.js +296 -0
  6. package/dist/bundled/v2/{OrSearch-19f43fe5.js → OrSearch-9d402f56.js} +2 -2
  7. package/dist/bundled/v2/{OrSelect-759b4410.js → OrSelect-1c9421ad.js} +3 -3
  8. package/dist/bundled/v2/{OrSortHeader-9932d28f.js → OrSortHeader-396e6a7c.js} +2 -2
  9. package/dist/bundled/v2/components/index.d.ts +1 -0
  10. package/dist/bundled/v2/components/index.js +8 -7
  11. package/dist/bundled/v2/components/or-button-v3/OrButton.vue.d.ts +11 -0
  12. package/dist/bundled/v2/components/or-button-v3/index.js +1 -1
  13. package/dist/bundled/v2/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +0 -4
  14. package/dist/bundled/v2/components/or-card-collection-v3/OrCardCollection.vue.d.ts +37 -61
  15. package/dist/bundled/v2/components/or-card-collection-v3/index.js +4 -7
  16. package/dist/bundled/v2/components/or-card-collection-v3/types.d.ts +4 -5
  17. package/dist/bundled/v2/components/or-card-v3/index.js +1 -1
  18. package/dist/bundled/v2/components/or-confirm-v3/index.js +2 -2
  19. package/dist/bundled/v2/components/or-pagination-v3/OrPagination.stories3.d.ts +12 -0
  20. package/dist/bundled/v2/components/or-pagination-v3/OrPagination.vue.d.ts +110 -0
  21. package/dist/bundled/v2/components/or-pagination-v3/index.d.ts +2 -0
  22. package/dist/bundled/v2/components/or-pagination-v3/index.js +20 -0
  23. package/dist/bundled/v2/components/or-pagination-v3/styles.d.ts +3 -0
  24. package/dist/bundled/v2/components/or-pagination-v3/types.d.ts +4 -0
  25. package/dist/bundled/v2/components/or-search-v3/index.js +1 -1
  26. package/dist/bundled/v2/components/or-select-v3/OrSelect.vue.d.ts +14 -14
  27. package/dist/bundled/v2/components/or-select-v3/index.d.ts +1 -0
  28. package/dist/bundled/v2/components/or-select-v3/index.js +1 -1
  29. package/dist/bundled/v2/components/or-select-v3/types.d.ts +1 -1
  30. package/dist/bundled/v2/components/or-sort-header-v3/index.js +1 -1
  31. package/dist/bundled/v2/index.js +9 -8
  32. package/dist/bundled/v3/{OrButton-8ab33d9d.js → OrButton-9640286b.js} +3 -2
  33. package/dist/bundled/v3/{OrButton.vue_vue_type_script_lang-3718b300.js → OrButton.vue_vue_type_script_lang-06d8ead1.js} +13 -1
  34. package/dist/bundled/v3/OrCardCollection.vue_vue_type_script_lang-3993a015.js +164 -0
  35. package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-85472b12.js → OrConfirm.vue_vue_type_script_lang-f1b81f00.js} +2 -2
  36. package/dist/bundled/v3/OrPagination.vue_vue_type_script_lang-ff22b11c.js +180 -0
  37. package/dist/bundled/v3/{OrSearch.vue_vue_type_script_lang-cb2d6612.js → OrSearch.vue_vue_type_script_lang-ed78b21f.js} +1 -1
  38. package/dist/bundled/v3/{OrSelect.vue_vue_type_script_lang-dfadd12f.js → OrSelect.vue_vue_type_script_lang-d0626539.js} +2 -2
  39. package/dist/bundled/v3/components/index.d.ts +1 -0
  40. package/dist/bundled/v3/components/index.js +11 -10
  41. package/dist/bundled/v3/components/or-button-v3/OrButton.vue.d.ts +11 -0
  42. package/dist/bundled/v3/components/or-button-v3/index.js +1 -1
  43. package/dist/bundled/v3/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +0 -4
  44. package/dist/bundled/v3/components/or-card-collection-v3/OrCardCollection.vue.d.ts +37 -61
  45. package/dist/bundled/v3/components/or-card-collection-v3/index.js +4 -11
  46. package/dist/bundled/v3/components/or-card-collection-v3/types.d.ts +4 -5
  47. package/dist/bundled/v3/components/or-confirm-v3/index.js +3 -3
  48. package/dist/bundled/v3/components/or-pagination-v3/OrPagination.stories3.d.ts +12 -0
  49. package/dist/bundled/v3/components/or-pagination-v3/OrPagination.vue.d.ts +110 -0
  50. package/dist/bundled/v3/components/or-pagination-v3/index.d.ts +2 -0
  51. package/dist/bundled/v3/components/or-pagination-v3/index.js +22 -0
  52. package/dist/bundled/v3/components/or-pagination-v3/styles.d.ts +3 -0
  53. package/dist/bundled/v3/components/or-pagination-v3/types.d.ts +4 -0
  54. package/dist/bundled/v3/components/or-search-v3/index.js +1 -1
  55. package/dist/bundled/v3/components/or-select-v3/OrSelect.vue.d.ts +14 -14
  56. package/dist/bundled/v3/components/or-select-v3/index.d.ts +1 -0
  57. package/dist/bundled/v3/components/or-select-v3/index.js +1 -1
  58. package/dist/bundled/v3/components/or-select-v3/types.d.ts +1 -1
  59. package/dist/bundled/v3/index.js +354 -292
  60. package/dist/esm/v2/{OrButton-357a5756.js → OrButton-3d4fc9da.js} +14 -1
  61. package/dist/esm/v2/OrCardCollection-4f001551.js +227 -0
  62. package/dist/esm/v2/{OrConfirm-b0b2e43c.js → OrConfirm-ba3f8c45.js} +1 -1
  63. package/dist/esm/v2/OrPagination-a56eb93b.js +296 -0
  64. package/dist/esm/v2/{OrSelect-ac382aa6.js → OrSelect-ca2510cd.js} +3 -3
  65. package/dist/esm/v2/components/index.d.ts +1 -0
  66. package/dist/esm/v2/components/index.js +5 -4
  67. package/dist/esm/v2/components/or-button-v3/OrButton.vue.d.ts +11 -0
  68. package/dist/esm/v2/components/or-button-v3/index.js +1 -1
  69. package/dist/esm/v2/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +0 -4
  70. package/dist/esm/v2/components/or-card-collection-v3/OrCardCollection.vue.d.ts +37 -61
  71. package/dist/esm/v2/components/or-card-collection-v3/index.js +4 -7
  72. package/dist/esm/v2/components/or-card-collection-v3/types.d.ts +4 -5
  73. package/dist/esm/v2/components/or-confirm-v3/index.js +2 -2
  74. package/dist/esm/v2/components/or-pagination-v3/OrPagination.stories3.d.ts +12 -0
  75. package/dist/esm/v2/components/or-pagination-v3/OrPagination.vue.d.ts +110 -0
  76. package/dist/esm/v2/components/or-pagination-v3/index.d.ts +2 -0
  77. package/dist/esm/v2/components/or-pagination-v3/index.js +18 -0
  78. package/dist/esm/v2/components/or-pagination-v3/styles.d.ts +3 -0
  79. package/dist/esm/v2/components/or-pagination-v3/types.d.ts +4 -0
  80. package/dist/esm/v2/components/or-select-v3/OrSelect.vue.d.ts +14 -14
  81. package/dist/esm/v2/components/or-select-v3/index.d.ts +1 -0
  82. package/dist/esm/v2/components/or-select-v3/index.js +1 -1
  83. package/dist/esm/v2/components/or-select-v3/types.d.ts +1 -1
  84. package/dist/esm/v2/index.js +5 -4
  85. package/dist/esm/v3/{OrButton-f4b9ee51.js → OrButton-970ae320.js} +15 -2
  86. package/dist/esm/v3/OrCardCollection-5a0febaf.js +198 -0
  87. package/dist/esm/v3/{OrConfirm-906427ef.js → OrConfirm-7cb2f36b.js} +1 -1
  88. package/dist/esm/v3/OrPagination-d351a13b.js +257 -0
  89. package/dist/esm/v3/{OrSelect-fee9c099.js → OrSelect-bff22c7f.js} +3 -3
  90. package/dist/esm/v3/components/index.d.ts +1 -0
  91. package/dist/esm/v3/components/index.js +5 -4
  92. package/dist/esm/v3/components/or-button-v3/OrButton.vue.d.ts +11 -0
  93. package/dist/esm/v3/components/or-button-v3/index.js +1 -1
  94. package/dist/esm/v3/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +0 -4
  95. package/dist/esm/v3/components/or-card-collection-v3/OrCardCollection.vue.d.ts +37 -61
  96. package/dist/esm/v3/components/or-card-collection-v3/index.js +4 -7
  97. package/dist/esm/v3/components/or-card-collection-v3/types.d.ts +4 -5
  98. package/dist/esm/v3/components/or-confirm-v3/index.js +2 -2
  99. package/dist/esm/v3/components/or-pagination-v3/OrPagination.stories3.d.ts +12 -0
  100. package/dist/esm/v3/components/or-pagination-v3/OrPagination.vue.d.ts +110 -0
  101. package/dist/esm/v3/components/or-pagination-v3/index.d.ts +2 -0
  102. package/dist/esm/v3/components/or-pagination-v3/index.js +17 -0
  103. package/dist/esm/v3/components/or-pagination-v3/styles.d.ts +3 -0
  104. package/dist/esm/v3/components/or-pagination-v3/types.d.ts +4 -0
  105. package/dist/esm/v3/components/or-select-v3/OrSelect.vue.d.ts +14 -14
  106. package/dist/esm/v3/components/or-select-v3/index.d.ts +1 -0
  107. package/dist/esm/v3/components/or-select-v3/index.js +1 -1
  108. package/dist/esm/v3/components/or-select-v3/types.d.ts +1 -1
  109. package/dist/esm/v3/index.js +5 -4
  110. package/package.json +1 -1
  111. package/src/components/index.ts +1 -0
  112. package/src/components/or-button-v3/OrButton.stories3.ts +4 -0
  113. package/src/components/or-button-v3/OrButton.vue +6 -0
  114. package/src/components/or-button-v3/styles.ts +15 -1
  115. package/src/components/or-card-collection-v3/OrCardCollection.stories3.ts +19 -160
  116. package/src/components/or-card-collection-v3/OrCardCollection.vue +74 -99
  117. package/src/components/or-card-collection-v3/styles.ts +1 -1
  118. package/src/components/or-card-collection-v3/types.ts +4 -5
  119. package/src/components/or-pagination-v3/OrPagination.docs.mdx +7 -0
  120. package/src/components/or-pagination-v3/OrPagination.stories3.ts +87 -0
  121. package/src/components/or-pagination-v3/OrPagination.vue +260 -0
  122. package/src/components/or-pagination-v3/index.ts +2 -0
  123. package/src/components/or-pagination-v3/styles.ts +30 -0
  124. package/src/components/or-pagination-v3/types.ts +4 -0
  125. package/src/components/or-select-v3/OrSelect.vue +3 -3
  126. package/src/components/or-select-v3/index.ts +1 -0
  127. package/src/components/or-select-v3/types.ts +1 -1
  128. package/dist/bundled/v2/OrCardCollection-a8d5ce32.js +0 -328
  129. package/dist/bundled/v2/components/or-card-collection-v3/OrCardCollectionView.vue2.vue.d.ts +0 -35
  130. package/dist/bundled/v2/components/or-card-collection-v3/constatnts.d.ts +0 -4
  131. package/dist/bundled/v3/OrCardCollection.vue_vue_type_script_lang-f9f329a2.js +0 -224
  132. package/dist/bundled/v3/components/or-card-collection-v3/OrCardCollectionView.vue3.vue.d.ts +0 -35
  133. package/dist/bundled/v3/components/or-card-collection-v3/constatnts.d.ts +0 -4
  134. package/dist/esm/v2/OrCardCollection-95b051e1.js +0 -328
  135. package/dist/esm/v2/components/or-card-collection-v3/OrCardCollectionView.vue2.vue.d.ts +0 -35
  136. package/dist/esm/v2/components/or-card-collection-v3/constatnts.d.ts +0 -4
  137. package/dist/esm/v3/OrCardCollection-afd863fc.js +0 -274
  138. package/dist/esm/v3/components/or-card-collection-v3/OrCardCollectionView.vue3.vue.d.ts +0 -35
  139. package/dist/esm/v3/components/or-card-collection-v3/constatnts.d.ts +0 -4
  140. package/src/components/or-card-collection-v3/OrCardCollectionView.vue2.vue +0 -41
  141. package/src/components/or-card-collection-v3/OrCardCollectionView.vue3.vue +0 -42
  142. package/src/components/or-card-collection-v3/constatnts.ts +0 -12
@@ -1,7 +1,7 @@
1
- import { s as script } from './OrButton.vue_vue_type_script_lang-3718b300.js';
1
+ import { s as script } from './OrButton.vue_vue_type_script_lang-06d8ead1.js';
2
2
  import { resolveComponent, openBlock, createElementBlock, mergeProps, createElementVNode, normalizeClass, renderSlot, createBlock, Fragment, createTextVNode, toDisplayString, createCommentVNode } from 'vue';
3
3
 
4
- const _hoisted_1 = ["type", "disabled"];
4
+ const _hoisted_1 = ["type", "activated", "disabled"];
5
5
  const _hoisted_2 = {
6
6
  key: 0,
7
7
  class: /*#__PURE__*/normalizeClass(['absolute'])
@@ -13,6 +13,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
13
13
  }, _ctx.$attrs, {
14
14
  class: _ctx.rootStyles,
15
15
  type: _ctx.type,
16
+ activated: _ctx.activated ? '' : null,
16
17
  disabled: _ctx.disabled,
17
18
  onClick: _cache[0] || (_cache[0] = $event => _ctx.$emit('click', $event)),
18
19
  onFocus: _cache[1] || (_cache[1] = $event => _ctx.$emit('focus', $event)),
@@ -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
@@ -0,0 +1,164 @@
1
+ import { openBlock, createElementBlock, mergeProps, renderSlot, resolveComponent, withModifiers, createBlock, normalizeClass, createCommentVNode, defineComponent, ref, computed, watch } from 'vue';
2
+ import { s as script$1 } from './OrCard.vue_vue_type_script_lang-165de137.js';
3
+ import './OrIconButton-4bd33e3c.js';
4
+ import { s as script$3 } from './OrIconButton.vue_vue_type_script_lang-641f6e06.js';
5
+ import './OrInput-fa782fc1.js';
6
+ import { s as script$4 } from './OrInput.vue_vue_type_script_lang-f6d793d3.js';
7
+ import { s as script$2 } from './OrSortHeader.vue_vue_type_script_lang-75115125.js';
8
+ import { u as useClassAttribute } from './useClassAttribute-00888f78.js';
9
+
10
+ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
11
+ return openBlock(), createElementBlock("div", mergeProps({
12
+ ref: "root"
13
+ }, _ctx.$attrs, {
14
+ class: _ctx.rootStyles
15
+ }), [renderSlot(_ctx.$slots, "default")], 16 /* FULL_PROPS */);
16
+ }
17
+
18
+ script$1.render = render$1;
19
+ script$1.__file = "src/components/or-card-v3/OrCard.vue";
20
+
21
+ const _hoisted_1 = ["activated"];
22
+ function render(_ctx, _cache, $props, $setup, $data, $options) {
23
+ const _component_OrIcon = resolveComponent("OrIcon");
24
+ return openBlock(), createElementBlock("div", mergeProps({
25
+ ref: "root"
26
+ }, _ctx.$attrs, {
27
+ class: _ctx.rootStyles,
28
+ activated: _ctx.activated ? '' : null,
29
+ onClick: _cache[0] || (_cache[0] = withModifiers($event => _ctx.toggleDirection(), ["stop"]))
30
+ }), [renderSlot(_ctx.$slots, "default"), _ctx.activated ? (openBlock(), createBlock(_component_OrIcon, {
31
+ key: 0,
32
+ class: normalizeClass({
33
+ 'rotate-180': _ctx.proxyModelValue.direction === 'asc'
34
+ }),
35
+ icon: 'arrow_downward'
36
+ }, null, 8 /* PROPS */, ["class"])) : createCommentVNode("v-if", true)], 16 /* FULL_PROPS */, _hoisted_1);
37
+ }
38
+
39
+ script$2.render = render;
40
+ script$2.__file = "src/components/or-sort-header-v3/OrSortHeader.vue";
41
+
42
+ var CardCollectionView;
43
+ (function (CardCollectionView) {
44
+ CardCollectionView["Grid"] = "grid";
45
+ CardCollectionView["List"] = "list";
46
+ })(CardCollectionView || (CardCollectionView = {}));
47
+
48
+ const CardCollectionRoot = [
49
+ // Layout
50
+ 'layout-column',
51
+ // Spacing
52
+ 'gap-md'];
53
+ const CardCollectionToolbar = [
54
+ // Layout
55
+ 'layout-row justify-between',
56
+ // Typography
57
+ 'typography-body-2-regular',
58
+ // Theme
59
+ 'theme-foreground-default', 'dark:theme-foreground-default-dark'];
60
+ const CardCollectionToolbarPanel = [
61
+ // Layout
62
+ 'layout-row',
63
+ // Spacing
64
+ 'gap-sm+'];
65
+ const CardCollectionContent = [
66
+ // Layout
67
+ 'grid',
68
+ // Spacing
69
+ 'gap-sm md:gap-md'];
70
+ const CardCollectionContentViews = {
71
+ 'grid': [
72
+ // Layout
73
+ 'sm:grid-cols-1', 'md:grid-cols-2', 'lg:grid-cols-4', 'xl:grid-cols-6'],
74
+ 'list': []
75
+ };
76
+
77
+ var script = defineComponent({
78
+ name: 'OrCardCollection',
79
+ components: {
80
+ OrCard: script$1,
81
+ OrIconButton: script$3,
82
+ OrInput: script$4,
83
+ OrSortHeader: script$2
84
+ },
85
+ inheritAttrs: false,
86
+ props: {
87
+ items: {
88
+ type: Array,
89
+ default: []
90
+ },
91
+ view: {
92
+ type: String,
93
+ default: CardCollectionView.Grid
94
+ },
95
+ sort: {
96
+ type: Object,
97
+ default: undefined
98
+ },
99
+ sortHeaders: {
100
+ type: Array,
101
+ default: undefined
102
+ },
103
+ search: {
104
+ type: String,
105
+ default: undefined
106
+ }
107
+ },
108
+ emits: ['viewChange', 'sortChange', 'searchChange'],
109
+ expose: ['root'],
110
+ setup(props, context) {
111
+ // Refs
112
+ const root = ref();
113
+ // Styles
114
+ const classAttribute = useClassAttribute();
115
+ const rootStyles = computed(() => ['or-card-collection', ...CardCollectionRoot, classAttribute.value]);
116
+ const toolbarStyles = computed(() => [...CardCollectionToolbar]);
117
+ const toolbarPanelStyles = computed(() => [...CardCollectionToolbarPanel]);
118
+ const contentStyles = computed(() => [...CardCollectionContent, ...CardCollectionContentViews[proxyView.value]]);
119
+ // State
120
+ const proxyView = ref(props.view);
121
+ const proxySort = ref(props.sort);
122
+ const proxySearch = ref(props.search);
123
+ // Methods
124
+ function switchToGridView() {
125
+ proxyView.value = CardCollectionView.Grid;
126
+ }
127
+ function switchToListView() {
128
+ proxyView.value = CardCollectionView.List;
129
+ }
130
+ // Effects
131
+ watch(() => props.view, value => {
132
+ proxyView.value = value;
133
+ });
134
+ watch(proxyView, value => {
135
+ context.emit('viewChange', value);
136
+ });
137
+ watch(() => props.sort, value => {
138
+ proxySort.value = value;
139
+ });
140
+ watch(proxySort, value => {
141
+ context.emit('sortChange', value);
142
+ });
143
+ watch(() => props.search, value => {
144
+ proxySearch.value = value;
145
+ });
146
+ watch(proxySearch, value => {
147
+ context.emit('searchChange', value);
148
+ });
149
+ return {
150
+ root,
151
+ rootStyles,
152
+ toolbarStyles,
153
+ toolbarPanelStyles,
154
+ contentStyles,
155
+ proxyView,
156
+ proxySort,
157
+ proxySearch,
158
+ switchToGridView,
159
+ switchToListView
160
+ };
161
+ }
162
+ });
163
+
164
+ export { CardCollectionView as C, script as s };
@@ -2,9 +2,9 @@ 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 './OrButton-8ab33d9d.js';
5
+ import './OrButton-9640286b.js';
6
6
  import './OrInput-fa782fc1.js';
7
- import { s as script$2, a as ButtonColor } from './OrButton.vue_vue_type_script_lang-3718b300.js';
7
+ import { s as script$2, a as ButtonColor } from './OrButton.vue_vue_type_script_lang-06d8ead1.js';
8
8
  import { s as script$1 } from './OrOverlay.vue_vue_type_script_lang-cb3aad0c.js';
9
9
  import { s as script$3 } from './OrInput.vue_vue_type_script_lang-f6d793d3.js';
10
10
 
@@ -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 };
@@ -1,8 +1,8 @@
1
1
  import { defineComponent, ref, computed, watch } from 'vue';
2
2
  import { debouncedWatch } from '@vueuse/core';
3
3
  import './OrInput-fa782fc1.js';
4
- import { s as script$1 } from './OrInput.vue_vue_type_script_lang-f6d793d3.js';
5
4
  import { u as useClassAttribute } from './useClassAttribute-00888f78.js';
5
+ import { s as script$1 } from './OrInput.vue_vue_type_script_lang-f6d793d3.js';
6
6
  import { a as InputBoxSize } from './OrInputBox.vue_vue_type_script_lang-5ee4ee45.js';
7
7
 
8
8
  var script = defineComponent({
@@ -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: {
@@ -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,10 +5,10 @@ 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-3718b300.js';
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
- export { C as CardCollectionView, s as OrCardCollectionV3 } from '../OrCardCollection.vue_vue_type_script_lang-f9f329a2.js';
11
+ export { C as CardCollectionView, s as OrCardCollectionV3 } from '../OrCardCollection.vue_vue_type_script_lang-3993a015.js';
12
12
  export { s as OrCardV3 } from '../OrCard.vue_vue_type_script_lang-165de137.js';
13
13
  export { a as OrCarousel, s as OrCarouselItem } from '../OrCarouselItem.vue_vue_type_script_lang-ad286afc.js';
14
14
  export { s as OrCheckbox } from '../OrCheckbox.vue_vue_type_script_lang-d8a66818.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-85472b12.js';
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,15 +58,16 @@ 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';
64
65
  export { s as OrRadioGroup } from '../OrRadioGroup.vue_vue_type_script_lang-caea7bcb.js';
65
66
  export { s as OrRadioV3 } from '../OrRadio.vue_vue_type_script_lang-2e666a56.js';
66
- export { s as OrSearchV3 } from '../OrSearch.vue_vue_type_script_lang-cb2d6612.js';
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-dfadd12f.js';
70
+ export { s as OrSelectV3 } from '../OrSelect.vue_vue_type_script_lang-d0626539.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';
@@ -106,10 +107,7 @@ import '../OrLoader-ee97fef4.js';
106
107
  import '../OrLoader-c4bbef2f.js';
107
108
  import '../OrIconButton-e637158e.js';
108
109
  import '../OrIconButton-4bd33e3c.js';
109
- import '../OrButton-8ab33d9d.js';
110
- import '../OrMenu-f26e8e55.js';
111
- import '../OrMenuItem-4feaba6c.js';
112
- import '../OrIcon-d878b768.js';
110
+ import '../OrInput-fa782fc1.js';
113
111
  import '../OrLabel-c6873e79.js';
114
112
  import '../OrLabel-e412c532.js';
115
113
  import '../OrError-b43ebad8.js';
@@ -120,8 +118,9 @@ import '../dom-d21d0a92.js';
120
118
  import '../OrFloating-b6672a37.js';
121
119
  import '../index-01519e46.js';
122
120
  import '../OrButton-ec723bb7.js';
123
- import '../OrInput-fa782fc1.js';
121
+ import '../OrButton-9640286b.js';
124
122
  import '../OrCollapse-63e83681.js';
123
+ import '../OrIcon-d878b768.js';
125
124
  import '../floating-ui.dom.esm-83eba816.js';
126
125
  import '../OrHint-9592499e.js';
127
126
  import '../OrInlineInputBox-9d68ded1.js';
@@ -131,5 +130,7 @@ import '../v4-cf8987a3.js';
131
130
  import '../OrPopover-c462ce77.js';
132
131
  import '../useResponsive-9d397e2a.js';
133
132
  import '../useElevation-c8d5d3ba.js';
133
+ import '../OrMenu-f26e8e55.js';
134
+ import '../OrMenuItem-4feaba6c.js';
134
135
  import '../dropdown-open-293d2de2.js';
135
136
  import '../useOverflow-06bcc7d7.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-3718b300.js';
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,5 +1,4 @@
1
1
  import { Meta, StoryFn } from '@storybook/vue3';
2
- import OrCardCollection from './OrCardCollection.vue';
3
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, {
4
3
  [x: string]: ((...args: any[]) => any) | null;
5
4
  } | string[], {} & {}, {
@@ -16,6 +15,3 @@ export declare const WithSorting: StoryFn<import("vue").ComponentOptions<import(
16
15
  } | string[], {} & {}, {
17
16
  [x: number]: string;
18
17
  } | {}, true>)>;
19
- export declare const OverrideViewContainer: StoryFn<typeof OrCardCollection>;
20
- export declare const ExtraViewMode: StoryFn<typeof OrCardCollection>;
21
- export declare const WithLink: StoryFn<typeof OrCardCollection>;