@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
|
@@ -6,7 +6,7 @@ import { O as OrButton } from './OrButton-d45772c1.js';
|
|
|
6
6
|
import { O as OrMenu } from './OrMenu-52da43bc.js';
|
|
7
7
|
import { O as OrMenuItem } from './OrMenuItem-e2693a5f.js';
|
|
8
8
|
import { O as OrIcon } from './OrIcon-458206aa.js';
|
|
9
|
-
import { O as OrSearch } from './OrSearch-
|
|
9
|
+
import { O as OrSearch } from './OrSearch-bb87b34c.js';
|
|
10
10
|
|
|
11
11
|
const CardCollectionRoot = [
|
|
12
12
|
// Layout
|
|
@@ -3,7 +3,7 @@ import { l as logicAnd } from './index-17f264f9.js';
|
|
|
3
3
|
import './index-fa6eb4ca.js';
|
|
4
4
|
import { O as OrOverlay } from './OrOverlay-efa7992e.js';
|
|
5
5
|
import { O as OrButton, a as ButtonColor } from './OrButton-d45772c1.js';
|
|
6
|
-
import { O as OrInput } from './OrInput-
|
|
6
|
+
import { O as OrInput } from './OrInput-00070eee.js';
|
|
7
7
|
import { defineComponent, ref, computed, watch } from '@vue/composition-api/dist/vue-composition-api.mjs';
|
|
8
8
|
import { n as normalizeComponent } from './normalize-component-6e8e3d80.js';
|
|
9
9
|
|
|
@@ -3,12 +3,10 @@ import { O as OrError } from './OrError-52f668a4.js';
|
|
|
3
3
|
import { O as OrHint } from './OrHint-fde53334.js';
|
|
4
4
|
import { O as OrIcon } from './OrIcon-458206aa.js';
|
|
5
5
|
import { O as OrIconButton } from './OrIconButton-837d57f8.js';
|
|
6
|
-
import { O as OrInputBox, a as InputBoxSize } from './OrInputBox-
|
|
6
|
+
import { O as OrInputBox, a as InputBoxSize } from './OrInputBox-2f559e98.js';
|
|
7
7
|
import { O as OrLabel } from './OrLabel-aff09c39.js';
|
|
8
|
-
import { O as OrLoader } from './OrLoader-864ef92a.js';
|
|
9
8
|
import { a as useIdAttribute, u as useControlAttributes } from './useIdAttribute-cf61643f.js';
|
|
10
9
|
import { u as useValidationAttributes } from './useValidationAttributes-6df7bcf9.js';
|
|
11
|
-
import { u as useResponsive } from './useResponsive-e13dfbb0.js';
|
|
12
10
|
import { defineComponent, ref, computed, reactive } from '@vue/composition-api/dist/vue-composition-api.mjs';
|
|
13
11
|
import { n as normalizeComponent } from './normalize-component-6e8e3d80.js';
|
|
14
12
|
import { c as createInjector } from './browser-82dea9ed.js';
|
|
@@ -42,8 +40,7 @@ var script = defineComponent({
|
|
|
42
40
|
OrIcon,
|
|
43
41
|
OrIconButton,
|
|
44
42
|
OrInputBox,
|
|
45
|
-
OrLabel
|
|
46
|
-
OrLoader
|
|
43
|
+
OrLabel
|
|
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 */
|
|
@@ -52,7 +52,7 @@ const InputBoxRootSizes = {
|
|
|
52
52
|
// Box
|
|
53
53
|
'children:min-h-[30px]',
|
|
54
54
|
// Spacing
|
|
55
|
-
'first-child:pl-
|
|
55
|
+
'first-child:pl-sm', 'last-child:pr-sm', 'children:py-[6px]', 'gap-[6px]',
|
|
56
56
|
// Typography
|
|
57
57
|
'typography-caption-regular']
|
|
58
58
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { debouncedWatch } from '@vueuse/core';
|
|
2
2
|
import './index-fa6eb4ca.js';
|
|
3
|
-
import { O as OrInput } from './OrInput-
|
|
3
|
+
import { O as OrInput } from './OrInput-00070eee.js';
|
|
4
4
|
import { defineComponent, ref, computed, watch } from '@vue/composition-api/dist/vue-composition-api.mjs';
|
|
5
|
-
import { a as InputBoxSize } from './OrInputBox-
|
|
5
|
+
import { a as InputBoxSize } from './OrInputBox-2f559e98.js';
|
|
6
6
|
import { n as normalizeComponent } from './normalize-component-6e8e3d80.js';
|
|
7
7
|
|
|
8
8
|
var script = defineComponent({
|
|
@@ -4,8 +4,8 @@ import { O as OrError } from './OrError-52f668a4.js';
|
|
|
4
4
|
import { O as OrExpansionPanel } from './OrExpansionPanel-96b8f568.js';
|
|
5
5
|
import { O as OrHint } from './OrHint-fde53334.js';
|
|
6
6
|
import { O as OrIcon } from './OrIcon-458206aa.js';
|
|
7
|
-
import { O as OrInput } from './OrInput-
|
|
8
|
-
import { O as OrInputBox, a as InputBoxSize } from './OrInputBox-
|
|
7
|
+
import { O as OrInput } from './OrInput-00070eee.js';
|
|
8
|
+
import { O as OrInputBox, a as InputBoxSize } from './OrInputBox-2f559e98.js';
|
|
9
9
|
import { O as OrLabel } from './OrLabel-aff09c39.js';
|
|
10
10
|
import { O as OrMenuItem } from './OrMenuItem-e2693a5f.js';
|
|
11
11
|
import { O as OrPopover } from './OrPopover-4e8acb7b.js';
|
|
@@ -1,93 +1,29 @@
|
|
|
1
1
|
import { useDraggable, useElementBounding } from '@vueuse/core';
|
|
2
2
|
import _ from 'lodash';
|
|
3
3
|
import './index-fa6eb4ca.js';
|
|
4
|
-
import {
|
|
4
|
+
import { a as OrSidebarCollapseButton, O as OrSidebarPlacement, S as SidebarRoot, b as SidebarBar, c as SidebarSides, d as SidebarToolbar, C as CollapsibleSidebarToolbar, e as SidebarToolbarSides, f as SidebarResize, g as SidebarResizeSides, h as SidebarResizingSides, i as SidebarCollapseButton, j as SidebarCollapseButtonSides, k as SidebarMain, l as SidebarHeader, m as SidebarContent, n as SidebarFooter } from './OrSidebarCollapseButton-fcc085c7.js';
|
|
5
|
+
import { defineComponent, ref, computed, useSlots, watch } from '@vue/composition-api/dist/vue-composition-api.mjs';
|
|
5
6
|
import { n as normalizeComponent } from './normalize-component-6e8e3d80.js';
|
|
6
7
|
|
|
7
|
-
var OrSidebarPlacement;
|
|
8
|
-
(function (OrSidebarPlacement) {
|
|
9
|
-
OrSidebarPlacement["left"] = "left";
|
|
10
|
-
OrSidebarPlacement["right"] = "right";
|
|
11
|
-
})(OrSidebarPlacement || (OrSidebarPlacement = {}));
|
|
12
|
-
|
|
13
|
-
const SidebarRoot = [
|
|
14
|
-
// Position
|
|
15
|
-
'relative',
|
|
16
|
-
// Layout
|
|
17
|
-
'flex', 'flex-col', 'shrink-0',
|
|
18
|
-
// Box
|
|
19
|
-
'min-h-0', 'p-0'];
|
|
20
|
-
const SidebarRootSides = {
|
|
21
|
-
[OrSidebarPlacement.left]: [
|
|
22
|
-
// Borders
|
|
23
|
-
'border-r-[1px]', 'border-r-solid', 'border-r-secondary dark:border-r-secondary-dark'],
|
|
24
|
-
[OrSidebarPlacement.right]: [
|
|
25
|
-
// Borders
|
|
26
|
-
'border-l-[1px]', 'border-l-solid', 'border-l-secondary dark:border-l-secondary-dark']
|
|
27
|
-
};
|
|
28
|
-
const SidebarResize = [
|
|
29
|
-
// Position
|
|
30
|
-
'absolute', 'inset-y-none', 'z-[1]',
|
|
31
|
-
// Box
|
|
32
|
-
'w-[12px]', 'h-[100%]',
|
|
33
|
-
// Cursor
|
|
34
|
-
'cursor-ew-resize'];
|
|
35
|
-
const SidebarResizeSides = {
|
|
36
|
-
[OrSidebarPlacement.left]: [
|
|
37
|
-
// Position
|
|
38
|
-
'-right-[1px]',
|
|
39
|
-
// Borders
|
|
40
|
-
'hover:border-r-2', 'hover:border-r-primary hover:dark:border-r-primary-dark',
|
|
41
|
-
// Transition
|
|
42
|
-
'transition-[border-right]'],
|
|
43
|
-
[OrSidebarPlacement.right]: [
|
|
44
|
-
// Position
|
|
45
|
-
'-left-[1px]',
|
|
46
|
-
// Borders
|
|
47
|
-
'hover:border-l-2', 'hover:border-l-primary hover:dark:border-l-primary-dark',
|
|
48
|
-
// Transition
|
|
49
|
-
'transition-[border-left]']
|
|
50
|
-
};
|
|
51
|
-
const SidebarResizingSides = {
|
|
52
|
-
[OrSidebarPlacement.left]: [
|
|
53
|
-
// Borders
|
|
54
|
-
'border-r-2', 'border-r-primary dark:border-r-primary-dark'],
|
|
55
|
-
[OrSidebarPlacement.right]: [
|
|
56
|
-
// Borders
|
|
57
|
-
'border-l-2', 'border-l-primary dark:border-l-primary-dark']
|
|
58
|
-
};
|
|
59
|
-
const SidebarMain = [
|
|
60
|
-
// Layout
|
|
61
|
-
'flex', 'flex-col', 'grow',
|
|
62
|
-
// Box
|
|
63
|
-
'min-h-0'];
|
|
64
|
-
const SidebarHeader = [
|
|
65
|
-
// Sizing
|
|
66
|
-
'p-md'];
|
|
67
|
-
const SidebarContent = [
|
|
68
|
-
// Layout
|
|
69
|
-
'grow', 'overflow-auto',
|
|
70
|
-
// Sizing
|
|
71
|
-
'p-md'];
|
|
72
|
-
const SidebarFooter = [
|
|
73
|
-
// Sizing
|
|
74
|
-
'p-md',
|
|
75
|
-
// Borders
|
|
76
|
-
'border-t-[1px]', 'border-t-solid', 'border-t-secondary dark:border-t-secondary-dark'];
|
|
77
|
-
|
|
78
8
|
var script = defineComponent({
|
|
79
9
|
name: 'OrSidebar',
|
|
10
|
+
components: {
|
|
11
|
+
OrSidebarCollapseButton
|
|
12
|
+
},
|
|
80
13
|
props: {
|
|
81
14
|
width: {
|
|
82
15
|
type: Number,
|
|
83
|
-
|
|
84
|
-
default: 0,
|
|
16
|
+
default: 320,
|
|
85
17
|
validator: value => _.isNumber(value) && value >= 0
|
|
86
18
|
},
|
|
87
19
|
minimumWidth: {
|
|
88
20
|
type: Number,
|
|
89
|
-
|
|
90
|
-
|
|
21
|
+
default: 256,
|
|
22
|
+
validator: value => _.isNumber(value) && value >= 0
|
|
23
|
+
},
|
|
24
|
+
maximumWidth: {
|
|
25
|
+
type: Number,
|
|
26
|
+
default: 384,
|
|
91
27
|
validator: value => _.isNumber(value) && value >= 0
|
|
92
28
|
},
|
|
93
29
|
/**
|
|
@@ -101,9 +37,18 @@ var script = defineComponent({
|
|
|
101
37
|
type: String,
|
|
102
38
|
default: OrSidebarPlacement.right,
|
|
103
39
|
validator: value => _.includes(_.values(OrSidebarPlacement), value)
|
|
40
|
+
},
|
|
41
|
+
draggable: {
|
|
42
|
+
type: Boolean,
|
|
43
|
+
default: true
|
|
44
|
+
},
|
|
45
|
+
collapsible: {
|
|
46
|
+
type: Boolean,
|
|
47
|
+
default: false
|
|
104
48
|
}
|
|
105
49
|
},
|
|
106
|
-
emits: ['change:width'],
|
|
50
|
+
emits: ['change:width', 'open', 'close'],
|
|
51
|
+
expose: ['root', 'open', 'close'],
|
|
107
52
|
setup(props, {
|
|
108
53
|
emit
|
|
109
54
|
}) {
|
|
@@ -114,16 +59,26 @@ var script = defineComponent({
|
|
|
114
59
|
var _a;
|
|
115
60
|
return (_a = root.value) === null || _a === void 0 ? void 0 : _a.parentElement;
|
|
116
61
|
});
|
|
62
|
+
// Slots
|
|
63
|
+
const {
|
|
64
|
+
toolbar: toolbarSlot
|
|
65
|
+
} = useSlots();
|
|
117
66
|
// State
|
|
118
67
|
const startPositionX = ref(0);
|
|
119
68
|
const isResizing = ref(false);
|
|
69
|
+
const isCollapsed = ref(false);
|
|
70
|
+
const maximumWidth = ref(props.maximumWidth || 384);
|
|
120
71
|
const localWidth = ref(props.width >= props.minimumWidth ? props.width : props.minimumWidth);
|
|
72
|
+
const isShowingToolbar = computed(() => !!toolbarSlot);
|
|
121
73
|
// Styles
|
|
122
74
|
const sidebarStyle = computed(() => ({
|
|
123
|
-
width: localWidth.value + 'px'
|
|
75
|
+
width: (isCollapsed.value ? 16 : localWidth.value) + 'px'
|
|
124
76
|
}));
|
|
125
|
-
const rootStyles = computed(() => ['or-sidebar', ...SidebarRoot
|
|
77
|
+
const rootStyles = computed(() => ['or-sidebar', ...SidebarRoot]);
|
|
78
|
+
const sidebarStyles = computed(() => [...SidebarBar, ...SidebarSides[props.side]]);
|
|
79
|
+
const toolbarStyles = computed(() => [...SidebarToolbar, ...(props.collapsible ? CollapsibleSidebarToolbar : []), ...SidebarToolbarSides[props.side]]);
|
|
126
80
|
const resizeStyles = computed(() => [...SidebarResize, ...SidebarResizeSides[props.side], ...(isResizing.value ? SidebarResizingSides[props.side] : [])]);
|
|
81
|
+
const collapsibleButtonStyles = computed(() => [...SidebarCollapseButton, ...SidebarCollapseButtonSides[props.side]]);
|
|
127
82
|
const mainStyles = computed(() => [...SidebarMain]);
|
|
128
83
|
const headerStyles = computed(() => [...SidebarHeader]);
|
|
129
84
|
const contentStyles = computed(() => [...SidebarContent]);
|
|
@@ -149,8 +104,15 @@ var script = defineComponent({
|
|
|
149
104
|
isResizing.value = false;
|
|
150
105
|
}
|
|
151
106
|
});
|
|
107
|
+
// Methods
|
|
108
|
+
function open() {
|
|
109
|
+
isCollapsed.value = false;
|
|
110
|
+
}
|
|
111
|
+
function close() {
|
|
112
|
+
isCollapsed.value = true;
|
|
113
|
+
}
|
|
152
114
|
const {
|
|
153
|
-
width:
|
|
115
|
+
width: containerWidth
|
|
154
116
|
} = useElementBounding(parentContainer);
|
|
155
117
|
watch(() => props.width, newValue => {
|
|
156
118
|
if (newValue !== localWidth.value) {
|
|
@@ -160,22 +122,36 @@ var script = defineComponent({
|
|
|
160
122
|
watch(() => props.minimumWidth, newMinimum => {
|
|
161
123
|
if (newMinimum > localWidth.value) localWidth.value = newMinimum;
|
|
162
124
|
});
|
|
125
|
+
watch(() => props.maximumWidth, newMaximum => {
|
|
126
|
+
if (newMaximum < maximumWidth.value) maximumWidth.value = newMaximum;
|
|
127
|
+
});
|
|
128
|
+
watch(containerWidth, newMaximum => {
|
|
129
|
+
if (newMaximum < maximumWidth.value) maximumWidth.value = newMaximum;
|
|
130
|
+
});
|
|
163
131
|
watch(maximumWidth, newMaximum => {
|
|
164
132
|
if (newMaximum < localWidth.value) localWidth.value = newMaximum;
|
|
165
133
|
});
|
|
166
134
|
watch(localWidth, val => emit('change:width', val));
|
|
135
|
+
watch(isCollapsed, val => emit(val ? 'close' : 'open'));
|
|
167
136
|
return {
|
|
168
137
|
root,
|
|
169
138
|
resizeBar,
|
|
170
139
|
isResizing,
|
|
140
|
+
isCollapsed,
|
|
171
141
|
localWidth,
|
|
142
|
+
isShowingToolbar,
|
|
172
143
|
sidebarStyle,
|
|
173
144
|
rootStyles,
|
|
145
|
+
sidebarStyles,
|
|
146
|
+
toolbarStyles,
|
|
174
147
|
resizeStyles,
|
|
148
|
+
collapsibleButtonStyles,
|
|
175
149
|
mainStyles,
|
|
176
150
|
headerStyles,
|
|
177
151
|
contentStyles,
|
|
178
|
-
footerStyles
|
|
152
|
+
footerStyles,
|
|
153
|
+
open,
|
|
154
|
+
close
|
|
179
155
|
};
|
|
180
156
|
}
|
|
181
157
|
});
|
|
@@ -190,20 +166,50 @@ var __vue_render__ = function () {
|
|
|
190
166
|
var _c = _vm._self._c || _h;
|
|
191
167
|
return _c('aside', {
|
|
192
168
|
ref: "root",
|
|
193
|
-
class: _vm.rootStyles
|
|
169
|
+
class: _vm.rootStyles
|
|
170
|
+
}, [_vm.side === 'right' && _vm.isShowingToolbar ? _c('div', {
|
|
171
|
+
class: _vm.toolbarStyles
|
|
172
|
+
}, [_vm._t("toolbar")], 2) : _vm._e(), _vm._v(" "), _c('div', {
|
|
173
|
+
class: _vm.sidebarStyles,
|
|
194
174
|
style: _vm.sidebarStyle
|
|
195
|
-
}, [_c('div', {
|
|
175
|
+
}, [_vm.draggable && !_vm.isCollapsed ? _c('div', {
|
|
196
176
|
ref: "resizeBar",
|
|
197
177
|
class: _vm.resizeStyles
|
|
198
|
-
}), _vm._v(" "), _c('
|
|
178
|
+
}) : _vm._e(), _vm._v(" "), _vm.collapsible ? _c('or-sidebar-collapse-button', {
|
|
179
|
+
class: _vm.collapsibleButtonStyles,
|
|
180
|
+
attrs: {
|
|
181
|
+
"side": _vm.side
|
|
182
|
+
},
|
|
183
|
+
model: {
|
|
184
|
+
value: _vm.isCollapsed,
|
|
185
|
+
callback: function ($$v) {
|
|
186
|
+
_vm.isCollapsed = $$v;
|
|
187
|
+
},
|
|
188
|
+
expression: "isCollapsed"
|
|
189
|
+
}
|
|
190
|
+
}) : _vm._e(), _vm._v(" "), _c('div', {
|
|
191
|
+
directives: [{
|
|
192
|
+
name: "show",
|
|
193
|
+
rawName: "v-show",
|
|
194
|
+
value: !_vm.isCollapsed,
|
|
195
|
+
expression: "!isCollapsed"
|
|
196
|
+
}],
|
|
199
197
|
class: _vm.mainStyles
|
|
200
198
|
}, [_vm.$slots.header ? _c('div', {
|
|
201
199
|
class: _vm.headerStyles
|
|
202
200
|
}, [_vm._t("header")], 2) : _vm._e(), _vm._v(" "), _c('div', {
|
|
203
201
|
class: _vm.contentStyles
|
|
204
202
|
}, [_vm._t("default")], 2)]), _vm._v(" "), _vm.$slots.footer ? _c('div', {
|
|
203
|
+
directives: [{
|
|
204
|
+
name: "show",
|
|
205
|
+
rawName: "v-show",
|
|
206
|
+
value: !_vm.isCollapsed,
|
|
207
|
+
expression: "!isCollapsed"
|
|
208
|
+
}],
|
|
205
209
|
class: _vm.footerStyles
|
|
206
|
-
}, [_vm._t("footer")], 2) : _vm._e()])
|
|
210
|
+
}, [_vm._t("footer")], 2) : _vm._e()], 1), _vm._v(" "), _vm.side === 'left' && _vm.isShowingToolbar ? _c('div', {
|
|
211
|
+
class: _vm.toolbarStyles
|
|
212
|
+
}, [_vm._t("toolbar")], 2) : _vm._e()]);
|
|
207
213
|
};
|
|
208
214
|
var __vue_staticRenderFns__ = [];
|
|
209
215
|
|
|
@@ -227,4 +233,4 @@ const __vue_component__ = /*#__PURE__*/normalizeComponent({
|
|
|
227
233
|
}, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined);
|
|
228
234
|
var __vue_component__$1 = __vue_component__;
|
|
229
235
|
|
|
230
|
-
export {
|
|
236
|
+
export { __vue_component__$1 as _ };
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
import _ from 'lodash';
|
|
2
|
+
import './index-fa6eb4ca.js';
|
|
3
|
+
import { O as OrIconButton } from './OrIconButton-837d57f8.js';
|
|
4
|
+
import { defineComponent, ref, computed } from '@vue/composition-api/dist/vue-composition-api.mjs';
|
|
5
|
+
import { n as normalizeComponent } from './normalize-component-6e8e3d80.js';
|
|
6
|
+
|
|
7
|
+
var OrSidebarPlacement;
|
|
8
|
+
(function (OrSidebarPlacement) {
|
|
9
|
+
OrSidebarPlacement["left"] = "left";
|
|
10
|
+
OrSidebarPlacement["right"] = "right";
|
|
11
|
+
})(OrSidebarPlacement || (OrSidebarPlacement = {}));
|
|
12
|
+
|
|
13
|
+
const SidebarRoot = [
|
|
14
|
+
// Position
|
|
15
|
+
'relative',
|
|
16
|
+
// Layout
|
|
17
|
+
'flex', 'flex-row', 'shrink-0',
|
|
18
|
+
// Box
|
|
19
|
+
'min-w-0', 'h-auto', 'p-0',
|
|
20
|
+
// Theme
|
|
21
|
+
'bg-background', 'dark:bg-background-dark'];
|
|
22
|
+
const SidebarBar = [
|
|
23
|
+
// Position
|
|
24
|
+
'relative',
|
|
25
|
+
// Layout
|
|
26
|
+
'flex', 'flex-col', 'shrink-0', 'grow',
|
|
27
|
+
// Box
|
|
28
|
+
'min-h-0', 'p-0',
|
|
29
|
+
// Theme
|
|
30
|
+
'text-on-background', 'dark:text-on-background-dark',
|
|
31
|
+
// Transition
|
|
32
|
+
'transition-[width]'];
|
|
33
|
+
const SidebarToolbar = [
|
|
34
|
+
// Position
|
|
35
|
+
'relative',
|
|
36
|
+
// Layout
|
|
37
|
+
'flex', 'flex-col', 'shrink-0', 'grow', 'overflow-auto', 'items-center',
|
|
38
|
+
// Sizing
|
|
39
|
+
'gap-md',
|
|
40
|
+
// Box
|
|
41
|
+
'min-h-0', 'min-w-xl', 'p-[6px]', 'py-md+',
|
|
42
|
+
// Theme
|
|
43
|
+
'text-outline', 'dark:text-outline-dark'];
|
|
44
|
+
const CollapsibleSidebarToolbar = ['pt-[56px]'];
|
|
45
|
+
const SidebarSides = {
|
|
46
|
+
[OrSidebarPlacement.left]: [
|
|
47
|
+
// Borders
|
|
48
|
+
'border-r-[1px]', 'border-r-solid', 'border-r-outline-variant dark:border-r-outline-variant-dark'],
|
|
49
|
+
[OrSidebarPlacement.right]: [
|
|
50
|
+
// Borders
|
|
51
|
+
'border-l-[1px]', 'border-l-solid', 'border-l-outline-variant dark:border-l-outline-variant-dark']
|
|
52
|
+
};
|
|
53
|
+
const SidebarToolbarSides = {
|
|
54
|
+
[OrSidebarPlacement.left]: [
|
|
55
|
+
// Borders
|
|
56
|
+
'border-r-[1px]', 'border-r-solid', 'border-r-outline-variant dark:border-r-outline-variant-dark'],
|
|
57
|
+
[OrSidebarPlacement.right]: [
|
|
58
|
+
// Borders
|
|
59
|
+
'border-l-[1px]', 'border-l-solid', 'border-l-outline-variant dark:border-l-outline-variant-dark']
|
|
60
|
+
};
|
|
61
|
+
const SidebarResize = [
|
|
62
|
+
// Position
|
|
63
|
+
'absolute', 'inset-y-none', 'z-[1]',
|
|
64
|
+
// Box
|
|
65
|
+
'w-sm+', 'h-[100%]',
|
|
66
|
+
// Cursor
|
|
67
|
+
'cursor-ew-resize'];
|
|
68
|
+
const SidebarResizeSides = {
|
|
69
|
+
[OrSidebarPlacement.left]: [
|
|
70
|
+
// Position
|
|
71
|
+
'-right-[1px]',
|
|
72
|
+
// Borders
|
|
73
|
+
'hover:border-r-2', 'hover:border-r-primary-hover hover:dark:border-r-primary-hover-dark',
|
|
74
|
+
// Transition
|
|
75
|
+
'transition-[border-right]'],
|
|
76
|
+
[OrSidebarPlacement.right]: [
|
|
77
|
+
// Position
|
|
78
|
+
'-left-[1px]',
|
|
79
|
+
// Borders
|
|
80
|
+
'hover:border-l-2', 'hover:border-l-primary-hover hover:dark:border-l-primary-hover-dark',
|
|
81
|
+
// Transition
|
|
82
|
+
'transition-[border-left]']
|
|
83
|
+
};
|
|
84
|
+
const SidebarCollapseButton = [
|
|
85
|
+
// Position
|
|
86
|
+
'absolute', 'top-md', 'inset-y-none', 'z-[1]'];
|
|
87
|
+
const SidebarCollapseButtonSides = {
|
|
88
|
+
[OrSidebarPlacement.left]: [
|
|
89
|
+
// Position
|
|
90
|
+
'-right-[12px]'],
|
|
91
|
+
[OrSidebarPlacement.right]: [
|
|
92
|
+
// Position
|
|
93
|
+
'-left-[12px]']
|
|
94
|
+
};
|
|
95
|
+
const SidebarResizingSides = {
|
|
96
|
+
[OrSidebarPlacement.left]: [
|
|
97
|
+
// Borders
|
|
98
|
+
'border-r-2', 'border-r-primary-hover dark:border-r-primary-hover-dark'],
|
|
99
|
+
[OrSidebarPlacement.right]: [
|
|
100
|
+
// Borders
|
|
101
|
+
'border-l-2', 'border-l-primary-hover dark:border-l-primary-hover-dark']
|
|
102
|
+
};
|
|
103
|
+
const SidebarMain = [
|
|
104
|
+
// Layout
|
|
105
|
+
'flex', 'flex-col', 'grow', 'overflow-x-hidden',
|
|
106
|
+
// Box
|
|
107
|
+
'min-h-0'];
|
|
108
|
+
const SidebarHeader = [
|
|
109
|
+
// Layout
|
|
110
|
+
'shrink-0', 'overflow-hidden',
|
|
111
|
+
// Sizing
|
|
112
|
+
'p-md',
|
|
113
|
+
// Typography
|
|
114
|
+
'typography-headline-2', 'whitespace-nowrap', 'text-ellipsis'];
|
|
115
|
+
const SidebarContent = [
|
|
116
|
+
// Layout
|
|
117
|
+
'grow', 'overflow-auto',
|
|
118
|
+
// Sizing
|
|
119
|
+
'p-md'];
|
|
120
|
+
const SidebarFooter = [
|
|
121
|
+
// Layout
|
|
122
|
+
'shrink-0', 'overflow-x-hidden',
|
|
123
|
+
// Sizing
|
|
124
|
+
'p-md',
|
|
125
|
+
// Borders
|
|
126
|
+
'border-t-[1px]', 'border-t-solid', 'border-t-outline-variant dark:border-t-outline-variant-dark'];
|
|
127
|
+
const CollapseButtonContainer = [
|
|
128
|
+
// Box
|
|
129
|
+
'w-[24px]', 'h-[24px]', 'rounded-full',
|
|
130
|
+
// Theme
|
|
131
|
+
'text-primary dark:text-primary-dark', 'bg-background dark:bg-background-dark'];
|
|
132
|
+
const CollapseButton = [
|
|
133
|
+
// Box
|
|
134
|
+
'w-[24px]', 'h-[24px]',
|
|
135
|
+
// Typography
|
|
136
|
+
'!text-[16px]',
|
|
137
|
+
// Borders
|
|
138
|
+
'!border-[1px]', '!border-solid',
|
|
139
|
+
// Theme
|
|
140
|
+
'!text-primary dark:!text-primary-dark', '!bg-background dark:!bg-background-dark', '!border-outline-variant dark:!border-outline-variant-dark', '!outline-none',
|
|
141
|
+
// Theme (hover)
|
|
142
|
+
'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',
|
|
143
|
+
// Theme (active)
|
|
144
|
+
'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',
|
|
145
|
+
// Theme (focus)
|
|
146
|
+
'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',
|
|
147
|
+
// Theme (disabled)
|
|
148
|
+
'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'];
|
|
149
|
+
|
|
150
|
+
var script = defineComponent({
|
|
151
|
+
name: 'OrSidebarCollapseButton',
|
|
152
|
+
components: {
|
|
153
|
+
OrIconButton
|
|
154
|
+
},
|
|
155
|
+
props: {
|
|
156
|
+
/**
|
|
157
|
+
* Must be `true` if sidebar is collapsed.
|
|
158
|
+
*/
|
|
159
|
+
modelValue: {
|
|
160
|
+
type: Boolean,
|
|
161
|
+
default: false
|
|
162
|
+
},
|
|
163
|
+
side: {
|
|
164
|
+
type: String,
|
|
165
|
+
default: OrSidebarPlacement.right,
|
|
166
|
+
validator: value => _.includes(_.values(OrSidebarPlacement), value)
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
emits: ['update:modelValue'],
|
|
170
|
+
expose: ['root'],
|
|
171
|
+
setup(props) {
|
|
172
|
+
// Refs
|
|
173
|
+
const root = ref();
|
|
174
|
+
const rootStyles = computed(() => ['or-sidebar-collapse-button', ...CollapseButtonContainer]);
|
|
175
|
+
const buttonStyles = computed(() => [...CollapseButton]);
|
|
176
|
+
const icon = computed(() => props.side === OrSidebarPlacement.left !== props.modelValue ? 'keyboard_arrow_left' : 'keyboard_arrow_right');
|
|
177
|
+
return {
|
|
178
|
+
root,
|
|
179
|
+
rootStyles,
|
|
180
|
+
buttonStyles,
|
|
181
|
+
icon
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
});
|
|
185
|
+
|
|
186
|
+
/* script */
|
|
187
|
+
const __vue_script__ = script;
|
|
188
|
+
|
|
189
|
+
/* template */
|
|
190
|
+
var __vue_render__ = function () {
|
|
191
|
+
var _vm = this;
|
|
192
|
+
var _h = _vm.$createElement;
|
|
193
|
+
var _c = _vm._self._c || _h;
|
|
194
|
+
return _c('div', {
|
|
195
|
+
ref: "root",
|
|
196
|
+
class: _vm.rootStyles
|
|
197
|
+
}, [_c('or-icon-button', {
|
|
198
|
+
class: _vm.buttonStyles,
|
|
199
|
+
attrs: {
|
|
200
|
+
"icon": {
|
|
201
|
+
icon: _vm.icon,
|
|
202
|
+
size: 'inherit'
|
|
203
|
+
},
|
|
204
|
+
"color": "inherit"
|
|
205
|
+
},
|
|
206
|
+
on: {
|
|
207
|
+
"click": function ($event) {
|
|
208
|
+
return _vm.$emit('update:modelValue', !_vm.modelValue);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
})], 1);
|
|
212
|
+
};
|
|
213
|
+
var __vue_staticRenderFns__ = [];
|
|
214
|
+
|
|
215
|
+
/* style */
|
|
216
|
+
const __vue_inject_styles__ = undefined;
|
|
217
|
+
/* scoped */
|
|
218
|
+
const __vue_scope_id__ = undefined;
|
|
219
|
+
/* module identifier */
|
|
220
|
+
const __vue_module_identifier__ = undefined;
|
|
221
|
+
/* functional template */
|
|
222
|
+
const __vue_is_functional_template__ = false;
|
|
223
|
+
/* style inject */
|
|
224
|
+
|
|
225
|
+
/* style inject SSR */
|
|
226
|
+
|
|
227
|
+
/* style inject shadow dom */
|
|
228
|
+
|
|
229
|
+
const __vue_component__ = /*#__PURE__*/normalizeComponent({
|
|
230
|
+
render: __vue_render__,
|
|
231
|
+
staticRenderFns: __vue_staticRenderFns__
|
|
232
|
+
}, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined);
|
|
233
|
+
var OrSidebarCollapseButton = __vue_component__;
|
|
234
|
+
|
|
235
|
+
export { CollapsibleSidebarToolbar as C, OrSidebarPlacement as O, SidebarRoot as S, OrSidebarCollapseButton as a, SidebarBar as b, SidebarSides as c, SidebarToolbar as d, SidebarToolbarSides as e, SidebarResize as f, SidebarResizeSides as g, SidebarResizingSides as h, SidebarCollapseButton as i, SidebarCollapseButtonSides as j, SidebarMain as k, SidebarHeader as l, SidebarContent as m, SidebarFooter as n };
|