@onereach/ui-components 2.70.3-beta.2213.0 → 2.70.3-beta.2224.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 (186) hide show
  1. package/dist/bundled/v2/{OrCardCollection-89428bbf.js → OrCardCollection-166cfcc6.js} +5 -5
  2. package/dist/bundled/v2/{OrConfirm-56d01cff.js → OrConfirm-55b89b17.js} +4 -4
  3. package/dist/bundled/v2/{OrListOfInputs-8f076650.js → OrListOfInputs-ab7f9d97.js} +4 -4
  4. package/dist/bundled/v2/OrNumberInput-face8ccc.js +227 -0
  5. package/dist/bundled/v2/OrPassword-a818e7b5.js +227 -0
  6. package/dist/bundled/v2/{OrSearch-f7cfa52f.js → OrSearch-832d7978.js} +4 -4
  7. package/dist/bundled/v2/OrSidebar-c95ef614.js +230 -0
  8. package/dist/bundled/v2/{OrPassword-7da938aa.js → OrTextarea-71ff236d.js} +7 -449
  9. package/dist/bundled/v2/components/index.d.ts +5 -1
  10. package/dist/bundled/v2/components/index.js +10 -8
  11. package/dist/bundled/v2/components/or-card-collection/index.js +4 -4
  12. package/dist/bundled/v2/components/or-confirm/index.js +2 -2
  13. package/dist/bundled/v2/components/or-input/index.d.ts +1 -0
  14. package/dist/bundled/v2/components/or-input/index.js +13 -0
  15. package/dist/bundled/v2/components/or-list-of-inputs/index.js +2 -2
  16. package/dist/bundled/v2/components/or-number-input/index.d.ts +1 -0
  17. package/dist/bundled/v2/components/or-number-input/index.js +14 -0
  18. package/dist/bundled/v2/components/or-password/index.d.ts +1 -0
  19. package/dist/bundled/v2/components/{or-inputs → or-password}/index.js +3 -4
  20. package/dist/bundled/v2/components/or-search/index.d.ts +1 -0
  21. package/dist/bundled/v2/components/or-search/index.js +25 -0
  22. package/dist/bundled/v2/components/or-sidebar-v3/OrSidebar.stories3.d.ts +1 -36
  23. package/dist/bundled/v2/components/or-sidebar-v3/OrSidebar.vue.d.ts +4 -49
  24. package/dist/bundled/v2/components/or-sidebar-v3/index.js +1 -13
  25. package/dist/bundled/v2/components/or-sidebar-v3/styles.d.ts +1 -8
  26. package/dist/bundled/v2/components/or-textarea/index.d.ts +1 -0
  27. package/dist/bundled/v2/components/or-textarea/index.js +13 -0
  28. package/dist/bundled/v2/index.js +10 -8
  29. package/dist/bundled/v3/{OrCardCollection.vue_vue_type_script_lang-d8124dda.js → OrCardCollection.vue_vue_type_script_lang-cd84f344.js} +4 -4
  30. package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-0f16fc67.js → OrConfirm.vue_vue_type_script_lang-41b4d791.js} +2 -1
  31. package/dist/bundled/v3/{OrInput-7d4b571a.js → OrInput-704e72ba.js} +5 -193
  32. package/dist/bundled/v3/OrInput.vue_vue_type_script_lang-409235cc.js +190 -0
  33. package/dist/bundled/v3/{OrListOfInputs.vue_vue_type_script_lang-62dbf1e7.js → OrListOfInputs.vue_vue_type_script_lang-6c5cf7a5.js} +2 -1
  34. package/dist/bundled/v3/OrNumberInput.vue_vue_type_script_lang-f061d829.js +113 -0
  35. package/dist/bundled/v3/OrPassword.vue_vue_type_script_lang-b75f6543.js +99 -0
  36. package/dist/bundled/v3/{OrSearch.vue_vue_type_script_lang-16fbccc0.js → OrSearch.vue_vue_type_script_lang-5356fa79.js} +2 -1
  37. package/dist/bundled/v3/OrSidebar.vue_vue_type_script_lang-ce0b152c.js +181 -0
  38. package/dist/bundled/v3/OrTextarea.vue_vue_type_script_lang-69ea22e9.js +187 -0
  39. package/dist/bundled/v3/components/index.d.ts +5 -1
  40. package/dist/bundled/v3/components/index.js +11 -8
  41. package/dist/bundled/v3/components/or-card-collection/index.js +5 -4
  42. package/dist/bundled/v3/components/or-confirm/index.js +3 -2
  43. package/dist/bundled/v3/components/or-input/index.d.ts +1 -0
  44. package/dist/bundled/v3/components/or-input/index.js +14 -0
  45. package/dist/bundled/v3/components/or-list-of-inputs/index.js +3 -2
  46. package/dist/bundled/v3/components/or-number-input/index.d.ts +1 -0
  47. package/dist/bundled/v3/components/or-number-input/index.js +16 -0
  48. package/dist/bundled/v3/components/or-password/index.d.ts +1 -0
  49. package/dist/bundled/v3/components/or-password/index.js +31 -0
  50. package/dist/bundled/v3/components/or-search/index.d.ts +1 -0
  51. package/dist/bundled/v3/components/{or-inputs → or-search}/index.js +4 -5
  52. package/dist/bundled/v3/components/or-sidebar-v3/OrSidebar.stories3.d.ts +1 -36
  53. package/dist/bundled/v3/components/or-sidebar-v3/OrSidebar.vue.d.ts +4 -49
  54. package/dist/bundled/v3/components/or-sidebar-v3/index.js +1 -15
  55. package/dist/bundled/v3/components/or-sidebar-v3/styles.d.ts +1 -8
  56. package/dist/bundled/v3/components/or-textarea/index.d.ts +1 -0
  57. package/dist/bundled/v3/components/or-textarea/index.js +14 -0
  58. package/dist/bundled/v3/index.js +666 -677
  59. package/dist/esm/v2/{OrCardCollection-f6b07557.js → OrCardCollection-19582949.js} +6 -7
  60. package/dist/esm/v2/{OrConfirm-d7112dd3.js → OrConfirm-ede619eb.js} +4 -4
  61. package/dist/esm/v2/{OrSearch.vue_rollup-plugin-vue_script-197d77fc.js → OrInput-6e6cfd11.js} +4 -492
  62. package/dist/esm/v2/{OrListOfInputs-50aa1ef1.js → OrListOfInputs-4298fa2c.js} +5 -5
  63. package/dist/esm/v2/OrNumberInput-b20d75d2.js +225 -0
  64. package/dist/esm/v2/OrPassword-e6d5e968.js +225 -0
  65. package/dist/esm/v2/{OrSearch-0589d17d.js → OrSearch-b4f4d59b.js} +122 -5
  66. package/dist/esm/v2/OrSidebar-fabc7bc9.js +228 -0
  67. package/dist/esm/v2/{OrPassword-1fa97156.js → OrTextarea-91a95068.js} +187 -245
  68. package/dist/esm/v2/components/index.d.ts +5 -1
  69. package/dist/esm/v2/components/index.js +10 -8
  70. package/dist/esm/v2/components/or-card-collection/index.js +3 -4
  71. package/dist/esm/v2/components/or-confirm/index.js +2 -3
  72. package/dist/esm/v2/components/or-input/index.d.ts +1 -0
  73. package/dist/esm/v2/components/or-input/index.js +11 -0
  74. package/dist/esm/v2/components/or-list-of-inputs/index.js +2 -4
  75. package/dist/esm/v2/components/or-number-input/index.d.ts +1 -0
  76. package/dist/esm/v2/components/or-number-input/index.js +12 -0
  77. package/dist/esm/v2/components/or-password/index.d.ts +1 -0
  78. package/dist/esm/v2/components/{or-inputs → or-password}/index.js +5 -6
  79. package/dist/esm/v2/components/or-search/index.d.ts +1 -0
  80. package/dist/esm/v2/components/or-search/index.js +23 -0
  81. package/dist/esm/v2/components/or-sidebar-v3/OrSidebar.stories3.d.ts +1 -36
  82. package/dist/esm/v2/components/or-sidebar-v3/OrSidebar.vue.d.ts +4 -49
  83. package/dist/esm/v2/components/or-sidebar-v3/index.js +1 -13
  84. package/dist/esm/v2/components/or-sidebar-v3/styles.d.ts +1 -8
  85. package/dist/esm/v2/components/or-textarea/index.d.ts +1 -0
  86. package/dist/esm/v2/components/or-textarea/index.js +11 -0
  87. package/dist/esm/v2/index.js +9 -7
  88. package/dist/esm/v3/{OrCardCollection-a5e326ef.js → OrCardCollection-1e44c758.js} +2 -2
  89. package/dist/esm/v3/{OrConfirm-f39bd784.js → OrConfirm-c11ee2ec.js} +1 -1
  90. package/dist/esm/v3/OrInput-81125804.js +295 -0
  91. package/dist/esm/v3/{OrListOfInputs-7a67440f.js → OrListOfInputs-508e056f.js} +1 -1
  92. package/dist/esm/v3/OrNumberInput-b32b5ce3.js +170 -0
  93. package/dist/esm/v3/OrPassword-b0cbb578.js +162 -0
  94. package/dist/esm/v3/OrSearch-11fdf667.js +188 -0
  95. package/dist/esm/v3/OrSidebar-a62972f5.js +206 -0
  96. package/dist/esm/v3/OrTextarea-1f5c3be1.js +290 -0
  97. package/dist/esm/v3/components/index.d.ts +5 -1
  98. package/dist/esm/v3/components/index.js +10 -6
  99. package/dist/esm/v3/components/or-card-collection/index.js +3 -3
  100. package/dist/esm/v3/components/or-confirm/index.js +2 -3
  101. package/dist/esm/v3/components/or-input/index.d.ts +1 -0
  102. package/dist/esm/v3/components/or-input/index.js +11 -0
  103. package/dist/esm/v3/components/or-list-of-inputs/index.js +2 -4
  104. package/dist/esm/v3/components/or-number-input/index.d.ts +1 -0
  105. package/dist/esm/v3/components/or-number-input/index.js +12 -0
  106. package/dist/esm/v3/components/or-password/index.d.ts +1 -0
  107. package/dist/esm/v3/components/{or-inputs → or-password}/index.js +3 -2
  108. package/dist/esm/v3/components/or-search/index.d.ts +1 -0
  109. package/dist/esm/v3/components/or-search/index.js +20 -0
  110. package/dist/esm/v3/components/or-sidebar-v3/OrSidebar.stories3.d.ts +1 -36
  111. package/dist/esm/v3/components/or-sidebar-v3/OrSidebar.vue.d.ts +4 -49
  112. package/dist/esm/v3/components/or-sidebar-v3/index.js +1 -12
  113. package/dist/esm/v3/components/or-sidebar-v3/styles.d.ts +1 -8
  114. package/dist/esm/v3/components/or-textarea/index.d.ts +1 -0
  115. package/dist/esm/v3/components/or-textarea/index.js +11 -0
  116. package/dist/esm/v3/index.js +9 -5
  117. package/package.json +1 -1
  118. package/src/components/index.ts +5 -1
  119. package/src/components/or-card-collection/OrCardCollection.vue +8 -8
  120. package/src/components/or-confirm/OrConfirm.vue +1 -1
  121. package/src/components/or-input/index.ts +1 -0
  122. package/src/components/or-list/OrList.stories.ts +1 -1
  123. package/src/components/or-list-of-inputs/OrListOfInputs.vue +1 -1
  124. package/src/components/or-modal/OrModal.stories.ts +1 -1
  125. package/src/components/{or-inputs → or-number-input}/OrNumberInput.vue +1 -1
  126. package/src/components/or-number-input/index.ts +1 -0
  127. package/src/components/{or-inputs → or-password}/OrPassword.vue +1 -1
  128. package/src/components/or-password/index.ts +1 -0
  129. package/src/components/{or-inputs → or-search}/OrSearch.vue +1 -1
  130. package/src/components/or-search/index.ts +1 -0
  131. package/src/components/or-sidebar-v3/OrSidebar.docs.mdx +0 -6
  132. package/src/components/or-sidebar-v3/OrSidebar.stories3.ts +10 -230
  133. package/src/components/or-sidebar-v3/OrSidebar.vue +22 -121
  134. package/src/components/or-sidebar-v3/styles.ts +9 -161
  135. package/src/components/{or-inputs → or-textarea}/OrTextarea.vue +225 -6
  136. package/src/components/or-textarea/index.ts +1 -0
  137. package/dist/bundled/v2/OrSidebar-774b382d.js +0 -462
  138. package/dist/bundled/v2/components/or-inputs/index.d.ts +0 -5
  139. package/dist/bundled/v2/components/or-sidebar-v3/OrSidebarCollapseButton.stories3.d.ts +0 -12
  140. package/dist/bundled/v2/components/or-sidebar-v3/OrSidebarCollapseButton.vue.d.ts +0 -53
  141. package/dist/bundled/v3/OrPassword.vue_vue_type_script_lang-13bc5b00.js +0 -390
  142. package/dist/bundled/v3/OrSidebar.vue_vue_type_script_lang-8305a28b.js +0 -354
  143. package/dist/bundled/v3/components/or-inputs/index.d.ts +0 -5
  144. package/dist/bundled/v3/components/or-sidebar-v3/OrSidebarCollapseButton.stories3.d.ts +0 -12
  145. package/dist/bundled/v3/components/or-sidebar-v3/OrSidebarCollapseButton.vue.d.ts +0 -53
  146. package/dist/esm/v2/OrSidebar-a6ee22d1.js +0 -459
  147. package/dist/esm/v2/components/or-inputs/index.d.ts +0 -5
  148. package/dist/esm/v2/components/or-sidebar-v3/OrSidebarCollapseButton.stories3.d.ts +0 -12
  149. package/dist/esm/v2/components/or-sidebar-v3/OrSidebarCollapseButton.vue.d.ts +0 -53
  150. package/dist/esm/v3/OrSearch-7cb2c91c.js +0 -1075
  151. package/dist/esm/v3/OrSidebar-f2150587.js +0 -394
  152. package/dist/esm/v3/components/or-inputs/index.d.ts +0 -5
  153. package/dist/esm/v3/components/or-sidebar-v3/OrSidebarCollapseButton.stories3.d.ts +0 -12
  154. package/dist/esm/v3/components/or-sidebar-v3/OrSidebarCollapseButton.vue.d.ts +0 -53
  155. package/src/components/or-inputs/index.ts +0 -5
  156. package/src/components/or-sidebar-v3/OrSidebarCollapseButton.stories3.ts +0 -48
  157. package/src/components/or-sidebar-v3/OrSidebarCollapseButton.vue +0 -74
  158. /package/dist/bundled/v2/{OrInput-08f2f666.js → OrInput-df1a14fa.js} +0 -0
  159. /package/dist/bundled/v2/components/{or-inputs → or-input}/OrInput.vue.d.ts +0 -0
  160. /package/dist/bundled/v2/components/{or-inputs → or-number-input}/OrNumberInput.vue.d.ts +0 -0
  161. /package/dist/bundled/v2/components/{or-inputs → or-password}/OrPassword.vue.d.ts +0 -0
  162. /package/dist/bundled/v2/components/{or-inputs → or-search}/OrSearch.vue.d.ts +0 -0
  163. /package/dist/bundled/v2/components/{or-inputs → or-textarea}/OrTextarea.vue.d.ts +0 -0
  164. /package/dist/bundled/v3/components/{or-inputs → or-input}/OrInput.vue.d.ts +0 -0
  165. /package/dist/bundled/v3/components/{or-inputs → or-number-input}/OrNumberInput.vue.d.ts +0 -0
  166. /package/dist/bundled/v3/components/{or-inputs → or-password}/OrPassword.vue.d.ts +0 -0
  167. /package/dist/bundled/v3/components/{or-inputs → or-search}/OrSearch.vue.d.ts +0 -0
  168. /package/dist/bundled/v3/components/{or-inputs → or-textarea}/OrTextarea.vue.d.ts +0 -0
  169. /package/dist/esm/v2/components/{or-inputs → or-input}/OrInput.vue.d.ts +0 -0
  170. /package/dist/esm/v2/components/{or-inputs → or-number-input}/OrNumberInput.vue.d.ts +0 -0
  171. /package/dist/esm/v2/components/{or-inputs → or-password}/OrPassword.vue.d.ts +0 -0
  172. /package/dist/esm/v2/components/{or-inputs → or-search}/OrSearch.vue.d.ts +0 -0
  173. /package/dist/esm/v2/components/{or-inputs → or-textarea}/OrTextarea.vue.d.ts +0 -0
  174. /package/dist/esm/v3/components/{or-inputs → or-input}/OrInput.vue.d.ts +0 -0
  175. /package/dist/esm/v3/components/{or-inputs → or-number-input}/OrNumberInput.vue.d.ts +0 -0
  176. /package/dist/esm/v3/components/{or-inputs → or-password}/OrPassword.vue.d.ts +0 -0
  177. /package/dist/esm/v3/components/{or-inputs → or-search}/OrSearch.vue.d.ts +0 -0
  178. /package/dist/esm/v3/components/{or-inputs → or-textarea}/OrTextarea.vue.d.ts +0 -0
  179. /package/src/components/{or-inputs → or-input}/OrInput.stories.ts +0 -0
  180. /package/src/components/{or-inputs → or-input}/OrInput.vue +0 -0
  181. /package/src/components/{or-inputs → or-input}/or-textbox-migration.stories.mdx +0 -0
  182. /package/src/components/{or-inputs → or-input}/styles.scss +0 -0
  183. /package/src/components/{or-inputs → or-number-input}/OrNumberInput.stories.ts +0 -0
  184. /package/src/components/{or-inputs → or-password}/OrPassword.stories.ts +0 -0
  185. /package/src/components/{or-inputs → or-search}/OrSearch.stories.ts +0 -0
  186. /package/src/components/{or-inputs → or-textarea}/OrTextarea.stories.ts +0 -0
