@onereach/ui-components 2.72.2-beta.2257.0 → 2.72.2-beta.2260.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. package/dist/bundled/v2/{OrCardCollection-134b0ffe.js → OrCardCollection-06ecb8e1.js} +1 -1
  2. package/dist/bundled/v2/{OrConfirm-3eceda8f.js → OrConfirm-8c0e957d.js} +1 -1
  3. package/dist/bundled/v2/{OrInput-eebed0aa.js → OrInput-00070eee.js} +11 -28
  4. package/dist/bundled/v2/{OrInputBox-10aecdc4.js → OrInputBox-2f559e98.js} +1 -1
  5. package/dist/bundled/v2/{OrSearch-5093c721.js → OrSearch-bb87b34c.js} +2 -2
  6. package/dist/bundled/v2/{OrSelect-974a83f8.js → OrSelect-2ececfc1.js} +2 -2
  7. package/dist/bundled/v2/{OrSidebar-c95ef614.js → OrSidebar-64cc9127.js} +92 -86
  8. package/dist/bundled/v2/OrSidebarCollapseButton-fcc085c7.js +235 -0
  9. package/dist/bundled/v2/{OrTextarea-dba56362.js → OrTextarea-5c57c02b.js} +1 -1
  10. package/dist/bundled/v2/components/index.js +10 -9
  11. package/dist/bundled/v2/components/or-card-collection-v3/index.js +4 -4
  12. package/dist/bundled/v2/components/or-confirm-v3/index.js +3 -3
  13. package/dist/bundled/v2/components/or-input-box-v3/index.js +1 -1
  14. package/dist/bundled/v2/components/or-input-v3/OrInput.vue.d.ts +0 -13
  15. package/dist/bundled/v2/components/or-input-v3/index.js +2 -3
  16. package/dist/bundled/v2/components/or-search-v3/index.js +3 -4
  17. package/dist/bundled/v2/components/or-select-v3/index.js +3 -4
  18. package/dist/bundled/v2/components/or-sidebar-v3/OrSidebar.stories3.d.ts +36 -1
  19. package/dist/bundled/v2/components/or-sidebar-v3/OrSidebar.vue.d.ts +49 -4
  20. package/dist/bundled/v2/components/or-sidebar-v3/index.js +13 -1
  21. package/dist/bundled/v2/components/or-sidebar-v3/partials/OrSidebarCollapseButton.stories3.d.ts +12 -0
  22. package/dist/bundled/v2/components/or-sidebar-v3/partials/OrSidebarCollapseButton.vue.d.ts +53 -0
  23. package/dist/bundled/v2/components/or-sidebar-v3/partials/index.d.ts +1 -0
  24. package/dist/bundled/v2/components/or-sidebar-v3/partials/index.js +18 -0
  25. package/dist/bundled/v2/components/or-sidebar-v3/styles.d.ts +9 -1
  26. package/dist/bundled/v2/components/or-textarea-v3/index.js +2 -2
  27. package/dist/bundled/v2/index.js +10 -9
  28. package/dist/bundled/v3/{OrCardCollection.vue_vue_type_script_lang-bd6bc732.js → OrCardCollection.vue_vue_type_script_lang-e2980d04.js} +1 -1
  29. package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-b7e3ac90.js → OrConfirm.vue_vue_type_script_lang-eb2bfce2.js} +2 -2
  30. package/dist/bundled/v3/{OrInput-889fbd90.js → OrInput-dcf2606e.js} +6 -15
  31. package/dist/bundled/v3/{OrInput.vue_vue_type_script_lang-8d2b69ae.js → OrInput.vue_vue_type_script_lang-27220623.js} +3 -15
  32. package/dist/bundled/v3/{OrInputBox-c8beb6c2.js → OrInputBox-4c7900c2.js} +1 -1
  33. package/dist/bundled/v3/{OrInputBox.vue_vue_type_script_lang-0174af07.js → OrInputBox.vue_vue_type_script_lang-47d98e81.js} +1 -1
  34. package/dist/bundled/v3/{OrSearch.vue_vue_type_script_lang-97d023eb.js → OrSearch.vue_vue_type_script_lang-321907ec.js} +3 -3
  35. package/dist/bundled/v3/{OrSelect.vue_vue_type_script_lang-b20d66fa.js → OrSelect.vue_vue_type_script_lang-7fd5e2f0.js} +4 -4
  36. package/dist/bundled/v3/{OrSidebar.vue_vue_type_script_lang-ce0b152c.js → OrSidebar.vue_vue_type_script_lang-a150808b.js} +75 -80
  37. package/dist/bundled/v3/OrSidebarCollapseButton.vue_vue_type_script_lang-d3e3cd4f.js +185 -0
  38. package/dist/bundled/v3/{OrTextarea.vue_vue_type_script_lang-7c88ef85.js → OrTextarea.vue_vue_type_script_lang-296da567.js} +2 -2
  39. package/dist/bundled/v3/components/index.js +12 -11
  40. package/dist/bundled/v3/components/or-card-collection-v3/index.js +6 -6
  41. package/dist/bundled/v3/components/or-confirm-v3/index.js +5 -5
  42. package/dist/bundled/v3/components/or-input-box-v3/index.js +1 -1
  43. package/dist/bundled/v3/components/or-input-v3/OrInput.vue.d.ts +0 -13
  44. package/dist/bundled/v3/components/or-input-v3/index.js +3 -5
  45. package/dist/bundled/v3/components/or-search-v3/index.js +5 -7
  46. package/dist/bundled/v3/components/or-select-v3/index.js +5 -7
  47. package/dist/bundled/v3/components/or-sidebar-v3/OrSidebar.stories3.d.ts +36 -1
  48. package/dist/bundled/v3/components/or-sidebar-v3/OrSidebar.vue.d.ts +49 -4
  49. package/dist/bundled/v3/components/or-sidebar-v3/index.js +16 -2
  50. package/dist/bundled/v3/components/or-sidebar-v3/partials/OrSidebarCollapseButton.stories3.d.ts +12 -0
  51. package/dist/bundled/v3/components/or-sidebar-v3/partials/OrSidebarCollapseButton.vue.d.ts +53 -0
  52. package/dist/bundled/v3/components/or-sidebar-v3/partials/index.d.ts +1 -0
  53. package/dist/bundled/v3/components/or-sidebar-v3/partials/index.js +17 -0
  54. package/dist/bundled/v3/components/or-sidebar-v3/styles.d.ts +9 -1
  55. package/dist/bundled/v3/components/or-textarea-v3/index.js +3 -3
  56. package/dist/bundled/v3/index.js +39 -22
  57. package/dist/esm/v2/{OrCardCollection-4f8957aa.js → OrCardCollection-251ab033.js} +2 -2
  58. package/dist/esm/v2/{OrConfirm-d87f2ae9.js → OrConfirm-9dbdedd7.js} +1 -1
  59. package/dist/esm/v2/{OrInput-cf2900cd.js → OrInput-59a15d80.js} +11 -28
  60. package/dist/esm/v2/{OrInputBox-1a8887df.js → OrInputBox-9ceb9fc4.js} +1 -1
  61. package/dist/esm/v2/{OrSearch-3e058ad4.js → OrSearch-f42d588d.js} +2 -2
  62. package/dist/esm/v2/{OrSelect-bf21fff7.js → OrSelect-e31d1c8b.js} +2 -2
  63. package/dist/esm/v2/{OrSidebar-fabc7bc9.js → OrSidebar-a10424d2.js} +92 -86
  64. package/dist/esm/v2/OrSidebarCollapseButton-3b461dfe.js +233 -0
  65. package/dist/esm/v2/{OrTextarea-2ec6facd.js → OrTextarea-a5a3572b.js} +1 -1
  66. package/dist/esm/v2/components/index.js +10 -9
  67. package/dist/esm/v2/components/or-card-collection-v3/index.js +4 -4
  68. package/dist/esm/v2/components/or-confirm-v3/index.js +4 -4
  69. package/dist/esm/v2/components/or-input-box-v3/index.js +1 -1
  70. package/dist/esm/v2/components/or-input-v3/OrInput.vue.d.ts +0 -13
  71. package/dist/esm/v2/components/or-input-v3/index.js +3 -4
  72. package/dist/esm/v2/components/or-search-v3/index.js +4 -5
  73. package/dist/esm/v2/components/or-select-v3/index.js +4 -5
  74. package/dist/esm/v2/components/or-sidebar-v3/OrSidebar.stories3.d.ts +36 -1
  75. package/dist/esm/v2/components/or-sidebar-v3/OrSidebar.vue.d.ts +49 -4
  76. package/dist/esm/v2/components/or-sidebar-v3/index.js +13 -1
  77. package/dist/esm/v2/components/or-sidebar-v3/partials/OrSidebarCollapseButton.stories3.d.ts +12 -0
  78. package/dist/esm/v2/components/or-sidebar-v3/partials/OrSidebarCollapseButton.vue.d.ts +53 -0
  79. package/dist/esm/v2/components/or-sidebar-v3/partials/index.d.ts +1 -0
  80. package/dist/esm/v2/components/or-sidebar-v3/partials/index.js +16 -0
  81. package/dist/esm/v2/components/or-sidebar-v3/styles.d.ts +9 -1
  82. package/dist/esm/v2/components/or-textarea-v3/index.js +2 -2
  83. package/dist/esm/v2/index.js +9 -8
  84. package/dist/esm/v3/{OrCardCollection-ab9b6d70.js → OrCardCollection-8b8e3745.js} +2 -2
  85. package/dist/esm/v3/{OrConfirm-223b1303.js → OrConfirm-37454a63.js} +1 -1
  86. package/dist/esm/v3/{OrInput-5afc20da.js → OrInput-bd054213.js} +7 -27
  87. package/dist/esm/v3/{OrInputBox-74646840.js → OrInputBox-e16ade90.js} +1 -1
  88. package/dist/esm/v3/{OrSearch-100ed7c8.js → OrSearch-4c5c44f2.js} +2 -2
  89. package/dist/esm/v3/{OrSelect-f1a2a55d.js → OrSelect-466e50ca.js} +2 -2
  90. package/dist/esm/v3/{OrSidebar-a62972f5.js → OrSidebar-3be35e8d.js} +81 -89
  91. package/dist/esm/v3/OrSidebarCollapseButton-30d0033b.js +204 -0
  92. package/dist/esm/v3/{OrTextarea-3e28946b.js → OrTextarea-37566985.js} +1 -1
  93. package/dist/esm/v3/components/index.js +10 -9
  94. package/dist/esm/v3/components/or-card-collection-v3/index.js +4 -4
  95. package/dist/esm/v3/components/or-confirm-v3/index.js +4 -4
  96. package/dist/esm/v3/components/or-input-box-v3/index.js +1 -1
  97. package/dist/esm/v3/components/or-input-v3/OrInput.vue.d.ts +0 -13
  98. package/dist/esm/v3/components/or-input-v3/index.js +3 -4
  99. package/dist/esm/v3/components/or-search-v3/index.js +4 -5
  100. package/dist/esm/v3/components/or-select-v3/index.js +4 -5
  101. package/dist/esm/v3/components/or-sidebar-v3/OrSidebar.stories3.d.ts +36 -1
  102. package/dist/esm/v3/components/or-sidebar-v3/OrSidebar.vue.d.ts +49 -4
  103. package/dist/esm/v3/components/or-sidebar-v3/index.js +12 -1
  104. package/dist/esm/v3/components/or-sidebar-v3/partials/OrSidebarCollapseButton.stories3.d.ts +12 -0
  105. package/dist/esm/v3/components/or-sidebar-v3/partials/OrSidebarCollapseButton.vue.d.ts +53 -0
  106. package/dist/esm/v3/components/or-sidebar-v3/partials/index.d.ts +1 -0
  107. package/dist/esm/v3/components/or-sidebar-v3/partials/index.js +15 -0
  108. package/dist/esm/v3/components/or-sidebar-v3/styles.d.ts +9 -1
  109. package/dist/esm/v3/components/or-textarea-v3/index.js +2 -2
  110. package/dist/esm/v3/index.js +9 -8
  111. package/package.json +1 -1
  112. package/src/components/or-input-box-v3/styles.ts +2 -2
  113. package/src/components/or-input-v3/OrInput.stories3.ts +0 -4
  114. package/src/components/or-input-v3/OrInput.vue +19 -39
  115. package/src/components/or-sidebar-v3/OrSidebar.docs.mdx +6 -0
  116. package/src/components/or-sidebar-v3/OrSidebar.stories3.ts +253 -12
  117. package/src/components/or-sidebar-v3/OrSidebar.vue +130 -23
  118. package/src/components/or-sidebar-v3/partials/OrSidebarCollapseButton.stories3.ts +48 -0
  119. package/src/components/or-sidebar-v3/partials/OrSidebarCollapseButton.vue +74 -0
  120. package/src/components/or-sidebar-v3/partials/index.ts +1 -0
  121. package/src/components/or-sidebar-v3/styles.ts +164 -9
