@onereach/ui-components 2.70.2-beta.2198.0 → 2.70.2-beta.2199.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-0141a358.js → OrCardCollection-1bb83cfb.js} +1 -1
- package/dist/bundled/v2/{OrCheckbox-dbef9f9a.js → OrCheckbox-251ecafc.js} +32 -17
- package/dist/bundled/v2/{OrConfirm-23c3ce56.js → OrConfirm-4cae7867.js} +1 -1
- package/dist/bundled/v2/{OrInlineInput-87589946.js → OrInlineInput-2133e469.js} +38 -22
- package/dist/bundled/v2/{OrInlineTextarea-21b0e6fc.js → OrInlineTextarea-d61ca596.js} +34 -18
- package/dist/bundled/v2/{OrInput-82ccfe00.js → OrInput-770f1bed.js} +38 -30
- package/dist/bundled/v2/{OrPagination-379c10b8.js → OrPagination-468d0964.js} +1 -1
- package/dist/bundled/v2/{OrRadio-cd39b20b.js → OrRadio-ae89bc9b.js} +30 -15
- package/dist/bundled/v2/{OrSearch-53470b0e.js → OrSearch-2e5f9e24.js} +1 -1
- package/dist/bundled/v2/{OrSelect-c49e1bcf.js → OrSelect-039c0711.js} +2 -2
- package/dist/bundled/v2/OrSidebar-c95ef614.js +230 -0
- package/dist/bundled/v2/{OrSwitch-237a2081.js → OrSwitch-20640a05.js} +30 -15
- package/dist/bundled/v2/{OrTabs-42f7c52c.js → OrTabs-85aefcba.js} +1 -1
- package/dist/bundled/v2/{OrTextarea-5593fbe9.js → OrTextarea-0ff8063b.js} +39 -20
- package/dist/bundled/v2/components/index.js +16 -14
- package/dist/bundled/v2/components/or-card-collection-v3/index.js +5 -3
- package/dist/bundled/v2/components/or-checkbox-v3/OrCheckbox.vue.d.ts +18 -2
- package/dist/bundled/v2/components/or-checkbox-v3/index.js +2 -1
- package/dist/bundled/v2/components/or-confirm-v3/index.js +4 -2
- package/dist/bundled/v2/components/or-inline-input-v3/OrInlineInput.vue.d.ts +36 -6
- package/dist/bundled/v2/components/or-inline-input-v3/index.js +3 -1
- package/dist/bundled/v2/components/or-inline-textarea-v3/OrInlineTextarea.vue.d.ts +36 -6
- package/dist/bundled/v2/components/or-inline-textarea-v3/index.js +3 -1
- package/dist/bundled/v2/components/or-input-v3/OrInput.vue.d.ts +43 -8
- package/dist/bundled/v2/components/or-input-v3/index.js +3 -1
- package/dist/bundled/v2/components/or-pagination-v3/index.js +1 -1
- package/dist/bundled/v2/components/or-radio-v3/OrRadio.vue.d.ts +18 -2
- package/dist/bundled/v2/components/or-radio-v3/index.js +2 -1
- package/dist/bundled/v2/components/or-search-v3/index.js +4 -2
- package/dist/bundled/v2/components/or-select-v3/index.js +5 -3
- package/dist/bundled/v2/components/or-sidebar-v3/OrSidebar.stories3.d.ts +1 -36
- package/dist/bundled/v2/components/or-sidebar-v3/OrSidebar.vue.d.ts +4 -49
- package/dist/bundled/v2/components/or-sidebar-v3/index.js +1 -13
- package/dist/bundled/v2/components/or-sidebar-v3/styles.d.ts +1 -7
- package/dist/bundled/v2/components/or-switch-v3/OrSwitch.vue.d.ts +18 -2
- package/dist/bundled/v2/components/or-switch-v3/index.js +2 -1
- package/dist/bundled/v2/components/or-tabs-v3/index.js +1 -1
- package/dist/bundled/v2/components/or-textarea-v3/OrTextarea.vue.d.ts +45 -6
- package/dist/bundled/v2/components/or-textarea-v3/index.js +3 -1
- package/dist/bundled/v2/hooks/index.d.ts +3 -0
- package/dist/bundled/v2/hooks/index.js +2 -0
- package/dist/bundled/v2/hooks/useControlAttributes.d.ts +8 -0
- package/dist/bundled/v2/hooks/useIdAttribute.d.ts +2 -0
- package/dist/bundled/v2/hooks/useValidationAttributes.d.ts +12 -0
- package/dist/bundled/v2/index.js +17 -15
- package/dist/bundled/v2/useIdAttribute-cf61643f.js +22 -0
- package/dist/bundled/v2/useValidationAttributes-6df7bcf9.js +17 -0
- package/dist/bundled/v3/{OrCardCollection.vue_vue_type_script_lang-2d78a51a.js → OrCardCollection.vue_vue_type_script_lang-a0f29a55.js} +1 -1
- package/dist/bundled/v3/{OrCheckbox.vue_vue_type_script_lang-8b36e06c.js → OrCheckbox.vue_vue_type_script_lang-2024ec32.js} +22 -7
- package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-05b21989.js → OrConfirm.vue_vue_type_script_lang-7d9d3810.js} +2 -2
- package/dist/bundled/v3/{OrInlineInput.vue_vue_type_script_lang-67218502.js → OrInlineInput.vue_vue_type_script_lang-40f0073f.js} +27 -11
- package/dist/bundled/v3/{OrInlineTextarea.vue_vue_type_script_lang-a1831ab8.js → OrInlineTextarea.vue_vue_type_script_lang-2817edd5.js} +27 -11
- package/dist/bundled/v3/{OrInput-a4f220ed.js → OrInput-e325a104.js} +12 -12
- package/dist/bundled/v3/{OrInput.vue_vue_type_script_lang-607d79d4.js → OrInput.vue_vue_type_script_lang-fd850b82.js} +26 -15
- package/dist/bundled/v3/{OrPagination.vue_vue_type_script_lang-c96d7cd7.js → OrPagination.vue_vue_type_script_lang-0d9daaa7.js} +1 -1
- package/dist/bundled/v3/{OrRadio.vue_vue_type_script_lang-2e666a56.js → OrRadio.vue_vue_type_script_lang-29e8b856.js} +22 -7
- package/dist/bundled/v3/{OrSearch.vue_vue_type_script_lang-06f318ca.js → OrSearch.vue_vue_type_script_lang-480f4b1c.js} +2 -2
- package/dist/bundled/v3/{OrSelect.vue_vue_type_script_lang-58e5a52b.js → OrSelect.vue_vue_type_script_lang-7aa8956a.js} +17 -15
- package/dist/bundled/v3/OrSidebar.vue_vue_type_script_lang-ce0b152c.js +181 -0
- package/dist/bundled/v3/{OrSwitch.vue_vue_type_script_lang-04829f64.js → OrSwitch.vue_vue_type_script_lang-02b4913a.js} +22 -7
- package/dist/bundled/v3/{OrTabs.vue_vue_type_script_lang-61b79a5a.js → OrTabs.vue_vue_type_script_lang-01188224.js} +1 -1
- package/dist/bundled/v3/{OrTextarea.vue_vue_type_script_lang-8e3531cd.js → OrTextarea.vue_vue_type_script_lang-2fdac7b2.js} +31 -12
- package/dist/bundled/v3/components/index.js +17 -15
- package/dist/bundled/v3/components/or-card-collection-v3/index.js +6 -4
- package/dist/bundled/v3/components/or-checkbox-v3/OrCheckbox.vue.d.ts +18 -2
- package/dist/bundled/v3/components/or-checkbox-v3/index.js +2 -1
- package/dist/bundled/v3/components/or-confirm-v3/index.js +5 -3
- package/dist/bundled/v3/components/or-inline-input-v3/OrInlineInput.vue.d.ts +36 -6
- package/dist/bundled/v3/components/or-inline-input-v3/index.js +3 -1
- package/dist/bundled/v3/components/or-inline-textarea-v3/OrInlineTextarea.vue.d.ts +36 -6
- package/dist/bundled/v3/components/or-inline-textarea-v3/index.js +3 -1
- package/dist/bundled/v3/components/or-input-v3/OrInput.vue.d.ts +43 -8
- package/dist/bundled/v3/components/or-input-v3/index.js +3 -1
- package/dist/bundled/v3/components/or-pagination-v3/index.js +1 -1
- package/dist/bundled/v3/components/or-radio-v3/OrRadio.vue.d.ts +18 -2
- package/dist/bundled/v3/components/or-radio-v3/index.js +2 -1
- package/dist/bundled/v3/components/or-search-v3/index.js +5 -3
- package/dist/bundled/v3/components/or-select-v3/index.js +6 -4
- package/dist/bundled/v3/components/or-sidebar-v3/OrSidebar.stories3.d.ts +1 -36
- package/dist/bundled/v3/components/or-sidebar-v3/OrSidebar.vue.d.ts +4 -49
- package/dist/bundled/v3/components/or-sidebar-v3/index.js +1 -15
- package/dist/bundled/v3/components/or-sidebar-v3/styles.d.ts +1 -7
- package/dist/bundled/v3/components/or-switch-v3/OrSwitch.vue.d.ts +18 -2
- package/dist/bundled/v3/components/or-switch-v3/index.js +2 -1
- package/dist/bundled/v3/components/or-tabs-v3/index.js +1 -1
- package/dist/bundled/v3/components/or-textarea-v3/OrTextarea.vue.d.ts +45 -6
- package/dist/bundled/v3/components/or-textarea-v3/index.js +3 -1
- package/dist/bundled/v3/hooks/index.d.ts +3 -0
- package/dist/bundled/v3/hooks/index.js +2 -0
- package/dist/bundled/v3/hooks/useControlAttributes.d.ts +8 -0
- package/dist/bundled/v3/hooks/useIdAttribute.d.ts +2 -0
- package/dist/bundled/v3/hooks/useValidationAttributes.d.ts +12 -0
- package/dist/bundled/v3/index.js +85 -93
- package/dist/bundled/v3/useIdAttribute-b2e42f31.js +21 -0
- package/dist/bundled/v3/useValidationAttributes-5428d8fa.js +16 -0
- package/dist/esm/v2/{OrCardCollection-3c38fc85.js → OrCardCollection-784318ac.js} +1 -1
- package/dist/esm/v2/{OrCheckbox-567e387c.js → OrCheckbox-7317fe1a.js} +32 -17
- package/dist/esm/v2/{OrConfirm-e2ab9b4c.js → OrConfirm-3d064f6c.js} +1 -1
- package/dist/esm/v2/{OrInlineInput-10205811.js → OrInlineInput-7c4f1f92.js} +38 -22
- package/dist/esm/v2/{OrInlineTextarea-7658611e.js → OrInlineTextarea-3381e2a9.js} +34 -18
- package/dist/esm/v2/{OrInput-ada3a970.js → OrInput-e10cc643.js} +38 -30
- package/dist/esm/v2/{OrPagination-c0dbec6a.js → OrPagination-291bd1b9.js} +1 -1
- package/dist/esm/v2/{OrRadio-848ce55d.js → OrRadio-b0a560d2.js} +30 -15
- package/dist/esm/v2/{OrSearch-0f08f2f5.js → OrSearch-1490c00b.js} +1 -1
- package/dist/esm/v2/{OrSelect-1d705445.js → OrSelect-1fbeed4f.js} +2 -2
- package/dist/esm/v2/OrSidebar-fabc7bc9.js +228 -0
- package/dist/esm/v2/{OrSwitch-13b6a7ee.js → OrSwitch-133052ca.js} +30 -15
- package/dist/esm/v2/{OrTabs-71bd3fd2.js → OrTabs-e5b81f4b.js} +1 -1
- package/dist/esm/v2/{OrTextarea-6712a150.js → OrTextarea-a7c846da.js} +39 -20
- package/dist/esm/v2/components/index.js +16 -14
- package/dist/esm/v2/components/or-card-collection-v3/index.js +5 -3
- package/dist/esm/v2/components/or-checkbox-v3/OrCheckbox.vue.d.ts +18 -2
- package/dist/esm/v2/components/or-checkbox-v3/index.js +2 -1
- package/dist/esm/v2/components/or-confirm-v3/index.js +4 -2
- package/dist/esm/v2/components/or-inline-input-v3/OrInlineInput.vue.d.ts +36 -6
- package/dist/esm/v2/components/or-inline-input-v3/index.js +3 -1
- package/dist/esm/v2/components/or-inline-textarea-v3/OrInlineTextarea.vue.d.ts +36 -6
- package/dist/esm/v2/components/or-inline-textarea-v3/index.js +3 -1
- package/dist/esm/v2/components/or-input-v3/OrInput.vue.d.ts +43 -8
- package/dist/esm/v2/components/or-input-v3/index.js +3 -1
- package/dist/esm/v2/components/or-pagination-v3/index.js +1 -1
- package/dist/esm/v2/components/or-radio-v3/OrRadio.vue.d.ts +18 -2
- package/dist/esm/v2/components/or-radio-v3/index.js +2 -1
- package/dist/esm/v2/components/or-search-v3/index.js +4 -2
- package/dist/esm/v2/components/or-select-v3/index.js +5 -3
- package/dist/esm/v2/components/or-sidebar-v3/OrSidebar.stories3.d.ts +1 -36
- package/dist/esm/v2/components/or-sidebar-v3/OrSidebar.vue.d.ts +4 -49
- package/dist/esm/v2/components/or-sidebar-v3/index.js +1 -13
- package/dist/esm/v2/components/or-sidebar-v3/styles.d.ts +1 -7
- package/dist/esm/v2/components/or-switch-v3/OrSwitch.vue.d.ts +18 -2
- package/dist/esm/v2/components/or-switch-v3/index.js +2 -1
- package/dist/esm/v2/components/or-tabs-v3/index.js +1 -1
- package/dist/esm/v2/components/or-textarea-v3/OrTextarea.vue.d.ts +45 -6
- package/dist/esm/v2/components/or-textarea-v3/index.js +3 -1
- package/dist/esm/v2/hooks/index.d.ts +3 -0
- package/dist/esm/v2/hooks/index.js +2 -0
- package/dist/esm/v2/hooks/useControlAttributes.d.ts +8 -0
- package/dist/esm/v2/hooks/useIdAttribute.d.ts +2 -0
- package/dist/esm/v2/hooks/useValidationAttributes.d.ts +12 -0
- package/dist/esm/v2/index.js +16 -14
- package/dist/esm/v2/useIdAttribute-859439f0.js +21 -0
- package/dist/esm/v2/useValidationAttributes-d1abbe34.js +16 -0
- package/dist/esm/v3/{OrCardCollection-dbb3e839.js → OrCardCollection-110b3a0b.js} +1 -1
- package/dist/esm/v3/{OrCheckbox-3e139eac.js → OrCheckbox-7144da06.js} +36 -19
- package/dist/esm/v3/{OrConfirm-1bcd39b1.js → OrConfirm-1a38ed1b.js} +1 -1
- package/dist/esm/v3/{OrInlineInput-507fc99c.js → OrInlineInput-a6b19dbe.js} +37 -20
- package/dist/esm/v3/{OrInlineTextarea-53a9e027.js → OrInlineTextarea-9eb60363.js} +37 -20
- package/dist/esm/v3/{OrInput-9c0426b9.js → OrInput-e07ec00c.js} +37 -26
- package/dist/esm/v3/{OrPagination-a703307d.js → OrPagination-5e01a0a5.js} +1 -1
- package/dist/esm/v3/{OrRadio-54b6d0de.js → OrRadio-39d1905d.js} +34 -17
- package/dist/esm/v3/{OrSearch-9885d178.js → OrSearch-a60f67f0.js} +1 -1
- package/dist/esm/v3/{OrSelect-dfa4885f.js → OrSelect-2c70e384.js} +2 -2
- package/dist/esm/v3/OrSidebar-a62972f5.js +206 -0
- package/dist/esm/v3/{OrSwitch-cca30aa0.js → OrSwitch-3e9a699d.js} +34 -18
- package/dist/esm/v3/{OrTabs-d0ee6cef.js → OrTabs-91618aab.js} +1 -1
- package/dist/esm/v3/{OrTextarea-bb9ef3f2.js → OrTextarea-fd6b9f31.js} +42 -22
- package/dist/esm/v3/components/index.js +16 -14
- package/dist/esm/v3/components/or-card-collection-v3/index.js +5 -3
- package/dist/esm/v3/components/or-checkbox-v3/OrCheckbox.vue.d.ts +18 -2
- package/dist/esm/v3/components/or-checkbox-v3/index.js +2 -1
- package/dist/esm/v3/components/or-confirm-v3/index.js +4 -2
- package/dist/esm/v3/components/or-inline-input-v3/OrInlineInput.vue.d.ts +36 -6
- package/dist/esm/v3/components/or-inline-input-v3/index.js +3 -1
- package/dist/esm/v3/components/or-inline-textarea-v3/OrInlineTextarea.vue.d.ts +36 -6
- package/dist/esm/v3/components/or-inline-textarea-v3/index.js +3 -1
- package/dist/esm/v3/components/or-input-v3/OrInput.vue.d.ts +43 -8
- package/dist/esm/v3/components/or-input-v3/index.js +3 -1
- package/dist/esm/v3/components/or-pagination-v3/index.js +1 -1
- package/dist/esm/v3/components/or-radio-v3/OrRadio.vue.d.ts +18 -2
- package/dist/esm/v3/components/or-radio-v3/index.js +2 -1
- package/dist/esm/v3/components/or-search-v3/index.js +4 -2
- package/dist/esm/v3/components/or-select-v3/index.js +5 -3
- package/dist/esm/v3/components/or-sidebar-v3/OrSidebar.stories3.d.ts +1 -36
- package/dist/esm/v3/components/or-sidebar-v3/OrSidebar.vue.d.ts +4 -49
- package/dist/esm/v3/components/or-sidebar-v3/index.js +1 -12
- package/dist/esm/v3/components/or-sidebar-v3/styles.d.ts +1 -7
- package/dist/esm/v3/components/or-switch-v3/OrSwitch.vue.d.ts +18 -2
- package/dist/esm/v3/components/or-switch-v3/index.js +2 -1
- package/dist/esm/v3/components/or-tabs-v3/index.js +1 -1
- package/dist/esm/v3/components/or-textarea-v3/OrTextarea.vue.d.ts +45 -6
- package/dist/esm/v3/components/or-textarea-v3/index.js +3 -1
- package/dist/esm/v3/hooks/index.d.ts +3 -0
- package/dist/esm/v3/hooks/index.js +2 -0
- package/dist/esm/v3/hooks/useControlAttributes.d.ts +8 -0
- package/dist/esm/v3/hooks/useIdAttribute.d.ts +2 -0
- package/dist/esm/v3/hooks/useValidationAttributes.d.ts +12 -0
- package/dist/esm/v3/index.js +16 -14
- package/dist/esm/v3/useIdAttribute-859439f0.js +21 -0
- package/dist/esm/v3/useValidationAttributes-d1abbe34.js +16 -0
- package/package.json +1 -1
- package/src/components/or-checkbox-v3/OrCheckbox.vue +28 -10
- package/src/components/or-inline-input-v3/OrInlineInput.vue +32 -13
- package/src/components/or-inline-textarea-v3/OrInlineTextarea.vue +32 -13
- package/src/components/or-input-v3/OrInput.stories3.ts +4 -4
- package/src/components/or-input-v3/OrInput.vue +31 -19
- package/src/components/or-pagination-v3/OrPagination.vue +1 -1
- package/src/components/or-radio-v3/OrRadio.vue +27 -9
- package/src/components/or-sidebar-v3/OrSidebar.docs.mdx +0 -6
- package/src/components/or-sidebar-v3/OrSidebar.stories3.ts +6 -219
- package/src/components/or-sidebar-v3/OrSidebar.vue +22 -121
- package/src/components/or-sidebar-v3/styles.ts +9 -153
- package/src/components/or-switch-v3/OrSwitch.vue +27 -9
- package/src/components/or-tabs-v3/OrTabs.vue +1 -1
- package/src/components/or-textarea-v3/OrTextarea.stories3.ts +4 -4
- package/src/components/or-textarea-v3/OrTextarea.vue +36 -14
- package/src/hooks/index.ts +3 -0
- package/src/hooks/useControlAttributes.ts +19 -0
- package/src/hooks/useIdAttribute.ts +9 -0
- package/src/hooks/useValidationAttributes.ts +25 -0
- package/dist/bundled/v2/OrSidebar-2a7d62a8.js +0 -455
- package/dist/bundled/v2/components/or-sidebar-v3/OrSidebarCollapseButton.stories3.d.ts +0 -12
- package/dist/bundled/v2/components/or-sidebar-v3/OrSidebarCollapseButton.vue.d.ts +0 -59
- package/dist/bundled/v3/OrSidebar.vue_vue_type_script_lang-b4fa1550.js +0 -347
- package/dist/bundled/v3/components/or-sidebar-v3/OrSidebarCollapseButton.stories3.d.ts +0 -12
- package/dist/bundled/v3/components/or-sidebar-v3/OrSidebarCollapseButton.vue.d.ts +0 -59
- package/dist/esm/v2/OrSidebar-1e02702f.js +0 -452
- package/dist/esm/v2/components/or-sidebar-v3/OrSidebarCollapseButton.stories3.d.ts +0 -12
- package/dist/esm/v2/components/or-sidebar-v3/OrSidebarCollapseButton.vue.d.ts +0 -59
- package/dist/esm/v3/OrSidebar-749bbcba.js +0 -387
- package/dist/esm/v3/components/or-sidebar-v3/OrSidebarCollapseButton.stories3.d.ts +0 -12
- package/dist/esm/v3/components/or-sidebar-v3/OrSidebarCollapseButton.vue.d.ts +0 -59
- package/src/components/or-sidebar-v3/OrSidebarCollapseButton.stories3.ts +0 -48
- package/src/components/or-sidebar-v3/OrSidebarCollapseButton.vue +0 -64
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { defineComponent,
|
|
1
|
+
import { defineComponent, ref, computed, reactive } from 'vue-demi';
|
|
2
2
|
import { u as useClassAttribute } from './useClassAttribute-47fdb016.js';
|
|
3
|
+
import { a as useIdAttribute, u as useControlAttributes } from './useIdAttribute-859439f0.js';
|
|
3
4
|
import '@vueuse/core';
|
|
5
|
+
import { u as useValidationAttributes } from './useValidationAttributes-d1abbe34.js';
|
|
4
6
|
import { _ as __vue_component__$1 } from './OrError-d267ee9a.js';
|
|
5
7
|
import { _ as __vue_component__$2 } from './OrHint-42dc9ebb.js';
|
|
6
8
|
import { _ as __vue_component__$4 } from './OrIconButton-b3779042.js';
|
|
@@ -79,6 +81,10 @@ var script = defineComponent({
|
|
|
79
81
|
type: Boolean,
|
|
80
82
|
default: false
|
|
81
83
|
},
|
|
84
|
+
readonly: {
|
|
85
|
+
type: Boolean,
|
|
86
|
+
default: false
|
|
87
|
+
},
|
|
82
88
|
disabled: {
|
|
83
89
|
type: Boolean,
|
|
84
90
|
default: false
|
|
@@ -89,19 +95,21 @@ var script = defineComponent({
|
|
|
89
95
|
}
|
|
90
96
|
},
|
|
91
97
|
emits: ['update:modelValue', 'input', 'keydown', 'keyup', 'focus', 'blur'],
|
|
92
|
-
expose: ['root', 'focus'],
|
|
98
|
+
expose: ['root', 'focus', 'blur'],
|
|
93
99
|
setup(props, context) {
|
|
94
|
-
var _a;
|
|
95
|
-
const currentInstance = getCurrentInstance();
|
|
96
100
|
// Refs
|
|
97
101
|
const root = ref();
|
|
98
|
-
const
|
|
102
|
+
const control = ref();
|
|
99
103
|
// Styles
|
|
100
104
|
const classAttribute = useClassAttribute();
|
|
101
105
|
const rootStyles = computed(() => ['or-input', ...InputRoot, classAttribute.value]);
|
|
102
106
|
const controlStyles = computed(() => [...InputControl]);
|
|
103
107
|
// State
|
|
104
|
-
const
|
|
108
|
+
const controlAttributes = reactive({
|
|
109
|
+
id: useIdAttribute(),
|
|
110
|
+
...useControlAttributes(),
|
|
111
|
+
...useValidationAttributes()
|
|
112
|
+
});
|
|
105
113
|
const proxyModelValue = computed({
|
|
106
114
|
get: () => {
|
|
107
115
|
var _a;
|
|
@@ -113,32 +121,35 @@ var script = defineComponent({
|
|
|
113
121
|
context.emit('update:modelValue', value);
|
|
114
122
|
}
|
|
115
123
|
});
|
|
116
|
-
const invalid = computed(() => !!props.error);
|
|
117
|
-
const readonly = computed(() => context.attrs.readonly);
|
|
118
124
|
const currentLength = computed(() => {
|
|
119
125
|
var _a, _b;
|
|
120
126
|
return (_b = (_a = proxyModelValue.value) === null || _a === void 0 ? void 0 : _a.toString().length) !== null && _b !== void 0 ? _b : 0;
|
|
121
127
|
});
|
|
122
|
-
const maxLength = computed(() =>
|
|
128
|
+
const maxLength = computed(() => controlAttributes.maxlength);
|
|
129
|
+
const invalid = computed(() => !!props.error);
|
|
123
130
|
const disclosed = ref(false);
|
|
124
131
|
// Methods
|
|
125
132
|
function focus() {
|
|
126
133
|
var _a;
|
|
127
|
-
(_a =
|
|
134
|
+
(_a = control.value) === null || _a === void 0 ? void 0 : _a.focus();
|
|
135
|
+
}
|
|
136
|
+
function blur() {
|
|
137
|
+
var _a;
|
|
138
|
+
(_a = control.value) === null || _a === void 0 ? void 0 : _a.blur();
|
|
128
139
|
}
|
|
129
140
|
return {
|
|
130
141
|
root,
|
|
131
|
-
|
|
142
|
+
control,
|
|
132
143
|
rootStyles,
|
|
133
144
|
controlStyles,
|
|
134
|
-
|
|
145
|
+
controlAttributes,
|
|
135
146
|
proxyModelValue,
|
|
136
|
-
invalid,
|
|
137
|
-
readonly,
|
|
138
147
|
currentLength,
|
|
139
148
|
maxLength,
|
|
149
|
+
invalid,
|
|
140
150
|
disclosed,
|
|
141
|
-
focus
|
|
151
|
+
focus,
|
|
152
|
+
blur
|
|
142
153
|
};
|
|
143
154
|
}
|
|
144
155
|
});
|
|
@@ -151,12 +162,12 @@ var __vue_render__ = function () {
|
|
|
151
162
|
var _vm = this;
|
|
152
163
|
var _h = _vm.$createElement;
|
|
153
164
|
var _c = _vm._self._c || _h;
|
|
154
|
-
return _c('div', {
|
|
165
|
+
return _c('div', _vm._b({
|
|
155
166
|
ref: "root",
|
|
156
167
|
class: _vm.rootStyles
|
|
157
|
-
}, [_vm.label ? [_c('OrLabel', {
|
|
168
|
+
}, 'div', _vm.$attrs, false), [_vm.label ? [_c('OrLabel', {
|
|
158
169
|
attrs: {
|
|
159
|
-
"control-id": _vm.
|
|
170
|
+
"control-id": _vm.controlAttributes.id,
|
|
160
171
|
"variant": 'input',
|
|
161
172
|
"required": _vm.required,
|
|
162
173
|
"disabled": _vm.disabled
|
|
@@ -183,10 +194,9 @@ var __vue_render__ = function () {
|
|
|
183
194
|
value: _vm.proxyModelValue,
|
|
184
195
|
expression: "proxyModelValue"
|
|
185
196
|
}],
|
|
186
|
-
ref: "
|
|
197
|
+
ref: "control",
|
|
187
198
|
class: _vm.controlStyles,
|
|
188
199
|
attrs: {
|
|
189
|
-
"id": _vm.controlId,
|
|
190
200
|
"placeholder": _vm.placeholder,
|
|
191
201
|
"required": _vm.required,
|
|
192
202
|
"disabled": _vm.disabled,
|
|
@@ -225,17 +235,16 @@ var __vue_render__ = function () {
|
|
|
225
235
|
}
|
|
226
236
|
}
|
|
227
237
|
}
|
|
228
|
-
}, 'input', _vm
|
|
238
|
+
}, 'input', _vm.controlAttributes, false)) : (_vm.type === 'password' && _vm.disclosed ? 'text' : _vm.type) === 'radio' ? _c('input', _vm._b({
|
|
229
239
|
directives: [{
|
|
230
240
|
name: "model",
|
|
231
241
|
rawName: "v-model",
|
|
232
242
|
value: _vm.proxyModelValue,
|
|
233
243
|
expression: "proxyModelValue"
|
|
234
244
|
}],
|
|
235
|
-
ref: "
|
|
245
|
+
ref: "control",
|
|
236
246
|
class: _vm.controlStyles,
|
|
237
247
|
attrs: {
|
|
238
|
-
"id": _vm.controlId,
|
|
239
248
|
"placeholder": _vm.placeholder,
|
|
240
249
|
"required": _vm.required,
|
|
241
250
|
"disabled": _vm.disabled,
|
|
@@ -261,17 +270,16 @@ var __vue_render__ = function () {
|
|
|
261
270
|
_vm.proxyModelValue = null;
|
|
262
271
|
}
|
|
263
272
|
}
|
|
264
|
-
}, 'input', _vm
|
|
273
|
+
}, 'input', _vm.controlAttributes, false)) : _c('input', _vm._b({
|
|
265
274
|
directives: [{
|
|
266
275
|
name: "model",
|
|
267
276
|
rawName: "v-model",
|
|
268
277
|
value: _vm.proxyModelValue,
|
|
269
278
|
expression: "proxyModelValue"
|
|
270
279
|
}],
|
|
271
|
-
ref: "
|
|
280
|
+
ref: "control",
|
|
272
281
|
class: _vm.controlStyles,
|
|
273
282
|
attrs: {
|
|
274
|
-
"id": _vm.controlId,
|
|
275
283
|
"placeholder": _vm.placeholder,
|
|
276
284
|
"required": _vm.required,
|
|
277
285
|
"disabled": _vm.disabled,
|
|
@@ -300,7 +308,7 @@ var __vue_render__ = function () {
|
|
|
300
308
|
_vm.proxyModelValue = $event.target.value;
|
|
301
309
|
}
|
|
302
310
|
}
|
|
303
|
-
}, 'input', _vm
|
|
311
|
+
}, 'input', _vm.controlAttributes, false)), _vm._v(" "), _c('div', {
|
|
304
312
|
class: ['layout-row']
|
|
305
313
|
}, [_vm.type === 'password' ? [_c('OrIconButton', {
|
|
306
314
|
attrs: {
|
|
@@ -363,14 +371,14 @@ var __vue_staticRenderFns__ = [];
|
|
|
363
371
|
/* style */
|
|
364
372
|
const __vue_inject_styles__ = function (inject) {
|
|
365
373
|
if (!inject) return;
|
|
366
|
-
inject("data-v-
|
|
367
|
-
source: "input[data-v-
|
|
374
|
+
inject("data-v-8d63a848_0", {
|
|
375
|
+
source: "input[data-v-8d63a848]{min-width:0;background:0 0;outline:0}input[type=number][data-v-8d63a848]::-webkit-inner-spin-button{display:none}input[type=search][data-v-8d63a848]::-webkit-search-cancel-button{display:none}",
|
|
368
376
|
map: undefined,
|
|
369
377
|
media: undefined
|
|
370
378
|
});
|
|
371
379
|
};
|
|
372
380
|
/* scoped */
|
|
373
|
-
const __vue_scope_id__ = "data-v-
|
|
381
|
+
const __vue_scope_id__ = "data-v-8d63a848";
|
|
374
382
|
/* module identifier */
|
|
375
383
|
const __vue_module_identifier__ = undefined;
|
|
376
384
|
/* functional template */
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { defineComponent,
|
|
1
|
+
import { defineComponent, ref, computed, reactive } from 'vue-demi';
|
|
2
2
|
import { u as useClassAttribute } from './useClassAttribute-47fdb016.js';
|
|
3
|
+
import { a as useIdAttribute, u as useControlAttributes } from './useIdAttribute-859439f0.js';
|
|
3
4
|
import '@vueuse/core';
|
|
4
5
|
import { _ as __vue_component__$1, L as LabelVariant } from './OrLabel-2a9f1477.js';
|
|
5
6
|
import { n as normalizeComponent } from './normalize-component-6e8e3d80.js';
|
|
@@ -72,18 +73,20 @@ var script = defineComponent({
|
|
|
72
73
|
}
|
|
73
74
|
},
|
|
74
75
|
emits: ['update:modelValue', 'input', 'focus', 'blur'],
|
|
75
|
-
expose: ['root'],
|
|
76
|
+
expose: ['root', 'focus', 'blur'],
|
|
76
77
|
setup(props, context) {
|
|
77
|
-
var _a;
|
|
78
|
-
const currentInstance = getCurrentInstance();
|
|
79
78
|
// Refs
|
|
80
79
|
const root = ref();
|
|
80
|
+
const control = ref();
|
|
81
81
|
// Styles
|
|
82
82
|
const classAttribute = useClassAttribute();
|
|
83
83
|
const rootStyles = computed(() => ['or-radio', ...RadioRoot, classAttribute.value]);
|
|
84
84
|
const controlStyles = computed(() => [...RadioControl, ...RadioControlHandle]);
|
|
85
85
|
// State
|
|
86
|
-
const
|
|
86
|
+
const controlAttributes = reactive({
|
|
87
|
+
id: useIdAttribute(),
|
|
88
|
+
...useControlAttributes()
|
|
89
|
+
});
|
|
87
90
|
const proxyModelValue = computed({
|
|
88
91
|
get: () => {
|
|
89
92
|
var _a;
|
|
@@ -95,12 +98,24 @@ var script = defineComponent({
|
|
|
95
98
|
context.emit('update:modelValue', value);
|
|
96
99
|
}
|
|
97
100
|
});
|
|
101
|
+
// Methods
|
|
102
|
+
function focus() {
|
|
103
|
+
var _a;
|
|
104
|
+
(_a = control.value) === null || _a === void 0 ? void 0 : _a.focus();
|
|
105
|
+
}
|
|
106
|
+
function blur() {
|
|
107
|
+
var _a;
|
|
108
|
+
(_a = control.value) === null || _a === void 0 ? void 0 : _a.blur();
|
|
109
|
+
}
|
|
98
110
|
return {
|
|
99
111
|
root,
|
|
112
|
+
control,
|
|
100
113
|
rootStyles,
|
|
101
114
|
controlStyles,
|
|
102
|
-
|
|
103
|
-
proxyModelValue
|
|
115
|
+
controlAttributes,
|
|
116
|
+
proxyModelValue,
|
|
117
|
+
focus,
|
|
118
|
+
blur
|
|
104
119
|
};
|
|
105
120
|
}
|
|
106
121
|
});
|
|
@@ -113,19 +128,19 @@ var __vue_render__ = function () {
|
|
|
113
128
|
var _vm = this;
|
|
114
129
|
var _h = _vm.$createElement;
|
|
115
130
|
var _c = _vm._self._c || _h;
|
|
116
|
-
return _c('div', {
|
|
131
|
+
return _c('div', _vm._b({
|
|
117
132
|
ref: "root",
|
|
118
133
|
class: _vm.rootStyles
|
|
119
|
-
}, [_c('input', _vm._b({
|
|
134
|
+
}, 'div', _vm.$attrs, false), [_c('input', _vm._b({
|
|
120
135
|
directives: [{
|
|
121
136
|
name: "model",
|
|
122
137
|
rawName: "v-model",
|
|
123
138
|
value: _vm.proxyModelValue,
|
|
124
139
|
expression: "proxyModelValue"
|
|
125
140
|
}],
|
|
141
|
+
ref: "control",
|
|
126
142
|
class: _vm.controlStyles,
|
|
127
143
|
attrs: {
|
|
128
|
-
"id": _vm.controlId,
|
|
129
144
|
"type": "radio",
|
|
130
145
|
"required": _vm.required,
|
|
131
146
|
"disabled": _vm.disabled
|
|
@@ -145,9 +160,9 @@ var __vue_render__ = function () {
|
|
|
145
160
|
_vm.proxyModelValue = _vm.inputValue;
|
|
146
161
|
}
|
|
147
162
|
}
|
|
148
|
-
}, 'input', _vm
|
|
163
|
+
}, 'input', _vm.controlAttributes, false)), _vm._v(" "), _vm.$slots.default || _vm.label ? [_c('OrLabel', {
|
|
149
164
|
attrs: {
|
|
150
|
-
"control-id": _vm.
|
|
165
|
+
"control-id": _vm.controlAttributes.id,
|
|
151
166
|
"variant": _vm.labelVariant,
|
|
152
167
|
"required": _vm.required,
|
|
153
168
|
"disabled": _vm.disabled
|
|
@@ -168,14 +183,14 @@ var __vue_staticRenderFns__ = [];
|
|
|
168
183
|
/* style */
|
|
169
184
|
const __vue_inject_styles__ = function (inject) {
|
|
170
185
|
if (!inject) return;
|
|
171
|
-
inject("data-v-
|
|
172
|
-
source: "input[data-v-
|
|
186
|
+
inject("data-v-5a34efe0_0", {
|
|
187
|
+
source: "input[data-v-5a34efe0]{appearance:none;line-height:0}",
|
|
173
188
|
map: undefined,
|
|
174
189
|
media: undefined
|
|
175
190
|
});
|
|
176
191
|
};
|
|
177
192
|
/* scoped */
|
|
178
|
-
const __vue_scope_id__ = "data-v-
|
|
193
|
+
const __vue_scope_id__ = "data-v-5a34efe0";
|
|
179
194
|
/* module identifier */
|
|
180
195
|
const __vue_module_identifier__ = undefined;
|
|
181
196
|
/* functional template */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, ref, computed, watch } from 'vue-demi';
|
|
2
2
|
import { debouncedWatch } from '@vueuse/core';
|
|
3
3
|
import { u as useClassAttribute } from './useClassAttribute-47fdb016.js';
|
|
4
|
-
import { _ as __vue_component__$1 } from './OrInput-
|
|
4
|
+
import { _ as __vue_component__$1 } from './OrInput-e10cc643.js';
|
|
5
5
|
import { a as InputBoxSize } from './OrInputBox-4d5a318d.js';
|
|
6
6
|
import { n as normalizeComponent } from './normalize-component-6e8e3d80.js';
|
|
7
7
|
|
|
@@ -3,13 +3,13 @@ import { D as DropdownClose, a as DropdownOpen } from './dropdown-open-0d314aa4.
|
|
|
3
3
|
import { u as useClassAttribute } from './useClassAttribute-47fdb016.js';
|
|
4
4
|
import { u as useOverflow } from './useOverflow-af6161c8.js';
|
|
5
5
|
import '@vueuse/core';
|
|
6
|
-
import { _ as __vue_component__$1 } from './OrCheckbox-
|
|
6
|
+
import { _ as __vue_component__$1 } from './OrCheckbox-7317fe1a.js';
|
|
7
7
|
import { _ as __vue_component__$2 } from './OrError-d267ee9a.js';
|
|
8
8
|
import { _ as __vue_component__$3 } from './OrExpansionPanel-a123024e.js';
|
|
9
9
|
import { _ as __vue_component__$4 } from './OrHint-42dc9ebb.js';
|
|
10
10
|
import { _ as __vue_component__$5 } from './OrIcon-5e394c62.js';
|
|
11
11
|
import { _ as __vue_component__$7, a as InputBoxSize } from './OrInputBox-4d5a318d.js';
|
|
12
|
-
import { _ as __vue_component__$6 } from './OrInput-
|
|
12
|
+
import { _ as __vue_component__$6 } from './OrInput-e10cc643.js';
|
|
13
13
|
import { _ as __vue_component__$8 } from './OrLabel-2a9f1477.js';
|
|
14
14
|
import { _ as __vue_component__$9 } from './OrMenuItem-c7f28480.js';
|
|
15
15
|
import { _ as __vue_component__$a } from './OrPopover-9bafbdb4.js';
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
import { useDraggable, useElementBounding } from '@vueuse/core';
|
|
2
|
+
import _ from 'lodash';
|
|
3
|
+
import { defineComponent, ref, computed, watch } from 'vue-demi';
|
|
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-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
|
+
var script = defineComponent({
|
|
78
|
+
name: 'OrSidebar',
|
|
79
|
+
props: {
|
|
80
|
+
width: {
|
|
81
|
+
type: Number,
|
|
82
|
+
required: false,
|
|
83
|
+
default: 0,
|
|
84
|
+
validator: value => _.isNumber(value) && value >= 0
|
|
85
|
+
},
|
|
86
|
+
minimumWidth: {
|
|
87
|
+
type: Number,
|
|
88
|
+
required: false,
|
|
89
|
+
default: 350,
|
|
90
|
+
validator: value => _.isNumber(value) && value >= 0
|
|
91
|
+
},
|
|
92
|
+
/**
|
|
93
|
+
* User may put the component on the right or the left side of a container.
|
|
94
|
+
* This property mirrors the resizing behavior (drag direction) and styling (horizontal border) of the sidebar.
|
|
95
|
+
*
|
|
96
|
+
* Note: the property doesn't reposition the component in the parent container.
|
|
97
|
+
* @values left, right
|
|
98
|
+
*/
|
|
99
|
+
side: {
|
|
100
|
+
type: String,
|
|
101
|
+
default: OrSidebarPlacement.right,
|
|
102
|
+
validator: value => _.includes(_.values(OrSidebarPlacement), value)
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
emits: ['change:width'],
|
|
106
|
+
setup(props, {
|
|
107
|
+
emit
|
|
108
|
+
}) {
|
|
109
|
+
// Refs
|
|
110
|
+
const root = ref();
|
|
111
|
+
const resizeBar = ref(null);
|
|
112
|
+
const parentContainer = computed(() => {
|
|
113
|
+
var _a;
|
|
114
|
+
return (_a = root.value) === null || _a === void 0 ? void 0 : _a.parentElement;
|
|
115
|
+
});
|
|
116
|
+
// State
|
|
117
|
+
const startPositionX = ref(0);
|
|
118
|
+
const isResizing = ref(false);
|
|
119
|
+
const localWidth = ref(props.width >= props.minimumWidth ? props.width : props.minimumWidth);
|
|
120
|
+
// Styles
|
|
121
|
+
const sidebarStyle = computed(() => ({
|
|
122
|
+
width: localWidth.value + 'px'
|
|
123
|
+
}));
|
|
124
|
+
const rootStyles = computed(() => ['or-sidebar', ...SidebarRoot, ...SidebarRootSides[props.side]]);
|
|
125
|
+
const resizeStyles = computed(() => [...SidebarResize, ...SidebarResizeSides[props.side], ...(isResizing.value ? SidebarResizingSides[props.side] : [])]);
|
|
126
|
+
const mainStyles = computed(() => [...SidebarMain]);
|
|
127
|
+
const headerStyles = computed(() => [...SidebarHeader]);
|
|
128
|
+
const contentStyles = computed(() => [...SidebarContent]);
|
|
129
|
+
const footerStyles = computed(() => [...SidebarFooter]);
|
|
130
|
+
// Effects
|
|
131
|
+
useDraggable(resizeBar, {
|
|
132
|
+
preventDefault: true,
|
|
133
|
+
onStart: (position, event) => {
|
|
134
|
+
document.body.style.cursor = 'ew-resize';
|
|
135
|
+
document.body.style.userSelect = 'none';
|
|
136
|
+
startPositionX.value = event.x;
|
|
137
|
+
isResizing.value = true;
|
|
138
|
+
},
|
|
139
|
+
onMove: position => {
|
|
140
|
+
const delta = (position.x - startPositionX.value) * (props.side === OrSidebarPlacement.left ? -1 : 1);
|
|
141
|
+
const newWidth = localWidth.value - delta;
|
|
142
|
+
localWidth.value = newWidth > maximumWidth.value ? maximumWidth.value : newWidth < props.minimumWidth ? props.minimumWidth : newWidth;
|
|
143
|
+
startPositionX.value = position.x;
|
|
144
|
+
},
|
|
145
|
+
onEnd: () => {
|
|
146
|
+
document.body.style.cursor = '';
|
|
147
|
+
document.body.style.userSelect = '';
|
|
148
|
+
isResizing.value = false;
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
const {
|
|
152
|
+
width: maximumWidth
|
|
153
|
+
} = useElementBounding(parentContainer);
|
|
154
|
+
watch(() => props.width, newValue => {
|
|
155
|
+
if (newValue !== localWidth.value) {
|
|
156
|
+
localWidth.value = newValue > maximumWidth.value ? maximumWidth.value : newValue < props.minimumWidth ? props.minimumWidth : newValue;
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
watch(() => props.minimumWidth, newMinimum => {
|
|
160
|
+
if (newMinimum > localWidth.value) localWidth.value = newMinimum;
|
|
161
|
+
});
|
|
162
|
+
watch(maximumWidth, newMaximum => {
|
|
163
|
+
if (newMaximum < localWidth.value) localWidth.value = newMaximum;
|
|
164
|
+
});
|
|
165
|
+
watch(localWidth, val => emit('change:width', val));
|
|
166
|
+
return {
|
|
167
|
+
root,
|
|
168
|
+
resizeBar,
|
|
169
|
+
isResizing,
|
|
170
|
+
localWidth,
|
|
171
|
+
sidebarStyle,
|
|
172
|
+
rootStyles,
|
|
173
|
+
resizeStyles,
|
|
174
|
+
mainStyles,
|
|
175
|
+
headerStyles,
|
|
176
|
+
contentStyles,
|
|
177
|
+
footerStyles
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
|
|
182
|
+
/* script */
|
|
183
|
+
const __vue_script__ = script;
|
|
184
|
+
|
|
185
|
+
/* template */
|
|
186
|
+
var __vue_render__ = function () {
|
|
187
|
+
var _vm = this;
|
|
188
|
+
var _h = _vm.$createElement;
|
|
189
|
+
var _c = _vm._self._c || _h;
|
|
190
|
+
return _c('aside', {
|
|
191
|
+
ref: "root",
|
|
192
|
+
class: _vm.rootStyles,
|
|
193
|
+
style: _vm.sidebarStyle
|
|
194
|
+
}, [_c('div', {
|
|
195
|
+
ref: "resizeBar",
|
|
196
|
+
class: _vm.resizeStyles
|
|
197
|
+
}), _vm._v(" "), _c('div', {
|
|
198
|
+
class: _vm.mainStyles
|
|
199
|
+
}, [_vm.$slots.header ? _c('div', {
|
|
200
|
+
class: _vm.headerStyles
|
|
201
|
+
}, [_vm._t("header")], 2) : _vm._e(), _vm._v(" "), _c('div', {
|
|
202
|
+
class: _vm.contentStyles
|
|
203
|
+
}, [_vm._t("default")], 2)]), _vm._v(" "), _vm.$slots.footer ? _c('div', {
|
|
204
|
+
class: _vm.footerStyles
|
|
205
|
+
}, [_vm._t("footer")], 2) : _vm._e()]);
|
|
206
|
+
};
|
|
207
|
+
var __vue_staticRenderFns__ = [];
|
|
208
|
+
|
|
209
|
+
/* style */
|
|
210
|
+
const __vue_inject_styles__ = undefined;
|
|
211
|
+
/* scoped */
|
|
212
|
+
const __vue_scope_id__ = undefined;
|
|
213
|
+
/* module identifier */
|
|
214
|
+
const __vue_module_identifier__ = undefined;
|
|
215
|
+
/* functional template */
|
|
216
|
+
const __vue_is_functional_template__ = false;
|
|
217
|
+
/* style inject */
|
|
218
|
+
|
|
219
|
+
/* style inject SSR */
|
|
220
|
+
|
|
221
|
+
/* style inject shadow dom */
|
|
222
|
+
|
|
223
|
+
const __vue_component__ = /*#__PURE__*/normalizeComponent({
|
|
224
|
+
render: __vue_render__,
|
|
225
|
+
staticRenderFns: __vue_staticRenderFns__
|
|
226
|
+
}, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined);
|
|
227
|
+
|
|
228
|
+
export { OrSidebarPlacement as O, __vue_component__ as _ };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { defineComponent,
|
|
1
|
+
import { defineComponent, ref, computed, reactive } from 'vue-demi';
|
|
2
2
|
import { u as useClassAttribute } from './useClassAttribute-47fdb016.js';
|
|
3
|
+
import { a as useIdAttribute, u as useControlAttributes } from './useIdAttribute-859439f0.js';
|
|
3
4
|
import '@vueuse/core';
|
|
4
5
|
import { _ as __vue_component__$1, L as LabelVariant } from './OrLabel-2a9f1477.js';
|
|
5
6
|
import { _ as __vue_component__$2 } from './OrLoader-f857d55b.js';
|
|
@@ -98,19 +99,21 @@ var script = defineComponent({
|
|
|
98
99
|
}
|
|
99
100
|
},
|
|
100
101
|
emits: ['update:modelValue', 'input', 'focus', 'blur'],
|
|
101
|
-
expose: ['root'],
|
|
102
|
+
expose: ['root', 'focus', 'blur'],
|
|
102
103
|
setup(props, context) {
|
|
103
|
-
var _a;
|
|
104
|
-
const currentInstance = getCurrentInstance();
|
|
105
104
|
// Refs
|
|
106
105
|
const root = ref();
|
|
106
|
+
const control = ref();
|
|
107
107
|
// Styles
|
|
108
108
|
const classAttribute = useClassAttribute();
|
|
109
109
|
const rootStyles = computed(() => ['or-switch', ...SwitchRoot, classAttribute.value]);
|
|
110
110
|
const controlStyles = computed(() => [...SwitchControl, ...SwitchControlHandle]);
|
|
111
111
|
const loaderStyles = computed(() => [...SwitchLoader, ...SwitchLoaderHandle]);
|
|
112
112
|
// State
|
|
113
|
-
const
|
|
113
|
+
const controlAttributes = reactive({
|
|
114
|
+
id: useIdAttribute(),
|
|
115
|
+
...useControlAttributes()
|
|
116
|
+
});
|
|
114
117
|
const proxyModelValue = computed({
|
|
115
118
|
get: () => {
|
|
116
119
|
var _a;
|
|
@@ -122,13 +125,25 @@ var script = defineComponent({
|
|
|
122
125
|
context.emit('update:modelValue', value);
|
|
123
126
|
}
|
|
124
127
|
});
|
|
128
|
+
// Methods
|
|
129
|
+
function focus() {
|
|
130
|
+
var _a;
|
|
131
|
+
(_a = control.value) === null || _a === void 0 ? void 0 : _a.focus();
|
|
132
|
+
}
|
|
133
|
+
function blur() {
|
|
134
|
+
var _a;
|
|
135
|
+
(_a = control.value) === null || _a === void 0 ? void 0 : _a.blur();
|
|
136
|
+
}
|
|
125
137
|
return {
|
|
126
138
|
root,
|
|
139
|
+
control,
|
|
127
140
|
rootStyles,
|
|
128
141
|
controlStyles,
|
|
129
142
|
loaderStyles,
|
|
130
|
-
|
|
131
|
-
proxyModelValue
|
|
143
|
+
controlAttributes,
|
|
144
|
+
proxyModelValue,
|
|
145
|
+
focus,
|
|
146
|
+
blur
|
|
132
147
|
};
|
|
133
148
|
}
|
|
134
149
|
});
|
|
@@ -141,19 +156,19 @@ var __vue_render__ = function () {
|
|
|
141
156
|
var _vm = this;
|
|
142
157
|
var _h = _vm.$createElement;
|
|
143
158
|
var _c = _vm._self._c || _h;
|
|
144
|
-
return _c('div', {
|
|
159
|
+
return _c('div', _vm._b({
|
|
145
160
|
ref: "root",
|
|
146
161
|
class: _vm.rootStyles
|
|
147
|
-
}, [!_vm.loading ? [_c('input', _vm._b({
|
|
162
|
+
}, 'div', _vm.$attrs, false), [!_vm.loading ? [_c('input', _vm._b({
|
|
148
163
|
directives: [{
|
|
149
164
|
name: "model",
|
|
150
165
|
rawName: "v-model",
|
|
151
166
|
value: _vm.proxyModelValue,
|
|
152
167
|
expression: "proxyModelValue"
|
|
153
168
|
}],
|
|
169
|
+
ref: "control",
|
|
154
170
|
class: _vm.controlStyles,
|
|
155
171
|
attrs: {
|
|
156
|
-
"id": _vm.controlId,
|
|
157
172
|
"type": "checkbox",
|
|
158
173
|
"required": _vm.required,
|
|
159
174
|
"disabled": _vm.disabled
|
|
@@ -186,7 +201,7 @@ var __vue_render__ = function () {
|
|
|
186
201
|
}
|
|
187
202
|
}
|
|
188
203
|
}
|
|
189
|
-
}, 'input', _vm
|
|
204
|
+
}, 'input', _vm.controlAttributes, false))] : [_c('div', {
|
|
190
205
|
class: _vm.loaderStyles,
|
|
191
206
|
attrs: {
|
|
192
207
|
"disabled": _vm.disabled ? '' : null
|
|
@@ -199,7 +214,7 @@ var __vue_render__ = function () {
|
|
|
199
214
|
}
|
|
200
215
|
})], 1)], _vm._v(" "), _vm.$slots.default || _vm.label ? [_c('OrLabel', {
|
|
201
216
|
attrs: {
|
|
202
|
-
"control-id": _vm.
|
|
217
|
+
"control-id": _vm.controlAttributes.id,
|
|
203
218
|
"variant": _vm.labelVariant,
|
|
204
219
|
"required": _vm.required,
|
|
205
220
|
"disabled": _vm.disabled
|
|
@@ -220,14 +235,14 @@ var __vue_staticRenderFns__ = [];
|
|
|
220
235
|
/* style */
|
|
221
236
|
const __vue_inject_styles__ = function (inject) {
|
|
222
237
|
if (!inject) return;
|
|
223
|
-
inject("data-v-
|
|
224
|
-
source: "input[data-v-
|
|
238
|
+
inject("data-v-203b3e04_0", {
|
|
239
|
+
source: "input[data-v-203b3e04]{appearance:none;line-height:0}",
|
|
225
240
|
map: undefined,
|
|
226
241
|
media: undefined
|
|
227
242
|
});
|
|
228
243
|
};
|
|
229
244
|
/* scoped */
|
|
230
|
-
const __vue_scope_id__ = "data-v-
|
|
245
|
+
const __vue_scope_id__ = "data-v-203b3e04";
|
|
231
246
|
/* module identifier */
|
|
232
247
|
const __vue_module_identifier__ = undefined;
|
|
233
248
|
/* functional template */
|