@@ -0,0 +1,162 @@
1
+ import { defineComponent, ref } from 'vue-demi';
2
+ import { useVModel } from '@vueuse/core';
3
+ import { s as script$1 } from './OrInput-81125804.js';
4
+ import { u as useToggle } from './useToggle-29e4d7c7.js';
5
+ import { a as script$2, c as BUTTON_SIZE } from './OrIconButton-8be9c89f.js';
6
+ import { resolveComponent, openBlock, createBlock, createSlots, withCtx, createVNode, renderSlot } from 'vue';
7
+ import { s as styleInject } from './style-inject.es-4c6f2515.js';
8
+
9
+ var script = defineComponent({
10
+ name: 'OrPassword',
11
+ components: {
12
+ OrInput: script$1,
13
+ OrIconButton: script$2
14
+ },
15
+ model: {
16
+ prop: 'modelValue',
17
+ event: 'update:modelValue'
18
+ },
19
+ props: {
20
+ modelValue: {
21
+ type: String,
22
+ default: '',
23
+ required: false
24
+ },
25
+ htmlId: {
26
+ type: String,
27
+ default: '',
28
+ required: false
29
+ },
30
+ placeholder: {
31
+ type: String,
32
+ default: '',
33
+ required: false
34
+ },
35
+ label: {
36
+ type: String,
37
+ default: '',
38
+ required: false
39
+ },
40
+ error: {
41
+ type: String,
42
+ default: '',
43
+ required: false
44
+ },
45
+ hint: {
46
+ type: String,
47
+ default: '',
48
+ required: false
49
+ },
50
+ maxLength: {
51
+ type: Number,
52
+ default: undefined,
53
+ required: false
54
+ },
55
+ isSmall: Boolean,
56
+ isRequired: Boolean,
57
+ isDisabled: Boolean,
58
+ isReadonly: Boolean,
59
+ isInvalid: Boolean
60
+ },
61
+ emits: ['focus', 'blur', 'update:modelValue', 'input', 'keypress', 'keyup', 'keydown'],
62
+ setup(props, {
63
+ emit
64
+ }) {
65
+ const inputRef = ref();
66
+ const localValue = useVModel(props, 'modelValue', emit);
67
+ const {
68
+ isActiveToggle,
69
+ toggle
70
+ } = useToggle();
71
+ return {
72
+ inputRef,
73
+ localValue,
74
+ isActiveToggle,
75
+ toggle
76
+ };
77
+ },
78
+ computed: {
79
+ currentButtonIcon() {
80
+ return this.isActiveToggle ? 'visibility' : 'visibility_off';
81
+ },
82
+ type() {
83
+ return this.isActiveToggle ? 'text' : 'password';
84
+ },
85
+ size() {
86
+ return this.isSmall ? BUTTON_SIZE.SMALL : BUTTON_SIZE.DEFAULT;
87
+ }
88
+ },
89
+ methods: {
90
+ onClick() {
91
+ var _a;
92
+ this.toggle();
93
+ (_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.focus();
94
+ }
95
+ }
96
+ });
97
+
98
+ function render(_ctx, _cache, $props, $setup, $data, $options) {
99
+ const _component_or_icon_button = resolveComponent("or-icon-button");
100
+ const _component_or_input = resolveComponent("or-input");
101
+ return openBlock(), createBlock(_component_or_input, {
102
+ ref: "inputRef",
103
+ modelValue: _ctx.localValue,
104
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => _ctx.localValue = $event),
105
+ class: "or-password",
106
+ "html-id": _ctx.htmlId,
107
+ placeholder: _ctx.placeholder,
108
+ "html-type": _ctx.type,
109
+ label: _ctx.label,
110
+ error: _ctx.error,
111
+ hint: _ctx.hint,
112
+ "max-length": _ctx.maxLength,
113
+ "is-small": _ctx.isSmall,
114
+ "is-required": _ctx.isRequired,
115
+ "is-disabled": _ctx.isDisabled,
116
+ "is-readonly": _ctx.isReadonly,
117
+ "is-invalid": _ctx.isInvalid,
118
+ onFocus: _cache[1] || (_cache[1] = $event => _ctx.$emit('focus', $event)),
119
+ onBlur: _cache[2] || (_cache[2] = $event => _ctx.$emit('blur', $event)),
120
+ onInput: _cache[3] || (_cache[3] = $event => _ctx.$emit('input', $event)),
121
+ onKeypress: _cache[4] || (_cache[4] = $event => _ctx.$emit('keypress', $event)),
122
+ onKeyup: _cache[5] || (_cache[5] = $event => _ctx.$emit('keyup', $event)),
123
+ onKeydown: _cache[6] || (_cache[6] = $event => _ctx.$emit('keydown', $event))
124
+ }, createSlots({
125
+ "wrapper-end": withCtx(() => [createVNode(_component_or_icon_button, {
126
+ icon: _ctx.currentButtonIcon,
127
+ "icon-color": "neutral-4",
128
+ size: _ctx.size,
129
+ onClick: _ctx.onClick
130
+ }, null, 8 /* PROPS */, ["icon", "size", "onClick"])]),
131
+ _: 2 /* DYNAMIC */
132
+ }, [_ctx.$slots.prepend ? {
133
+ name: "prepend",
134
+ fn: withCtx(() => [renderSlot(_ctx.$slots, "prepend")]),
135
+ key: "0"
136
+ } : undefined, _ctx.$slots['label-default'] ? {
137
+ name: "label-default",
138
+ fn: withCtx(() => [renderSlot(_ctx.$slots, "label-default")]),
139
+ key: "1"
140
+ } : undefined, _ctx.$slots['label-append'] ? {
141
+ name: "label-append",
142
+ fn: withCtx(() => [renderSlot(_ctx.$slots, "label-append")]),
143
+ key: "2"
144
+ } : undefined, _ctx.$slots['input-end'] ? {
145
+ name: "input-end",
146
+ fn: withCtx(() => [renderSlot(_ctx.$slots, "input-end")]),
147
+ key: "3"
148
+ } : undefined, _ctx.$slots.append ? {
149
+ name: "append",
150
+ fn: withCtx(() => [renderSlot(_ctx.$slots, "append")]),
151
+ key: "4"
152
+ } : undefined]), 1032 /* PROPS, DYNAMIC_SLOTS */, ["modelValue", "html-id", "placeholder", "html-type", "label", "error", "hint", "max-length", "is-small", "is-required", "is-disabled", "is-readonly", "is-invalid"]);
153
+ }
154
+
155
+ var css_248z = "/**\n * A simple way to manage mobile breakpoints described in https://davidwalsh.name/write-media-queries-sass.\n * Can be further extended using following approach https://rimdev.io/making-media-query-mixins-with-sass/\n */\n@keyframes spinAround-4b6cde50 {\nfrom {\n transform: rotate(0);\n}\nto {\n transform: rotate(359deg);\n}\n}\n@keyframes fade-4b6cde50 {\nfrom {\n opacity: 1;\n}\nto {\n opacity: 0;\n}\n}\n.or-password .or-icon-button-root[data-v-4b6cde50] {\n position: absolute;\n top: 50%;\n right: 0;\n z-index: 1;\n transform: translate(-0.625rem, -50%);\n}\n.or-password[data-v-4b6cde50] .or-textbox--input {\n padding-right: calc(0.625rem + 1.625rem);\n}\n.or-password.is-small[data-v-4b6cde50] .or-textbox--input {\n padding-right: calc(0.625rem + 1.5rem);\n}";
156
+ styleInject(css_248z);
157
+
158
+ script.render = render;
159
+ script.__scopeId = "data-v-4b6cde50";
160
+ script.__file = "src/components/or-password/OrPassword.vue";
161
+
162
+ export { script as s };
@@ -0,0 +1,188 @@
1
+ import { defineComponent, ref } from 'vue-demi';
2
+ import { s as script$1 } from './OrInput-81125804.js';
3
+ import { debouncedWatch } from '@vueuse/core';
4
+ import { a as script$2, c as BUTTON_SIZE } from './OrIconButton-8be9c89f.js';
5
+ import { resolveComponent, openBlock, createBlock, createSlots, withCtx, createVNode, normalizeStyle, renderSlot } from 'vue';
6
+ import { s as styleInject } from './style-inject.es-4c6f2515.js';
7
+
8
+ var script = defineComponent({
9
+ name: 'OrSearch',
10
+ components: {
11
+ OrInput: script$1,
12
+ OrIconButton: script$2
13
+ },
14
+ model: {
15
+ prop: 'modelValue',
16
+ event: 'update:modelValue'
17
+ },
18
+ props: {
19
+ modelValue: {
20
+ type: String,
21
+ default: '',
22
+ required: false
23
+ },
24
+ htmlId: {
25
+ type: String,
26
+ default: '',
27
+ required: false
28
+ },
29
+ placeholder: {
30
+ type: String,
31
+ default: '',
32
+ required: false
33
+ },
34
+ label: {
35
+ type: String,
36
+ default: '',
37
+ required: false
38
+ },
39
+ error: {
40
+ type: String,
41
+ default: '',
42
+ required: false
43
+ },
44
+ hint: {
45
+ type: String,
46
+ default: '',
47
+ required: false
48
+ },
49
+ debounce: {
50
+ type: Number,
51
+ default: 500,
52
+ required: false
53
+ },
54
+ isUsingTrim: {
55
+ type: Boolean,
56
+ default: true,
57
+ required: false
58
+ },
59
+ maxLength: {
60
+ type: Number,
61
+ default: undefined,
62
+ required: false
63
+ },
64
+ isSmall: Boolean,
65
+ isRequired: Boolean,
66
+ isDisabled: Boolean,
67
+ isReadonly: Boolean,
68
+ isInvalid: Boolean
69
+ },
70
+ emits: ['focus', 'blur', 'update:modelValue', 'input', 'search', 'clear', 'keypress', 'keyup', 'keydown'],
71
+ setup(props, {
72
+ emit
73
+ }) {
74
+ var _a;
75
+ const inputRef = ref();
76
+ const localValue = ref((_a = props.modelValue) !== null && _a !== void 0 ? _a : '');
77
+ debouncedWatch(localValue, () => {
78
+ emit('search', props.isUsingTrim ? localValue.value.trim() : localValue.value);
79
+ }, {
80
+ debounce: +props.debounce
81
+ });
82
+ return {
83
+ inputRef,
84
+ localValue
85
+ };
86
+ },
87
+ computed: {
88
+ hasValue() {
89
+ var _a;
90
+ return !!((_a = this.localValue) === null || _a === void 0 ? void 0 : _a.length);
91
+ },
92
+ currentButtonIcon() {
93
+ return this.hasValue ? 'close' : 'search';
94
+ },
95
+ size() {
96
+ return this.isSmall ? BUTTON_SIZE.SMALL : BUTTON_SIZE.DEFAULT;
97
+ }
98
+ },
99
+ watch: {
100
+ modelValue(val) {
101
+ if (this.localValue !== val) this.localValue = val;
102
+ }
103
+ },
104
+ methods: {
105
+ onClick() {
106
+ var _a;
107
+ if (this.hasValue) {
108
+ this.localValue = '';
109
+ this.$emit('update:modelValue', '');
110
+ this.$emit('clear');
111
+ (_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.focus();
112
+ }
113
+ },
114
+ onModelValueUpdate(value) {
115
+ this.localValue = value;
116
+ this.$emit('update:modelValue', value);
117
+ }
118
+ }
119
+ });
120
+
121
+ function render(_ctx, _cache, $props, $setup, $data, $options) {
122
+ const _component_or_icon_button = resolveComponent("or-icon-button");
123
+ const _component_or_input = resolveComponent("or-input");
124
+ return openBlock(), createBlock(_component_or_input, {
125
+ ref: "inputRef",
126
+ class: "or-search",
127
+ "model-value": _ctx.localValue,
128
+ "html-id": _ctx.htmlId,
129
+ placeholder: _ctx.placeholder,
130
+ "html-type": "search",
131
+ label: _ctx.label,
132
+ error: _ctx.error,
133
+ hint: _ctx.hint,
134
+ "max-length": _ctx.maxLength,
135
+ "is-small": _ctx.isSmall,
136
+ "is-required": _ctx.isRequired,
137
+ "is-disabled": _ctx.isDisabled,
138
+ "is-readonly": _ctx.isReadonly,
139
+ "is-invalid": _ctx.isInvalid,
140
+ onFocus: _cache[0] || (_cache[0] = $event => _ctx.$emit('focus', $event)),
141
+ onBlur: _cache[1] || (_cache[1] = $event => _ctx.$emit('blur', $event)),
142
+ "onUpdate:modelValue": _ctx.onModelValueUpdate,
143
+ onInput: _cache[2] || (_cache[2] = $event => _ctx.$emit('input', $event)),
144
+ onKeypress: _cache[3] || (_cache[3] = $event => _ctx.$emit('keypress', $event)),
145
+ onKeyup: _cache[4] || (_cache[4] = $event => _ctx.$emit('keyup', $event)),
146
+ onKeydown: _cache[5] || (_cache[5] = $event => _ctx.$emit('keydown', $event))
147
+ }, createSlots({
148
+ "wrapper-end": withCtx(() => [createVNode(_component_or_icon_button, {
149
+ icon: _ctx.currentButtonIcon,
150
+ style: normalizeStyle(!_ctx.hasValue ? {
151
+ pointerEvents: 'none'
152
+ } : null),
153
+ "icon-color": "neutral-4",
154
+ size: _ctx.size,
155
+ onClick: _ctx.onClick
156
+ }, null, 8 /* PROPS */, ["icon", "style", "size", "onClick"])]),
157
+ _: 2 /* DYNAMIC */
158
+ }, [_ctx.$slots.prepend ? {
159
+ name: "prepend",
160
+ fn: withCtx(() => [renderSlot(_ctx.$slots, "prepend")]),
161
+ key: "0"
162
+ } : undefined, _ctx.$slots['label-default'] ? {
163
+ name: "label-default",
164
+ fn: withCtx(() => [renderSlot(_ctx.$slots, "label-default")]),
165
+ key: "1"
166
+ } : undefined, _ctx.$slots['label-append'] ? {
167
+ name: "label-append",
168
+ fn: withCtx(() => [renderSlot(_ctx.$slots, "label-append")]),
169
+ key: "2"
170
+ } : undefined, _ctx.$slots['input-end'] ? {
171
+ name: "input-end",
172
+ fn: withCtx(() => [renderSlot(_ctx.$slots, "input-end")]),
173
+ key: "3"
174
+ } : undefined, _ctx.$slots.append ? {
175
+ name: "append",
176
+ fn: withCtx(() => [renderSlot(_ctx.$slots, "append")]),
177
+ key: "4"
178
+ } : undefined]), 1032 /* PROPS, DYNAMIC_SLOTS */, ["model-value", "html-id", "placeholder", "label", "error", "hint", "max-length", "is-small", "is-required", "is-disabled", "is-readonly", "is-invalid", "onUpdate:modelValue"]);
179
+ }
180
+
181
+ var css_248z = "/**\n * A simple way to manage mobile breakpoints described in https://davidwalsh.name/write-media-queries-sass.\n * Can be further extended using following approach https://rimdev.io/making-media-query-mixins-with-sass/\n */\n@keyframes spinAround-056f5f90 {\nfrom {\n transform: rotate(0);\n}\nto {\n transform: rotate(359deg);\n}\n}\n@keyframes fade-056f5f90 {\nfrom {\n opacity: 1;\n}\nto {\n opacity: 0;\n}\n}\n.or-search .or-icon-button-root[data-v-056f5f90] {\n position: absolute;\n top: 50%;\n right: 0;\n z-index: 1;\n transform: translate(-0.625rem, -50%);\n}\n.or-search[data-v-056f5f90] .or-textbox--input {\n padding-right: calc(0.625rem + 1.625rem);\n}\n.or-search.is-small[data-v-056f5f90] .or-textbox--input {\n padding-right: calc(0.625rem + 1.5rem);\n}";
182
+ styleInject(css_248z);
183
+
184
+ script.render = render;
185
+ script.__scopeId = "data-v-056f5f90";
186
+ script.__file = "src/components/or-search/OrSearch.vue";
187
+
188
+ export { script as s };
@@ -0,0 +1,206 @@
1
+ import { useDraggable, useElementBounding } from '@vueuse/core';
2
+ import _ from 'lodash';
3
+ import { defineComponent, ref, computed, watch } from 'vue-demi';
4
+ import { openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, renderSlot, createCommentVNode } from 'vue';
5
+
6
+ var OrSidebarPlacement;
7
+ (function (OrSidebarPlacement) {
8
+ OrSidebarPlacement["left"] = "left";
9
+ OrSidebarPlacement["right"] = "right";
10
+ })(OrSidebarPlacement || (OrSidebarPlacement = {}));
11
+
12
+ const SidebarRoot = [
13
+ // Position
14
+ 'relative',
15
+ // Layout
16
+ 'flex', 'flex-col', 'shrink-0',
17
+ // Box
18
+ 'min-h-0', 'p-0'];
19
+ const SidebarRootSides = {
20
+ [OrSidebarPlacement.left]: [
21
+ // Borders
22
+ 'border-r-[1px]', 'border-r-solid', 'border-r-secondary dark:border-r-secondary-dark'],
23
+ [OrSidebarPlacement.right]: [
24
+ // Borders
25
+ 'border-l-[1px]', 'border-l-solid', 'border-l-secondary dark:border-l-secondary-dark']
26
+ };
27
+ const SidebarResize = [
28
+ // Position
29
+ 'absolute', 'inset-y-none', 'z-[1]',
30
+ // Box
31
+ 'w-[12px]', 'h-[100%]',
32
+ // Cursor
33
+ 'cursor-ew-resize'];
34
+ const SidebarResizeSides = {
35
+ [OrSidebarPlacement.left]: [
36
+ // Position
37
+ '-right-[1px]',
38
+ // Borders
39
+ 'hover:border-r-2', 'hover:border-r-primary hover:dark:border-r-primary-dark',
40
+ // Transition
41
+ 'transition-[border-right]'],
42
+ [OrSidebarPlacement.right]: [
43
+ // Position
44
+ '-left-[1px]',
45
+ // Borders
46
+ 'hover:border-l-2', 'hover:border-l-primary hover:dark:border-l-primary-dark',
47
+ // Transition
48
+ 'transition-[border-left]']
49
+ };
50
+ const SidebarResizingSides = {
51
+ [OrSidebarPlacement.left]: [
52
+ // Borders
53
+ 'border-r-2', 'border-r-primary dark:border-r-primary-dark'],
54
+ [OrSidebarPlacement.right]: [
55
+ // Borders
56
+ 'border-l-2', 'border-l-primary dark:border-l-primary-dark']
57
+ };
58
+ const SidebarMain = [
59
+ // Layout
60
+ 'flex', 'flex-col', 'grow',
61
+ // Box
62
+ 'min-h-0'];
63
+ const SidebarHeader = [
64
+ // Sizing
65
+ 'p-md'];
66
+ const SidebarContent = [
67
+ // Layout
68
+ 'grow', 'overflow-auto',
69
+ // Sizing
70
+ 'p-md'];
71
+ const SidebarFooter = [
72
+ // Sizing
73
+ 'p-md',
74
+ // Borders
75
+ 'border-t-[1px]', 'border-t-solid', 'border-t-secondary dark:border-t-secondary-dark'];
76
+
77
+ var script = defineComponent({
78
+ name: 'OrSidebar',
79
+ props: {
80
+ width: {
81
+ type: Number,
82
+ required: false,
83
+ default: 0,
84
+ validator: value => _.isNumber(value) && value >= 0
85
+ },
86
+ minimumWidth: {
87
+ type: Number,
88
+ required: false,
89
+ default: 350,
90
+ validator: value => _.isNumber(value) && value >= 0
91
+ },
92
+ /**
93
+ * User may put the component on the right or the left side of a container.
94
+ * This property mirrors the resizing behavior (drag direction) and styling (horizontal border) of the sidebar.
95
+ *
96
+ * Note: the property doesn't reposition the component in the parent container.
97
+ * @values left, right
98
+ */
99
+ side: {
100
+ type: String,
101
+ default: OrSidebarPlacement.right,
102
+ validator: value => _.includes(_.values(OrSidebarPlacement), value)
103
+ }
104
+ },
105
+ emits: ['change:width'],
106
+ setup(props, {
107
+ emit
108
+ }) {
109
+ // Refs
110
+ const root = ref();
111
+ const resizeBar = ref(null);
112
+ const parentContainer = computed(() => {
113
+ var _a;
114
+ return (_a = root.value) === null || _a === void 0 ? void 0 : _a.parentElement;
115
+ });
116
+ // State
117
+ const startPositionX = ref(0);
118
+ const isResizing = ref(false);
119
+ const localWidth = ref(props.width >= props.minimumWidth ? props.width : props.minimumWidth);
120
+ // Styles
121
+ const sidebarStyle = computed(() => ({
122
+ width: localWidth.value + 'px'
123
+ }));
124
+ const rootStyles = computed(() => ['or-sidebar', ...SidebarRoot, ...SidebarRootSides[props.side]]);
125
+ const resizeStyles = computed(() => [...SidebarResize, ...SidebarResizeSides[props.side], ...(isResizing.value ? SidebarResizingSides[props.side] : [])]);
126
+ const mainStyles = computed(() => [...SidebarMain]);
127
+ const headerStyles = computed(() => [...SidebarHeader]);
128
+ const contentStyles = computed(() => [...SidebarContent]);
129
+ const footerStyles = computed(() => [...SidebarFooter]);
130
+ // Effects
131
+ useDraggable(resizeBar, {
132
+ preventDefault: true,
133
+ onStart: (position, event) => {
134
+ document.body.style.cursor = 'ew-resize';
135
+ document.body.style.userSelect = 'none';
136
+ startPositionX.value = event.x;
137
+ isResizing.value = true;
138
+ },
139
+ onMove: position => {
140
+ const delta = (position.x - startPositionX.value) * (props.side === OrSidebarPlacement.left ? -1 : 1);
141
+ const newWidth = localWidth.value - delta;
142
+ localWidth.value = newWidth > maximumWidth.value ? maximumWidth.value : newWidth < props.minimumWidth ? props.minimumWidth : newWidth;
143
+ startPositionX.value = position.x;
144
+ },
145
+ onEnd: () => {
146
+ document.body.style.cursor = '';
147
+ document.body.style.userSelect = '';
148
+ isResizing.value = false;
149
+ }
150
+ });
151
+ const {
152
+ width: maximumWidth
153
+ } = useElementBounding(parentContainer);
154
+ watch(() => props.width, newValue => {
155
+ if (newValue !== localWidth.value) {
156
+ localWidth.value = newValue > maximumWidth.value ? maximumWidth.value : newValue < props.minimumWidth ? props.minimumWidth : newValue;
157
+ }
158
+ });
159
+ watch(() => props.minimumWidth, newMinimum => {
160
+ if (newMinimum > localWidth.value) localWidth.value = newMinimum;
161
+ });
162
+ watch(maximumWidth, newMaximum => {
163
+ if (newMaximum < localWidth.value) localWidth.value = newMaximum;
164
+ });
165
+ watch(localWidth, val => emit('change:width', val));
166
+ return {
167
+ root,
168
+ resizeBar,
169
+ isResizing,
170
+ localWidth,
171
+ sidebarStyle,
172
+ rootStyles,
173
+ resizeStyles,
174
+ mainStyles,
175
+ headerStyles,
176
+ contentStyles,
177
+ footerStyles
178
+ };
179
+ }
180
+ });
181
+
182
+ function render(_ctx, _cache, $props, $setup, $data, $options) {
183
+ return openBlock(), createElementBlock("aside", {
184
+ ref: "root",
185
+ class: normalizeClass(_ctx.rootStyles),
186
+ style: normalizeStyle(_ctx.sidebarStyle)
187
+ }, [createElementVNode("div", {
188
+ ref: "resizeBar",
189
+ class: normalizeClass(_ctx.resizeStyles)
190
+ }, null, 2 /* CLASS */), createElementVNode("div", {
191
+ class: normalizeClass(_ctx.mainStyles)
192
+ }, [_ctx.$slots.header ? (openBlock(), createElementBlock("div", {
193
+ key: 0,
194
+ class: normalizeClass(_ctx.headerStyles)
195
+ }, [renderSlot(_ctx.$slots, "header")], 2 /* CLASS */)) : createCommentVNode("v-if", true), createElementVNode("div", {
196
+ class: normalizeClass(_ctx.contentStyles)
197
+ }, [renderSlot(_ctx.$slots, "default")], 2 /* CLASS */)], 2 /* CLASS */), _ctx.$slots.footer ? (openBlock(), createElementBlock("div", {
198
+ key: 0,
199
+ class: normalizeClass(_ctx.footerStyles)
200
+ }, [renderSlot(_ctx.$slots, "footer")], 2 /* CLASS */)) : createCommentVNode("v-if", true)], 6 /* CLASS, STYLE */);
201
+ }
202
+
203
+ script.render = render;
204
+ script.__file = "src/components/or-sidebar-v3/OrSidebar.vue";
205
+
206
+ export { OrSidebarPlacement as O, script as s };