@onereach/ui-components 2.72.2-beta.2257.0 → 2.72.2-beta.2260.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/{OrCardCollection-134b0ffe.js → OrCardCollection-06ecb8e1.js} +1 -1
- package/dist/bundled/v2/{OrConfirm-3eceda8f.js → OrConfirm-8c0e957d.js} +1 -1
- package/dist/bundled/v2/{OrInput-eebed0aa.js → OrInput-00070eee.js} +11 -28
- package/dist/bundled/v2/{OrInputBox-10aecdc4.js → OrInputBox-2f559e98.js} +1 -1
- package/dist/bundled/v2/{OrSearch-5093c721.js → OrSearch-bb87b34c.js} +2 -2
- package/dist/bundled/v2/{OrSelect-974a83f8.js → OrSelect-2ececfc1.js} +2 -2
- package/dist/bundled/v2/{OrSidebar-c95ef614.js → OrSidebar-64cc9127.js} +92 -86
- package/dist/bundled/v2/OrSidebarCollapseButton-fcc085c7.js +235 -0
- package/dist/bundled/v2/{OrTextarea-dba56362.js → OrTextarea-5c57c02b.js} +1 -1
- package/dist/bundled/v2/components/index.js +10 -9
- package/dist/bundled/v2/components/or-card-collection-v3/index.js +4 -4
- package/dist/bundled/v2/components/or-confirm-v3/index.js +3 -3
- package/dist/bundled/v2/components/or-input-box-v3/index.js +1 -1
- package/dist/bundled/v2/components/or-input-v3/OrInput.vue.d.ts +0 -13
- package/dist/bundled/v2/components/or-input-v3/index.js +2 -3
- package/dist/bundled/v2/components/or-search-v3/index.js +3 -4
- package/dist/bundled/v2/components/or-select-v3/index.js +3 -4
- package/dist/bundled/v2/components/or-sidebar-v3/OrSidebar.stories3.d.ts +36 -1
- package/dist/bundled/v2/components/or-sidebar-v3/OrSidebar.vue.d.ts +49 -4
- package/dist/bundled/v2/components/or-sidebar-v3/index.js +13 -1
- package/dist/bundled/v2/components/or-sidebar-v3/partials/OrSidebarCollapseButton.stories3.d.ts +12 -0
- package/dist/bundled/v2/components/or-sidebar-v3/partials/OrSidebarCollapseButton.vue.d.ts +53 -0
- package/dist/bundled/v2/components/or-sidebar-v3/partials/index.d.ts +1 -0
- package/dist/bundled/v2/components/or-sidebar-v3/partials/index.js +18 -0
- package/dist/bundled/v2/components/or-sidebar-v3/styles.d.ts +9 -1
- package/dist/bundled/v2/components/or-textarea-v3/index.js +2 -2
- package/dist/bundled/v2/index.js +10 -9
- package/dist/bundled/v3/{OrCardCollection.vue_vue_type_script_lang-bd6bc732.js → OrCardCollection.vue_vue_type_script_lang-e2980d04.js} +1 -1
- package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-b7e3ac90.js → OrConfirm.vue_vue_type_script_lang-eb2bfce2.js} +2 -2
- package/dist/bundled/v3/{OrInput-889fbd90.js → OrInput-dcf2606e.js} +6 -15
- package/dist/bundled/v3/{OrInput.vue_vue_type_script_lang-8d2b69ae.js → OrInput.vue_vue_type_script_lang-27220623.js} +3 -15
- package/dist/bundled/v3/{OrInputBox-c8beb6c2.js → OrInputBox-4c7900c2.js} +1 -1
- package/dist/bundled/v3/{OrInputBox.vue_vue_type_script_lang-0174af07.js → OrInputBox.vue_vue_type_script_lang-47d98e81.js} +1 -1
- package/dist/bundled/v3/{OrSearch.vue_vue_type_script_lang-97d023eb.js → OrSearch.vue_vue_type_script_lang-321907ec.js} +3 -3
- package/dist/bundled/v3/{OrSelect.vue_vue_type_script_lang-b20d66fa.js → OrSelect.vue_vue_type_script_lang-7fd5e2f0.js} +4 -4
- package/dist/bundled/v3/{OrSidebar.vue_vue_type_script_lang-ce0b152c.js → OrSidebar.vue_vue_type_script_lang-a150808b.js} +75 -80
- package/dist/bundled/v3/OrSidebarCollapseButton.vue_vue_type_script_lang-d3e3cd4f.js +185 -0
- package/dist/bundled/v3/{OrTextarea.vue_vue_type_script_lang-7c88ef85.js → OrTextarea.vue_vue_type_script_lang-296da567.js} +2 -2
- package/dist/bundled/v3/components/index.js +12 -11
- package/dist/bundled/v3/components/or-card-collection-v3/index.js +6 -6
- package/dist/bundled/v3/components/or-confirm-v3/index.js +5 -5
- package/dist/bundled/v3/components/or-input-box-v3/index.js +1 -1
- package/dist/bundled/v3/components/or-input-v3/OrInput.vue.d.ts +0 -13
- package/dist/bundled/v3/components/or-input-v3/index.js +3 -5
- package/dist/bundled/v3/components/or-search-v3/index.js +5 -7
- package/dist/bundled/v3/components/or-select-v3/index.js +5 -7
- package/dist/bundled/v3/components/or-sidebar-v3/OrSidebar.stories3.d.ts +36 -1
- package/dist/bundled/v3/components/or-sidebar-v3/OrSidebar.vue.d.ts +49 -4
- package/dist/bundled/v3/components/or-sidebar-v3/index.js +16 -2
- package/dist/bundled/v3/components/or-sidebar-v3/partials/OrSidebarCollapseButton.stories3.d.ts +12 -0
- package/dist/bundled/v3/components/or-sidebar-v3/partials/OrSidebarCollapseButton.vue.d.ts +53 -0
- package/dist/bundled/v3/components/or-sidebar-v3/partials/index.d.ts +1 -0
- package/dist/bundled/v3/components/or-sidebar-v3/partials/index.js +17 -0
- package/dist/bundled/v3/components/or-sidebar-v3/styles.d.ts +9 -1
- package/dist/bundled/v3/components/or-textarea-v3/index.js +3 -3
- package/dist/bundled/v3/index.js +39 -22
- package/dist/esm/v2/{OrCardCollection-4f8957aa.js → OrCardCollection-251ab033.js} +2 -2
- package/dist/esm/v2/{OrConfirm-d87f2ae9.js → OrConfirm-9dbdedd7.js} +1 -1
- package/dist/esm/v2/{OrInput-cf2900cd.js → OrInput-59a15d80.js} +11 -28
- package/dist/esm/v2/{OrInputBox-1a8887df.js → OrInputBox-9ceb9fc4.js} +1 -1
- package/dist/esm/v2/{OrSearch-3e058ad4.js → OrSearch-f42d588d.js} +2 -2
- package/dist/esm/v2/{OrSelect-bf21fff7.js → OrSelect-e31d1c8b.js} +2 -2
- package/dist/esm/v2/{OrSidebar-fabc7bc9.js → OrSidebar-a10424d2.js} +92 -86
- package/dist/esm/v2/OrSidebarCollapseButton-3b461dfe.js +233 -0
- package/dist/esm/v2/{OrTextarea-2ec6facd.js → OrTextarea-a5a3572b.js} +1 -1
- package/dist/esm/v2/components/index.js +10 -9
- package/dist/esm/v2/components/or-card-collection-v3/index.js +4 -4
- package/dist/esm/v2/components/or-confirm-v3/index.js +4 -4
- package/dist/esm/v2/components/or-input-box-v3/index.js +1 -1
- package/dist/esm/v2/components/or-input-v3/OrInput.vue.d.ts +0 -13
- package/dist/esm/v2/components/or-input-v3/index.js +3 -4
- package/dist/esm/v2/components/or-search-v3/index.js +4 -5
- package/dist/esm/v2/components/or-select-v3/index.js +4 -5
- package/dist/esm/v2/components/or-sidebar-v3/OrSidebar.stories3.d.ts +36 -1
- package/dist/esm/v2/components/or-sidebar-v3/OrSidebar.vue.d.ts +49 -4
- package/dist/esm/v2/components/or-sidebar-v3/index.js +13 -1
- package/dist/esm/v2/components/or-sidebar-v3/partials/OrSidebarCollapseButton.stories3.d.ts +12 -0
- package/dist/esm/v2/components/or-sidebar-v3/partials/OrSidebarCollapseButton.vue.d.ts +53 -0
- package/dist/esm/v2/components/or-sidebar-v3/partials/index.d.ts +1 -0
- package/dist/esm/v2/components/or-sidebar-v3/partials/index.js +16 -0
- package/dist/esm/v2/components/or-sidebar-v3/styles.d.ts +9 -1
- package/dist/esm/v2/components/or-textarea-v3/index.js +2 -2
- package/dist/esm/v2/index.js +9 -8
- package/dist/esm/v3/{OrCardCollection-ab9b6d70.js → OrCardCollection-8b8e3745.js} +2 -2
- package/dist/esm/v3/{OrConfirm-223b1303.js → OrConfirm-37454a63.js} +1 -1
- package/dist/esm/v3/{OrInput-5afc20da.js → OrInput-bd054213.js} +7 -27
- package/dist/esm/v3/{OrInputBox-74646840.js → OrInputBox-e16ade90.js} +1 -1
- package/dist/esm/v3/{OrSearch-100ed7c8.js → OrSearch-4c5c44f2.js} +2 -2
- package/dist/esm/v3/{OrSelect-f1a2a55d.js → OrSelect-466e50ca.js} +2 -2
- package/dist/esm/v3/{OrSidebar-a62972f5.js → OrSidebar-3be35e8d.js} +81 -89
- package/dist/esm/v3/OrSidebarCollapseButton-30d0033b.js +204 -0
- package/dist/esm/v3/{OrTextarea-3e28946b.js → OrTextarea-37566985.js} +1 -1
- package/dist/esm/v3/components/index.js +10 -9
- package/dist/esm/v3/components/or-card-collection-v3/index.js +4 -4
- 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/OrInput.vue.d.ts +0 -13
- package/dist/esm/v3/components/or-input-v3/index.js +3 -4
- package/dist/esm/v3/components/or-search-v3/index.js +4 -5
- package/dist/esm/v3/components/or-select-v3/index.js +4 -5
- package/dist/esm/v3/components/or-sidebar-v3/OrSidebar.stories3.d.ts +36 -1
- package/dist/esm/v3/components/or-sidebar-v3/OrSidebar.vue.d.ts +49 -4
- package/dist/esm/v3/components/or-sidebar-v3/index.js +12 -1
- package/dist/esm/v3/components/or-sidebar-v3/partials/OrSidebarCollapseButton.stories3.d.ts +12 -0
- package/dist/esm/v3/components/or-sidebar-v3/partials/OrSidebarCollapseButton.vue.d.ts +53 -0
- package/dist/esm/v3/components/or-sidebar-v3/partials/index.d.ts +1 -0
- package/dist/esm/v3/components/or-sidebar-v3/partials/index.js +15 -0
- package/dist/esm/v3/components/or-sidebar-v3/styles.d.ts +9 -1
- package/dist/esm/v3/components/or-textarea-v3/index.js +2 -2
- package/dist/esm/v3/index.js +9 -8
- package/package.json +1 -1
- package/src/components/or-input-box-v3/styles.ts +2 -2
- package/src/components/or-input-v3/OrInput.stories3.ts +0 -4
- package/src/components/or-input-v3/OrInput.vue +19 -39
- package/src/components/or-sidebar-v3/OrSidebar.docs.mdx +6 -0
- package/src/components/or-sidebar-v3/OrSidebar.stories3.ts +253 -12
- package/src/components/or-sidebar-v3/OrSidebar.vue +130 -23
- package/src/components/or-sidebar-v3/partials/OrSidebarCollapseButton.stories3.ts +48 -0
- package/src/components/or-sidebar-v3/partials/OrSidebarCollapseButton.vue +74 -0
- package/src/components/or-sidebar-v3/partials/index.ts +1 -0
- package/src/components/or-sidebar-v3/styles.ts +164 -9
|
@@ -5,8 +5,8 @@ import { _ as __vue_component__$6 } from './OrIcon-f34e0e6f.js';
|
|
|
5
5
|
import { _ as __vue_component__$5 } from './OrMenuItem-7b7fbf8a.js';
|
|
6
6
|
import { _ as __vue_component__$4 } from './OrMenu-c276db74.js';
|
|
7
7
|
import './OrPopover-d5d4f62a.js';
|
|
8
|
-
import { _ as __vue_component__$7 } from './OrSearch-
|
|
9
|
-
import './OrInputBox-
|
|
8
|
+
import { _ as __vue_component__$7 } from './OrSearch-f42d588d.js';
|
|
9
|
+
import './OrInputBox-9ceb9fc4.js';
|
|
10
10
|
import { n as normalizeComponent } from './normalize-component-6e8e3d80.js';
|
|
11
11
|
|
|
12
12
|
const CardCollectionRoot = [
|
|
@@ -2,7 +2,7 @@ import { useMagicKeys, whenever, onClickOutside } from '@vueuse/core';
|
|
|
2
2
|
import { logicAnd } from '@vueuse/math';
|
|
3
3
|
import { defineComponent, ref, computed, watch } from 'vue-demi';
|
|
4
4
|
import { _ as __vue_component__$2, a as ButtonColor } from './OrButton-66964360.js';
|
|
5
|
-
import { _ as __vue_component__$3 } from './OrInput-
|
|
5
|
+
import { _ as __vue_component__$3 } from './OrInput-59a15d80.js';
|
|
6
6
|
import { _ as __vue_component__$1 } from './OrOverlay-a019186f.js';
|
|
7
7
|
import { n as normalizeComponent } from './normalize-component-6e8e3d80.js';
|
|
8
8
|
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import { defineComponent, ref, computed, reactive } from 'vue-demi';
|
|
2
2
|
import { a as useIdAttribute, u as useControlAttributes } from './useIdAttribute-859439f0.js';
|
|
3
3
|
import '@vueuse/core';
|
|
4
|
-
import { u as useResponsive } from './useResponsive-a02e95b7.js';
|
|
5
4
|
import { u as useValidationAttributes } from './useValidationAttributes-d1abbe34.js';
|
|
6
5
|
import { _ as __vue_component__$1 } from './OrError-13845bb0.js';
|
|
7
6
|
import { _ as __vue_component__$2 } from './OrHint-78b399cb.js';
|
|
8
7
|
import { _ as __vue_component__$4 } from './OrIconButton-04a3566d.js';
|
|
9
8
|
import { _ as __vue_component__$3 } from './OrIcon-f34e0e6f.js';
|
|
10
|
-
import { _ as __vue_component__$5, a as InputBoxSize } from './OrInputBox-
|
|
9
|
+
import { _ as __vue_component__$5, a as InputBoxSize } from './OrInputBox-9ceb9fc4.js';
|
|
11
10
|
import { _ as __vue_component__$6 } from './OrLabel-0945a4d9.js';
|
|
12
|
-
import { _ as __vue_component__$7 } from './OrLoader-76307488.js';
|
|
13
11
|
import { n as normalizeComponent } from './normalize-component-6e8e3d80.js';
|
|
14
12
|
import { c as createInjector } from './browser-82dea9ed.js';
|
|
15
13
|
|
|
@@ -42,8 +40,7 @@ var script = defineComponent({
|
|
|
42
40
|
OrIcon: __vue_component__$3,
|
|
43
41
|
OrIconButton: __vue_component__$4,
|
|
44
42
|
OrInputBox: __vue_component__$5,
|
|
45
|
-
OrLabel: __vue_component__$6
|
|
46
|
-
OrLoader: __vue_component__$7
|
|
43
|
+
OrLabel: __vue_component__$6
|
|
47
44
|
},
|
|
48
45
|
model: {
|
|
49
46
|
prop: 'modelValue',
|
|
@@ -78,10 +75,6 @@ var script = defineComponent({
|
|
|
78
75
|
type: String,
|
|
79
76
|
default: undefined
|
|
80
77
|
},
|
|
81
|
-
loading: {
|
|
82
|
-
type: Boolean,
|
|
83
|
-
default: false
|
|
84
|
-
},
|
|
85
78
|
required: {
|
|
86
79
|
type: Boolean,
|
|
87
80
|
default: false
|
|
@@ -127,9 +120,6 @@ var script = defineComponent({
|
|
|
127
120
|
const maxLength = computed(() => controlAttributes.maxlength);
|
|
128
121
|
const invalid = computed(() => !!props.error);
|
|
129
122
|
const disclosed = ref(false);
|
|
130
|
-
const {
|
|
131
|
-
isMobile
|
|
132
|
-
} = useResponsive();
|
|
133
123
|
// Methods
|
|
134
124
|
function focus() {
|
|
135
125
|
var _a;
|
|
@@ -150,7 +140,6 @@ var script = defineComponent({
|
|
|
150
140
|
maxLength,
|
|
151
141
|
invalid,
|
|
152
142
|
disclosed,
|
|
153
|
-
isMobile,
|
|
154
143
|
focus,
|
|
155
144
|
blur
|
|
156
145
|
};
|
|
@@ -187,7 +176,7 @@ var __vue_render__ = function () {
|
|
|
187
176
|
"variant": _vm.disableDefaultStyles ? 'unstyled' : 'styled',
|
|
188
177
|
"size": _vm.size,
|
|
189
178
|
"invalid": _vm.invalid,
|
|
190
|
-
"readonly": _vm.readonly
|
|
179
|
+
"readonly": _vm.readonly,
|
|
191
180
|
"disabled": _vm.disabled
|
|
192
181
|
}
|
|
193
182
|
}, [(_vm.type === 'password' && _vm.disclosed ? 'text' : _vm.type) === 'checkbox' ? _c('input', _vm._b({
|
|
@@ -202,7 +191,7 @@ var __vue_render__ = function () {
|
|
|
202
191
|
attrs: {
|
|
203
192
|
"placeholder": _vm.placeholder,
|
|
204
193
|
"required": _vm.required,
|
|
205
|
-
"readonly": _vm.readonly
|
|
194
|
+
"readonly": _vm.readonly,
|
|
206
195
|
"disabled": _vm.disabled,
|
|
207
196
|
"type": "checkbox"
|
|
208
197
|
},
|
|
@@ -251,7 +240,7 @@ var __vue_render__ = function () {
|
|
|
251
240
|
attrs: {
|
|
252
241
|
"placeholder": _vm.placeholder,
|
|
253
242
|
"required": _vm.required,
|
|
254
|
-
"readonly": _vm.readonly
|
|
243
|
+
"readonly": _vm.readonly,
|
|
255
244
|
"disabled": _vm.disabled,
|
|
256
245
|
"type": "radio"
|
|
257
246
|
},
|
|
@@ -287,7 +276,7 @@ var __vue_render__ = function () {
|
|
|
287
276
|
attrs: {
|
|
288
277
|
"placeholder": _vm.placeholder,
|
|
289
278
|
"required": _vm.required,
|
|
290
|
-
"readonly": _vm.readonly
|
|
279
|
+
"readonly": _vm.readonly,
|
|
291
280
|
"disabled": _vm.disabled,
|
|
292
281
|
"type": _vm.type === 'password' && _vm.disclosed ? 'text' : _vm.type
|
|
293
282
|
},
|
|
@@ -316,13 +305,7 @@ var __vue_render__ = function () {
|
|
|
316
305
|
}
|
|
317
306
|
}, 'input', _vm.controlAttributes, false)), _vm._v(" "), _c('div', {
|
|
318
307
|
class: ['layout-row']
|
|
319
|
-
}, [_vm.
|
|
320
|
-
attrs: {
|
|
321
|
-
"variant": 'circular',
|
|
322
|
-
"color": 'primary',
|
|
323
|
-
"size": _vm.isMobile ? 'm' : 's'
|
|
324
|
-
}
|
|
325
|
-
})] : [_vm.type === 'password' ? [_c('OrIconButton', {
|
|
308
|
+
}, [_vm.type === 'password' ? [_c('OrIconButton', {
|
|
326
309
|
attrs: {
|
|
327
310
|
"icon": {
|
|
328
311
|
icon: _vm.disclosed ? 'visibility_off' : 'visibility',
|
|
@@ -354,7 +337,7 @@ var __vue_render__ = function () {
|
|
|
354
337
|
"icon": 'search',
|
|
355
338
|
"variant": 'outlined'
|
|
356
339
|
}
|
|
357
|
-
})]] : _vm._e()]
|
|
340
|
+
})]] : _vm._e()], 2)]), _vm._v(" "), !_vm.invalid ? [_vm.hint || _vm.maxLength ? [_c('OrHint', {
|
|
358
341
|
attrs: {
|
|
359
342
|
"disabled": _vm.disabled
|
|
360
343
|
},
|
|
@@ -383,14 +366,14 @@ var __vue_staticRenderFns__ = [];
|
|
|
383
366
|
/* style */
|
|
384
367
|
const __vue_inject_styles__ = function (inject) {
|
|
385
368
|
if (!inject) return;
|
|
386
|
-
inject("data-v-
|
|
387
|
-
source: "input[data-v-
|
|
369
|
+
inject("data-v-1243ae22_0", {
|
|
370
|
+
source: "input[data-v-1243ae22]{min-width:0;background:0 0;outline:0}input[type=number][data-v-1243ae22]::-webkit-inner-spin-button{display:none}input[type=search][data-v-1243ae22]::-webkit-search-cancel-button{display:none}",
|
|
388
371
|
map: undefined,
|
|
389
372
|
media: undefined
|
|
390
373
|
});
|
|
391
374
|
};
|
|
392
375
|
/* scoped */
|
|
393
|
-
const __vue_scope_id__ = "data-v-
|
|
376
|
+
const __vue_scope_id__ = "data-v-1243ae22";
|
|
394
377
|
/* module identifier */
|
|
395
378
|
const __vue_module_identifier__ = undefined;
|
|
396
379
|
/* functional template */
|
|
@@ -51,7 +51,7 @@ const InputBoxRootSizes = {
|
|
|
51
51
|
// Box
|
|
52
52
|
'children:min-h-[30px]',
|
|
53
53
|
// Spacing
|
|
54
|
-
'first-child:pl-
|
|
54
|
+
'first-child:pl-sm', 'last-child:pr-sm', 'children:py-[6px]', 'gap-[6px]',
|
|
55
55
|
// Typography
|
|
56
56
|
'typography-caption-regular']
|
|
57
57
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { debouncedWatch } from '@vueuse/core';
|
|
2
2
|
import { defineComponent, ref, computed, watch } from 'vue-demi';
|
|
3
|
-
import { _ as __vue_component__$1 } from './OrInput-
|
|
4
|
-
import { a as InputBoxSize } from './OrInputBox-
|
|
3
|
+
import { _ as __vue_component__$1 } from './OrInput-59a15d80.js';
|
|
4
|
+
import { a as InputBoxSize } from './OrInputBox-9ceb9fc4.js';
|
|
5
5
|
import { n as normalizeComponent } from './normalize-component-6e8e3d80.js';
|
|
6
6
|
|
|
7
7
|
var script = defineComponent({
|
|
@@ -7,8 +7,8 @@ import { _ as __vue_component__$2 } from './OrError-13845bb0.js';
|
|
|
7
7
|
import { _ as __vue_component__$3 } from './OrExpansionPanel-729eb1e7.js';
|
|
8
8
|
import { _ as __vue_component__$4 } from './OrHint-78b399cb.js';
|
|
9
9
|
import { _ as __vue_component__$5 } from './OrIcon-f34e0e6f.js';
|
|
10
|
-
import { _ as __vue_component__$7, a as InputBoxSize } from './OrInputBox-
|
|
11
|
-
import { _ as __vue_component__$6 } from './OrInput-
|
|
10
|
+
import { _ as __vue_component__$7, a as InputBoxSize } from './OrInputBox-9ceb9fc4.js';
|
|
11
|
+
import { _ as __vue_component__$6 } from './OrInput-59a15d80.js';
|
|
12
12
|
import { _ as __vue_component__$8 } from './OrLabel-0945a4d9.js';
|
|
13
13
|
import { _ as __vue_component__$9 } from './OrMenuItem-7b7fbf8a.js';
|
|
14
14
|
import { _ as __vue_component__$a } from './OrPopover-d5d4f62a.js';
|
|
@@ -1,92 +1,28 @@
|
|
|
1
1
|
import { useDraggable, useElementBounding } from '@vueuse/core';
|
|
2
2
|
import _ from 'lodash';
|
|
3
|
-
import { defineComponent, ref, computed, watch } from 'vue-demi';
|
|
3
|
+
import { defineComponent, ref, computed, useSlots, watch } from 'vue-demi';
|
|
4
|
+
import { _ as __vue_component__$1, O as OrSidebarPlacement, S as SidebarRoot, a as SidebarBar, b as SidebarSides, c as SidebarToolbar, C as CollapsibleSidebarToolbar, d as SidebarToolbarSides, e as SidebarResize, f as SidebarResizeSides, g as SidebarResizingSides, h as SidebarCollapseButton, i as SidebarCollapseButtonSides, j as SidebarMain, k as SidebarHeader, l as SidebarContent, m as SidebarFooter } from './OrSidebarCollapseButton-3b461dfe.js';
|
|
4
5
|
import { n as normalizeComponent } from './normalize-component-6e8e3d80.js';
|
|
5
6
|
|
|
6
|
-
var OrSidebarPlacement;
|
|
7
|
-
(function (OrSidebarPlacement) {
|
|
8
|
-
OrSidebarPlacement["left"] = "left";
|
|
9
|
-
OrSidebarPlacement["right"] = "right";
|
|
10
|
-
})(OrSidebarPlacement || (OrSidebarPlacement = {}));
|
|
11
|
-
|
|
12
|
-
const SidebarRoot = [
|
|
13
|
-
// Position
|
|
14
|
-
'relative',
|
|
15
|
-
// Layout
|
|
16
|
-
'flex', 'flex-col', 'shrink-0',
|
|
17
|
-
// Box
|
|
18
|
-
'min-h-0', 'p-0'];
|
|
19
|
-
const SidebarRootSides = {
|
|
20
|
-
[OrSidebarPlacement.left]: [
|
|
21
|
-
// Borders
|
|
22
|
-
'border-r-[1px]', 'border-r-solid', 'border-r-secondary dark:border-r-secondary-dark'],
|
|
23
|
-
[OrSidebarPlacement.right]: [
|
|
24
|
-
// Borders
|
|
25
|
-
'border-l-[1px]', 'border-l-solid', 'border-l-secondary dark:border-l-secondary-dark']
|
|
26
|
-
};
|
|
27
|
-
const SidebarResize = [
|
|
28
|
-
// Position
|
|
29
|
-
'absolute', 'inset-y-none', 'z-[1]',
|
|
30
|
-
// Box
|
|
31
|
-
'w-[12px]', 'h-[100%]',
|
|
32
|
-
// Cursor
|
|
33
|
-
'cursor-ew-resize'];
|
|
34
|
-
const SidebarResizeSides = {
|
|
35
|
-
[OrSidebarPlacement.left]: [
|
|
36
|
-
// Position
|
|
37
|
-
'-right-[1px]',
|
|
38
|
-
// Borders
|
|
39
|
-
'hover:border-r-2', 'hover:border-r-primary hover:dark:border-r-primary-dark',
|
|
40
|
-
// Transition
|
|
41
|
-
'transition-[border-right]'],
|
|
42
|
-
[OrSidebarPlacement.right]: [
|
|
43
|
-
// Position
|
|
44
|
-
'-left-[1px]',
|
|
45
|
-
// Borders
|
|
46
|
-
'hover:border-l-2', 'hover:border-l-primary hover:dark:border-l-primary-dark',
|
|
47
|
-
// Transition
|
|
48
|
-
'transition-[border-left]']
|
|
49
|
-
};
|
|
50
|
-
const SidebarResizingSides = {
|
|
51
|
-
[OrSidebarPlacement.left]: [
|
|
52
|
-
// Borders
|
|
53
|
-
'border-r-2', 'border-r-primary dark:border-r-primary-dark'],
|
|
54
|
-
[OrSidebarPlacement.right]: [
|
|
55
|
-
// Borders
|
|
56
|
-
'border-l-2', 'border-l-primary dark:border-l-primary-dark']
|
|
57
|
-
};
|
|
58
|
-
const SidebarMain = [
|
|
59
|
-
// Layout
|
|
60
|
-
'flex', 'flex-col', 'grow',
|
|
61
|
-
// Box
|
|
62
|
-
'min-h-0'];
|
|
63
|
-
const SidebarHeader = [
|
|
64
|
-
// Sizing
|
|
65
|
-
'p-md'];
|
|
66
|
-
const SidebarContent = [
|
|
67
|
-
// Layout
|
|
68
|
-
'grow', 'overflow-auto',
|
|
69
|
-
// Sizing
|
|
70
|
-
'p-md'];
|
|
71
|
-
const SidebarFooter = [
|
|
72
|
-
// Sizing
|
|
73
|
-
'p-md',
|
|
74
|
-
// Borders
|
|
75
|
-
'border-t-[1px]', 'border-t-solid', 'border-t-secondary dark:border-t-secondary-dark'];
|
|
76
|
-
|
|
77
7
|
var script = defineComponent({
|
|
78
8
|
name: 'OrSidebar',
|
|
9
|
+
components: {
|
|
10
|
+
OrSidebarCollapseButton: __vue_component__$1
|
|
11
|
+
},
|
|
79
12
|
props: {
|
|
80
13
|
width: {
|
|
81
14
|
type: Number,
|
|
82
|
-
|
|
83
|
-
default: 0,
|
|
15
|
+
default: 320,
|
|
84
16
|
validator: value => _.isNumber(value) && value >= 0
|
|
85
17
|
},
|
|
86
18
|
minimumWidth: {
|
|
87
19
|
type: Number,
|
|
88
|
-
|
|
89
|
-
|
|
20
|
+
default: 256,
|
|
21
|
+
validator: value => _.isNumber(value) && value >= 0
|
|
22
|
+
},
|
|
23
|
+
maximumWidth: {
|
|
24
|
+
type: Number,
|
|
25
|
+
default: 384,
|
|
90
26
|
validator: value => _.isNumber(value) && value >= 0
|
|
91
27
|
},
|
|
92
28
|
/**
|
|
@@ -100,9 +36,18 @@ var script = defineComponent({
|
|
|
100
36
|
type: String,
|
|
101
37
|
default: OrSidebarPlacement.right,
|
|
102
38
|
validator: value => _.includes(_.values(OrSidebarPlacement), value)
|
|
39
|
+
},
|
|
40
|
+
draggable: {
|
|
41
|
+
type: Boolean,
|
|
42
|
+
default: true
|
|
43
|
+
},
|
|
44
|
+
collapsible: {
|
|
45
|
+
type: Boolean,
|
|
46
|
+
default: false
|
|
103
47
|
}
|
|
104
48
|
},
|
|
105
|
-
emits: ['change:width'],
|
|
49
|
+
emits: ['change:width', 'open', 'close'],
|
|
50
|
+
expose: ['root', 'open', 'close'],
|
|
106
51
|
setup(props, {
|
|
107
52
|
emit
|
|
108
53
|
}) {
|
|
@@ -113,16 +58,26 @@ var script = defineComponent({
|
|
|
113
58
|
var _a;
|
|
114
59
|
return (_a = root.value) === null || _a === void 0 ? void 0 : _a.parentElement;
|
|
115
60
|
});
|
|
61
|
+
// Slots
|
|
62
|
+
const {
|
|
63
|
+
toolbar: toolbarSlot
|
|
64
|
+
} = useSlots();
|
|
116
65
|
// State
|
|
117
66
|
const startPositionX = ref(0);
|
|
118
67
|
const isResizing = ref(false);
|
|
68
|
+
const isCollapsed = ref(false);
|
|
69
|
+
const maximumWidth = ref(props.maximumWidth || 384);
|
|
119
70
|
const localWidth = ref(props.width >= props.minimumWidth ? props.width : props.minimumWidth);
|
|
71
|
+
const isShowingToolbar = computed(() => !!toolbarSlot);
|
|
120
72
|
// Styles
|
|
121
73
|
const sidebarStyle = computed(() => ({
|
|
122
|
-
width: localWidth.value + 'px'
|
|
74
|
+
width: (isCollapsed.value ? 16 : localWidth.value) + 'px'
|
|
123
75
|
}));
|
|
124
|
-
const rootStyles = computed(() => ['or-sidebar', ...SidebarRoot
|
|
76
|
+
const rootStyles = computed(() => ['or-sidebar', ...SidebarRoot]);
|
|
77
|
+
const sidebarStyles = computed(() => [...SidebarBar, ...SidebarSides[props.side]]);
|
|
78
|
+
const toolbarStyles = computed(() => [...SidebarToolbar, ...(props.collapsible ? CollapsibleSidebarToolbar : []), ...SidebarToolbarSides[props.side]]);
|
|
125
79
|
const resizeStyles = computed(() => [...SidebarResize, ...SidebarResizeSides[props.side], ...(isResizing.value ? SidebarResizingSides[props.side] : [])]);
|
|
80
|
+
const collapsibleButtonStyles = computed(() => [...SidebarCollapseButton, ...SidebarCollapseButtonSides[props.side]]);
|
|
126
81
|
const mainStyles = computed(() => [...SidebarMain]);
|
|
127
82
|
const headerStyles = computed(() => [...SidebarHeader]);
|
|
128
83
|
const contentStyles = computed(() => [...SidebarContent]);
|
|
@@ -148,8 +103,15 @@ var script = defineComponent({
|
|
|
148
103
|
isResizing.value = false;
|
|
149
104
|
}
|
|
150
105
|
});
|
|
106
|
+
// Methods
|
|
107
|
+
function open() {
|
|
108
|
+
isCollapsed.value = false;
|
|
109
|
+
}
|
|
110
|
+
function close() {
|
|
111
|
+
isCollapsed.value = true;
|
|
112
|
+
}
|
|
151
113
|
const {
|
|
152
|
-
width:
|
|
114
|
+
width: containerWidth
|
|
153
115
|
} = useElementBounding(parentContainer);
|
|
154
116
|
watch(() => props.width, newValue => {
|
|
155
117
|
if (newValue !== localWidth.value) {
|
|
@@ -159,22 +121,36 @@ var script = defineComponent({
|
|
|
159
121
|
watch(() => props.minimumWidth, newMinimum => {
|
|
160
122
|
if (newMinimum > localWidth.value) localWidth.value = newMinimum;
|
|
161
123
|
});
|
|
124
|
+
watch(() => props.maximumWidth, newMaximum => {
|
|
125
|
+
if (newMaximum < maximumWidth.value) maximumWidth.value = newMaximum;
|
|
126
|
+
});
|
|
127
|
+
watch(containerWidth, newMaximum => {
|
|
128
|
+
if (newMaximum < maximumWidth.value) maximumWidth.value = newMaximum;
|
|
129
|
+
});
|
|
162
130
|
watch(maximumWidth, newMaximum => {
|
|
163
131
|
if (newMaximum < localWidth.value) localWidth.value = newMaximum;
|
|
164
132
|
});
|
|
165
133
|
watch(localWidth, val => emit('change:width', val));
|
|
134
|
+
watch(isCollapsed, val => emit(val ? 'close' : 'open'));
|
|
166
135
|
return {
|
|
167
136
|
root,
|
|
168
137
|
resizeBar,
|
|
169
138
|
isResizing,
|
|
139
|
+
isCollapsed,
|
|
170
140
|
localWidth,
|
|
141
|
+
isShowingToolbar,
|
|
171
142
|
sidebarStyle,
|
|
172
143
|
rootStyles,
|
|
144
|
+
sidebarStyles,
|
|
145
|
+
toolbarStyles,
|
|
173
146
|
resizeStyles,
|
|
147
|
+
collapsibleButtonStyles,
|
|
174
148
|
mainStyles,
|
|
175
149
|
headerStyles,
|
|
176
150
|
contentStyles,
|
|
177
|
-
footerStyles
|
|
151
|
+
footerStyles,
|
|
152
|
+
open,
|
|
153
|
+
close
|
|
178
154
|
};
|
|
179
155
|
}
|
|
180
156
|
});
|
|
@@ -189,20 +165,50 @@ var __vue_render__ = function () {
|
|
|
189
165
|
var _c = _vm._self._c || _h;
|
|
190
166
|
return _c('aside', {
|
|
191
167
|
ref: "root",
|
|
192
|
-
class: _vm.rootStyles
|
|
168
|
+
class: _vm.rootStyles
|
|
169
|
+
}, [_vm.side === 'right' && _vm.isShowingToolbar ? _c('div', {
|
|
170
|
+
class: _vm.toolbarStyles
|
|
171
|
+
}, [_vm._t("toolbar")], 2) : _vm._e(), _vm._v(" "), _c('div', {
|
|
172
|
+
class: _vm.sidebarStyles,
|
|
193
173
|
style: _vm.sidebarStyle
|
|
194
|
-
}, [_c('div', {
|
|
174
|
+
}, [_vm.draggable && !_vm.isCollapsed ? _c('div', {
|
|
195
175
|
ref: "resizeBar",
|
|
196
176
|
class: _vm.resizeStyles
|
|
197
|
-
}), _vm._v(" "), _c('
|
|
177
|
+
}) : _vm._e(), _vm._v(" "), _vm.collapsible ? _c('or-sidebar-collapse-button', {
|
|
178
|
+
class: _vm.collapsibleButtonStyles,
|
|
179
|
+
attrs: {
|
|
180
|
+
"side": _vm.side
|
|
181
|
+
},
|
|
182
|
+
model: {
|
|
183
|
+
value: _vm.isCollapsed,
|
|
184
|
+
callback: function ($$v) {
|
|
185
|
+
_vm.isCollapsed = $$v;
|
|
186
|
+
},
|
|
187
|
+
expression: "isCollapsed"
|
|
188
|
+
}
|
|
189
|
+
}) : _vm._e(), _vm._v(" "), _c('div', {
|
|
190
|
+
directives: [{
|
|
191
|
+
name: "show",
|
|
192
|
+
rawName: "v-show",
|
|
193
|
+
value: !_vm.isCollapsed,
|
|
194
|
+
expression: "!isCollapsed"
|
|
195
|
+
}],
|
|
198
196
|
class: _vm.mainStyles
|
|
199
197
|
}, [_vm.$slots.header ? _c('div', {
|
|
200
198
|
class: _vm.headerStyles
|
|
201
199
|
}, [_vm._t("header")], 2) : _vm._e(), _vm._v(" "), _c('div', {
|
|
202
200
|
class: _vm.contentStyles
|
|
203
201
|
}, [_vm._t("default")], 2)]), _vm._v(" "), _vm.$slots.footer ? _c('div', {
|
|
202
|
+
directives: [{
|
|
203
|
+
name: "show",
|
|
204
|
+
rawName: "v-show",
|
|
205
|
+
value: !_vm.isCollapsed,
|
|
206
|
+
expression: "!isCollapsed"
|
|
207
|
+
}],
|
|
204
208
|
class: _vm.footerStyles
|
|
205
|
-
}, [_vm._t("footer")], 2) : _vm._e()])
|
|
209
|
+
}, [_vm._t("footer")], 2) : _vm._e()], 1), _vm._v(" "), _vm.side === 'left' && _vm.isShowingToolbar ? _c('div', {
|
|
210
|
+
class: _vm.toolbarStyles
|
|
211
|
+
}, [_vm._t("toolbar")], 2) : _vm._e()]);
|
|
206
212
|
};
|
|
207
213
|
var __vue_staticRenderFns__ = [];
|
|
208
214
|
|
|
@@ -225,4 +231,4 @@ const __vue_component__ = /*#__PURE__*/normalizeComponent({
|
|
|
225
231
|
staticRenderFns: __vue_staticRenderFns__
|
|
226
232
|
}, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined);
|
|
227
233
|
|
|
228
|
-
export {
|
|
234
|
+
export { __vue_component__ as _ };
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import _ from 'lodash';
|
|
2
|
+
import { defineComponent, ref, computed } from 'vue-demi';
|
|
3
|
+
import { _ as __vue_component__$1 } from './OrIconButton-04a3566d.js';
|
|
4
|
+
import { n as normalizeComponent } from './normalize-component-6e8e3d80.js';
|
|
5
|
+
|
|
6
|
+
var OrSidebarPlacement;
|
|
7
|
+
(function (OrSidebarPlacement) {
|
|
8
|
+
OrSidebarPlacement["left"] = "left";
|
|
9
|
+
OrSidebarPlacement["right"] = "right";
|
|
10
|
+
})(OrSidebarPlacement || (OrSidebarPlacement = {}));
|
|
11
|
+
|
|
12
|
+
const SidebarRoot = [
|
|
13
|
+
// Position
|
|
14
|
+
'relative',
|
|
15
|
+
// Layout
|
|
16
|
+
'flex', 'flex-row', 'shrink-0',
|
|
17
|
+
// Box
|
|
18
|
+
'min-w-0', 'h-auto', 'p-0',
|
|
19
|
+
// Theme
|
|
20
|
+
'bg-background', 'dark:bg-background-dark'];
|
|
21
|
+
const SidebarBar = [
|
|
22
|
+
// Position
|
|
23
|
+
'relative',
|
|
24
|
+
// Layout
|
|
25
|
+
'flex', 'flex-col', 'shrink-0', 'grow',
|
|
26
|
+
// Box
|
|
27
|
+
'min-h-0', 'p-0',
|
|
28
|
+
// Theme
|
|
29
|
+
'text-on-background', 'dark:text-on-background-dark',
|
|
30
|
+
// Transition
|
|
31
|
+
'transition-[width]'];
|
|
32
|
+
const SidebarToolbar = [
|
|
33
|
+
// Position
|
|
34
|
+
'relative',
|
|
35
|
+
// Layout
|
|
36
|
+
'flex', 'flex-col', 'shrink-0', 'grow', 'overflow-auto', 'items-center',
|
|
37
|
+
// Sizing
|
|
38
|
+
'gap-md',
|
|
39
|
+
// Box
|
|
40
|
+
'min-h-0', 'min-w-xl', 'p-[6px]', 'py-md+',
|
|
41
|
+
// Theme
|
|
42
|
+
'text-outline', 'dark:text-outline-dark'];
|
|
43
|
+
const CollapsibleSidebarToolbar = ['pt-[56px]'];
|
|
44
|
+
const SidebarSides = {
|
|
45
|
+
[OrSidebarPlacement.left]: [
|
|
46
|
+
// Borders
|
|
47
|
+
'border-r-[1px]', 'border-r-solid', 'border-r-outline-variant dark:border-r-outline-variant-dark'],
|
|
48
|
+
[OrSidebarPlacement.right]: [
|
|
49
|
+
// Borders
|
|
50
|
+
'border-l-[1px]', 'border-l-solid', 'border-l-outline-variant dark:border-l-outline-variant-dark']
|
|
51
|
+
};
|
|
52
|
+
const SidebarToolbarSides = {
|
|
53
|
+
[OrSidebarPlacement.left]: [
|
|
54
|
+
// Borders
|
|
55
|
+
'border-r-[1px]', 'border-r-solid', 'border-r-outline-variant dark:border-r-outline-variant-dark'],
|
|
56
|
+
[OrSidebarPlacement.right]: [
|
|
57
|
+
// Borders
|
|
58
|
+
'border-l-[1px]', 'border-l-solid', 'border-l-outline-variant dark:border-l-outline-variant-dark']
|
|
59
|
+
};
|
|
60
|
+
const SidebarResize = [
|
|
61
|
+
// Position
|
|
62
|
+
'absolute', 'inset-y-none', 'z-[1]',
|
|
63
|
+
// Box
|
|
64
|
+
'w-sm+', 'h-[100%]',
|
|
65
|
+
// Cursor
|
|
66
|
+
'cursor-ew-resize'];
|
|
67
|
+
const SidebarResizeSides = {
|
|
68
|
+
[OrSidebarPlacement.left]: [
|
|
69
|
+
// Position
|
|
70
|
+
'-right-[1px]',
|
|
71
|
+
// Borders
|
|
72
|
+
'hover:border-r-2', 'hover:border-r-primary-hover hover:dark:border-r-primary-hover-dark',
|
|
73
|
+
// Transition
|
|
74
|
+
'transition-[border-right]'],
|
|
75
|
+
[OrSidebarPlacement.right]: [
|
|
76
|
+
// Position
|
|
77
|
+
'-left-[1px]',
|
|
78
|
+
// Borders
|
|
79
|
+
'hover:border-l-2', 'hover:border-l-primary-hover hover:dark:border-l-primary-hover-dark',
|
|
80
|
+
// Transition
|
|
81
|
+
'transition-[border-left]']
|
|
82
|
+
};
|
|
83
|
+
const SidebarCollapseButton = [
|
|
84
|
+
// Position
|
|
85
|
+
'absolute', 'top-md', 'inset-y-none', 'z-[1]'];
|
|
86
|
+
const SidebarCollapseButtonSides = {
|
|
87
|
+
[OrSidebarPlacement.left]: [
|
|
88
|
+
// Position
|
|
89
|
+
'-right-[12px]'],
|
|
90
|
+
[OrSidebarPlacement.right]: [
|
|
91
|
+
// Position
|
|
92
|
+
'-left-[12px]']
|
|
93
|
+
};
|
|
94
|
+
const SidebarResizingSides = {
|
|
95
|
+
[OrSidebarPlacement.left]: [
|
|
96
|
+
// Borders
|
|
97
|
+
'border-r-2', 'border-r-primary-hover dark:border-r-primary-hover-dark'],
|
|
98
|
+
[OrSidebarPlacement.right]: [
|
|
99
|
+
// Borders
|
|
100
|
+
'border-l-2', 'border-l-primary-hover dark:border-l-primary-hover-dark']
|
|
101
|
+
};
|
|
102
|
+
const SidebarMain = [
|
|
103
|
+
// Layout
|
|
104
|
+
'flex', 'flex-col', 'grow', 'overflow-x-hidden',
|
|
105
|
+
// Box
|
|
106
|
+
'min-h-0'];
|
|
107
|
+
const SidebarHeader = [
|
|
108
|
+
// Layout
|
|
109
|
+
'shrink-0', 'overflow-hidden',
|
|
110
|
+
// Sizing
|
|
111
|
+
'p-md',
|
|
112
|
+
// Typography
|
|
113
|
+
'typography-headline-2', 'whitespace-nowrap', 'text-ellipsis'];
|
|
114
|
+
const SidebarContent = [
|
|
115
|
+
// Layout
|
|
116
|
+
'grow', 'overflow-auto',
|
|
117
|
+
// Sizing
|
|
118
|
+
'p-md'];
|
|
119
|
+
const SidebarFooter = [
|
|
120
|
+
// Layout
|
|
121
|
+
'shrink-0', 'overflow-x-hidden',
|
|
122
|
+
// Sizing
|
|
123
|
+
'p-md',
|
|
124
|
+
// Borders
|
|
125
|
+
'border-t-[1px]', 'border-t-solid', 'border-t-outline-variant dark:border-t-outline-variant-dark'];
|
|
126
|
+
const CollapseButtonContainer = [
|
|
127
|
+
// Box
|
|
128
|
+
'w-[24px]', 'h-[24px]', 'rounded-full',
|
|
129
|
+
// Theme
|
|
130
|
+
'text-primary dark:text-primary-dark', 'bg-background dark:bg-background-dark'];
|
|
131
|
+
const CollapseButton = [
|
|
132
|
+
// Box
|
|
133
|
+
'w-[24px]', 'h-[24px]',
|
|
134
|
+
// Typography
|
|
135
|
+
'!text-[16px]',
|
|
136
|
+
// Borders
|
|
137
|
+
'!border-[1px]', '!border-solid',
|
|
138
|
+
// Theme
|
|
139
|
+
'!text-primary dark:!text-primary-dark', '!bg-background dark:!bg-background-dark', '!border-outline-variant dark:!border-outline-variant-dark', '!outline-none',
|
|
140
|
+
// Theme (hover)
|
|
141
|
+
'hover:!text-primary hover:dark:!text-primary-dark', 'hover:!bg-primary-opacity-0-08 dark:hover:!bg-primary-opacity-0-08-dark', 'hover:!border-outline dark:hover:!border-outline-dark',
|
|
142
|
+
// Theme (active)
|
|
143
|
+
'active:!text-primary active:dark:!text-primary-dark', 'active:!bg-primary-opacity-0-12 dark:active:!bg-primary-opacity-0-12-dark', 'active:!border-primary dark:active:!border-primary-dark',
|
|
144
|
+
// Theme (focus)
|
|
145
|
+
'focus:!text-primary focus:dark:!text-primary-dark', 'focus:!bg-primary-opacity-0-12 dark:focus:!bg-primary-opacity-0-12-dark', 'focus:!border-outline dark:focus:!border-outline-dark',
|
|
146
|
+
// Theme (disabled)
|
|
147
|
+
'disabled:!text-on-disabled disabled:dark:!text-on-disabled-dark', 'disabled:!bg-background disabled:dark:!bg-background-dark', 'disabled:!border-outline-variant disabled:dark:!border-outline-variant-dark'];
|
|
148
|
+
|
|
149
|
+
var script = defineComponent({
|
|
150
|
+
name: 'OrSidebarCollapseButton',
|
|
151
|
+
components: {
|
|
152
|
+
OrIconButton: __vue_component__$1
|
|
153
|
+
},
|
|
154
|
+
props: {
|
|
155
|
+
/**
|
|
156
|
+
* Must be `true` if sidebar is collapsed.
|
|
157
|
+
*/
|
|
158
|
+
modelValue: {
|
|
159
|
+
type: Boolean,
|
|
160
|
+
default: false
|
|
161
|
+
},
|
|
162
|
+
side: {
|
|
163
|
+
type: String,
|
|
164
|
+
default: OrSidebarPlacement.right,
|
|
165
|
+
validator: value => _.includes(_.values(OrSidebarPlacement), value)
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
emits: ['update:modelValue'],
|
|
169
|
+
expose: ['root'],
|
|
170
|
+
setup(props) {
|
|
171
|
+
// Refs
|
|
172
|
+
const root = ref();
|
|
173
|
+
const rootStyles = computed(() => ['or-sidebar-collapse-button', ...CollapseButtonContainer]);
|
|
174
|
+
const buttonStyles = computed(() => [...CollapseButton]);
|
|
175
|
+
const icon = computed(() => props.side === OrSidebarPlacement.left !== props.modelValue ? 'keyboard_arrow_left' : 'keyboard_arrow_right');
|
|
176
|
+
return {
|
|
177
|
+
root,
|
|
178
|
+
rootStyles,
|
|
179
|
+
buttonStyles,
|
|
180
|
+
icon
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
/* script */
|
|
186
|
+
const __vue_script__ = script;
|
|
187
|
+
|
|
188
|
+
/* template */
|
|
189
|
+
var __vue_render__ = function () {
|
|
190
|
+
var _vm = this;
|
|
191
|
+
var _h = _vm.$createElement;
|
|
192
|
+
var _c = _vm._self._c || _h;
|
|
193
|
+
return _c('div', {
|
|
194
|
+
ref: "root",
|
|
195
|
+
class: _vm.rootStyles
|
|
196
|
+
}, [_c('or-icon-button', {
|
|
197
|
+
class: _vm.buttonStyles,
|
|
198
|
+
attrs: {
|
|
199
|
+
"icon": {
|
|
200
|
+
icon: _vm.icon,
|
|
201
|
+
size: 'inherit'
|
|
202
|
+
},
|
|
203
|
+
"color": "inherit"
|
|
204
|
+
},
|
|
205
|
+
on: {
|
|
206
|
+
"click": function ($event) {
|
|
207
|
+
return _vm.$emit('update:modelValue', !_vm.modelValue);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
})], 1);
|
|
211
|
+
};
|
|
212
|
+
var __vue_staticRenderFns__ = [];
|
|
213
|
+
|
|
214
|
+
/* style */
|
|
215
|
+
const __vue_inject_styles__ = undefined;
|
|
216
|
+
/* scoped */
|
|
217
|
+
const __vue_scope_id__ = undefined;
|
|
218
|
+
/* module identifier */
|
|
219
|
+
const __vue_module_identifier__ = undefined;
|
|
220
|
+
/* functional template */
|
|
221
|
+
const __vue_is_functional_template__ = false;
|
|
222
|
+
/* style inject */
|
|
223
|
+
|
|
224
|
+
/* style inject SSR */
|
|
225
|
+
|
|
226
|
+
/* style inject shadow dom */
|
|
227
|
+
|
|
228
|
+
const __vue_component__ = /*#__PURE__*/normalizeComponent({
|
|
229
|
+
render: __vue_render__,
|
|
230
|
+
staticRenderFns: __vue_staticRenderFns__
|
|
231
|
+
}, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined);
|
|
232
|
+
|
|
233
|
+
export { CollapsibleSidebarToolbar as C, OrSidebarPlacement as O, SidebarRoot as S, __vue_component__ as _, SidebarBar as a, SidebarSides as b, SidebarToolbar as c, SidebarToolbarSides as d, SidebarResize as e, SidebarResizeSides as f, SidebarResizingSides as g, SidebarCollapseButton as h, SidebarCollapseButtonSides as i, SidebarMain as j, SidebarHeader as k, SidebarContent as l, SidebarFooter as m };
|