@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
package/dist/esm/v3/index.js
CHANGED
|
@@ -6,17 +6,17 @@ export { b as BUTTON_COLOR, d as BUTTON_LOADER_TYPE, c as BUTTON_SIZE, B as BUTT
|
|
|
6
6
|
export { a as ButtonColor, b as ButtonType, B as ButtonVariant, s as OrButtonV3 } from './OrButton-0fa67a0d.js';
|
|
7
7
|
export { s as OrCard } from './OrCard-e3a5aea4.js';
|
|
8
8
|
export { C as CARD_COLLECTION_LAYOUT, s as OrCardCollection } from './OrCardCollection-a5e326ef.js';
|
|
9
|
-
export { D as DefaultCardCollectionViews, s as OrCardCollectionV3, d as defaultViewModes, g as gridView, l as listView } from './OrCardCollection-
|
|
9
|
+
export { D as DefaultCardCollectionViews, s as OrCardCollectionV3, d as defaultViewModes, g as gridView, l as listView } from './OrCardCollection-110b3a0b.js';
|
|
10
10
|
export { s as OrCardV3 } from './OrCard-fd92f7c8.js';
|
|
11
11
|
export { a as OrCarousel, s as OrCarouselItem } from './OrCarouselItem-636d99a1.js';
|
|
12
12
|
export { s as OrCheckbox } from './OrCheckbox-ed4a19cf.js';
|
|
13
|
-
export { s as OrCheckboxV3 } from './OrCheckbox-
|
|
13
|
+
export { s as OrCheckboxV3 } from './OrCheckbox-7144da06.js';
|
|
14
14
|
export { s as OrChip, a as OrChips } from './OrChips-9afba42f.js';
|
|
15
15
|
export { s as OrCode, O as OrCodeLanguages } from './OrCode-5ed69c23.js';
|
|
16
16
|
export { s as OrCollapse } from './OrCollapse-445141ab.js';
|
|
17
17
|
export { s as OrColorPicker, h as amber, n as black, b as blue, m as blueGrey, k as brown, c as cyan, j as deepOrange, d as deepPurple, g as green, i as indigo, l as lightBlue, e as lightGreen, f as lime, o as orange, p as pink, a as purple, r as red, t as teal, w as white, y as yellow } from './OrColorPicker-189cb097.js';
|
|
18
18
|
export { s as OrConfirm } from './OrConfirm-f39bd784.js';
|
|
19
|
-
export { C as ConfirmType, s as OrConfirmV3 } from './OrConfirm-
|
|
19
|
+
export { C as ConfirmType, s as OrConfirmV3 } from './OrConfirm-1a38ed1b.js';
|
|
20
20
|
export { D as DEFAULT_TEXT, s as OrDateTimePicker, a as OrDateTimePickerItemTypes, O as OrDateTimePickerTypes } from './OrDateTimePicker-f2e08564.js';
|
|
21
21
|
export { s as OrError } from './OrError-f90296db.js';
|
|
22
22
|
export { s as OrErrorTagV3 } from './OrErrorTag-98252eef.js';
|
|
@@ -31,11 +31,11 @@ export { s as OrIcon, O as OrIconColors, a as OrIconType } from './OrIcon-669503
|
|
|
31
31
|
export { I as IconButtonColor, s as OrIconButtonV3 } from './OrIconButton-1a89fbf9.js';
|
|
32
32
|
export { I as IconButtonSize, I as IconSize, a as IconVariant, s as OrIconV3 } from './OrIcon-b195169c.js';
|
|
33
33
|
export { I as InlineInputBoxSize, I as InlineInputSize, s as OrInlineInputBoxV3 } from './OrInlineInputBox-8049f95a.js';
|
|
34
|
-
export { I as InlineInputType, s as OrInlineInputV3 } from './OrInlineInput-
|
|
34
|
+
export { I as InlineInputType, s as OrInlineInputV3 } from './OrInlineInput-a6b19dbe.js';
|
|
35
35
|
export { a as InlineTextEditTrimmingTypes, I as InlineTextEditTypes, s as OrInlineTextEdit } from './OrInlineTextEdit-1aa477b5.js';
|
|
36
|
-
export { s as OrInlineTextareaV3 } from './OrInlineTextarea-
|
|
36
|
+
export { s as OrInlineTextareaV3 } from './OrInlineTextarea-9eb60363.js';
|
|
37
37
|
export { a as InputBoxSize, I as InputBoxVariant, a as InputSize, s as OrInputBoxV3, a as SearchSize, a as SelectSize, a as TextareaSize } from './OrInputBox-6d1b6059.js';
|
|
38
|
-
export { I as InputType, s as OrInputV3 } from './OrInput-
|
|
38
|
+
export { I as InputType, s as OrInputV3 } from './OrInput-e07ec00c.js';
|
|
39
39
|
export { a as OrInput, b as OrNumberInput, c as OrPassword, d as OrSearch, s as OrTextarea } from './OrSearch-7cb2c91c.js';
|
|
40
40
|
export { s as OrLabel } from './OrLabel-876f8729.js';
|
|
41
41
|
export { L as LabelVariant, s as OrLabelV3 } from './OrLabel-bdaec602.js';
|
|
@@ -54,36 +54,36 @@ export { N as NotificationVariant, s as OrNotificationV3 } from './OrNotificatio
|
|
|
54
54
|
export { s as OrOverflowMenu } from './OrOverflowMenu-e82cbcbe.js';
|
|
55
55
|
export { s as OrOverlay } from './OrOverlay-451dce49.js';
|
|
56
56
|
export { s as OrOverlayV3 } from './OrOverlay-738a44d5.js';
|
|
57
|
-
export { s as OrPaginationV3 } from './OrPagination-
|
|
57
|
+
export { s as OrPaginationV3 } from './OrPagination-5e01a0a5.js';
|
|
58
58
|
export { s as OrProgress, O as OrProgressColors, a as OrProgressTypes } from './OrProgress-d0d52c86.js';
|
|
59
59
|
export { s as OrProgressV3, P as ProgressColor, a as ProgressType } from './OrProgress-407002e0.js';
|
|
60
60
|
export { s as OrRadio } from './OrRadio-c3ab11f2.js';
|
|
61
61
|
export { s as OrRadioGroup } from './OrRadioGroup-00785e41.js';
|
|
62
|
-
export { s as OrRadioV3 } from './OrRadio-
|
|
63
|
-
export { s as OrSearchV3 } from './OrSearch-
|
|
62
|
+
export { s as OrRadioV3 } from './OrRadio-39d1905d.js';
|
|
63
|
+
export { s as OrSearchV3 } from './OrSearch-a60f67f0.js';
|
|
64
64
|
export { s as OrSegmentedControlV3, S as SegmentedControlSize } from './OrSegmentedControl-171cad78.js';
|
|
65
65
|
export { s as OrSelect } from './OrSelect-0821b907.js';
|
|
66
|
-
export { s as OrSelectV3 } from './OrSelect-
|
|
66
|
+
export { s as OrSelectV3 } from './OrSelect-2c70e384.js';
|
|
67
67
|
export { s as OrSidebar, O as OrSidebarSide } from './OrSidebar-375c85a3.js';
|
|
68
|
-
export { O as OrSidebarPlacement, s as OrSidebarV3 } from './OrSidebar-
|
|
68
|
+
export { O as OrSidebarPlacement, s as OrSidebarV3 } from './OrSidebar-a62972f5.js';
|
|
69
69
|
export { s as OrSkeletonCircle, a as OrSkeletonRect, b as OrSkeletonText, O as OrSkeletonTextSizes } from './OrSkeletonText-2b1610ce.js';
|
|
70
70
|
export { s as OrSkeletonCircleV3, a as OrSkeletonRectV3, b as OrSkeletonTextV3 } from './OrSkeletonText-3965ff71.js';
|
|
71
71
|
export { s as OrSlider } from './OrSlider-87e2da8c.js';
|
|
72
72
|
export { s as OrSortHeaderV3 } from './OrSortHeader-fe1a9cf8.js';
|
|
73
73
|
export { s as OrStepper } from './OrStepper-f19b4eac.js';
|
|
74
74
|
export { s as OrSwitch } from './OrSwitch-c333ee32.js';
|
|
75
|
-
export { s as OrSwitchV3 } from './OrSwitch-
|
|
75
|
+
export { s as OrSwitchV3 } from './OrSwitch-3e9a699d.js';
|
|
76
76
|
export { s as OrTab } from './OrTab-bc98be02.js';
|
|
77
77
|
export { s as OrTabHeaderItem } from './OrTabHeaderItem-d668cc59.js';
|
|
78
78
|
export { s as OrTabV3 } from './OrTab-c131cf60.js';
|
|
79
79
|
export { s as OrTabs } from './OrTabs-d3812c11.js';
|
|
80
|
-
export { s as OrTabsV3, T as TabsVariant } from './OrTabs-
|
|
80
|
+
export { s as OrTabsV3, T as TabsVariant } from './OrTabs-91618aab.js';
|
|
81
81
|
export { s as OrTag } from './OrTag-1b5e43fa.js';
|
|
82
82
|
export { s as OrTagV3, a as TagColor, T as TagVariant } from './OrTag-efa7578f.js';
|
|
83
83
|
export { s as OrTeleport } from './OrTeleportVue3-ad639f12.js';
|
|
84
84
|
export { s as OrTeleportV3 } from './OrTeleport.vue3-8099178c.js';
|
|
85
85
|
export { s as OrTextV3 } from './OrText-ecb46923.js';
|
|
86
|
-
export { s as OrTextareaV3 } from './OrTextarea-
|
|
86
|
+
export { s as OrTextareaV3 } from './OrTextarea-fd6b9f31.js';
|
|
87
87
|
export { s as OrTextbox, T as TextboxTypes } from './OrTextbox-2f33e9c3.js';
|
|
88
88
|
export { s as OrToast, a as OrToastContainer } from './OrToastContainer-40c4c1c8.js';
|
|
89
89
|
export { P as PositionsX, b as PositionsY, c as ToastType, T as TransitionType, a as useQueue, u as useToast } from './useToast-4fbe0e5a.js';
|
|
@@ -93,10 +93,12 @@ export { s as OrTooltip, a as OrTooltipContent } from './OrTooltip-78cd7f6b.js';
|
|
|
93
93
|
export { s as OrTooltipV3 } from './OrTooltip-50d27b4f.js';
|
|
94
94
|
export { D as DropdownClose, a as DropdownOpen } from './dropdown-open-0d314aa4.js';
|
|
95
95
|
export { u as useClassAttribute } from './useClassAttribute-47fdb016.js';
|
|
96
|
+
export { u as useControlAttributes, a as useIdAttribute } from './useIdAttribute-859439f0.js';
|
|
96
97
|
export { u as useElevation } from './useElevation-31bfe1f6.js';
|
|
97
98
|
export { u as useOverflow } from './useOverflow-af6161c8.js';
|
|
98
99
|
export { u as useResponsive } from './useResponsive-a02e95b7.js';
|
|
99
100
|
export { u as useToggle } from './useToggle-29e4d7c7.js';
|
|
101
|
+
export { u as useValidationAttributes } from './useValidationAttributes-d1abbe34.js';
|
|
100
102
|
import { R as RX_ABBREVIATION_FROM_STRING } from './color-1f348774.js';
|
|
101
103
|
import 'vue-demi';
|
|
102
104
|
import 'lodash';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { useAttrs, computed, getCurrentInstance } from 'vue-demi';
|
|
2
|
+
|
|
3
|
+
function useControlAttributes() {
|
|
4
|
+
const attributes = useAttrs();
|
|
5
|
+
return {
|
|
6
|
+
readonly: computed(() => attributes['readonly']),
|
|
7
|
+
disabled: computed(() => attributes['disabled']),
|
|
8
|
+
'force-state': computed(() => attributes['force-state'])
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function useIdAttribute() {
|
|
13
|
+
const attributes = useAttrs(),
|
|
14
|
+
component = getCurrentInstance();
|
|
15
|
+
return computed(() => {
|
|
16
|
+
var _a;
|
|
17
|
+
return (_a = attributes['id']) !== null && _a !== void 0 ? _a : component === null || component === void 0 ? void 0 : component.uid.toString();
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export { useIdAttribute as a, useControlAttributes as u };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { useAttrs, computed } from 'vue-demi';
|
|
2
|
+
|
|
3
|
+
function useValidationAttributes() {
|
|
4
|
+
const attributes = useAttrs();
|
|
5
|
+
return {
|
|
6
|
+
required: computed(() => attributes['required']),
|
|
7
|
+
minlength: computed(() => attributes['minlength']),
|
|
8
|
+
maxlength: computed(() => attributes['maxlength']),
|
|
9
|
+
pattern: computed(() => attributes['pattern']),
|
|
10
|
+
min: computed(() => attributes['min']),
|
|
11
|
+
max: computed(() => attributes['max']),
|
|
12
|
+
step: computed(() => attributes['step'])
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export { useValidationAttributes as u };
|
package/package.json
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
3
|
ref="root"
|
|
4
|
+
v-bind="$attrs"
|
|
4
5
|
:class="rootStyles"
|
|
5
6
|
>
|
|
6
7
|
<input
|
|
7
|
-
|
|
8
|
-
:id="controlId"
|
|
8
|
+
ref="control"
|
|
9
9
|
v-model="proxyModelValue"
|
|
10
|
+
v-bind="controlAttributes"
|
|
10
11
|
:class="controlStyles"
|
|
11
|
-
type="checkbox"
|
|
12
|
+
:type="'checkbox'"
|
|
12
13
|
:value="inputValue"
|
|
13
14
|
:indeterminate="indeterminate"
|
|
14
15
|
:required="required"
|
|
@@ -19,7 +20,7 @@
|
|
|
19
20
|
|
|
20
21
|
<template v-if="$slots.default || label">
|
|
21
22
|
<OrLabel
|
|
22
|
-
:control-id="
|
|
23
|
+
:control-id="controlAttributes.id"
|
|
23
24
|
:variant="labelVariant"
|
|
24
25
|
:required="required"
|
|
25
26
|
:disabled="disabled"
|
|
@@ -35,8 +36,8 @@
|
|
|
35
36
|
</template>
|
|
36
37
|
|
|
37
38
|
<script lang="ts">
|
|
38
|
-
import { computed, defineComponent,
|
|
39
|
-
import { useClassAttribute } from '../../hooks';
|
|
39
|
+
import { computed, defineComponent, PropType, reactive, ref } from 'vue-demi';
|
|
40
|
+
import { useClassAttribute, useControlAttributes, useIdAttribute } from '../../hooks';
|
|
40
41
|
import { LabelVariant, OrLabelV3 as OrLabel } from '../or-label-v3';
|
|
41
42
|
import { CheckboxControl, CheckboxControlHandle, CheckboxRoot } from './styles';
|
|
42
43
|
|
|
@@ -101,13 +102,15 @@ export default defineComponent({
|
|
|
101
102
|
|
|
102
103
|
expose: [
|
|
103
104
|
'root',
|
|
105
|
+
|
|
106
|
+
'focus',
|
|
107
|
+
'blur',
|
|
104
108
|
],
|
|
105
109
|
|
|
106
110
|
setup(props, context) {
|
|
107
|
-
const currentInstance = getCurrentInstance()!;
|
|
108
|
-
|
|
109
111
|
// Refs
|
|
110
112
|
const root = ref<HTMLElement>();
|
|
113
|
+
const control = ref<HTMLInputElement>();
|
|
111
114
|
|
|
112
115
|
// Styles
|
|
113
116
|
const classAttribute = useClassAttribute();
|
|
@@ -124,7 +127,10 @@ export default defineComponent({
|
|
|
124
127
|
]);
|
|
125
128
|
|
|
126
129
|
// State
|
|
127
|
-
const
|
|
130
|
+
const controlAttributes = reactive({
|
|
131
|
+
id: useIdAttribute(),
|
|
132
|
+
...useControlAttributes(),
|
|
133
|
+
});
|
|
128
134
|
|
|
129
135
|
const proxyModelValue = computed({
|
|
130
136
|
get: () => {
|
|
@@ -137,12 +143,24 @@ export default defineComponent({
|
|
|
137
143
|
},
|
|
138
144
|
});
|
|
139
145
|
|
|
146
|
+
// Methods
|
|
147
|
+
function focus(): void {
|
|
148
|
+
control.value?.focus();
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
function blur(): void {
|
|
152
|
+
control.value?.blur();
|
|
153
|
+
}
|
|
154
|
+
|
|
140
155
|
return {
|
|
141
156
|
root,
|
|
157
|
+
control,
|
|
142
158
|
rootStyles,
|
|
143
159
|
controlStyles,
|
|
144
|
-
|
|
160
|
+
controlAttributes,
|
|
145
161
|
proxyModelValue,
|
|
162
|
+
focus,
|
|
163
|
+
blur,
|
|
146
164
|
};
|
|
147
165
|
},
|
|
148
166
|
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
3
|
ref="root"
|
|
4
|
+
v-bind="$attrs"
|
|
4
5
|
:class="rootStyles"
|
|
5
6
|
>
|
|
6
7
|
<div :class="['layout-row', 'gap-sm+']">
|
|
@@ -9,9 +10,9 @@
|
|
|
9
10
|
:invalid="invalid"
|
|
10
11
|
>
|
|
11
12
|
<input
|
|
12
|
-
|
|
13
|
+
ref="control"
|
|
13
14
|
v-model="draftModelValue"
|
|
14
|
-
v-bind="
|
|
15
|
+
v-bind="controlAttributes"
|
|
15
16
|
:class="controlStyles"
|
|
16
17
|
:type="type"
|
|
17
18
|
:placeholder="placeholder"
|
|
@@ -71,8 +72,8 @@
|
|
|
71
72
|
</template>
|
|
72
73
|
|
|
73
74
|
<script lang="ts">
|
|
74
|
-
import { computed, defineComponent,
|
|
75
|
-
import { useClassAttribute } from '../../hooks';
|
|
75
|
+
import { computed, defineComponent, PropType, reactive, ref, watch } from 'vue-demi';
|
|
76
|
+
import { useClassAttribute, useControlAttributes, useIdAttribute, useValidationAttributes } from '../../hooks';
|
|
76
77
|
import { OrErrorV3 as OrError } from '../or-error-v3';
|
|
77
78
|
import { OrHintV3 as OrHint } from '../or-hint-v3';
|
|
78
79
|
import { OrIconButtonV3 as OrIconButton } from '../or-icon-button-v3';
|
|
@@ -146,13 +147,15 @@ export default defineComponent({
|
|
|
146
147
|
|
|
147
148
|
expose: [
|
|
148
149
|
'root',
|
|
150
|
+
|
|
151
|
+
'focus',
|
|
152
|
+
'blur',
|
|
149
153
|
],
|
|
150
154
|
|
|
151
155
|
setup(props, context) {
|
|
152
|
-
const currentInstance = getCurrentInstance()!;
|
|
153
|
-
|
|
154
156
|
// Refs
|
|
155
157
|
const root = ref<HTMLElement>();
|
|
158
|
+
const control = ref<HTMLInputElement>();
|
|
156
159
|
|
|
157
160
|
// Styles
|
|
158
161
|
const classAttribute = useClassAttribute();
|
|
@@ -173,7 +176,11 @@ export default defineComponent({
|
|
|
173
176
|
]);
|
|
174
177
|
|
|
175
178
|
// State
|
|
176
|
-
const
|
|
179
|
+
const controlAttributes = reactive({
|
|
180
|
+
id: useIdAttribute(),
|
|
181
|
+
...useControlAttributes(),
|
|
182
|
+
...useValidationAttributes(),
|
|
183
|
+
});
|
|
177
184
|
|
|
178
185
|
const proxyModelValue = computed({
|
|
179
186
|
get: () => {
|
|
@@ -188,11 +195,12 @@ export default defineComponent({
|
|
|
188
195
|
|
|
189
196
|
const draftModelValue = ref<string | number>('');
|
|
190
197
|
|
|
191
|
-
const
|
|
198
|
+
const currentLength = computed(() => draftModelValue.value?.toString().length ?? 0);
|
|
199
|
+
const maxLength = computed(() => controlAttributes.maxlength);
|
|
200
|
+
|
|
192
201
|
const invalid = computed(() => !!props.error);
|
|
193
202
|
|
|
194
|
-
const
|
|
195
|
-
const maxLength = computed(() => context.attrs.maxlength as number | undefined);
|
|
203
|
+
const activated = ref(false);
|
|
196
204
|
|
|
197
205
|
// Handlers
|
|
198
206
|
function onFocus(event: Event): void {
|
|
@@ -210,6 +218,14 @@ export default defineComponent({
|
|
|
210
218
|
}
|
|
211
219
|
|
|
212
220
|
// Methods
|
|
221
|
+
function focus(): void {
|
|
222
|
+
control.value?.focus();
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
function blur(): void {
|
|
226
|
+
control.value?.blur();
|
|
227
|
+
}
|
|
228
|
+
|
|
213
229
|
function apply(): void {
|
|
214
230
|
if (draftModelValue.value !== proxyModelValue.value) {
|
|
215
231
|
proxyModelValue.value = draftModelValue.value;
|
|
@@ -233,18 +249,21 @@ export default defineComponent({
|
|
|
233
249
|
|
|
234
250
|
return {
|
|
235
251
|
root,
|
|
252
|
+
control,
|
|
236
253
|
rootStyles,
|
|
237
254
|
controlStyles,
|
|
238
255
|
actionStyles,
|
|
239
|
-
|
|
256
|
+
controlAttributes,
|
|
240
257
|
proxyModelValue,
|
|
241
258
|
draftModelValue,
|
|
242
|
-
activated,
|
|
243
|
-
invalid,
|
|
244
259
|
currentLength,
|
|
245
260
|
maxLength,
|
|
261
|
+
invalid,
|
|
262
|
+
activated,
|
|
246
263
|
onFocus,
|
|
247
264
|
onBlur,
|
|
265
|
+
focus,
|
|
266
|
+
blur,
|
|
248
267
|
apply,
|
|
249
268
|
reset,
|
|
250
269
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
3
|
ref="root"
|
|
4
|
+
v-bind="$attrs"
|
|
4
5
|
:class="rootStyles"
|
|
5
6
|
>
|
|
6
7
|
<div :class="['layout-row', 'gap-sm+']">
|
|
@@ -9,9 +10,9 @@
|
|
|
9
10
|
:invalid="invalid"
|
|
10
11
|
>
|
|
11
12
|
<textarea
|
|
12
|
-
|
|
13
|
+
ref="control"
|
|
13
14
|
v-model="draftModelValue"
|
|
14
|
-
v-bind="
|
|
15
|
+
v-bind="controlAttributes"
|
|
15
16
|
:class="controlStyles"
|
|
16
17
|
:placeholder="placeholder"
|
|
17
18
|
:activated="activated ? '' : null"
|
|
@@ -70,8 +71,8 @@
|
|
|
70
71
|
</template>
|
|
71
72
|
|
|
72
73
|
<script lang="ts">
|
|
73
|
-
import { computed, defineComponent,
|
|
74
|
-
import { useClassAttribute } from '../../hooks';
|
|
74
|
+
import { computed, defineComponent, reactive, ref, watch } from 'vue-demi';
|
|
75
|
+
import { useClassAttribute, useControlAttributes, useIdAttribute, useValidationAttributes } from '../../hooks';
|
|
75
76
|
import { OrErrorV3 as OrError } from '../or-error-v3';
|
|
76
77
|
import { OrHintV3 as OrHint } from '../or-hint-v3';
|
|
77
78
|
import { OrIconButtonV3 as OrIconButton } from '../or-icon-button-v3';
|
|
@@ -134,13 +135,15 @@ export default defineComponent({
|
|
|
134
135
|
|
|
135
136
|
expose: [
|
|
136
137
|
'root',
|
|
138
|
+
|
|
139
|
+
'focus',
|
|
140
|
+
'blur',
|
|
137
141
|
],
|
|
138
142
|
|
|
139
143
|
setup(props, context) {
|
|
140
|
-
const currentInstance = getCurrentInstance()!;
|
|
141
|
-
|
|
142
144
|
// Refs
|
|
143
145
|
const root = ref<HTMLElement>();
|
|
146
|
+
const control = ref<HTMLTextAreaElement>();
|
|
144
147
|
|
|
145
148
|
// Styles
|
|
146
149
|
const classAttribute = useClassAttribute();
|
|
@@ -160,7 +163,11 @@ export default defineComponent({
|
|
|
160
163
|
]);
|
|
161
164
|
|
|
162
165
|
// State
|
|
163
|
-
const
|
|
166
|
+
const controlAttributes = reactive({
|
|
167
|
+
id: useIdAttribute(),
|
|
168
|
+
...useControlAttributes(),
|
|
169
|
+
...useValidationAttributes(),
|
|
170
|
+
});
|
|
164
171
|
|
|
165
172
|
const proxyModelValue = computed({
|
|
166
173
|
get: () => {
|
|
@@ -175,11 +182,12 @@ export default defineComponent({
|
|
|
175
182
|
|
|
176
183
|
const draftModelValue = ref<string>('');
|
|
177
184
|
|
|
178
|
-
const
|
|
185
|
+
const currentLength = computed(() => draftModelValue.value?.toString().length ?? 0);
|
|
186
|
+
const maxLength = computed(() => controlAttributes.maxlength);
|
|
187
|
+
|
|
179
188
|
const invalid = computed(() => !!props.error);
|
|
180
189
|
|
|
181
|
-
const
|
|
182
|
-
const maxLength = computed(() => context.attrs.maxlength as number | undefined);
|
|
190
|
+
const activated = ref(false);
|
|
183
191
|
|
|
184
192
|
// Handlers
|
|
185
193
|
function onFocus(event: Event): void {
|
|
@@ -197,6 +205,14 @@ export default defineComponent({
|
|
|
197
205
|
}
|
|
198
206
|
|
|
199
207
|
// Methods
|
|
208
|
+
function focus(): void {
|
|
209
|
+
control.value?.focus();
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
function blur(): void {
|
|
213
|
+
control.value?.blur();
|
|
214
|
+
}
|
|
215
|
+
|
|
200
216
|
function apply(): void {
|
|
201
217
|
if (draftModelValue.value !== proxyModelValue.value) {
|
|
202
218
|
proxyModelValue.value = draftModelValue.value;
|
|
@@ -220,18 +236,21 @@ export default defineComponent({
|
|
|
220
236
|
|
|
221
237
|
return {
|
|
222
238
|
root,
|
|
239
|
+
control,
|
|
223
240
|
rootStyles,
|
|
224
241
|
controlStyles,
|
|
225
242
|
actionStyles,
|
|
226
|
-
|
|
243
|
+
controlAttributes,
|
|
227
244
|
proxyModelValue,
|
|
228
245
|
draftModelValue,
|
|
229
|
-
activated,
|
|
230
|
-
invalid,
|
|
231
246
|
currentLength,
|
|
232
247
|
maxLength,
|
|
248
|
+
invalid,
|
|
249
|
+
activated,
|
|
233
250
|
onFocus,
|
|
234
251
|
onBlur,
|
|
252
|
+
focus,
|
|
253
|
+
blur,
|
|
235
254
|
apply,
|
|
236
255
|
reset,
|
|
237
256
|
};
|
|
@@ -17,10 +17,6 @@ export default {
|
|
|
17
17
|
control: { type: 'text' },
|
|
18
18
|
},
|
|
19
19
|
|
|
20
|
-
readonly: {
|
|
21
|
-
control: { type: 'boolean' },
|
|
22
|
-
},
|
|
23
|
-
|
|
24
20
|
maxlength: {
|
|
25
21
|
control: { type: 'number' },
|
|
26
22
|
},
|
|
@@ -74,6 +70,10 @@ export default {
|
|
|
74
70
|
control: { type: 'boolean' },
|
|
75
71
|
},
|
|
76
72
|
|
|
73
|
+
readonly: {
|
|
74
|
+
control: { type: 'boolean' },
|
|
75
|
+
},
|
|
76
|
+
|
|
77
77
|
disabled: {
|
|
78
78
|
control: { type: 'boolean' },
|
|
79
79
|
},
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
3
|
ref="root"
|
|
4
|
+
v-bind="$attrs"
|
|
4
5
|
:class="rootStyles"
|
|
5
6
|
>
|
|
6
7
|
<template v-if="label">
|
|
7
8
|
<OrLabel
|
|
8
|
-
:control-id="
|
|
9
|
+
:control-id="controlAttributes.id"
|
|
9
10
|
:variant="'input'"
|
|
10
11
|
:required="required"
|
|
11
12
|
:disabled="disabled"
|
|
@@ -26,10 +27,9 @@
|
|
|
26
27
|
:disabled="disabled"
|
|
27
28
|
>
|
|
28
29
|
<input
|
|
29
|
-
|
|
30
|
-
ref="input"
|
|
30
|
+
ref="control"
|
|
31
31
|
v-model="proxyModelValue"
|
|
32
|
-
v-bind="
|
|
32
|
+
v-bind="controlAttributes"
|
|
33
33
|
:class="controlStyles"
|
|
34
34
|
:type="type === 'password' && disclosed ? 'text' : type"
|
|
35
35
|
:placeholder="placeholder"
|
|
@@ -102,8 +102,8 @@
|
|
|
102
102
|
</template>
|
|
103
103
|
|
|
104
104
|
<script lang="ts">
|
|
105
|
-
import { computed, defineComponent,
|
|
106
|
-
import { useClassAttribute } from '../../hooks';
|
|
105
|
+
import { computed, defineComponent, PropType, reactive, ref } from 'vue-demi';
|
|
106
|
+
import { useClassAttribute, useControlAttributes, useIdAttribute, useValidationAttributes } from '../../hooks';
|
|
107
107
|
import { OrErrorV3 as OrError } from '../or-error-v3';
|
|
108
108
|
import { OrHintV3 as OrHint } from '../or-hint-v3';
|
|
109
109
|
import { OrIconButtonV3 as OrIconButton } from '../or-icon-button-v3';
|
|
@@ -173,6 +173,11 @@ export default defineComponent({
|
|
|
173
173
|
default: false,
|
|
174
174
|
},
|
|
175
175
|
|
|
176
|
+
readonly: {
|
|
177
|
+
type: Boolean,
|
|
178
|
+
default: false,
|
|
179
|
+
},
|
|
180
|
+
|
|
176
181
|
disabled: {
|
|
177
182
|
type: Boolean,
|
|
178
183
|
default: false,
|
|
@@ -196,15 +201,15 @@ export default defineComponent({
|
|
|
196
201
|
|
|
197
202
|
expose: [
|
|
198
203
|
'root',
|
|
204
|
+
|
|
199
205
|
'focus',
|
|
206
|
+
'blur',
|
|
200
207
|
],
|
|
201
208
|
|
|
202
209
|
setup(props, context) {
|
|
203
|
-
const currentInstance = getCurrentInstance()!;
|
|
204
|
-
|
|
205
210
|
// Refs
|
|
206
211
|
const root = ref<HTMLElement>();
|
|
207
|
-
const
|
|
212
|
+
const control = ref<HTMLInputElement>();
|
|
208
213
|
|
|
209
214
|
// Styles
|
|
210
215
|
const classAttribute = useClassAttribute();
|
|
@@ -220,7 +225,11 @@ export default defineComponent({
|
|
|
220
225
|
]);
|
|
221
226
|
|
|
222
227
|
// State
|
|
223
|
-
const
|
|
228
|
+
const controlAttributes = reactive({
|
|
229
|
+
id: useIdAttribute(),
|
|
230
|
+
...useControlAttributes(),
|
|
231
|
+
...useValidationAttributes(),
|
|
232
|
+
});
|
|
224
233
|
|
|
225
234
|
const proxyModelValue = computed({
|
|
226
235
|
get: () => {
|
|
@@ -233,32 +242,35 @@ export default defineComponent({
|
|
|
233
242
|
},
|
|
234
243
|
});
|
|
235
244
|
|
|
236
|
-
const invalid = computed(() => !!props.error);
|
|
237
|
-
const readonly = computed(() => context.attrs.readonly as boolean);
|
|
238
|
-
|
|
239
245
|
const currentLength = computed(() => proxyModelValue.value?.toString().length ?? 0);
|
|
240
|
-
const maxLength = computed(() =>
|
|
246
|
+
const maxLength = computed(() => controlAttributes.maxlength);
|
|
247
|
+
|
|
248
|
+
const invalid = computed(() => !!props.error);
|
|
241
249
|
|
|
242
250
|
const disclosed = ref(false);
|
|
243
251
|
|
|
244
252
|
// Methods
|
|
245
253
|
function focus(): void {
|
|
246
|
-
|
|
254
|
+
control.value?.focus();
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
function blur(): void {
|
|
258
|
+
control.value?.blur();
|
|
247
259
|
}
|
|
248
260
|
|
|
249
261
|
return {
|
|
250
262
|
root,
|
|
251
|
-
|
|
263
|
+
control,
|
|
252
264
|
rootStyles,
|
|
253
265
|
controlStyles,
|
|
254
|
-
|
|
266
|
+
controlAttributes,
|
|
255
267
|
proxyModelValue,
|
|
256
|
-
invalid,
|
|
257
|
-
readonly,
|
|
258
268
|
currentLength,
|
|
259
269
|
maxLength,
|
|
270
|
+
invalid,
|
|
260
271
|
disclosed,
|
|
261
272
|
focus,
|
|
273
|
+
blur,
|
|
262
274
|
};
|
|
263
275
|
},
|
|
264
276
|
});
|