@onereach/ui-components 4.12.0 → 4.12.1-beta.2983.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/components/OrCardCollectionV3/OrCardCollection.js +26 -62
- package/dist/bundled/v2/components/OrCardCollectionV3/OrCardCollection.vue.d.ts +2 -25
- package/dist/bundled/v2/components/OrCardCollectionV3/index.js +6 -4
- package/dist/bundled/v2/components/OrCardCollectionV3/styles.js +6 -5
- package/dist/bundled/v2/components/OrCardCollectionV3/types.d.ts +0 -4
- package/dist/bundled/v2/components/OrDatePickerV3/OrDatePicker.js +1 -1
- package/dist/bundled/v2/components/OrDatePickerV3/index.js +1 -1
- package/dist/bundled/v2/components/OrDateTimePickerV3/OrDateTimePicker.js +1 -1
- package/dist/bundled/v2/components/OrDateTimePickerV3/index.js +1 -1
- package/dist/bundled/v2/components/OrMenuItemV3/styles.js +3 -1
- package/dist/bundled/v2/components/OrSortingV3/OrSortingV3.js +160 -0
- package/dist/bundled/v2/components/OrSortingV3/OrSortingV3.vue.d.ts +69 -0
- package/dist/bundled/v2/components/OrSortingV3/index.d.ts +2 -0
- package/dist/bundled/v2/components/OrSortingV3/index.js +34 -0
- package/dist/bundled/v2/components/OrSortingV3/styles.d.ts +2 -0
- package/dist/bundled/v2/components/OrSortingV3/styles.js +6 -0
- package/dist/bundled/v2/components/OrSortingV3/types.d.ts +4 -0
- package/dist/bundled/v2/components/index.d.ts +1 -1
- package/dist/bundled/v2/components/index.js +3 -3
- package/dist/bundled/v2/index.js +4 -4
- package/dist/bundled/v3/{OrCardCollection.vue_vue_type_script_lang-9d20dd3c.js → OrCardCollection.vue_vue_type_script_lang-9597e400.js} +5 -30
- package/dist/bundled/v3/{OrDatePicker.vue_vue_type_script_lang-d94c33ca.js → OrDatePicker.vue_vue_type_script_lang-04af0e24.js} +1 -1
- package/dist/bundled/v3/{OrDateTimePicker.vue_vue_type_script_lang-46b1735a.js → OrDateTimePicker.vue_vue_type_script_lang-ec06a304.js} +1 -1
- package/dist/bundled/v3/{OrDateTimePickerMonthSelect-57340c1e.js → OrDateTimePickerMonthSelect-1e284be4.js} +1 -1
- package/dist/bundled/v3/{OrPagination.vue_vue_type_script_lang-32a27808.js → OrPagination.vue_vue_type_script_lang-f4c61af9.js} +1 -1
- package/dist/bundled/v3/{OrSelect.vue_vue_type_script_lang-69c5cd67.js → OrSelect.vue_vue_type_script_lang-fe9a7e7c.js} +1 -1
- package/dist/bundled/v3/OrSortingV3.vue_vue_type_script_lang-1bb22099.js +68 -0
- package/dist/bundled/v3/{OrTabs.vue_vue_type_script_lang-e9ea6c28.js → OrTabs.vue_vue_type_script_lang-366b95d9.js} +1 -1
- package/dist/bundled/v3/components/OrCardCollectionV3/OrCardCollection.js +26 -51
- package/dist/bundled/v3/components/OrCardCollectionV3/OrCardCollection.vue.d.ts +2 -5
- package/dist/bundled/v3/components/OrCardCollectionV3/index.js +10 -7
- package/dist/bundled/v3/components/OrCardCollectionV3/styles.js +6 -5
- package/dist/bundled/v3/components/OrCardCollectionV3/types.d.ts +0 -4
- package/dist/bundled/v3/components/OrDatePickerV3/OrDatePicker.js +4 -4
- package/dist/bundled/v3/components/OrDatePickerV3/index.js +3 -3
- package/dist/bundled/v3/components/OrDateTimePickerV3/OrDateTimePicker.js +4 -4
- package/dist/bundled/v3/components/OrDateTimePickerV3/index.js +3 -3
- package/dist/bundled/v3/components/OrMenuItemV3/OrMenuItem.js +2 -2
- package/dist/bundled/v3/components/OrMenuItemV3/index.js +1 -1
- package/dist/bundled/v3/components/OrMenuItemV3/styles.js +3 -1
- package/dist/bundled/v3/components/OrPaginationV3/OrPagination.js +3 -3
- package/dist/bundled/v3/components/OrPaginationV3/index.js +2 -2
- package/dist/bundled/v3/components/OrSelectV3/OrSelect.js +3 -3
- package/dist/bundled/v3/components/OrSelectV3/index.js +2 -2
- package/dist/bundled/v3/components/OrSortingV3/OrSortingV3.js +88 -0
- package/dist/bundled/v3/components/OrSortingV3/OrSortingV3.vue.d.ts +36 -0
- package/dist/bundled/v3/components/OrSortingV3/index.d.ts +2 -0
- package/dist/bundled/v3/components/OrSortingV3/index.js +42 -0
- package/dist/bundled/v3/components/OrSortingV3/styles.d.ts +2 -0
- package/dist/bundled/v3/components/OrSortingV3/styles.js +6 -0
- package/dist/bundled/v3/components/OrSortingV3/types.d.ts +4 -0
- package/dist/bundled/v3/components/OrTabsV3/OrTabs.js +3 -3
- package/dist/bundled/v3/components/OrTabsV3/index.js +2 -2
- package/dist/bundled/v3/components/index.d.ts +1 -1
- package/dist/bundled/v3/components/index.js +12 -11
- package/dist/bundled/v3/index.js +15 -15
- package/dist/esm/v2/{OrCardCollection-d29b850c.js → OrCardCollection-4e2fba5e.js} +24 -65
- package/dist/esm/v2/{OrDatePicker-365c393c.js → OrDatePicker-078c3498.js} +1 -1
- package/dist/esm/v2/{OrDateTimePicker-665b1585.js → OrDateTimePicker-22febde1.js} +1 -1
- package/dist/esm/v2/{OrDateTimePicker.vue_rollup-plugin-vue_script-a59d2087.js → OrDateTimePicker.vue_rollup-plugin-vue_script-f843a18d.js} +1 -1
- package/dist/esm/v2/{OrDateTimePickerPopoverHeader-3a99a29d.js → OrDateTimePickerPopoverHeader-f4dabe74.js} +1 -1
- package/dist/esm/v2/{OrMenuItem-b5bb6e11.js → OrMenuItem-8af38fc8.js} +3 -1
- package/dist/esm/v2/{OrPagination-b9a941dd.js → OrPagination-05a1c01b.js} +1 -1
- package/dist/esm/v2/{OrSelect-9893819d.js → OrSelect-925d2b50.js} +1 -1
- package/dist/esm/v2/OrSortingV3-6b5f1b51.js +139 -0
- package/dist/esm/v2/{OrTabs-80db5b36.js → OrTabs-e5b6986c.js} +1 -1
- package/dist/esm/v2/{OrTimePicker-13232692.js → OrTimePicker-3860cda8.js} +2 -2
- package/dist/esm/v2/components/index.d.ts +1 -1
- package/dist/esm/v2/components/index.js +11 -11
- package/dist/esm/v2/components/or-card-collection-v3/OrCardCollection.vue.d.ts +2 -25
- package/dist/esm/v2/components/or-card-collection-v3/index.js +8 -7
- package/dist/esm/v2/components/or-card-collection-v3/types.d.ts +0 -4
- package/dist/esm/v2/components/or-date-picker-v3/index.js +3 -3
- package/dist/esm/v2/components/or-date-time-picker-v3/index.js +4 -4
- package/dist/esm/v2/components/or-menu-item-v3/index.js +1 -1
- package/dist/esm/v2/components/or-pagination-v3/index.js +2 -2
- package/dist/esm/v2/components/or-select-v3/index.js +2 -2
- package/dist/esm/v2/components/or-sorting-v3/OrSortingV3.vue.d.ts +69 -0
- package/dist/esm/v2/components/or-sorting-v3/index.d.ts +2 -0
- package/dist/esm/v2/components/or-sorting-v3/index.js +20 -0
- package/dist/esm/v2/components/or-sorting-v3/styles.d.ts +2 -0
- package/dist/esm/v2/components/or-sorting-v3/types.d.ts +4 -0
- package/dist/esm/v2/components/or-tabs-v3/index.js +2 -2
- package/dist/esm/v2/components/or-time-picker-v3/index.js +4 -4
- package/dist/esm/v2/index.js +11 -11
- package/dist/esm/v3/{OrCardCollection-305a9a2d.js → OrCardCollection-46544ba3.js} +25 -75
- package/dist/esm/v3/{OrDatePicker-aac79bce.js → OrDatePicker-4b5a93ad.js} +1 -1
- package/dist/esm/v3/{OrDateTimePicker-5a1af2fe.js → OrDateTimePicker-091fe6ac.js} +1 -1
- package/dist/esm/v3/{OrDateTimePickerPopoverHeader-a478e254.js → OrDateTimePickerPopoverHeader-be89989e.js} +1 -1
- package/dist/esm/v3/{OrMenuItem-331cb96b.js → OrMenuItem-e2344d0e.js} +3 -1
- package/dist/esm/v3/{OrPagination-1018acbc.js → OrPagination-a3904a4d.js} +1 -1
- package/dist/esm/v3/{OrSelect-a310d8be.js → OrSelect-0ef072dc.js} +1 -1
- package/dist/esm/v3/OrSortingV3-1ac9a2d5.js +115 -0
- package/dist/esm/v3/{OrTabs-328f5a69.js → OrTabs-3457d575.js} +1 -1
- package/dist/esm/v3/{OrTimePicker-aaf59858.js → OrTimePicker-c4b02958.js} +2 -2
- package/dist/esm/v3/components/index.d.ts +1 -1
- package/dist/esm/v3/components/index.js +10 -10
- package/dist/esm/v3/components/or-card-collection-v3/OrCardCollection.vue.d.ts +2 -5
- package/dist/esm/v3/components/or-card-collection-v3/index.js +8 -7
- package/dist/esm/v3/components/or-card-collection-v3/types.d.ts +0 -4
- package/dist/esm/v3/components/or-date-picker-v3/index.js +3 -3
- package/dist/esm/v3/components/or-date-time-picker-v3/index.js +3 -3
- package/dist/esm/v3/components/or-menu-item-v3/index.js +1 -1
- package/dist/esm/v3/components/or-pagination-v3/index.js +2 -2
- package/dist/esm/v3/components/or-select-v3/index.js +2 -2
- package/dist/esm/v3/components/or-sorting-v3/OrSortingV3.vue.d.ts +36 -0
- package/dist/esm/v3/components/or-sorting-v3/index.d.ts +2 -0
- package/dist/esm/v3/components/or-sorting-v3/index.js +19 -0
- package/dist/esm/v3/components/or-sorting-v3/styles.d.ts +2 -0
- package/dist/esm/v3/components/or-sorting-v3/types.d.ts +4 -0
- package/dist/esm/v3/components/or-tabs-v3/index.js +2 -2
- package/dist/esm/v3/components/or-time-picker-v3/index.js +4 -4
- package/dist/esm/v3/index.js +10 -10
- package/package.json +2 -3
- package/src/components/index.ts +1 -1
- package/src/components/or-card-collection-v3/OrCardCollection.vue +17 -58
- package/src/components/or-card-collection-v3/styles.ts +6 -8
- package/src/components/or-card-collection-v3/types.ts +0 -5
- package/src/components/or-menu-item-v3/styles.ts +3 -0
- package/src/components/or-sorting-v3/OrSortingV3.vue +116 -0
- package/src/components/or-sorting-v3/index.ts +2 -0
- package/src/components/or-sorting-v3/styles.ts +5 -0
- package/src/components/or-sorting-v3/types.ts +4 -0
- package/dist/bundled/v2/components/OrSortHeaderV3/OrSortHeader.js +0 -109
- package/dist/bundled/v2/components/OrSortHeaderV3/OrSortHeader.vue.d.ts +0 -46
- package/dist/bundled/v2/components/OrSortHeaderV3/index.d.ts +0 -2
- package/dist/bundled/v2/components/OrSortHeaderV3/index.js +0 -8
- package/dist/bundled/v2/components/OrSortHeaderV3/styles.d.ts +0 -1
- package/dist/bundled/v2/components/OrSortHeaderV3/styles.js +0 -15
- package/dist/bundled/v2/components/OrSortHeaderV3/types.d.ts +0 -4
- package/dist/bundled/v3/OrSortHeader.vue_vue_type_script_lang-a444d88b.js +0 -57
- package/dist/bundled/v3/components/OrSortHeaderV3/OrSortHeader.js +0 -30
- package/dist/bundled/v3/components/OrSortHeaderV3/OrSortHeader.vue.d.ts +0 -34
- package/dist/bundled/v3/components/OrSortHeaderV3/index.d.ts +0 -2
- package/dist/bundled/v3/components/OrSortHeaderV3/index.js +0 -9
- package/dist/bundled/v3/components/OrSortHeaderV3/styles.d.ts +0 -1
- package/dist/bundled/v3/components/OrSortHeaderV3/styles.js +0 -15
- package/dist/bundled/v3/components/OrSortHeaderV3/types.d.ts +0 -4
- package/dist/esm/v2/OrSortHeader-46a92f09.js +0 -123
- package/dist/esm/v2/components/or-sort-header-v3/OrSortHeader.vue.d.ts +0 -46
- package/dist/esm/v2/components/or-sort-header-v3/index.d.ts +0 -2
- package/dist/esm/v2/components/or-sort-header-v3/index.js +0 -8
- package/dist/esm/v2/components/or-sort-header-v3/styles.d.ts +0 -1
- package/dist/esm/v2/components/or-sort-header-v3/types.d.ts +0 -4
- package/dist/esm/v3/OrSortHeader-21a443f9.js +0 -93
- package/dist/esm/v3/components/or-sort-header-v3/OrSortHeader.vue.d.ts +0 -34
- package/dist/esm/v3/components/or-sort-header-v3/index.d.ts +0 -2
- package/dist/esm/v3/components/or-sort-header-v3/index.js +0 -8
- package/dist/esm/v3/components/or-sort-header-v3/styles.d.ts +0 -1
- package/dist/esm/v3/components/or-sort-header-v3/types.d.ts +0 -4
- package/src/components/or-sort-header-v3/OrSortHeader.docs.mdx +0 -3
- package/src/components/or-sort-header-v3/OrSortHeader.stories3.ts +0 -125
- package/src/components/or-sort-header-v3/OrSortHeader.vue +0 -95
- package/src/components/or-sort-header-v3/index.ts +0 -2
- package/src/components/or-sort-header-v3/styles.ts +0 -21
- package/src/components/or-sort-header-v3/types.ts +0 -4
- /package/dist/bundled/v2/{OrDateTimePickerMonthSelect-232c4dda.js → OrDateTimePickerMonthSelect-2e61ba21.js} +0 -0
- /package/dist/bundled/v2/components/{OrSortHeaderV3 → OrSortingV3}/types.js +0 -0
- /package/dist/bundled/v3/{OrMenuItem.vue_vue_type_script_lang-f35dcab4.js → OrMenuItem.vue_vue_type_script_lang-8f6994d5.js} +0 -0
- /package/dist/bundled/v3/components/{OrSortHeaderV3 → OrSortingV3}/types.js +0 -0
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
const SortHeaderRoot = [
|
|
2
|
-
// Layout
|
|
3
|
-
'layout-row',
|
|
4
|
-
// Interactivity
|
|
5
|
-
'interactivity-auto',
|
|
6
|
-
// Typography
|
|
7
|
-
'typography-caption-regular',
|
|
8
|
-
// Typography (activated)
|
|
9
|
-
'activated:typography-caption-semibold',
|
|
10
|
-
// Theme
|
|
11
|
-
'theme-foreground-outline', 'dark:theme-foreground-outline-dark',
|
|
12
|
-
// Theme (activated)
|
|
13
|
-
'activated:theme-foreground-default', 'dark:activated:theme-foreground-default-dark'];
|
|
14
|
-
|
|
15
|
-
export { SortHeaderRoot };
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import { defineComponent, ref, computed, toRef } from 'vue-demi';
|
|
2
|
-
import '@vueuse/core';
|
|
3
|
-
import { u as useProxyModelValue } from './useProxyModelValue-940010d2.js';
|
|
4
|
-
import '@onereach/styles/tailwind.config';
|
|
5
|
-
import 'tailwindcss/resolveConfig';
|
|
6
|
-
import { _ as __vue_component__$1 } from './OrIcon-d35a84d8.js';
|
|
7
|
-
import { n as normalizeComponent } from './normalize-component-6e8e3d80.js';
|
|
8
|
-
|
|
9
|
-
const SortHeaderRoot = [
|
|
10
|
-
// Layout
|
|
11
|
-
'layout-row',
|
|
12
|
-
// Interactivity
|
|
13
|
-
'interactivity-auto',
|
|
14
|
-
// Typography
|
|
15
|
-
'typography-caption-regular',
|
|
16
|
-
// Typography (activated)
|
|
17
|
-
'activated:typography-caption-semibold',
|
|
18
|
-
// Theme
|
|
19
|
-
'theme-foreground-outline', 'dark:theme-foreground-outline-dark',
|
|
20
|
-
// Theme (activated)
|
|
21
|
-
'activated:theme-foreground-default', 'dark:activated:theme-foreground-default-dark'];
|
|
22
|
-
|
|
23
|
-
var script = defineComponent({
|
|
24
|
-
name: 'OrSortHeader',
|
|
25
|
-
components: {
|
|
26
|
-
OrIcon: __vue_component__$1
|
|
27
|
-
},
|
|
28
|
-
model: {
|
|
29
|
-
prop: 'modelValue',
|
|
30
|
-
event: 'update:modelValue'
|
|
31
|
-
},
|
|
32
|
-
props: {
|
|
33
|
-
modelValue: {
|
|
34
|
-
type: Object,
|
|
35
|
-
default: undefined
|
|
36
|
-
},
|
|
37
|
-
value: {
|
|
38
|
-
type: String,
|
|
39
|
-
required: true
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
emits: ['update:modelValue', 'focus', 'blur'],
|
|
43
|
-
expose: ['root'],
|
|
44
|
-
setup(props, context) {
|
|
45
|
-
// Refs
|
|
46
|
-
const root = ref();
|
|
47
|
-
// Styles
|
|
48
|
-
const rootStyles = computed(() => ['or-sort-header-v3', ...SortHeaderRoot]);
|
|
49
|
-
// State
|
|
50
|
-
const proxyModelValue = useProxyModelValue(toRef(props, 'modelValue'), context.emit);
|
|
51
|
-
const activated = computed(() => {
|
|
52
|
-
var _a;
|
|
53
|
-
return ((_a = proxyModelValue.value) === null || _a === void 0 ? void 0 : _a.column) === props.value;
|
|
54
|
-
});
|
|
55
|
-
// Methods
|
|
56
|
-
function toggleDirection() {
|
|
57
|
-
var _a;
|
|
58
|
-
proxyModelValue.value = {
|
|
59
|
-
column: props.value,
|
|
60
|
-
direction: ((_a = proxyModelValue.value) === null || _a === void 0 ? void 0 : _a.direction) === 'asc' ? 'desc' : 'asc'
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
return {
|
|
64
|
-
root,
|
|
65
|
-
rootStyles,
|
|
66
|
-
proxyModelValue,
|
|
67
|
-
activated,
|
|
68
|
-
toggleDirection
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
|
|
73
|
-
/* script */
|
|
74
|
-
const __vue_script__ = script;
|
|
75
|
-
|
|
76
|
-
/* template */
|
|
77
|
-
var __vue_render__ = function () {
|
|
78
|
-
var _vm = this;
|
|
79
|
-
var _h = _vm.$createElement;
|
|
80
|
-
var _c = _vm._self._c || _h;
|
|
81
|
-
return _c('div', {
|
|
82
|
-
ref: "root",
|
|
83
|
-
class: _vm.rootStyles,
|
|
84
|
-
attrs: {
|
|
85
|
-
"activated": _vm.activated ? '' : null
|
|
86
|
-
},
|
|
87
|
-
on: {
|
|
88
|
-
"click": function ($event) {
|
|
89
|
-
$event.stopPropagation();
|
|
90
|
-
return _vm.toggleDirection();
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}, [_vm._t("default"), _vm._v(" "), _vm.activated ? [_c('OrIcon', {
|
|
94
|
-
class: {
|
|
95
|
-
'rotate-180': _vm.proxyModelValue.direction === 'asc'
|
|
96
|
-
},
|
|
97
|
-
attrs: {
|
|
98
|
-
"icon": 'arrow_downward'
|
|
99
|
-
}
|
|
100
|
-
})] : _vm._e()], 2);
|
|
101
|
-
};
|
|
102
|
-
var __vue_staticRenderFns__ = [];
|
|
103
|
-
|
|
104
|
-
/* style */
|
|
105
|
-
const __vue_inject_styles__ = undefined;
|
|
106
|
-
/* scoped */
|
|
107
|
-
const __vue_scope_id__ = undefined;
|
|
108
|
-
/* module identifier */
|
|
109
|
-
const __vue_module_identifier__ = undefined;
|
|
110
|
-
/* functional template */
|
|
111
|
-
const __vue_is_functional_template__ = false;
|
|
112
|
-
/* style inject */
|
|
113
|
-
|
|
114
|
-
/* style inject SSR */
|
|
115
|
-
|
|
116
|
-
/* style inject shadow dom */
|
|
117
|
-
|
|
118
|
-
const __vue_component__ = /*#__PURE__*/normalizeComponent({
|
|
119
|
-
render: __vue_render__,
|
|
120
|
-
staticRenderFns: __vue_staticRenderFns__
|
|
121
|
-
}, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined);
|
|
122
|
-
|
|
123
|
-
export { __vue_component__ as _ };
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { PropType } from 'vue-demi';
|
|
2
|
-
import { SortHeaderModel } 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
|
-
rootStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
6
|
-
proxyModelValue: import("../../hooks").UseProxyModelValueReturn<SortHeaderModel>;
|
|
7
|
-
activated: import("@vue/composition-api").ComputedRef<boolean>;
|
|
8
|
-
toggleDirection: () => void;
|
|
9
|
-
}> & import("@vue/composition-api").Data, {}, {}, {
|
|
10
|
-
modelValue: {
|
|
11
|
-
type: PropType<SortHeaderModel>;
|
|
12
|
-
default: undefined;
|
|
13
|
-
};
|
|
14
|
-
value: {
|
|
15
|
-
type: StringConstructor;
|
|
16
|
-
required: true;
|
|
17
|
-
};
|
|
18
|
-
}, import("@vue/composition-api").ExtractPropTypes<{
|
|
19
|
-
modelValue: {
|
|
20
|
-
type: PropType<SortHeaderModel>;
|
|
21
|
-
default: undefined;
|
|
22
|
-
};
|
|
23
|
-
value: {
|
|
24
|
-
type: StringConstructor;
|
|
25
|
-
required: true;
|
|
26
|
-
};
|
|
27
|
-
}>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
|
|
28
|
-
modelValue: SortHeaderModel;
|
|
29
|
-
value: string;
|
|
30
|
-
} & {} & {
|
|
31
|
-
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
32
|
-
}, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
33
|
-
root: import("@vue/composition-api").Ref<HTMLElement | undefined>;
|
|
34
|
-
rootStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
35
|
-
proxyModelValue: import("../../hooks").UseProxyModelValueReturn<SortHeaderModel>;
|
|
36
|
-
activated: import("@vue/composition-api").ComputedRef<boolean>;
|
|
37
|
-
toggleDirection: () => void;
|
|
38
|
-
}>, import("@vue/composition-api").Data, {}, {}, {}, {}, string[], {
|
|
39
|
-
modelValue: SortHeaderModel;
|
|
40
|
-
value: string;
|
|
41
|
-
} & {} & {
|
|
42
|
-
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
43
|
-
}, {
|
|
44
|
-
modelValue: SortHeaderModel;
|
|
45
|
-
}, true>);
|
|
46
|
-
export default _default;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export { _ as OrSortHeaderV3 } from '../../OrSortHeader-46a92f09.js';
|
|
2
|
-
import 'vue-demi';
|
|
3
|
-
import '@vueuse/core';
|
|
4
|
-
import '../../useProxyModelValue-940010d2.js';
|
|
5
|
-
import '@onereach/styles/tailwind.config';
|
|
6
|
-
import 'tailwindcss/resolveConfig';
|
|
7
|
-
import '../../OrIcon-d35a84d8.js';
|
|
8
|
-
import '../../normalize-component-6e8e3d80.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const SortHeaderRoot: string[];
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { defineComponent, ref, computed, toRef } from 'vue-demi';
|
|
2
|
-
import '@vueuse/core';
|
|
3
|
-
import { u as useProxyModelValue } from './useProxyModelValue-940010d2.js';
|
|
4
|
-
import '@onereach/styles/tailwind.config';
|
|
5
|
-
import 'tailwindcss/resolveConfig';
|
|
6
|
-
import { s as script$1 } from './OrIcon-62793572.js';
|
|
7
|
-
import { resolveComponent, openBlock, createElementBlock, normalizeClass, withModifiers, renderSlot, createBlock, createCommentVNode } from 'vue';
|
|
8
|
-
|
|
9
|
-
const SortHeaderRoot = [
|
|
10
|
-
// Layout
|
|
11
|
-
'layout-row',
|
|
12
|
-
// Interactivity
|
|
13
|
-
'interactivity-auto',
|
|
14
|
-
// Typography
|
|
15
|
-
'typography-caption-regular',
|
|
16
|
-
// Typography (activated)
|
|
17
|
-
'activated:typography-caption-semibold',
|
|
18
|
-
// Theme
|
|
19
|
-
'theme-foreground-outline', 'dark:theme-foreground-outline-dark',
|
|
20
|
-
// Theme (activated)
|
|
21
|
-
'activated:theme-foreground-default', 'dark:activated:theme-foreground-default-dark'];
|
|
22
|
-
|
|
23
|
-
var script = defineComponent({
|
|
24
|
-
name: 'OrSortHeader',
|
|
25
|
-
components: {
|
|
26
|
-
OrIcon: script$1
|
|
27
|
-
},
|
|
28
|
-
model: {
|
|
29
|
-
prop: 'modelValue',
|
|
30
|
-
event: 'update:modelValue'
|
|
31
|
-
},
|
|
32
|
-
props: {
|
|
33
|
-
modelValue: {
|
|
34
|
-
type: Object,
|
|
35
|
-
default: undefined
|
|
36
|
-
},
|
|
37
|
-
value: {
|
|
38
|
-
type: String,
|
|
39
|
-
required: true
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
emits: ['update:modelValue', 'focus', 'blur'],
|
|
43
|
-
expose: ['root'],
|
|
44
|
-
setup(props, context) {
|
|
45
|
-
// Refs
|
|
46
|
-
const root = ref();
|
|
47
|
-
// Styles
|
|
48
|
-
const rootStyles = computed(() => ['or-sort-header-v3', ...SortHeaderRoot]);
|
|
49
|
-
// State
|
|
50
|
-
const proxyModelValue = useProxyModelValue(toRef(props, 'modelValue'), context.emit);
|
|
51
|
-
const activated = computed(() => {
|
|
52
|
-
var _a;
|
|
53
|
-
return ((_a = proxyModelValue.value) === null || _a === void 0 ? void 0 : _a.column) === props.value;
|
|
54
|
-
});
|
|
55
|
-
// Methods
|
|
56
|
-
function toggleDirection() {
|
|
57
|
-
var _a;
|
|
58
|
-
proxyModelValue.value = {
|
|
59
|
-
column: props.value,
|
|
60
|
-
direction: ((_a = proxyModelValue.value) === null || _a === void 0 ? void 0 : _a.direction) === 'asc' ? 'desc' : 'asc'
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
return {
|
|
64
|
-
root,
|
|
65
|
-
rootStyles,
|
|
66
|
-
proxyModelValue,
|
|
67
|
-
activated,
|
|
68
|
-
toggleDirection
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
|
|
73
|
-
const _hoisted_1 = ["activated"];
|
|
74
|
-
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
75
|
-
const _component_OrIcon = resolveComponent("OrIcon");
|
|
76
|
-
return openBlock(), createElementBlock("div", {
|
|
77
|
-
ref: "root",
|
|
78
|
-
class: normalizeClass(_ctx.rootStyles),
|
|
79
|
-
activated: _ctx.activated ? '' : null,
|
|
80
|
-
onClick: _cache[0] || (_cache[0] = withModifiers($event => _ctx.toggleDirection(), ["stop"]))
|
|
81
|
-
}, [renderSlot(_ctx.$slots, "default"), _ctx.activated ? (openBlock(), createBlock(_component_OrIcon, {
|
|
82
|
-
key: 0,
|
|
83
|
-
class: normalizeClass({
|
|
84
|
-
'rotate-180': _ctx.proxyModelValue.direction === 'asc'
|
|
85
|
-
}),
|
|
86
|
-
icon: 'arrow_downward'
|
|
87
|
-
}, null, 8 /* PROPS */, ["class"])) : createCommentVNode("v-if", true)], 10 /* CLASS, PROPS */, _hoisted_1);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
script.render = render;
|
|
91
|
-
script.__file = "src/components/or-sort-header-v3/OrSortHeader.vue";
|
|
92
|
-
|
|
93
|
-
export { script as s };
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { PropType } from 'vue-demi';
|
|
2
|
-
import { SortHeaderModel } from './types';
|
|
3
|
-
declare const _default: import("vue-demi").DefineComponent<{
|
|
4
|
-
modelValue: {
|
|
5
|
-
type: PropType<SortHeaderModel>;
|
|
6
|
-
default: undefined;
|
|
7
|
-
};
|
|
8
|
-
value: {
|
|
9
|
-
type: StringConstructor;
|
|
10
|
-
required: true;
|
|
11
|
-
};
|
|
12
|
-
}, {
|
|
13
|
-
root: import("vue-demi").Ref<HTMLElement | undefined>;
|
|
14
|
-
rootStyles: import("vue-demi").ComputedRef<string[]>;
|
|
15
|
-
proxyModelValue: import("../../hooks").UseProxyModelValueReturn<SortHeaderModel | undefined>;
|
|
16
|
-
activated: import("vue-demi").ComputedRef<boolean>;
|
|
17
|
-
toggleDirection: () => void;
|
|
18
|
-
}, unknown, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, ("update:modelValue" | "focus" | "blur")[], "update:modelValue" | "focus" | "blur", import("vue-demi").VNodeProps & import("vue-demi").AllowedComponentProps & import("vue-demi").ComponentCustomProps, Readonly<import("vue-demi").ExtractPropTypes<{
|
|
19
|
-
modelValue: {
|
|
20
|
-
type: PropType<SortHeaderModel>;
|
|
21
|
-
default: undefined;
|
|
22
|
-
};
|
|
23
|
-
value: {
|
|
24
|
-
type: StringConstructor;
|
|
25
|
-
required: true;
|
|
26
|
-
};
|
|
27
|
-
}>> & {
|
|
28
|
-
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
29
|
-
onFocus?: ((...args: any[]) => any) | undefined;
|
|
30
|
-
onBlur?: ((...args: any[]) => any) | undefined;
|
|
31
|
-
}, {
|
|
32
|
-
modelValue: SortHeaderModel;
|
|
33
|
-
}>;
|
|
34
|
-
export default _default;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export { s as OrSortHeaderV3 } from '../../OrSortHeader-21a443f9.js';
|
|
2
|
-
import 'vue-demi';
|
|
3
|
-
import '@vueuse/core';
|
|
4
|
-
import '../../useProxyModelValue-940010d2.js';
|
|
5
|
-
import '@onereach/styles/tailwind.config';
|
|
6
|
-
import 'tailwindcss/resolveConfig';
|
|
7
|
-
import '../../OrIcon-62793572.js';
|
|
8
|
-
import 'vue';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const SortHeaderRoot: string[];
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
import { action } from '@storybook/addon-actions';
|
|
2
|
-
import { Meta, StoryFn } from '@storybook/vue3';
|
|
3
|
-
import { ref, watch } from 'vue-demi';
|
|
4
|
-
import OrSortHeaderDocs from './OrSortHeader.docs.mdx';
|
|
5
|
-
import OrSortHeader from './OrSortHeader.vue';
|
|
6
|
-
import { SortHeaderModel } from './types';
|
|
7
|
-
|
|
8
|
-
export default {
|
|
9
|
-
title: 'Components/Sort Header',
|
|
10
|
-
component: OrSortHeader,
|
|
11
|
-
|
|
12
|
-
argTypes: {
|
|
13
|
-
// Slots
|
|
14
|
-
default: {
|
|
15
|
-
type: {
|
|
16
|
-
name: 'string',
|
|
17
|
-
required: true,
|
|
18
|
-
},
|
|
19
|
-
|
|
20
|
-
control: { type: 'text' },
|
|
21
|
-
},
|
|
22
|
-
|
|
23
|
-
// Props
|
|
24
|
-
modelValue: {
|
|
25
|
-
control: { type: 'object' },
|
|
26
|
-
},
|
|
27
|
-
|
|
28
|
-
value: {
|
|
29
|
-
control: { type: 'text' },
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
-
// Events
|
|
33
|
-
'update:modelValue': {
|
|
34
|
-
table: { disable: true },
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
input: {
|
|
38
|
-
table: { disable: true },
|
|
39
|
-
},
|
|
40
|
-
|
|
41
|
-
focus: {
|
|
42
|
-
table: { disable: true },
|
|
43
|
-
},
|
|
44
|
-
|
|
45
|
-
blur: {
|
|
46
|
-
table: { disable: true },
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
|
|
50
|
-
parameters: {
|
|
51
|
-
layout: 'centered',
|
|
52
|
-
|
|
53
|
-
docs: {
|
|
54
|
-
page: OrSortHeaderDocs,
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
|
|
58
|
-
decorators: [
|
|
59
|
-
() => ({
|
|
60
|
-
template: `
|
|
61
|
-
<div class="flex flex-row gap-sm">
|
|
62
|
-
<story />
|
|
63
|
-
</div>
|
|
64
|
-
`,
|
|
65
|
-
}),
|
|
66
|
-
],
|
|
67
|
-
} as Meta<typeof OrSortHeader>;
|
|
68
|
-
|
|
69
|
-
const Template: StoryFn<typeof OrSortHeader> = (args) => ({
|
|
70
|
-
components: {
|
|
71
|
-
OrSortHeader,
|
|
72
|
-
},
|
|
73
|
-
|
|
74
|
-
setup() {
|
|
75
|
-
// State
|
|
76
|
-
const model = ref<SortHeaderModel>();
|
|
77
|
-
|
|
78
|
-
// Effects
|
|
79
|
-
watch(model, (value) => {
|
|
80
|
-
console.debug(value);
|
|
81
|
-
});
|
|
82
|
-
|
|
83
|
-
return {
|
|
84
|
-
args,
|
|
85
|
-
model,
|
|
86
|
-
onUpdateModelValue: action('update:modelValue'),
|
|
87
|
-
onFocus: action('focus'),
|
|
88
|
-
onBlur: action('blur'),
|
|
89
|
-
};
|
|
90
|
-
},
|
|
91
|
-
|
|
92
|
-
template: `
|
|
93
|
-
<div class="contents">
|
|
94
|
-
<OrSortHeader
|
|
95
|
-
v-model="model"
|
|
96
|
-
v-bind="args"
|
|
97
|
-
@update:modelValue="onUpdateModelValue"
|
|
98
|
-
@focus="onFocus"
|
|
99
|
-
@blur="onBlur"
|
|
100
|
-
>
|
|
101
|
-
${args.default}
|
|
102
|
-
</OrSortHeader>
|
|
103
|
-
|
|
104
|
-
<OrSortHeader
|
|
105
|
-
v-model="model"
|
|
106
|
-
value="column-2"
|
|
107
|
-
@update:modelValue="onUpdateModelValue"
|
|
108
|
-
@focus="onFocus"
|
|
109
|
-
@blur="onBlur"
|
|
110
|
-
>
|
|
111
|
-
Column 2
|
|
112
|
-
</OrSortHeader>
|
|
113
|
-
</div>
|
|
114
|
-
`,
|
|
115
|
-
});
|
|
116
|
-
|
|
117
|
-
export const Default = Template.bind({});
|
|
118
|
-
|
|
119
|
-
Default.args = {
|
|
120
|
-
// Slots
|
|
121
|
-
default: 'Column 1',
|
|
122
|
-
|
|
123
|
-
// Props
|
|
124
|
-
value: 'column-1',
|
|
125
|
-
};
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
ref="root"
|
|
4
|
-
:class="rootStyles"
|
|
5
|
-
:activated="activated ? '' : null"
|
|
6
|
-
@click.stop="toggleDirection()"
|
|
7
|
-
>
|
|
8
|
-
<slot />
|
|
9
|
-
|
|
10
|
-
<template v-if="activated">
|
|
11
|
-
<OrIcon
|
|
12
|
-
:class="{ 'rotate-180': proxyModelValue.direction === 'asc' }"
|
|
13
|
-
:icon="'arrow_downward'"
|
|
14
|
-
/>
|
|
15
|
-
</template>
|
|
16
|
-
</div>
|
|
17
|
-
</template>
|
|
18
|
-
|
|
19
|
-
<script lang="ts">
|
|
20
|
-
import { computed, defineComponent, PropType, ref, toRef } from 'vue-demi';
|
|
21
|
-
import { useProxyModelValue } from '../../hooks';
|
|
22
|
-
import { OrIconV3 as OrIcon } from '../or-icon-v3';
|
|
23
|
-
import { SortHeaderRoot } from './styles';
|
|
24
|
-
import { SortHeaderModel } from './types';
|
|
25
|
-
|
|
26
|
-
export default defineComponent({
|
|
27
|
-
name: 'OrSortHeader',
|
|
28
|
-
|
|
29
|
-
components: {
|
|
30
|
-
OrIcon,
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
model: {
|
|
34
|
-
prop: 'modelValue',
|
|
35
|
-
event: 'update:modelValue',
|
|
36
|
-
},
|
|
37
|
-
|
|
38
|
-
props: {
|
|
39
|
-
modelValue: {
|
|
40
|
-
type: Object as PropType<SortHeaderModel>,
|
|
41
|
-
default: undefined,
|
|
42
|
-
},
|
|
43
|
-
|
|
44
|
-
value: {
|
|
45
|
-
type: String,
|
|
46
|
-
required: true,
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
|
|
50
|
-
emits: [
|
|
51
|
-
'update:modelValue',
|
|
52
|
-
|
|
53
|
-
'focus',
|
|
54
|
-
'blur',
|
|
55
|
-
],
|
|
56
|
-
|
|
57
|
-
expose: [
|
|
58
|
-
'root',
|
|
59
|
-
],
|
|
60
|
-
|
|
61
|
-
setup(props, context) {
|
|
62
|
-
// Refs
|
|
63
|
-
const root = ref<HTMLElement>();
|
|
64
|
-
|
|
65
|
-
// Styles
|
|
66
|
-
const rootStyles = computed(() => [
|
|
67
|
-
'or-sort-header-v3',
|
|
68
|
-
...SortHeaderRoot,
|
|
69
|
-
]);
|
|
70
|
-
|
|
71
|
-
// State
|
|
72
|
-
const proxyModelValue = useProxyModelValue(toRef(props, 'modelValue'), context.emit);
|
|
73
|
-
|
|
74
|
-
const activated = computed(() => {
|
|
75
|
-
return proxyModelValue.value?.column === props.value;
|
|
76
|
-
});
|
|
77
|
-
|
|
78
|
-
// Methods
|
|
79
|
-
function toggleDirection(): void {
|
|
80
|
-
proxyModelValue.value = {
|
|
81
|
-
column: props.value,
|
|
82
|
-
direction: proxyModelValue.value?.direction === 'asc' ? 'desc' : 'asc',
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
return {
|
|
87
|
-
root,
|
|
88
|
-
rootStyles,
|
|
89
|
-
proxyModelValue,
|
|
90
|
-
activated,
|
|
91
|
-
toggleDirection,
|
|
92
|
-
};
|
|
93
|
-
},
|
|
94
|
-
});
|
|
95
|
-
</script>
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export const SortHeaderRoot: string[] = [
|
|
2
|
-
// Layout
|
|
3
|
-
'layout-row',
|
|
4
|
-
|
|
5
|
-
// Interactivity
|
|
6
|
-
'interactivity-auto',
|
|
7
|
-
|
|
8
|
-
// Typography
|
|
9
|
-
'typography-caption-regular',
|
|
10
|
-
|
|
11
|
-
// Typography (activated)
|
|
12
|
-
'activated:typography-caption-semibold',
|
|
13
|
-
|
|
14
|
-
// Theme
|
|
15
|
-
'theme-foreground-outline',
|
|
16
|
-
'dark:theme-foreground-outline-dark',
|
|
17
|
-
|
|
18
|
-
// Theme (activated)
|
|
19
|
-
'activated:theme-foreground-default',
|
|
20
|
-
'dark:activated:theme-foreground-default-dark',
|
|
21
|
-
];
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|