@@ -7,7 +7,7 @@ import { s as script$5 } from './OrMenu.vue_vue_type_script_lang-df35fd76.js';
7
7
  import './OrMenuItem-807e2a49.js';
8
8
  import { s as script$6 } from './OrMenuItem.vue_vue_type_script_lang-2400ec2a.js';
9
9
  import './OrIcon-1a5c9091.js';
10
- import { s as script$2 } from './OrSearch.vue_vue_type_script_lang-97d023eb.js';
10
+ import { s as script$2 } from './OrSearch.vue_vue_type_script_lang-321907ec.js';
11
11
  import { s as script$4 } from './OrButton.vue_vue_type_script_lang-3b1e442b.js';
12
12
  import { s as script$7 } from './OrIcon.vue_vue_type_script_lang-bdbaad94.js';
13
13
 
@@ -3,10 +3,10 @@ import { l as logicAnd } from './index-01519e46.js';
3
3
  import { defineComponent, ref, computed, watch } from 'vue';
4
4
  import './OrBottomSheet.vue_vue_type_script_lang-bdef5ca2.js';
5
5
  import './OrButton-a1448bfa.js';
6
- import './OrInput-889fbd90.js';
6
+ import './OrInput-dcf2606e.js';
7
7
  import { s as script$2, a as ButtonColor } from './OrButton.vue_vue_type_script_lang-3b1e442b.js';
