@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
|
@@ -4,97 +4,28 @@ export const SidebarRoot: string[] = [
|
|
|
4
4
|
// Position
|
|
5
5
|
'relative',
|
|
6
6
|
|
|
7
|
-
// Layout
|
|
8
|
-
'flex',
|
|
9
|
-
'flex-row',
|
|
10
|
-
'shrink-0',
|
|
11
|
-
|
|
12
|
-
// Box
|
|
13
|
-
'min-w-0',
|
|
14
|
-
'h-auto',
|
|
15
|
-
'p-0',
|
|
16
|
-
|
|
17
|
-
// Theme
|
|
18
|
-
'bg-background',
|
|
19
|
-
'dark:bg-background-dark',
|
|
20
|
-
];
|
|
21
|
-
|
|
22
|
-
export const SidebarBar: string[] = [
|
|
23
|
-
// Position
|
|
24
|
-
'relative',
|
|
25
|
-
|
|
26
7
|
// Layout
|
|
27
8
|
'flex',
|
|
28
9
|
'flex-col',
|
|
29
10
|
'shrink-0',
|
|
30
|
-
'grow',
|
|
31
11
|
|
|
32
12
|
// Box
|
|
33
13
|
'min-h-0',
|
|
34
14
|
'p-0',
|
|
35
|
-
|
|
36
|
-
// Theme
|
|
37
|
-
'text-on-background',
|
|
38
|
-
'dark:text-on-background-dark',
|
|
39
|
-
|
|
40
|
-
// Transition
|
|
41
|
-
'transition-[width]',
|
|
42
|
-
];
|
|
43
|
-
|
|
44
|
-
export const SidebarToolbar: string[] = [
|
|
45
|
-
// Position
|
|
46
|
-
'relative',
|
|
47
|
-
|
|
48
|
-
// Layout
|
|
49
|
-
'flex',
|
|
50
|
-
'flex-col',
|
|
51
|
-
'shrink-0',
|
|
52
|
-
'grow',
|
|
53
|
-
'overflow-auto',
|
|
54
|
-
'items-center',
|
|
55
|
-
|
|
56
|
-
// Sizing
|
|
57
|
-
'gap-md',
|
|
58
|
-
|
|
59
|
-
// Box
|
|
60
|
-
'min-h-0',
|
|
61
|
-
'min-w-xl',
|
|
62
|
-
'p-[6px]',
|
|
63
|
-
'pt-[56px]',
|
|
64
|
-
'pb-md+',
|
|
65
|
-
|
|
66
|
-
// Theme
|
|
67
|
-
'text-outline',
|
|
68
|
-
'dark:text-outline-dark',
|
|
69
15
|
];
|
|
70
16
|
|
|
71
|
-
export const
|
|
17
|
+
export const SidebarRootSides: Record<OrSidebarPlacement, string[]> = {
|
|
72
18
|
[OrSidebarPlacement.left]: [
|
|
73
19
|
// Borders
|
|
74
20
|
'border-r-[1px]',
|
|
75
21
|
'border-r-solid',
|
|
76
|
-
'border-r-
|
|
22
|
+
'border-r-secondary dark:border-r-secondary-dark',
|
|
77
23
|
],
|
|
78
24
|
[OrSidebarPlacement.right]: [
|
|
79
25
|
// Borders
|
|
80
26
|
'border-l-[1px]',
|
|
81
27
|
'border-l-solid',
|
|
82
|
-
'border-l-
|
|
83
|
-
],
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
export const SidebarToolbarSides: Record<OrSidebarPlacement, string[]> = {
|
|
87
|
-
[OrSidebarPlacement.left]: [
|
|
88
|
-
// Borders
|
|
89
|
-
'border-r-[1px]',
|
|
90
|
-
'border-r-solid',
|
|
91
|
-
'border-r-outline-variant dark:border-r-outline-variant-dark',
|
|
92
|
-
],
|
|
93
|
-
[OrSidebarPlacement.right]: [
|
|
94
|
-
// Borders
|
|
95
|
-
'border-l-[1px]',
|
|
96
|
-
'border-l-solid',
|
|
97
|
-
'border-l-outline-variant dark:border-l-outline-variant-dark',
|
|
28
|
+
'border-l-secondary dark:border-l-secondary-dark',
|
|
98
29
|
],
|
|
99
30
|
};
|
|
100
31
|
|
|
@@ -105,7 +36,7 @@ export const SidebarResize: string[] = [
|
|
|
105
36
|
'z-[1]',
|
|
106
37
|
|
|
107
38
|
// Box
|
|
108
|
-
'w-
|
|
39
|
+
'w-[12px]',
|
|
109
40
|
'h-[100%]',
|
|
110
41
|
|
|
111
42
|
// Cursor
|
|
@@ -119,7 +50,7 @@ export const SidebarResizeSides: Record<OrSidebarPlacement, string[]> = {
|
|
|
119
50
|
|
|
120
51
|
// Borders
|
|
121
52
|
'hover:border-r-2',
|
|
122
|
-
'hover:border-r-primary
|
|
53
|
+
'hover:border-r-primary hover:dark:border-r-primary-dark',
|
|
123
54
|
|
|
124
55
|
// Transition
|
|
125
56
|
'transition-[border-right]',
|
|
@@ -130,45 +61,23 @@ export const SidebarResizeSides: Record<OrSidebarPlacement, string[]> = {
|
|
|
130
61
|
|
|
131
62
|
// Borders
|
|
132
63
|
'hover:border-l-2',
|
|
133
|
-
'hover:border-l-primary
|
|
64
|
+
'hover:border-l-primary hover:dark:border-l-primary-dark',
|
|
134
65
|
|
|
135
66
|
// Transition
|
|
136
67
|
'transition-[border-left]',
|
|
137
68
|
],
|
|
138
69
|
};
|
|
139
70
|
|
|
140
|
-
export const SidebarCollapseButton: string[] = [
|
|
141
|
-
// Position
|
|
142
|
-
'absolute',
|
|
143
|
-
'top-md',
|
|
144
|
-
'inset-y-none',
|
|
145
|
-
'z-[1]',
|
|
146
|
-
|
|
147
|
-
// Cursor
|
|
148
|
-
'cursor-ew-resize',
|
|
149
|
-
];
|
|
150
|
-
|
|
151
|
-
export const SidebarCollapseButtonSides: Record<OrSidebarPlacement, string[]> = {
|
|
152
|
-
[OrSidebarPlacement.left]: [
|
|
153
|
-
// Position
|
|
154
|
-
'-right-[12px]',
|
|
155
|
-
],
|
|
156
|
-
[OrSidebarPlacement.right]: [
|
|
157
|
-
// Position
|
|
158
|
-
'-left-[12px]',
|
|
159
|
-
],
|
|
160
|
-
};
|
|
161
|
-
|
|
162
71
|
export const SidebarResizingSides: Record<OrSidebarPlacement, string[]> = {
|
|
163
72
|
[OrSidebarPlacement.left]: [
|
|
164
73
|
// Borders
|
|
165
74
|
'border-r-2',
|
|
166
|
-
'border-r-primary
|
|
75
|
+
'border-r-primary dark:border-r-primary-dark',
|
|
167
76
|
],
|
|
168
77
|
[OrSidebarPlacement.right]: [
|
|
169
78
|
// Borders
|
|
170
79
|
'border-l-2',
|
|
171
|
-
'border-l-primary
|
|
80
|
+
'border-l-primary dark:border-l-primary-dark',
|
|
172
81
|
],
|
|
173
82
|
};
|
|
174
83
|
|
|
@@ -177,24 +86,14 @@ export const SidebarMain: string[] = [
|
|
|
177
86
|
'flex',
|
|
178
87
|
'flex-col',
|
|
179
88
|
'grow',
|
|
180
|
-
'overflow-x-hidden',
|
|
181
89
|
|
|
182
90
|
// Box
|
|
183
91
|
'min-h-0',
|
|
184
92
|
];
|
|
185
93
|
|
|
186
94
|
export const SidebarHeader: string[] = [
|
|
187
|
-
// Layout
|
|
188
|
-
'shrink-0',
|
|
189
|
-
'overflow-hidden',
|
|
190
|
-
|
|
191
95
|
// Sizing
|
|
192
96
|
'p-md',
|
|
193
|
-
|
|
194
|
-
// Typography
|
|
195
|
-
'typography-headline-2',
|
|
196
|
-
'whitespace-nowrap',
|
|
197
|
-
'text-ellipsis',
|
|
198
97
|
];
|
|
199
98
|
|
|
200
99
|
export const SidebarContent: string[] = [
|
|
@@ -207,54 +106,11 @@ export const SidebarContent: string[] = [
|
|
|
207
106
|
];
|
|
208
107
|
|
|
209
108
|
export const SidebarFooter: string[] = [
|
|
210
|
-
// Layout
|
|
211
|
-
'shrink-0',
|
|
212
|
-
'overflow-x-hidden',
|
|
213
|
-
|
|
214
109
|
// Sizing
|
|
215
110
|
'p-md',
|
|
216
111
|
|
|
217
112
|
// Borders
|
|
218
113
|
'border-t-[1px]',
|
|
219
114
|
'border-t-solid',
|
|
220
|
-
'border-t-
|
|
221
|
-
];
|
|
222
|
-
|
|
223
|
-
export const CollapseButton: string[] = [
|
|
224
|
-
// Box
|
|
225
|
-
'w-[24px]',
|
|
226
|
-
'h-[24px]',
|
|
227
|
-
|
|
228
|
-
// Typography
|
|
229
|
-
'!text-[16px]',
|
|
230
|
-
|
|
231
|
-
// Borders
|
|
232
|
-
'!border-[1px]',
|
|
233
|
-
'!border-solid',
|
|
234
|
-
|
|
235
|
-
// Theme
|
|
236
|
-
'!text-primary dark:!text-primary-dark',
|
|
237
|
-
'!bg-background dark:!bg-background-dark',
|
|
238
|
-
'!border-outline-variant dark:!border-outline-variant-dark',
|
|
239
|
-
'!outline-none',
|
|
240
|
-
|
|
241
|
-
// Theme (hover)
|
|
242
|
-
'hover:!text-primary hover:dark:!text-primary-dark',
|
|
243
|
-
'hover:!bg-primary-opacity-0-08 dark:hover:!bg-primary-opacity-0-08-dark',
|
|
244
|
-
'hover:!border-outline dark:hover:!border-outline-dark',
|
|
245
|
-
|
|
246
|
-
// Theme (active)
|
|
247
|
-
'active:!text-primary active:dark:!text-primary-dark',
|
|
248
|
-
'active:!bg-primary-opacity-0-12 dark:active:!bg-primary-opacity-0-12-dark',
|
|
249
|
-
'active:!border-primary dark:active:!border-primary-dark',
|
|
250
|
-
|
|
251
|
-
// Theme (focus)
|
|
252
|
-
'focus:!text-primary focus:dark:!text-primary-dark',
|
|
253
|
-
'focus:!bg-primary-opacity-0-12 dark:focus:!bg-primary-opacity-0-12-dark',
|
|
254
|
-
'focus:!border-outline dark:focus:!border-outline-dark',
|
|
255
|
-
|
|
256
|
-
// Theme (disabled)
|
|
257
|
-
'disabled:!text-on-disabled disabled:dark:!text-on-disabled-dark',
|
|
258
|
-
'disabled:!bg-background disabled:dark:!bg-background-dark',
|
|
259
|
-
'disabled:!border-outline-variant disabled:dark:!border-outline-variant-dark',
|
|
115
|
+
'border-t-secondary dark:border-t-secondary-dark',
|
|
260
116
|
];
|
|
@@ -1,13 +1,14 @@
|
|
|
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="!loading">
|
|
7
8
|
<input
|
|
8
|
-
|
|
9
|
-
:id="controlId"
|
|
9
|
+
ref="control"
|
|
10
10
|
v-model="proxyModelValue"
|
|
11
|
+
v-bind="controlAttributes"
|
|
11
12
|
:class="controlStyles"
|
|
12
13
|
type="checkbox"
|
|
13
14
|
:value="inputValue"
|
|
@@ -33,7 +34,7 @@
|
|
|
33
34
|
|
|
34
35
|
<template v-if="$slots.default || label">
|
|
35
36
|
<OrLabel
|
|
36
|
-
:control-id="
|
|
37
|
+
:control-id="controlAttributes.id"
|
|
37
38
|
:variant="labelVariant"
|
|
38
39
|
:required="required"
|
|
39
40
|
:disabled="disabled"
|
|
@@ -49,8 +50,8 @@
|
|
|
49
50
|
</template>
|
|
50
51
|
|
|
51
52
|
<script lang="ts">
|
|
52
|
-
import { computed, defineComponent,
|
|
53
|
-
import { useClassAttribute } from '../../hooks';
|
|
53
|
+
import { computed, defineComponent, PropType, reactive, ref } from 'vue-demi';
|
|
54
|
+
import { useClassAttribute, useControlAttributes, useIdAttribute } from '../../hooks';
|
|
54
55
|
import { LabelVariant, OrLabelV3 as OrLabel } from '../or-label-v3';
|
|
55
56
|
import { OrLoaderV3 as OrLoader } from '../or-loader-v3';
|
|
56
57
|
import { SwitchControl, SwitchControlHandle, SwitchLoader, SwitchLoaderHandle, SwitchRoot } from './styles';
|
|
@@ -117,13 +118,15 @@ export default defineComponent({
|
|
|
117
118
|
|
|
118
119
|
expose: [
|
|
119
120
|
'root',
|
|
121
|
+
|
|
122
|
+
'focus',
|
|
123
|
+
'blur',
|
|
120
124
|
],
|
|
121
125
|
|
|
122
126
|
setup(props, context) {
|
|
123
|
-
const currentInstance = getCurrentInstance()!;
|
|
124
|
-
|
|
125
127
|
// Refs
|
|
126
128
|
const root = ref<HTMLElement>();
|
|
129
|
+
const control = ref<HTMLInputElement>();
|
|
127
130
|
|
|
128
131
|
// Styles
|
|
129
132
|
const classAttribute = useClassAttribute();
|
|
@@ -145,7 +148,10 @@ export default defineComponent({
|
|
|
145
148
|
]);
|
|
146
149
|
|
|
147
150
|
// State
|
|
148
|
-
const
|
|
151
|
+
const controlAttributes = reactive({
|
|
152
|
+
id: useIdAttribute(),
|
|
153
|
+
...useControlAttributes(),
|
|
154
|
+
});
|
|
149
155
|
|
|
150
156
|
const proxyModelValue = computed({
|
|
151
157
|
get: () => {
|
|
@@ -158,13 +164,25 @@ export default defineComponent({
|
|
|
158
164
|
},
|
|
159
165
|
});
|
|
160
166
|
|
|
167
|
+
// Methods
|
|
168
|
+
function focus(): void {
|
|
169
|
+
control.value?.focus();
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
function blur(): void {
|
|
173
|
+
control.value?.blur();
|
|
174
|
+
}
|
|
175
|
+
|
|
161
176
|
return {
|
|
162
177
|
root,
|
|
178
|
+
control,
|
|
163
179
|
rootStyles,
|
|
164
180
|
controlStyles,
|
|
165
181
|
loaderStyles,
|
|
166
|
-
|
|
182
|
+
controlAttributes,
|
|
167
183
|
proxyModelValue,
|
|
184
|
+
focus,
|
|
185
|
+
blur,
|
|
168
186
|
};
|
|
169
187
|
},
|
|
170
188
|
});
|
|
@@ -139,7 +139,7 @@ export default defineComponent({
|
|
|
139
139
|
|
|
140
140
|
const activeTab = computed(() => props.items.find(({ value }) => value === proxyModelValue.value)!);
|
|
141
141
|
|
|
142
|
-
//
|
|
142
|
+
// Methods
|
|
143
143
|
function rearrangeTabs(items: TabsItem[], activeTab: TabsItem, rootElement: Element): typeof tabs {
|
|
144
144
|
const { children } = rootElement;
|
|
145
145
|
|
|
@@ -16,10 +16,6 @@ export default {
|
|
|
16
16
|
control: { type: 'text' },
|
|
17
17
|
},
|
|
18
18
|
|
|
19
|
-
readonly: {
|
|
20
|
-
control: { type: 'boolean' },
|
|
21
|
-
},
|
|
22
|
-
|
|
23
19
|
maxlength: {
|
|
24
20
|
control: { type: 'number' },
|
|
25
21
|
},
|
|
@@ -68,6 +64,10 @@ export default {
|
|
|
68
64
|
control: { type: 'boolean' },
|
|
69
65
|
},
|
|
70
66
|
|
|
67
|
+
readonly: {
|
|
68
|
+
control: { type: 'boolean' },
|
|
69
|
+
},
|
|
70
|
+
|
|
71
71
|
disabled: {
|
|
72
72
|
control: { type: 'boolean' },
|
|
73
73
|
},
|
|
@@ -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"
|
|
@@ -25,9 +26,9 @@
|
|
|
25
26
|
:disabled="disabled"
|
|
26
27
|
>
|
|
27
28
|
<textarea
|
|
28
|
-
|
|
29
|
+
ref="control"
|
|
29
30
|
v-model="proxyModelValue"
|
|
30
|
-
v-bind="
|
|
31
|
+
v-bind="controlAttributes"
|
|
31
32
|
:class="controlStyles"
|
|
32
33
|
:placeholder="placeholder"
|
|
33
34
|
:required="required"
|
|
@@ -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, PropType, reactive, ref } 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 { OrInputBoxV3 as OrInputBox } from '../or-input-box-v3';
|
|
@@ -132,6 +133,11 @@ export default defineComponent({
|
|
|
132
133
|
default: false,
|
|
133
134
|
},
|
|
134
135
|
|
|
136
|
+
readonly: {
|
|
137
|
+
type: Boolean,
|
|
138
|
+
default: false,
|
|
139
|
+
},
|
|
140
|
+
|
|
135
141
|
disabled: {
|
|
136
142
|
type: Boolean,
|
|
137
143
|
default: false,
|
|
@@ -150,13 +156,15 @@ export default defineComponent({
|
|
|
150
156
|
|
|
151
157
|
expose: [
|
|
152
158
|
'root',
|
|
159
|
+
|
|
160
|
+
'focus',
|
|
161
|
+
'blur',
|
|
153
162
|
],
|
|
154
163
|
|
|
155
164
|
setup(props, context) {
|
|
156
|
-
const currentInstance = getCurrentInstance()!;
|
|
157
|
-
|
|
158
165
|
// Refs
|
|
159
166
|
const root = ref<HTMLElement>();
|
|
167
|
+
const control = ref<HTMLTextAreaElement>();
|
|
160
168
|
|
|
161
169
|
// Styles
|
|
162
170
|
const classAttribute = useClassAttribute();
|
|
@@ -172,7 +180,11 @@ export default defineComponent({
|
|
|
172
180
|
]);
|
|
173
181
|
|
|
174
182
|
// State
|
|
175
|
-
const
|
|
183
|
+
const controlAttributes = reactive({
|
|
184
|
+
id: useIdAttribute(),
|
|
185
|
+
...useControlAttributes(),
|
|
186
|
+
...useValidationAttributes(),
|
|
187
|
+
});
|
|
176
188
|
|
|
177
189
|
const proxyModelValue = computed({
|
|
178
190
|
get: () => {
|
|
@@ -185,22 +197,32 @@ export default defineComponent({
|
|
|
185
197
|
},
|
|
186
198
|
});
|
|
187
199
|
|
|
200
|
+
const currentLength = computed(() => proxyModelValue.value?.toString().length ?? 0);
|
|
201
|
+
const maxLength = computed(() => controlAttributes.maxlength);
|
|
202
|
+
|
|
188
203
|
const invalid = computed(() => !!props.error);
|
|
189
|
-
const readonly = computed(() => context.attrs.readonly as boolean);
|
|
190
204
|
|
|
191
|
-
|
|
192
|
-
|
|
205
|
+
// Methods
|
|
206
|
+
function focus(): void {
|
|
207
|
+
control.value?.focus();
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
function blur(): void {
|
|
211
|
+
control.value?.blur();
|
|
212
|
+
}
|
|
193
213
|
|
|
194
214
|
return {
|
|
195
215
|
root,
|
|
216
|
+
control,
|
|
196
217
|
rootStyles,
|
|
197
218
|
controlStyles,
|
|
198
|
-
|
|
219
|
+
controlAttributes,
|
|
199
220
|
proxyModelValue,
|
|
200
|
-
invalid,
|
|
201
|
-
readonly,
|
|
202
221
|
currentLength,
|
|
203
222
|
maxLength,
|
|
223
|
+
invalid,
|
|
224
|
+
focus,
|
|
225
|
+
blur,
|
|
204
226
|
};
|
|
205
227
|
},
|
|
206
228
|
});
|
package/src/hooks/index.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
export { useClassAttribute } from './useClassAttribute';
|
|
2
|
+
export { useControlAttributes } from './useControlAttributes';
|
|
2
3
|
export { useElevation } from './useElevation';
|
|
4
|
+
export { useIdAttribute } from './useIdAttribute';
|
|
3
5
|
export { useOverflow } from './useOverflow';
|
|
4
6
|
export { useResponsive } from './useResponsive';
|
|
5
7
|
export { default as useToggle } from './useToggle';
|
|
8
|
+
export { useValidationAttributes } from './useValidationAttributes';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { computed, ComputedRef, useAttrs } from 'vue-demi';
|
|
2
|
+
|
|
3
|
+
interface ControlAttributes {
|
|
4
|
+
readonly: ComputedRef<boolean | undefined>;
|
|
5
|
+
disabled: ComputedRef<boolean | undefined>;
|
|
6
|
+
|
|
7
|
+
'force-state': ComputedRef<string | undefined>;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function useControlAttributes(): ControlAttributes {
|
|
11
|
+
const attributes = useAttrs();
|
|
12
|
+
|
|
13
|
+
return {
|
|
14
|
+
readonly: computed(() => attributes['readonly'] as boolean | undefined),
|
|
15
|
+
disabled: computed(() => attributes['disabled'] as boolean | undefined),
|
|
16
|
+
|
|
17
|
+
'force-state': computed(() => attributes['force-state'] as string | undefined),
|
|
18
|
+
};
|
|
19
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { computed, ComputedRef, getCurrentInstance, useAttrs } from 'vue-demi';
|
|
2
|
+
|
|
3
|
+
export function useIdAttribute(): ComputedRef<string | undefined> {
|
|
4
|
+
const attributes = useAttrs(), component = getCurrentInstance();
|
|
5
|
+
|
|
6
|
+
return computed(() => {
|
|
7
|
+
return attributes['id'] as string | undefined ?? component?.uid.toString();
|
|
8
|
+
});
|
|
9
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { computed, ComputedRef, useAttrs } from 'vue-demi';
|
|
2
|
+
|
|
3
|
+
interface ValidationAttributes {
|
|
4
|
+
required: ComputedRef<boolean | undefined>;
|
|
5
|
+
minlength: ComputedRef<number | undefined>;
|
|
6
|
+
maxlength: ComputedRef<number | undefined>;
|
|
7
|
+
pattern: ComputedRef<string | undefined>;
|
|
8
|
+
min: ComputedRef<number | undefined>;
|
|
9
|
+
max: ComputedRef<number | undefined>;
|
|
10
|
+
step: ComputedRef<number | undefined>;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function useValidationAttributes(): ValidationAttributes {
|
|
14
|
+
const attributes = useAttrs();
|
|
15
|
+
|
|
16
|
+
return {
|
|
17
|
+
required: computed(() => attributes['required'] as boolean | undefined),
|
|
18
|
+
minlength: computed(() => attributes['minlength'] as number | undefined),
|
|
19
|
+
maxlength: computed(() => attributes['maxlength'] as number | undefined),
|
|
20
|
+
pattern: computed(() => attributes['pattern'] as string | undefined),
|
|
21
|
+
min: computed(() => attributes['min'] as number | undefined),
|
|
22
|
+
max: computed(() => attributes['max'] as number | undefined),
|
|
23
|
+
step: computed(() => attributes['step'] as number | undefined),
|
|
24
|
+
};
|
|
25
|
+
}
|