@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,13 +1,15 @@
|
|
|
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 { s as script$1 } from './OrError-ec8c709d.js';
|
|
5
7
|
import { s as script$2 } from './OrHint-74bb732d.js';
|
|
6
8
|
import { s as script$4 } from './OrIconButton-1a89fbf9.js';
|
|
7
9
|
import { s as script$3 } from './OrIcon-b195169c.js';
|
|
8
10
|
import { s as script$5, a as InputBoxSize } from './OrInputBox-6d1b6059.js';
|
|
9
11
|
import { s as script$6 } from './OrLabel-bdaec602.js';
|
|
10
|
-
import { resolveComponent, openBlock, createElementBlock,
|
|
12
|
+
import { resolveComponent, openBlock, createElementBlock, mergeProps, createBlock, withCtx, renderSlot, createTextVNode, toDisplayString, createCommentVNode, createVNode, withDirectives, createElementVNode, vModelDynamic, withModifiers, Fragment, createSlots, normalizeClass } from 'vue';
|
|
11
13
|
import { s as styleInject } from './style-inject.es-4c6f2515.js';
|
|
12
14
|
|
|
13
15
|
var InputType;
|
|
@@ -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,37 +121,40 @@ 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
|
});
|
|
145
156
|
|
|
146
|
-
const _hoisted_1 = ["
|
|
157
|
+
const _hoisted_1 = ["type", "placeholder", "required", "disabled"];
|
|
147
158
|
const _hoisted_2 = {
|
|
148
159
|
class: /*#__PURE__*/normalizeClass(['layout-row'])
|
|
149
160
|
};
|
|
@@ -154,12 +165,13 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
154
165
|
const _component_OrInputBox = resolveComponent("OrInputBox");
|
|
155
166
|
const _component_OrHint = resolveComponent("OrHint");
|
|
156
167
|
const _component_OrError = resolveComponent("OrError");
|
|
157
|
-
return openBlock(), createElementBlock("div", {
|
|
158
|
-
ref: "root"
|
|
159
|
-
|
|
160
|
-
|
|
168
|
+
return openBlock(), createElementBlock("div", mergeProps({
|
|
169
|
+
ref: "root"
|
|
170
|
+
}, _ctx.$attrs, {
|
|
171
|
+
class: _ctx.rootStyles
|
|
172
|
+
}), [_ctx.label ? (openBlock(), createBlock(_component_OrLabel, {
|
|
161
173
|
key: 0,
|
|
162
|
-
"control-id": _ctx.
|
|
174
|
+
"control-id": _ctx.controlAttributes.id,
|
|
163
175
|
variant: 'input',
|
|
164
176
|
required: _ctx.required,
|
|
165
177
|
disabled: _ctx.disabled
|
|
@@ -176,10 +188,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
176
188
|
disabled: _ctx.disabled
|
|
177
189
|
}, {
|
|
178
190
|
default: withCtx(() => [withDirectives(createElementVNode("input", mergeProps({
|
|
179
|
-
|
|
180
|
-
ref: "input",
|
|
191
|
+
ref: "control",
|
|
181
192
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => _ctx.proxyModelValue = $event)
|
|
182
|
-
}, _ctx
|
|
193
|
+
}, _ctx.controlAttributes, {
|
|
183
194
|
class: _ctx.controlStyles,
|
|
184
195
|
type: _ctx.type === 'password' && _ctx.disclosed ? 'text' : _ctx.type,
|
|
185
196
|
placeholder: _ctx.placeholder,
|
|
@@ -238,7 +249,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
238
249
|
fn: withCtx(() => [createTextVNode(toDisplayString(_ctx.currentLength) + " / " + toDisplayString(_ctx.maxLength), 1 /* TEXT */)]),
|
|
239
250
|
|
|
240
251
|
key: "0"
|
|
241
|
-
} : undefined]), 1032 /* PROPS, DYNAMIC_SLOTS */, ["disabled"]))],
|
|
252
|
+
} : undefined]), 1032 /* PROPS, DYNAMIC_SLOTS */, ["disabled"]))], 16 /* FULL_PROPS */);
|
|
242
253
|
}
|
|
243
254
|
|
|
244
255
|
var css_248z = "\ninput[data-v-78975fa2] {\n min-width: 0;\n background: none;\n outline: none;\n}\ninput[type=\"number\"][data-v-78975fa2]::-webkit-inner-spin-button {\n display: none;\n}\ninput[type=\"search\"][data-v-78975fa2]::-webkit-search-cancel-button {\n display: none;\n}\n";
|
|
@@ -1,8 +1,9 @@
|
|
|
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 { s as script$1, L as LabelVariant } from './OrLabel-bdaec602.js';
|
|
5
|
-
import { resolveComponent, openBlock, createElementBlock,
|
|
6
|
+
import { resolveComponent, openBlock, createElementBlock, mergeProps, withDirectives, createElementVNode, vModelRadio, createBlock, withCtx, renderSlot, createTextVNode, toDisplayString, createCommentVNode } from 'vue';
|
|
6
7
|
import { s as styleInject } from './style-inject.es-4c6f2515.js';
|
|
7
8
|
|
|
8
9
|
const RadioRoot = [
|
|
@@ -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,25 +98,39 @@ 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
|
});
|
|
107
122
|
|
|
108
|
-
const _hoisted_1 = ["
|
|
123
|
+
const _hoisted_1 = ["value", "required", "disabled"];
|
|
109
124
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
110
125
|
const _component_OrLabel = resolveComponent("OrLabel");
|
|
111
|
-
return openBlock(), createElementBlock("div", {
|
|
112
|
-
ref: "root"
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
126
|
+
return openBlock(), createElementBlock("div", mergeProps({
|
|
127
|
+
ref: "root"
|
|
128
|
+
}, _ctx.$attrs, {
|
|
129
|
+
class: _ctx.rootStyles
|
|
130
|
+
}), [withDirectives(createElementVNode("input", mergeProps({
|
|
131
|
+
ref: "control",
|
|
132
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => _ctx.proxyModelValue = $event)
|
|
133
|
+
}, _ctx.controlAttributes, {
|
|
117
134
|
class: _ctx.controlStyles,
|
|
118
135
|
type: "radio",
|
|
119
136
|
value: _ctx.inputValue,
|
|
@@ -123,7 +140,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
123
140
|
onBlur: _cache[2] || (_cache[2] = $event => _ctx.$emit('blur', $event))
|
|
124
141
|
}), null, 16 /* FULL_PROPS */, _hoisted_1), [[vModelRadio, _ctx.proxyModelValue]]), _ctx.$slots.default || _ctx.label ? (openBlock(), createBlock(_component_OrLabel, {
|
|
125
142
|
key: 0,
|
|
126
|
-
"control-id": _ctx.
|
|
143
|
+
"control-id": _ctx.controlAttributes.id,
|
|
127
144
|
variant: _ctx.labelVariant,
|
|
128
145
|
required: _ctx.required,
|
|
129
146
|
disabled: _ctx.disabled
|
|
@@ -132,7 +149,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
132
149
|
default: withCtx(() => [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(_ctx.label), 1 /* TEXT */)])]),
|
|
133
150
|
|
|
134
151
|
_: 3 /* FORWARDED */
|
|
135
|
-
}, 8 /* PROPS */, ["control-id", "variant", "required", "disabled"])) : createCommentVNode("v-if", true)],
|
|
152
|
+
}, 8 /* PROPS */, ["control-id", "variant", "required", "disabled"])) : createCommentVNode("v-if", true)], 16 /* FULL_PROPS */);
|
|
136
153
|
}
|
|
137
154
|
|
|
138
155
|
var css_248z = "\ninput[data-v-2567d702] {\n appearance: none;\n line-height: 0;\n}\n";
|
|
@@ -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 { s as script$1 } from './OrInput-
|
|
4
|
+
import { s as script$1 } from './OrInput-e07ec00c.js';
|
|
5
5
|
import { a as InputBoxSize } from './OrInputBox-6d1b6059.js';
|
|
6
6
|
import { resolveComponent, openBlock, createBlock, mergeProps } from 'vue';
|
|
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 { s as script$1 } from './OrCheckbox-
|
|
6
|
+
import { s as script$1 } from './OrCheckbox-7144da06.js';
|
|
7
7
|
import { s as script$2 } from './OrError-ec8c709d.js';
|
|
8
8
|
import { s as script$3 } from './OrExpansionPanel-f8d7ff8d.js';
|
|
9
9
|
import { s as script$4 } from './OrHint-74bb732d.js';
|
|
10
10
|
import { s as script$5 } from './OrIcon-b195169c.js';
|
|
11
11
|
import { s as script$7, a as InputBoxSize } from './OrInputBox-6d1b6059.js';
|
|
12
|
-
import { s as script$6 } from './OrInput-
|
|
12
|
+
import { s as script$6 } from './OrInput-e07ec00c.js';
|
|
13
13
|
import { s as script$8 } from './OrLabel-bdaec602.js';
|
|
14
14
|
import { s as script$9 } from './OrMenuItem-9da279f6.js';
|
|
15
15
|
import { s as script$a } from './OrPopover-1075dd38.js';
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import { useDraggable, useElementBounding } from '@vueuse/core';
|
|
2
|
+
import _ from 'lodash';
|
|
3
|
+
import { defineComponent, ref, computed, watch } from 'vue-demi';
|
|
4
|
+
import { openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, renderSlot, createCommentVNode } from 'vue';
|
|
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
|
+
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
183
|
+
return openBlock(), createElementBlock("aside", {
|
|
184
|
+
ref: "root",
|
|
185
|
+
class: normalizeClass(_ctx.rootStyles),
|
|
186
|
+
style: normalizeStyle(_ctx.sidebarStyle)
|
|
187
|
+
}, [createElementVNode("div", {
|
|
188
|
+
ref: "resizeBar",
|
|
189
|
+
class: normalizeClass(_ctx.resizeStyles)
|
|
190
|
+
}, null, 2 /* CLASS */), createElementVNode("div", {
|
|
191
|
+
class: normalizeClass(_ctx.mainStyles)
|
|
192
|
+
}, [_ctx.$slots.header ? (openBlock(), createElementBlock("div", {
|
|
193
|
+
key: 0,
|
|
194
|
+
class: normalizeClass(_ctx.headerStyles)
|
|
195
|
+
}, [renderSlot(_ctx.$slots, "header")], 2 /* CLASS */)) : createCommentVNode("v-if", true), createElementVNode("div", {
|
|
196
|
+
class: normalizeClass(_ctx.contentStyles)
|
|
197
|
+
}, [renderSlot(_ctx.$slots, "default")], 2 /* CLASS */)], 2 /* CLASS */), _ctx.$slots.footer ? (openBlock(), createElementBlock("div", {
|
|
198
|
+
key: 0,
|
|
199
|
+
class: normalizeClass(_ctx.footerStyles)
|
|
200
|
+
}, [renderSlot(_ctx.$slots, "footer")], 2 /* CLASS */)) : createCommentVNode("v-if", true)], 6 /* CLASS, STYLE */);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
script.render = render;
|
|
204
|
+
script.__file = "src/components/or-sidebar-v3/OrSidebar.vue";
|
|
205
|
+
|
|
206
|
+
export { OrSidebarPlacement as O, script as s };
|
|
@@ -1,9 +1,10 @@
|
|
|
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 { s as script$1, L as LabelVariant } from './OrLabel-bdaec602.js';
|
|
5
6
|
import { s as script$2 } from './OrLoader-b3cf4231.js';
|
|
6
|
-
import { resolveComponent, openBlock, createElementBlock,
|
|
7
|
+
import { resolveComponent, openBlock, createElementBlock, mergeProps, withDirectives, vModelCheckbox, normalizeClass, createVNode, createBlock, withCtx, renderSlot, createTextVNode, toDisplayString, createCommentVNode } from 'vue';
|
|
7
8
|
import { s as styleInject } from './style-inject.es-4c6f2515.js';
|
|
8
9
|
|
|
9
10
|
const SwitchRoot = [
|
|
@@ -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,30 +125,43 @@ 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
|
});
|
|
135
150
|
|
|
136
|
-
const _hoisted_1 = ["
|
|
151
|
+
const _hoisted_1 = ["value", "required", "disabled"];
|
|
137
152
|
const _hoisted_2 = ["disabled"];
|
|
138
153
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
139
154
|
const _component_OrLoader = resolveComponent("OrLoader");
|
|
140
155
|
const _component_OrLabel = resolveComponent("OrLabel");
|
|
141
|
-
return openBlock(), createElementBlock("div", {
|
|
142
|
-
ref: "root"
|
|
143
|
-
class: normalizeClass(_ctx.rootStyles)
|
|
144
|
-
}, [!_ctx.loading ? withDirectives((openBlock(), createElementBlock("input", mergeProps({
|
|
145
|
-
key: 0
|
|
156
|
+
return openBlock(), createElementBlock("div", mergeProps({
|
|
157
|
+
ref: "root"
|
|
146
158
|
}, _ctx.$attrs, {
|
|
147
|
-
|
|
148
|
-
|
|
159
|
+
class: _ctx.rootStyles
|
|
160
|
+
}), [!_ctx.loading ? withDirectives((openBlock(), createElementBlock("input", mergeProps({
|
|
161
|
+
key: 0,
|
|
162
|
+
ref: "control",
|
|
163
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => _ctx.proxyModelValue = $event)
|
|
164
|
+
}, _ctx.controlAttributes, {
|
|
149
165
|
class: _ctx.controlStyles,
|
|
150
166
|
type: "checkbox",
|
|
151
167
|
value: _ctx.inputValue,
|
|
@@ -163,7 +179,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
163
179
|
size: 'm'
|
|
164
180
|
})], 10 /* CLASS, PROPS */, _hoisted_2)), _ctx.$slots.default || _ctx.label ? (openBlock(), createBlock(_component_OrLabel, {
|
|
165
181
|
key: 2,
|
|
166
|
-
"control-id": _ctx.
|
|
182
|
+
"control-id": _ctx.controlAttributes.id,
|
|
167
183
|
variant: _ctx.labelVariant,
|
|
168
184
|
required: _ctx.required,
|
|
169
185
|
disabled: _ctx.disabled
|
|
@@ -172,7 +188,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
172
188
|
default: withCtx(() => [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(_ctx.label), 1 /* TEXT */)])]),
|
|
173
189
|
|
|
174
190
|
_: 3 /* FORWARDED */
|
|
175
|
-
}, 8 /* PROPS */, ["control-id", "variant", "required", "disabled"])) : createCommentVNode("v-if", true)],
|
|
191
|
+
}, 8 /* PROPS */, ["control-id", "variant", "required", "disabled"])) : createCommentVNode("v-if", true)], 16 /* FULL_PROPS */);
|
|
176
192
|
}
|
|
177
193
|
|
|
178
194
|
var css_248z = "\ninput[data-v-4296509a] {\n appearance: none;\n line-height: 0;\n}\n";
|