8
8
  import { s as script$1 } from './OrOverlay.vue_vue_type_script_lang-7edd25f6.js';
9
- import { s as script$3 } from './OrInput.vue_vue_type_script_lang-8d2b69ae.js';
9
+ import { s as script$3 } from './OrInput.vue_vue_type_script_lang-27220623.js';
10
10
 
11
11
  var ConfirmType;
12
12
  (function (ConfirmType) {
@@ -1,5 +1,5 @@
1
- import { s as script } from './OrInput.vue_vue_type_script_lang-8d2b69ae.js';
2
- import { resolveComponent, openBlock, createElementBlock, normalizeClass, createBlock, withCtx, renderSlot, createTextVNode, toDisplayString, createCommentVNode, createVNode, withDirectives, createElementVNode, mergeProps, vModelDynamic, Fragment, withModifiers, createSlots } from 'vue';
1
+ import { s as script } from './OrInput.vue_vue_type_script_lang-27220623.js';
2
+ import { resolveComponent, openBlock, createElementBlock, normalizeClass, createBlock, withCtx, renderSlot, createTextVNode, toDisplayString, createCommentVNode, createVNode, withDirectives, createElementVNode, mergeProps, vModelDynamic, withModifiers, Fragment, createSlots } from 'vue';
3
3
  import { s as styleInject } from './style-inject.es-4c6f2515.js';
4
4
 
5
5
  const _hoisted_1 = ["type", "placeholder", "required", "readonly", "disabled"];
@@ -8,7 +8,6 @@ const _hoisted_2 = {
8
8
  };
9
9
  function render(_ctx, _cache, $props, $setup, $data, $options) {
10
10
  const _component_OrLabel = resolveComponent("OrLabel");
11
- const _component_OrLoader = resolveComponent("OrLoader");
12
11
  const _component_OrIconButton = resolveComponent("OrIconButton");
13
12
  const _component_OrIcon = resolveComponent("OrIcon");
14
13
  const _component_OrInputBox = resolveComponent("OrInputBox");
@@ -32,7 +31,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
32
31
  variant: _ctx.disableDefaultStyles ? 'unstyled' : 'styled',
33
32
  size: _ctx.size,
34
33
  invalid: _ctx.invalid,
35
- readonly: _ctx.readonly || _ctx.loading,
34
+ readonly: _ctx.readonly,
36
35
  disabled: _ctx.disabled
37
36
  }, {
38
37
  default: withCtx(() => [withDirectives(createElementVNode("input", mergeProps({
@@ -43,20 +42,13 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
43
42
  type: _ctx.type === 'password' && _ctx.disclosed ? 'text' : _ctx.type,
44
43
  placeholder: _ctx.placeholder,
45
44
  required: _ctx.required,
46
- readonly: _ctx.readonly || _ctx.loading,
45
+ readonly: _ctx.readonly,
47
46
  disabled: _ctx.disabled,
48
47
  onKeydown: _cache[1] || (_cache[1] = $event => _ctx.$emit('keydown', $event)),
49
48
  onKeyup: _cache[2] || (_cache[2] = $event => _ctx.$emit('keyup', $event)),
50
49
  onFocus: _cache[3] || (_cache[3] = $event => _ctx.$emit('focus', $event)),
51
50
  onBlur: _cache[4] || (_cache[4] = $event => _ctx.$emit('blur', $event))
52
- }), null, 16 /* FULL_PROPS */, _hoisted_1), [[vModelDynamic, _ctx.proxyModelValue]]), createElementVNode("div", _hoisted_2, [_ctx.loading ? (openBlock(), createBlock(_component_OrLoader, {
53
- key: 0,
54
- variant: 'circular',
55
- color: 'primary',
56
- size: _ctx.isMobile ? 'm' : 's'
57
- }, null, 8 /* PROPS */, ["size"])) : (openBlock(), createElementBlock(Fragment, {
58
- key: 1
59
- }, [_ctx.type === 'password' ? (openBlock(), createBlock(_component_OrIconButton, {
51
+ }), null, 16 /* FULL_PROPS */, _hoisted_1), [[vModelDynamic, _ctx.proxyModelValue]]), createElementVNode("div", _hoisted_2, [_ctx.type === 'password' ? (openBlock(), createBlock(_component_OrIconButton, {
60
52
  key: 0,
61
53
  icon: {
62
54
  icon: _ctx.disclosed ? 'visibility_off' : 'visibility',
@@ -77,8 +69,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
77
69
  key: 1,
78
70
  icon: 'search',
79
71
  variant: 'outlined'
80
- }))], 64 /* STABLE_FRAGMENT */)) : createCommentVNode("v-if", true)], 64 /* STABLE_FRAGMENT */))])]),
81
-
72
+ }))], 64 /* STABLE_FRAGMENT */)) : createCommentVNode("v-if", true)])]),
82
73
  _: 1 /* STABLE */
83
74
  }, 8 /* PROPS */, ["variant", "size", "invalid", "readonly", "disabled"]), !_ctx.invalid ? (openBlock(), createElementBlock(Fragment, {
84
75
  key: 1
@@ -4,17 +4,14 @@ import { s as script$1 } from './OrError.vue_vue_type_script_lang-53648a65.js';
4
4
  import { s as script$2 } from './OrHint.vue_vue_type_script_lang-e322f61e.js';
5
5
  import './OrIcon-1a5c9091.js';
6
6
  import './OrIconButton-e0566ecf.js';
7
- import './OrInputBox-c8beb6c2.js';
8
- import { s as script$5, a as InputBoxSize } from './OrInputBox.vue_vue_type_script_lang-0174af07.js';
7
+ import './OrInputBox-4c7900c2.js';
8
+ import { s as script$5, a as InputBoxSize } from './OrInputBox.vue_vue_type_script_lang-47d98e81.js';
9
9
  import './OrLabel-c556887e.js';
10
10
  import { s as script$6 } from './OrLabel.vue_vue_type_script_lang-191d2304.js';
11
- import './OrLoader-123ef8c4.js';
12
11
  import { a as useIdAttribute, u as useControlAttributes } from './useIdAttribute-b2e42f31.js';
13
12
  import { u as useValidationAttributes } from './useValidationAttributes-5428d8fa.js';
14
- import { u as useResponsive } from './useResponsive-9d397e2a.js';
15
13
  import { s as script$3 } from './OrIcon.vue_vue_type_script_lang-bdbaad94.js';
16
14
  import { s as script$4 } from './OrIconButton.vue_vue_type_script_lang-7d1c3fe1.js';
17
- import { s as script$7 } from './OrLoader.vue_vue_type_script_lang-4c3c1ac9.js';
18
15
 
19
16
  var InputType;
20
17
  (function (InputType) {
@@ -45,8 +42,7 @@ var script = defineComponent({
45
42
  OrIcon: script$3,
46
43
  OrIconButton: script$4,
47
44
  OrInputBox: script$5,
48
- OrLabel: script$6,
49
- OrLoader: script$7
45
+ OrLabel: script$6
50
46
  },
51
47
  model: {
52
48
  prop: 'modelValue',
@@ -81,10 +77,6 @@ var script = defineComponent({
81
77
  type: String,
82
78
  default: undefined
83
79
  },
84
- loading: {
85
- type: Boolean,
86
- default: false
87
- },
88
80
  required: {
89
81
  type: Boolean,
90
82
  default: false
@@ -130,9 +122,6 @@ var script = defineComponent({
130
122
  const maxLength = computed(() => controlAttributes.maxlength);
131
123
  const invalid = computed(() => !!props.error);
132
124
  const disclosed = ref(false);
133
- const {
134
- isMobile
135
- } = useResponsive();
136
125
  // Methods
137
126
  function focus() {
138
127
  var _a;
@@ -153,7 +142,6 @@ var script = defineComponent({
153
142
  maxLength,
154
143
  invalid,
155
144
  disclosed,
156
- isMobile,
157
145
  focus,
158
146
  blur
159
147
  };
@@ -1,4 +1,4 @@
1
- import { s as script } from './OrInputBox.vue_vue_type_script_lang-0174af07.js';
1
+ import { s as script } from './OrInputBox.vue_vue_type_script_lang-47d98e81.js';
2
2
  import { openBlock, createElementBlock, normalizeClass, renderSlot } from 'vue';
3
3
 
4
4
  const _hoisted_1 = ["invalid", "readonly", "disabled"];
@@ -50,7 +50,7 @@ const InputBoxRootSizes = {
50
50
  // Box
51
51
  'children:min-h-[30px]',
52
52
  // Spacing
53
- 'first-child:pl-md first-child:md:pl-sm+', 'last-child:pr-md last-child:md:pr-sm+', 'children:py-[6px]', 'gap-[6px]',
53
+ 'first-child:pl-sm', 'last-child:pr-sm', 'children:py-[6px]', 'gap-[6px]',
54
54
  // Typography
55
55
  'typography-caption-regular']
56
56
  };
@@ -1,8 +1,8 @@
1
1
  import { debouncedWatch } from '@vueuse/core';
2
2
  import { defineComponent, ref, computed, watch } from 'vue';
3
- import './OrInput-889fbd90.js';
4
- import { s as script$1 } from './OrInput.vue_vue_type_script_lang-8d2b69ae.js';
5
- import { a as InputBoxSize } from './OrInputBox.vue_vue_type_script_lang-0174af07.js';
3
+ import './OrInput-dcf2606e.js';
4
+ import { s as script$1 } from './OrInput.vue_vue_type_script_lang-27220623.js';
5
+ import { a as InputBoxSize } from './OrInputBox.vue_vue_type_script_lang-47d98e81.js';
6
6
 
7
7
  var script = defineComponent({
8
8
  name: 'OrSearch',
@@ -4,8 +4,8 @@ import { s as styleInject } from './style-inject.es-4c6f2515.js';
4
4
  import './OrHint-5d5e4d99.js';
5
5
  import { s as script$2 } from './OrExpansionPanel.vue_vue_type_script_lang-2cc8964c.js';
6
6
  import './OrIcon-1a5c9091.js';
7
- import './OrInput-889fbd90.js';
8
- import './OrInputBox-c8beb6c2.js';
7
+ import './OrInput-dcf2606e.js';
8
+ import './OrInputBox-4c7900c2.js';
9
9
  import './OrLabel-c556887e.js';
10
10
  import './OrMenuItem-807e2a49.js';
11
11
  import './OrPopover-1a488f88.js';
@@ -15,8 +15,8 @@ import { u as useOverflow } from './useOverflow-6dce216b.js';
15
15
  import { s as script$4 } from './OrError.vue_vue_type_script_lang-53648a65.js';
16
16
  import { s as script$5 } from './OrHint.vue_vue_type_script_lang-e322f61e.js';
17
17
  import { s as script$6 } from './OrIcon.vue_vue_type_script_lang-bdbaad94.js';
18
- import { s as script$7 } from './OrInput.vue_vue_type_script_lang-8d2b69ae.js';
19
- import { s as script$8, a as InputBoxSize } from './OrInputBox.vue_vue_type_script_lang-0174af07.js';
18
+ import { s as script$7 } from './OrInput.vue_vue_type_script_lang-27220623.js';
19
+ import { s as script$8, a as InputBoxSize } from './OrInputBox.vue_vue_type_script_lang-47d98e81.js';
20
20
  import { s as script$9 } from './OrLabel.vue_vue_type_script_lang-191d2304.js';
21
21
  import { s as script$a } from './OrMenuItem.vue_vue_type_script_lang-2400ec2a.js';
22
22
  import { s as script$b } from './OrPopover.vue_vue_type_script_lang-b1102c1a.js';
@@ -1,91 +1,46 @@
1
1
  import { useDraggable, useElementBounding } from '@vueuse/core';
2
2
  import _ from 'lodash';
3
- import { defineComponent, ref, computed, watch } from 'vue';
3
+ import { resolveComponent, openBlock, createElementBlock, normalizeClass, createVNode, defineComponent, ref, computed, useSlots, watch } from 'vue';
4
+ import { s as script$1, O as OrSidebarPlacement, S as SidebarRoot, a as SidebarBar, b as SidebarSides, c as SidebarToolbar, C as CollapsibleSidebarToolbar, d as SidebarToolbarSides, e as SidebarResize, f as SidebarResizeSides, g as SidebarResizingSides, h as SidebarCollapseButton, i as SidebarCollapseButtonSides, j as SidebarMain, k as SidebarHeader, l as SidebarContent, m as SidebarFooter } from './OrSidebarCollapseButton.vue_vue_type_script_lang-d3e3cd4f.js';
4
5
 
5
- var OrSidebarPlacement;
6
- (function (OrSidebarPlacement) {
7
- OrSidebarPlacement["left"] = "left";
8
- OrSidebarPlacement["right"] = "right";
9
- })(OrSidebarPlacement || (OrSidebarPlacement = {}));
6
+ function render(_ctx, _cache, $props, $setup, $data, $options) {
7
+ const _component_or_icon_button = resolveComponent("or-icon-button");
8
+ return openBlock(), createElementBlock("div", {
9
+ ref: "root",
10
+ class: normalizeClass(_ctx.rootStyles)
11
+ }, [createVNode(_component_or_icon_button, {
12
+ class: normalizeClass(_ctx.buttonStyles),
13
+ icon: {
14
+ icon: _ctx.icon,
15
+ size: 'inherit'
16
+ },
17
+ color: "inherit",
18
+ onClick: _cache[0] || (_cache[0] = $event => _ctx.$emit('update:modelValue', !_ctx.modelValue))
19
+ }, null, 8 /* PROPS */, ["class", "icon"])], 2 /* CLASS */);
20
+ }
10
21
 
11
- const SidebarRoot = [
12
- // Position
13
- 'relative',
14
- // Layout
15
- 'flex', 'flex-col', 'shrink-0',
16
- // Box
17
- 'min-h-0', 'p-0'];
18
- const SidebarRootSides = {
19
- [OrSidebarPlacement.left]: [
20
- // Borders
21
- 'border-r-[1px]', 'border-r-solid', 'border-r-secondary dark:border-r-secondary-dark'],
22
- [OrSidebarPlacement.right]: [
23
- // Borders
24
- 'border-l-[1px]', 'border-l-solid', 'border-l-secondary dark:border-l-secondary-dark']
25
- };
26
- const SidebarResize = [
27
- // Position
28
- 'absolute', 'inset-y-none', 'z-[1]',
29
- // Box
30
- 'w-[12px]', 'h-[100%]',
31
- // Cursor
32
- 'cursor-ew-resize'];
33
- const SidebarResizeSides = {
34
- [OrSidebarPlacement.left]: [
35
- // Position
36
- '-right-[1px]',
37
- // Borders
38
- 'hover:border-r-2', 'hover:border-r-primary hover:dark:border-r-primary-dark',
39
- // Transition
40
- 'transition-[border-right]'],
41
- [OrSidebarPlacement.right]: [
42
- // Position
43
- '-left-[1px]',
44
- // Borders
45
- 'hover:border-l-2', 'hover:border-l-primary hover:dark:border-l-primary-dark',
46
- // Transition
47
- 'transition-[border-left]']
48
- };
49
- const SidebarResizingSides = {
50
- [OrSidebarPlacement.left]: [
51
- // Borders
52
- 'border-r-2', 'border-r-primary dark:border-r-primary-dark'],
53
- [OrSidebarPlacement.right]: [
54
- // Borders
55
- 'border-l-2', 'border-l-primary dark:border-l-primary-dark']
56
- };
57
- const SidebarMain = [
58
- // Layout
59
- 'flex', 'flex-col', 'grow',
60
- // Box
61
- 'min-h-0'];
62
- const SidebarHeader = [
63
- // Sizing
64
- 'p-md'];
65
- const SidebarContent = [
66
- // Layout
67
- 'grow', 'overflow-auto',
68
- // Sizing
69
- 'p-md'];
70
- const SidebarFooter = [
71
- // Sizing
72
- 'p-md',
73
- // Borders
74
- 'border-t-[1px]', 'border-t-solid', 'border-t-secondary dark:border-t-secondary-dark'];
22
+ script$1.render = render;
23
+ script$1.__file = "src/components/or-sidebar-v3/partials/OrSidebarCollapseButton.vue";
75
24
 
76
25
  var script = defineComponent({
77
26
  name: 'OrSidebar',
27
+ components: {
28
+ OrSidebarCollapseButton: script$1
29
+ },
78
30
  props: {
79
31
  width: {
80
32
  type: Number,
81
- required: false,
82
- default: 0,
33
+ default: 320,
83
34
  validator: value => _.isNumber(value) && value >= 0
84
35
  },
85
36
  minimumWidth: {
86
37
  type: Number,
87
- required: false,
88
- default: 350,
38
+ default: 256,
39
+ validator: value => _.isNumber(value) && value >= 0
40
+ },
41
+ maximumWidth: {
42
+ type: Number,
43
+ default: 384,
89
44
  validator: value => _.isNumber(value) && value >= 0
90
45
  },
91
46
  /**
@@ -99,9 +54,18 @@ var script = defineComponent({
99
54
  type: String,
100
55
  default: OrSidebarPlacement.right,
101
56
  validator: value => _.includes(_.values(OrSidebarPlacement), value)
57
+ },
58
+ draggable: {
59
+ type: Boolean,
60
+ default: true
61
+ },
62
+ collapsible: {
63
+ type: Boolean,
64
+ default: false
102
65
  }
103
66
  },
104
- emits: ['change:width'],
67
+ emits: ['change:width', 'open', 'close'],
68
+ expose: ['root', 'open', 'close'],
105
69
  setup(props, {
106
70
  emit
107
71
  }) {
@@ -112,16 +76,26 @@ var script = defineComponent({
112
76
  var _a;
113
77
  return (_a = root.value) === null || _a === void 0 ? void 0 : _a.parentElement;
114
78
  });
79
+ // Slots
80
+ const {
81
+ toolbar: toolbarSlot
82
+ } = useSlots();
115
83
  // State
116
84
  const startPositionX = ref(0);
117
85
  const isResizing = ref(false);
86
+ const isCollapsed = ref(false);
87
+ const maximumWidth = ref(props.maximumWidth || 384);
118
88
  const localWidth = ref(props.width >= props.minimumWidth ? props.width : props.minimumWidth);
89
+ const isShowingToolbar = computed(() => !!toolbarSlot);
119
90
  // Styles
120
91
  const sidebarStyle = computed(() => ({
121
- width: localWidth.value + 'px'
92
+ width: (isCollapsed.value ? 16 : localWidth.value) + 'px'
122
93
  }));
123
- const rootStyles = computed(() => ['or-sidebar', ...SidebarRoot, ...SidebarRootSides[props.side]]);
94
+ const rootStyles = computed(() => ['or-sidebar', ...SidebarRoot]);
95
+ const sidebarStyles = computed(() => [...SidebarBar, ...SidebarSides[props.side]]);
96
+ const toolbarStyles = computed(() => [...SidebarToolbar, ...(props.collapsible ? CollapsibleSidebarToolbar : []), ...SidebarToolbarSides[props.side]]);
124
97
  const resizeStyles = computed(() => [...SidebarResize, ...SidebarResizeSides[props.side], ...(isResizing.value ? SidebarResizingSides[props.side] : [])]);
98
+ const collapsibleButtonStyles = computed(() => [...SidebarCollapseButton, ...SidebarCollapseButtonSides[props.side]]);
125
99
  const mainStyles = computed(() => [...SidebarMain]);
126
100
  const headerStyles = computed(() => [...SidebarHeader]);
127
101
  const contentStyles = computed(() => [...SidebarContent]);
@@ -147,8 +121,15 @@ var script = defineComponent({
147
121
  isResizing.value = false;
148
122
  }
149
123
  });
124
+ // Methods
125
+ function open() {
126
+ isCollapsed.value = false;
127
+ }
128
+ function close() {
129
+ isCollapsed.value = true;
130
+ }
150
131
  const {
151
- width: maximumWidth
132
+ width: containerWidth
152
133
  } = useElementBounding(parentContainer);
153
134
  watch(() => props.width, newValue => {
154
135
  if (newValue !== localWidth.value) {
@@ -158,24 +139,38 @@ var script = defineComponent({
158
139
  watch(() => props.minimumWidth, newMinimum => {
159
140
  if (newMinimum > localWidth.value) localWidth.value = newMinimum;
160
141
  });
142
+ watch(() => props.maximumWidth, newMaximum => {
143
+ if (newMaximum < maximumWidth.value) maximumWidth.value = newMaximum;
144
+ });
145
+ watch(containerWidth, newMaximum => {
146
+ if (newMaximum < maximumWidth.value) maximumWidth.value = newMaximum;
147
+ });
161
148
  watch(maximumWidth, newMaximum => {
162
149
  if (newMaximum < localWidth.value) localWidth.value = newMaximum;
163
150
  });
164
151
  watch(localWidth, val => emit('change:width', val));
152
+ watch(isCollapsed, val => emit(val ? 'close' : 'open'));
165
153
  return {
166
154
  root,
167
155
  resizeBar,
168
156
  isResizing,
157
+ isCollapsed,
169
158
  localWidth,
159
+ isShowingToolbar,
170
160
  sidebarStyle,
171
161
  rootStyles,
162
+ sidebarStyles,
163
+ toolbarStyles,
172
164
  resizeStyles,
165
+ collapsibleButtonStyles,
173
166
  mainStyles,
174
167
  headerStyles,
175
168
  contentStyles,
176
- footerStyles
169
+ footerStyles,
170
+ open,
171
+ close
177
172
  };
178
173
  }
179
174
  });
180
175
 
181
- export { OrSidebarPlacement as O, script as s };
176
+ export { script as s };
@@ -0,0 +1,185 @@
1
+ import _ from 'lodash';
2
+ import { defineComponent, ref, computed } from 'vue';
3
+ import './OrIconButton-e0566ecf.js';
4
+ import { s as script$1 } from './OrIconButton.vue_vue_type_script_lang-7d1c3fe1.js';
5
+
6
+ var OrSidebarPlacement;
7
+ (function (OrSidebarPlacement) {
8
+ OrSidebarPlacement["left"] = "left";
9
+ OrSidebarPlacement["right"] = "right";
10
+ })(OrSidebarPlacement || (OrSidebarPlacement = {}));
11
+
12
+ const SidebarRoot = [
13
+ // Position
14
+ 'relative',
15
+ // Layout
16
+ 'flex', 'flex-row', 'shrink-0',
17
+ // Box
18
+ 'min-w-0', 'h-auto', 'p-0',
19
+ // Theme
20
+ 'bg-background', 'dark:bg-background-dark'];
21
+ const SidebarBar = [
22
+ // Position
23
+ 'relative',
24
+ // Layout
25
+ 'flex', 'flex-col', 'shrink-0', 'grow',
26
+ // Box
27
+ 'min-h-0', 'p-0',
28
+ // Theme
29
+ 'text-on-background', 'dark:text-on-background-dark',
30
+ // Transition
31
+ 'transition-[width]'];
32
+ const SidebarToolbar = [
33
+ // Position
34
+ 'relative',
35
+ // Layout
36
+ 'flex', 'flex-col', 'shrink-0', 'grow', 'overflow-auto', 'items-center',
37
+ // Sizing
38
+ 'gap-md',
39
+ // Box
40
+ 'min-h-0', 'min-w-xl', 'p-[6px]', 'py-md+',
41
+ // Theme
42
+ 'text-outline', 'dark:text-outline-dark'];
43
+ const CollapsibleSidebarToolbar = ['pt-[56px]'];
44
+ const SidebarSides = {
45
+ [OrSidebarPlacement.left]: [
46
+ // Borders
47
+ 'border-r-[1px]', 'border-r-solid', 'border-r-outline-variant dark:border-r-outline-variant-dark'],
48
+ [OrSidebarPlacement.right]: [
49
+ // Borders
50
+ 'border-l-[1px]', 'border-l-solid', 'border-l-outline-variant dark:border-l-outline-variant-dark']
51
+ };
52
+ const SidebarToolbarSides = {
53
+ [OrSidebarPlacement.left]: [
54
+ // Borders
55
+ 'border-r-[1px]', 'border-r-solid', 'border-r-outline-variant dark:border-r-outline-variant-dark'],
56
+ [OrSidebarPlacement.right]: [
57
+ // Borders
58
+ 'border-l-[1px]', 'border-l-solid', 'border-l-outline-variant dark:border-l-outline-variant-dark']
59
+ };
60
+ const SidebarResize = [
61
+ // Position
62
+ 'absolute', 'inset-y-none', 'z-[1]',
63
+ // Box
64
+ 'w-sm+', 'h-[100%]',
65
+ // Cursor
66
+ 'cursor-ew-resize'];
67
+ const SidebarResizeSides = {
68
+ [OrSidebarPlacement.left]: [
69
+ // Position
70
+ '-right-[1px]',
71
+ // Borders
72
+ 'hover:border-r-2', 'hover:border-r-primary-hover hover:dark:border-r-primary-hover-dark',
73
+ // Transition
74
+ 'transition-[border-right]'],
75
+ [OrSidebarPlacement.right]: [
76
+ // Position
77
+ '-left-[1px]',
78
+ // Borders
79
+ 'hover:border-l-2', 'hover:border-l-primary-hover hover:dark:border-l-primary-hover-dark',
80
+ // Transition
81
+ 'transition-[border-left]']
82
+ };
83
+ const SidebarCollapseButton = [
84
+ // Position
85
+ 'absolute', 'top-md', 'inset-y-none', 'z-[1]'];
86
+ const SidebarCollapseButtonSides = {
87
+ [OrSidebarPlacement.left]: [
88
+ // Position
89
+ '-right-[12px]'],
90
+ [OrSidebarPlacement.right]: [
91
+ // Position
92
+ '-left-[12px]']
93
+ };
94
+ const SidebarResizingSides = {
95
+ [OrSidebarPlacement.left]: [
96
+ // Borders
97
+ 'border-r-2', 'border-r-primary-hover dark:border-r-primary-hover-dark'],
98
+ [OrSidebarPlacement.right]: [
99
+ // Borders
100
+ 'border-l-2', 'border-l-primary-hover dark:border-l-primary-hover-dark']
101
+ };
102
+ const SidebarMain = [
103
+ // Layout
104
+ 'flex', 'flex-col', 'grow', 'overflow-x-hidden',
105
+ // Box
106
+ 'min-h-0'];
107
+ const SidebarHeader = [
108
+ // Layout
109
+ 'shrink-0', 'overflow-hidden',
110
+ // Sizing
111
+ 'p-md',
112
+ // Typography
113
+ 'typography-headline-2', 'whitespace-nowrap', 'text-ellipsis'];
114
+ const SidebarContent = [
115
+ // Layout
116
+ 'grow', 'overflow-auto',
117
+ // Sizing
118
+ 'p-md'];
119
+ const SidebarFooter = [
120
+ // Layout
121
+ 'shrink-0', 'overflow-x-hidden',
122
+ // Sizing
123
+ 'p-md',
124
+ // Borders
125
+ 'border-t-[1px]', 'border-t-solid', 'border-t-outline-variant dark:border-t-outline-variant-dark'];
126
+ const CollapseButtonContainer = [
127
+ // Box
128
+ 'w-[24px]', 'h-[24px]', 'rounded-full',
129
+ // Theme
130
+ 'text-primary dark:text-primary-dark', 'bg-background dark:bg-background-dark'];
131
+ const CollapseButton = [
132
+ // Box
133
+ 'w-[24px]', 'h-[24px]',
134
+ // Typography
135
+ '!text-[16px]',
136
+ // Borders
137
+ '!border-[1px]', '!border-solid',
138
+ // Theme
139
+ '!text-primary dark:!text-primary-dark', '!bg-background dark:!bg-background-dark', '!border-outline-variant dark:!border-outline-variant-dark', '!outline-none',
140
+ // Theme (hover)
141
+ 'hover:!text-primary hover:dark:!text-primary-dark', 'hover:!bg-primary-opacity-0-08 dark:hover:!bg-primary-opacity-0-08-dark', 'hover:!border-outline dark:hover:!border-outline-dark',
142
+ // Theme (active)
143
+ 'active:!text-primary active:dark:!text-primary-dark', 'active:!bg-primary-opacity-0-12 dark:active:!bg-primary-opacity-0-12-dark', 'active:!border-primary dark:active:!border-primary-dark',
144
+ // Theme (focus)
145
+ 'focus:!text-primary focus:dark:!text-primary-dark', 'focus:!bg-primary-opacity-0-12 dark:focus:!bg-primary-opacity-0-12-dark', 'focus:!border-outline dark:focus:!border-outline-dark',
146
+ // Theme (disabled)
147
+ 'disabled:!text-on-disabled disabled:dark:!text-on-disabled-dark', 'disabled:!bg-background disabled:dark:!bg-background-dark', 'disabled:!border-outline-variant disabled:dark:!border-outline-variant-dark'];
148
+
149
+ var script = defineComponent({
150
+ name: 'OrSidebarCollapseButton',
151
+ components: {
152
+ OrIconButton: script$1
153
+ },
154
+ props: {
155
+ /**
156
+ * Must be `true` if sidebar is collapsed.
157
+ */
158
+ modelValue: {
159
+ type: Boolean,
160
+ default: false
161
+ },
162
+ side: {
163
+ type: String,
164
+ default: OrSidebarPlacement.right,
165
+ validator: value => _.includes(_.values(OrSidebarPlacement), value)
166
+ }
167
+ },
168
+ emits: ['update:modelValue'],
169
+ expose: ['root'],
170
+ setup(props) {
171
+ // Refs
172
+ const root = ref();
173
+ const rootStyles = computed(() => ['or-sidebar-collapse-button', ...CollapseButtonContainer]);
174
+ const buttonStyles = computed(() => [...CollapseButton]);
175
+ const icon = computed(() => props.side === OrSidebarPlacement.left !== props.modelValue ? 'keyboard_arrow_left' : 'keyboard_arrow_right');
176
+ return {
177
+ root,
178
+ rootStyles,
179
+ buttonStyles,
180
+ icon
181
+ };
182
+ }
183
+ });
184
+
185
+ export { CollapsibleSidebarToolbar as C, OrSidebarPlacement as O, SidebarRoot as S, SidebarBar as a, SidebarSides as b, SidebarToolbar as c, SidebarToolbarSides as d, SidebarResize as e, SidebarResizeSides as f, SidebarResizingSides as g, SidebarCollapseButton as h, SidebarCollapseButtonSides as i, SidebarMain as j, SidebarHeader as k, SidebarContent as l, SidebarFooter as m, script as s };
@@ -1,12 +1,12 @@
1
1
  import { defineComponent, ref, computed, reactive } from 'vue';
2
2
  import './OrHint-5d5e4d99.js';
3
- import './OrInputBox-c8beb6c2.js';
3
+ import './OrInputBox-4c7900c2.js';
4
4
  import './OrLabel-c556887e.js';
5
5
  import { a as useIdAttribute, u as useControlAttributes } from './useIdAttribute-b2e42f31.js';
6
6
  import { u as useValidationAttributes } from './useValidationAttributes-5428d8fa.js';
7
7
  import { s as script$1 } from './OrError.vue_vue_type_script_lang-53648a65.js';
8
8
  import { s as script$2 } from './OrHint.vue_vue_type_script_lang-e322f61e.js';
9
- import { s as script$3, a as InputBoxSize } from './OrInputBox.vue_vue_type_script_lang-0174af07.js';
9
+ import { s as script$3, a as InputBoxSize } from './OrInputBox.vue_vue_type_script_lang-47d98e81.js';
10
10
  import { s as script$4 } from './OrLabel.vue_vue_type_script_lang-191d2304.js';
11
11
 
12
12
  const TextareaRoot = [