@onereach/ui-components 2.63.0-beta.1896.0 → 2.63.0-beta.1907.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 (68) hide show
  1. package/dist/v2/{OrSelect-bb223cce.js → OrSelect-f416b7aa.js} +11 -31
  2. package/dist/v2/components/or-select-v3/OrSelect.vue.d.ts +2 -2
  3. package/dist/v2/directives/index.d.ts +2 -0
  4. package/dist/v2/dropdown-open-0d314aa4.js +28 -0
  5. package/dist/v2/index.d.ts +1 -0
  6. package/dist/v2/index.js +2 -1
  7. package/dist/v2/index2.js +2 -1
  8. package/dist/v2/index62.js +31 -12
  9. package/dist/v2/index65.js +2 -1
  10. package/dist/v2/index92.js +1 -6
  11. package/dist/v2/index93.js +5 -1
  12. package/dist/v2/index94.js +3 -0
  13. package/dist/v3/{OrSelect-63ada65d.js → OrSelect-9d300f55.js} +10 -30
  14. package/dist/v3/components/or-select-v3/OrSelect.vue.d.ts +2 -2
  15. package/dist/v3/directives/index.d.ts +2 -0
  16. package/dist/v3/dropdown-open-0d314aa4.js +28 -0
  17. package/dist/v3/index.d.ts +1 -0
  18. package/dist/v3/index.js +2 -1
  19. package/dist/v3/index2.js +2 -1
  20. package/dist/v3/index62.js +31 -12
  21. package/dist/v3/index65.js +2 -1
  22. package/dist/v3/index92.js +1 -6
  23. package/dist/v3/index93.js +5 -1
  24. package/dist/v3/index94.js +3 -0
  25. package/package.json +1 -1
  26. package/src/components/or-avatar-v3/OrAvatar.docs.mdx +4 -0
  27. package/src/components/or-bottom-sheet-v3/OrBottomSheet.docs.mdx +4 -0
  28. package/src/components/or-button-v3/OrButton.docs.mdx +4 -0
  29. package/src/components/or-card-v3/OrCard.docs.mdx +4 -0
  30. package/src/components/or-checkbox-v3/OrCheckbox.docs.mdx +4 -0
  31. package/src/components/or-confirm-v3/OrConfirm.docs.mdx +4 -0
  32. package/src/components/or-error-tag-v3/OrErrorTag.docs.mdx +5 -0
  33. package/src/components/or-error-v3/OrError.docs.mdx +4 -0
  34. package/src/components/or-expansion-panel-v3/OrExpansionPanel.docs.mdx +4 -0
  35. package/src/components/or-fab-v3/OrFab.docs.mdx +4 -0
  36. package/src/components/or-hint-v3/OrHint.docs.mdx +4 -0
  37. package/src/components/or-icon-button-v3/OrIconButton.docs.mdx +4 -0
  38. package/src/components/or-icon-v3/OrIcon.docs.mdx +4 -0
  39. package/src/components/or-inline-input-v3/OrInlineInput.docs.mdx +4 -0
  40. package/src/components/or-inline-textarea-v3/OrInlineTextarea.docs.mdx +4 -0
  41. package/src/components/or-input-v3/OrInput.docs.mdx +4 -0
  42. package/src/components/or-label-v3/OrLabel.docs.mdx +4 -0
  43. package/src/components/or-link-v3/OrLink.docs.mdx +4 -0
  44. package/src/components/or-loader-v3/OrLoader.docs.mdx +4 -0
  45. package/src/components/or-menu-item-v3/OrMenuItem.docs.mdx +4 -0
  46. package/src/components/or-menu-v3/OrMenu.docs.mdx +4 -0
  47. package/src/components/or-modal-v3/OrModal.docs.mdx +4 -0
  48. package/src/components/or-notification-v3/OrNotification.docs.mdx +4 -0
  49. package/src/components/or-overlay-v3/OrOverlay.docs.mdx +4 -0
  50. package/src/components/or-popover-v3/OrPopover.docs.mdx +4 -0
  51. package/src/components/or-progress-v3/OrProgress.docs.mdx +4 -0
  52. package/src/components/or-radio-v3/OrRadio.docs.mdx +4 -0
  53. package/src/components/or-rich-text-editor-v3/OrRichTextEditor.vue +38 -11
  54. package/src/components/or-search-v3/OrSearch.docs.mdx +4 -0
  55. package/src/components/or-select-v3/OrSelect.docs.mdx +4 -0
  56. package/src/components/or-select-v3/OrSelect.vue +9 -6
  57. package/src/components/or-sidebar-v3/OrSidebar.docs.mdx +4 -0
  58. package/src/components/or-skeleton-v3/OrSkeleton.docs.mdx +8 -0
  59. package/src/components/or-switch-v3/OrSwitch.docs.mdx +4 -0
  60. package/src/components/or-tab-v3/OrTab.docs.mdx +4 -0
  61. package/src/components/or-tabs-v3/OrTabs.docs.mdx +4 -0
  62. package/src/components/or-tag-v3/OrTag.docs.mdx +4 -0
  63. package/src/components/or-teleport-v3/OrTeleport.docs.mdx +4 -0
  64. package/src/components/or-text-v3/OrText.docs.mdx +4 -0
  65. package/src/components/or-textarea-v3/OrTextarea.docs.mdx +4 -0
  66. package/src/components/or-tooltip-v3/OrTooltip.docs.mdx +3 -0
  67. package/src/directives/index.ts +2 -0
  68. package/src/index.ts +1 -0
@@ -1,4 +1,5 @@
1
- import { isVue3, defineComponent, getCurrentInstance, ref, computed, onMounted, watch } from 'vue-demi';
1
+ import { defineComponent, getCurrentInstance, ref, computed, onMounted, watch } from 'vue-demi';
2
+ import { D as DropdownClose, a as DropdownOpen } from './dropdown-open-0d314aa4.js';
2
3
  import { u as useClassAttribute } from './useClassAttribute-47fdb016.js';
3
4
  import { u as useOverflow } from './useOverflow-ac506c65.js';
4
5
  import '@vueuse/core';
@@ -15,31 +16,6 @@ import { _ as __vue_component__$a } from './OrPopover-9080fc00.js';
15
16
  import { _ as __vue_component__$b } from './OrTag-ab03c4f7.js';
16
17
  import { n as normalizeComponent } from './normalize-component-6e8e3d80.js';
17
18
 
18
- const created$1 = (element, binding) => {
19
- element.addEventListener('keydown', event => {
20
- event.preventDefault();
21
- if (['Escape'].includes(event.key)) {
22
- binding.value(event);
23
- }
24
- });
25
- };
26
- const DropdownClose = {
27
- [isVue3 ? 'created' : 'bind']: created$1
28
- };
29
-
30
- const created = (element, binding) => {
31
- element.addEventListener('keydown', event => {
32
- event.preventDefault();
33
- if (['Enter', ' '].includes(event.key)) {
34
- binding.value(event);
35
- }
36
- });
37
- element.addEventListener('click', binding.value);
38
- };
39
- const DropdownOpen = {
40
- [isVue3 ? 'created' : 'bind']: created
41
- };
42
-
43
19
  const SelectRoot = [
44
20
  // Layout
45
21
  'flex', 'flex-col',
@@ -247,11 +223,15 @@ var script = defineComponent({
247
223
  };
248
224
  });
249
225
  // Methods
250
- function open() {
226
+ function toggle() {
251
227
  if (!readonly.value && !props.disabled) {
252
228
  const popoverInstance = popover.value;
253
229
  if (popoverInstance) {
254
- popoverInstance.open();
230
+ if (popoverState.value === 'open') {
231
+ popoverInstance.close();
232
+ } else {
233
+ popoverInstance.open();
234
+ }
255
235
  }
256
236
  }
257
237
  }
@@ -293,7 +273,7 @@ var script = defineComponent({
293
273
  internalSearchOptions,
294
274
  resolvedSearchOptions,
295
275
  groupedOptions,
296
- open,
276
+ toggle,
297
277
  close,
298
278
  deselect,
299
279
  innerItems,
@@ -331,8 +311,8 @@ var __vue_render__ = function () {
331
311
  directives: [{
332
312
  name: "dropdown-open",
333
313
  rawName: "v-dropdown-open",
334
- value: _vm.open,
335
- expression: "open"
314
+ value: _vm.toggle,
315
+ expression: "toggle"
336
316
  }, {
337
317
  name: "dropdown-close",
338
318
  rawName: "v-dropdown-close",
@@ -34,7 +34,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
34
34
  }[]>;
35
35
  resolvedSearchOptions: import("@vue/composition-api").ComputedRef<SelectOption[]>;
36
36
  groupedOptions: import("@vue/composition-api").ComputedRef<Record<string, SelectOption[]>>;
37
- open: () => void;
37
+ toggle: () => void;
38
38
  close: () => void;
39
39
  deselect: (option: SelectOption) => void;
40
40
  innerItems: import("@vue/composition-api").Ref<HTMLElement[]>;
@@ -221,7 +221,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
221
221
  }[]>;
222
222
  resolvedSearchOptions: import("@vue/composition-api").ComputedRef<SelectOption[]>;
223
223
  groupedOptions: import("@vue/composition-api").ComputedRef<Record<string, SelectOption[]>>;
224
- open: () => void;
224
+ toggle: () => void;
225
225
  close: () => void;
226
226
  deselect: (option: SelectOption) => void;
227
227
  innerItems: import("@vue/composition-api").Ref<HTMLElement[]>;
@@ -0,0 +1,2 @@
1
+ export * from './dropdown-close';
2
+ export * from './dropdown-open';
@@ -0,0 +1,28 @@
1
+ import { isVue3 } from 'vue-demi';
2
+
3
+ const created$1 = (element, binding) => {
4
+ element.addEventListener('keydown', event => {
5
+ event.preventDefault();
6
+ if (['Escape'].includes(event.key)) {
7
+ binding.value(event);
8
+ }
9
+ });
10
+ };
11
+ const DropdownClose = {
12
+ [isVue3 ? 'created' : 'bind']: created$1
13
+ };
14
+
15
+ const created = (element, binding) => {
16
+ element.addEventListener('keydown', event => {
17
+ event.preventDefault();
18
+ if (['Enter', ' '].includes(event.key)) {
19
+ binding.value(event);
20
+ }
21
+ });
22
+ element.addEventListener('click', binding.value);
23
+ };
24
+ const DropdownOpen = {
25
+ [isVue3 ? 'created' : 'bind']: created
26
+ };
27
+
28
+ export { DropdownClose as D, DropdownOpen as a };
@@ -1,3 +1,4 @@
1
1
  export * from './components';
2
+ export * from './directives';
2
3
  export * from './hooks';
3
4
  export * from './utils/functions/text';
package/dist/v2/index.js CHANGED
@@ -64,7 +64,7 @@ export { _ as OrRadioGroup } from './OrRadioGroup-11424644.js';
64
64
  export { _ as OrRadioV3 } from './OrRadio-4ba56887.js';
65
65
  export { _ as OrSearchV3 } from './OrSearch-a247f072.js';
66
66
  export { _ as OrSelect } from './OrSelect-ea27a70e.js';
67
- export { _ as OrSelectV3 } from './OrSelect-bb223cce.js';
67
+ export { _ as OrSelectV3 } from './OrSelect-f416b7aa.js';
68
68
  export { _ as OrSidebar, O as OrSidebarSide } from './OrSidebar-feacf13a.js';
69
69
  export { O as OrSidebarPlacement, _ as OrSidebarV3 } from './OrSidebar-fabc7bc9.js';
70
70
  export { _ as OrSkeletonCircle, a as OrSkeletonRect, b as OrSkeletonText, O as OrSkeletonTextSizes } from './OrSkeletonText-38aef640.js';
@@ -92,6 +92,7 @@ export { p as PropsV3, a as useQueueV3, u as useToastV3 } from './useToast-06654
92
92
  export { _ as OrTooltip } from './OrTooltip-b31bd78d.js';
93
93
  export { _ as OrTooltipContent } from './OrTooltip.vue_rollup-plugin-vue_styles.0-54c17910.js';
94
94
  export { _ as OrTooltipV3 } from './OrTooltip-caeac590.js';
95
+ export { D as DropdownClose, a as DropdownOpen } from './dropdown-open-0d314aa4.js';
95
96
  export { u as useClassAttribute } from './useClassAttribute-47fdb016.js';
96
97
  export { u as useElevation } from './useElevation-0e973238.js';
97
98
  export { u as useOverflow } from './useOverflow-ac506c65.js';
package/dist/v2/index2.js CHANGED
@@ -64,7 +64,7 @@ export { _ as OrRadioGroup } from './OrRadioGroup-11424644.js';
64
64
  export { _ as OrRadioV3 } from './OrRadio-4ba56887.js';
65
65
  export { _ as OrSearchV3 } from './OrSearch-a247f072.js';
66
66
  export { _ as OrSelect } from './OrSelect-ea27a70e.js';
67
- export { _ as OrSelectV3 } from './OrSelect-bb223cce.js';
67
+ export { _ as OrSelectV3 } from './OrSelect-f416b7aa.js';
68
68
  export { _ as OrSidebar, O as OrSidebarSide } from './OrSidebar-feacf13a.js';
69
69
  export { O as OrSidebarPlacement, _ as OrSidebarV3 } from './OrSidebar-fabc7bc9.js';
70
70
  export { _ as OrSkeletonCircle, a as OrSkeletonRect, b as OrSkeletonText, O as OrSkeletonTextSizes } from './OrSkeletonText-38aef640.js';
@@ -117,6 +117,7 @@ import 'sortablejs';
117
117
  import './useElevation-0e973238.js';
118
118
  import './useResponsive-a02e95b7.js';
119
119
  import '@vueuse/integrations/useFocusTrap';
120
+ import './dropdown-open-0d314aa4.js';
120
121
  import './useOverflow-ac506c65.js';
121
122
  import 'vue';
122
123
  import 'portal-vue';
@@ -4,6 +4,7 @@ import '@vueuse/core';
4
4
  import { Editor } from '@tiptap/core';
5
5
  import StarterKit from '@tiptap/starter-kit';
6
6
  import Underline from '@tiptap/extension-underline';
7
+ import Link from '@tiptap/extension-link';
7
8
  import Highlight from '@tiptap/extension-highlight';
8
9
  import Placeholder from '@tiptap/extension-placeholder';
9
10
  import { _ as __vue_component__$1 } from './OrIconButton-5883eba0.js';
@@ -79,7 +80,7 @@ var script = defineComponent({
79
80
  },
80
81
  toolbar: {
81
82
  type: Array,
82
- default: () => [['bold', 'italic', 'strike'], ['underline', 'highlight'], ['bulletList', 'orderedList'], ['undo', 'redo']]
83
+ default: () => [['bold', 'italic', 'strike'], ['underline', 'highlight'], ['link'], ['bulletList', 'orderedList'], ['undo', 'redo']]
83
84
  },
84
85
  description: {
85
86
  type: String,
@@ -142,17 +143,16 @@ var script = defineComponent({
142
143
  element: editorRef.value,
143
144
  content: props.modelValue,
144
145
  autofocus: props.autofocus,
145
- extensions: [StarterKit, Underline,
146
- // Link.configure({
147
- // openOnClick: true,
148
- // linkOnPaste: true,
149
- // protocols: ['ftp', 'mailto'],
150
- // validate: href => /^https?:\/\//.test(href),
151
- // HTMLAttributes: {
152
- // class: 'text-primary cursor-pointer',
153
- // },
154
- // }),
155
- Highlight, Placeholder.configure({
146
+ extensions: [StarterKit, Underline, Link.configure({
147
+ openOnClick: true,
148
+ linkOnPaste: true,
149
+ autolink: false,
150
+ protocols: ['ftp', 'mailto', 'http', 'https'],
151
+ validate: href => /^https?:\/\//.test(href),
152
+ HTMLAttributes: {
153
+ class: 'text-primary cursor-pointer'
154
+ }
155
+ }), Highlight, Placeholder.configure({
156
156
  placeholder: props.placeholder,
157
157
  emptyEditorClass: 'is-editor-empty text-outline'
158
158
  })],
@@ -176,12 +176,31 @@ var script = defineComponent({
176
176
  const handleToolbarClick = item => {
177
177
  if (item === 'bulletList' || item === 'orderedList') {
178
178
  item === 'bulletList' ? editor === null || editor === void 0 ? void 0 : editor.commands.toggleBulletList() : editor === null || editor === void 0 ? void 0 : editor.commands.toggleOrderedList();
179
+ } else if (item === 'link') {
180
+ setLink();
179
181
  } else if (item === 'undo' || item === 'redo') {
180
182
  item === 'undo' ? editor === null || editor === void 0 ? void 0 : editor.commands.undo() : editor === null || editor === void 0 ? void 0 : editor.commands.redo();
181
183
  } else {
182
184
  editor === null || editor === void 0 ? void 0 : editor.chain().focus().toggleMark(item).run();
183
185
  }
184
186
  };
187
+ const setLink = () => {
188
+ const previousUrl = editor === null || editor === void 0 ? void 0 : editor.getAttributes('link').href;
189
+ const url = window.prompt('URL', previousUrl);
190
+ // cancelled
191
+ if (url === null) {
192
+ return;
193
+ }
194
+ // empty
195
+ if (url === '') {
196
+ editor === null || editor === void 0 ? void 0 : editor.chain().focus().extendMarkRange('link').unsetLink().run();
197
+ return;
198
+ }
199
+ // update link
200
+ editor === null || editor === void 0 ? void 0 : editor.chain().focus().extendMarkRange('link').setLink({
201
+ href: url
202
+ }).run();
203
+ };
185
204
  const setActiveFormats = () => {
186
205
  const toolbarList = flatMap(props.toolbar);
187
206
  toolbarList.forEach(item => {
@@ -1,6 +1,7 @@
1
- export { _ as OrSelectV3 } from './OrSelect-bb223cce.js';
1
+ export { _ as OrSelectV3 } from './OrSelect-f416b7aa.js';
2
2
  export { a as SelectSize } from './OrInputBox-208dceac.js';
3
3
  import 'vue-demi';
4
+ import './dropdown-open-0d314aa4.js';
4
5
  import './useClassAttribute-47fdb016.js';
5
6
  import './useOverflow-ac506c65.js';
6
7
  import '@vueuse/core';
@@ -1,7 +1,2 @@
1
- export { u as useClassAttribute } from './useClassAttribute-47fdb016.js';
2
- export { u as useElevation } from './useElevation-0e973238.js';
3
- export { u as useOverflow } from './useOverflow-ac506c65.js';
4
- export { u as useResponsive } from './useResponsive-a02e95b7.js';
5
- export { u as useToggle } from './useToggle-29e4d7c7.js';
1
+ export { D as DropdownClose, a as DropdownOpen } from './dropdown-open-0d314aa4.js';
6
2
  import 'vue-demi';
7
- import '@vueuse/core';
@@ -1,3 +1,7 @@
1
+ export { u as useClassAttribute } from './useClassAttribute-47fdb016.js';
2
+ export { u as useElevation } from './useElevation-0e973238.js';
3
+ export { u as useOverflow } from './useOverflow-ac506c65.js';
1
4
  export { u as useResponsive } from './useResponsive-a02e95b7.js';
2
- import '@vueuse/core';
5
+ export { u as useToggle } from './useToggle-29e4d7c7.js';
3
6
  import 'vue-demi';
7
+ import '@vueuse/core';
@@ -0,0 +1,3 @@
1
+ export { u as useResponsive } from './useResponsive-a02e95b7.js';
2
+ import '@vueuse/core';
3
+ import 'vue-demi';
@@ -1,4 +1,5 @@
1
- import { isVue3, defineComponent, getCurrentInstance, ref, computed, onMounted, watch } from 'vue-demi';
1
+ import { defineComponent, getCurrentInstance, ref, computed, onMounted, watch } from 'vue-demi';
2
+ import { D as DropdownClose, a as DropdownOpen } from './dropdown-open-0d314aa4.js';
2
3
  import { u as useClassAttribute } from './useClassAttribute-47fdb016.js';
3
4
  import { u as useOverflow } from './useOverflow-ac506c65.js';
4
5
  import '@vueuse/core';
@@ -15,31 +16,6 @@ import { s as script$a } from './OrPopover-3525c670.js';
15
16
  import { s as script$b } from './OrTag-144b4ab8.js';
16
17
  import { resolveComponent, resolveDirective, openBlock, createElementBlock, mergeProps, createBlock, withCtx, renderSlot, createTextVNode, toDisplayString, createCommentVNode, withDirectives, normalizeClass, createElementVNode, Fragment, renderList, createVNode, withModifiers } from 'vue';
17
18
 
18
- const created$1 = (element, binding) => {
19
- element.addEventListener('keydown', event => {
20
- event.preventDefault();
21
- if (['Escape'].includes(event.key)) {
22
- binding.value(event);
23
- }
24
- });
25
- };
26
- const DropdownClose = {
27
- [isVue3 ? 'created' : 'bind']: created$1
28
- };
29
-
30
- const created = (element, binding) => {
31
- element.addEventListener('keydown', event => {
32
- event.preventDefault();
33
- if (['Enter', ' '].includes(event.key)) {
34
- binding.value(event);
35
- }
36
- });
37
- element.addEventListener('click', binding.value);
38
- };
39
- const DropdownOpen = {
40
- [isVue3 ? 'created' : 'bind']: created
41
- };
42
-
43
19
  const SelectRoot = [
44
20
  // Layout
45
21
  'flex', 'flex-col',
@@ -247,11 +223,15 @@ var script = defineComponent({
247
223
  };
248
224
  });
249
225
  // Methods
250
- function open() {
226
+ function toggle() {
251
227
  if (!readonly.value && !props.disabled) {
252
228
  const popoverInstance = popover.value;
253
229
  if (popoverInstance) {
254
- popoverInstance.open();
230
+ if (popoverState.value === 'open') {
231
+ popoverInstance.close();
232
+ } else {
233
+ popoverInstance.open();
234
+ }
255
235
  }
256
236
  }
257
237
  }
@@ -293,7 +273,7 @@ var script = defineComponent({
293
273
  internalSearchOptions,
294
274
  resolvedSearchOptions,
295
275
  groupedOptions,
296
- open,
276
+ toggle,
297
277
  close,
298
278
  deselect,
299
279
  innerItems,
@@ -484,7 +464,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
484
464
  _: 3 /* FORWARDED */
485
465
  }, 8 /* PROPS */, ["class", "trigger"])]),
486
466
  _: 3 /* FORWARDED */
487
- }, 8 /* PROPS */, ["class", "size", "invalid", "readonly", "disabled"])), [[_directive_dropdown_open, _ctx.open], [_directive_dropdown_close, _ctx.close]]), !_ctx.invalid ? (openBlock(), createBlock(_component_OrHint, {
467
+ }, 8 /* PROPS */, ["class", "size", "invalid", "readonly", "disabled"])), [[_directive_dropdown_open, _ctx.toggle], [_directive_dropdown_close, _ctx.close]]), !_ctx.invalid ? (openBlock(), createBlock(_component_OrHint, {
488
468
  key: 1,
489
469
  disabled: _ctx.disabled
490
470
  }, {
@@ -34,7 +34,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
34
34
  }[]>;
35
35
  resolvedSearchOptions: import("@vue/composition-api").ComputedRef<SelectOption[]>;
36
36
  groupedOptions: import("@vue/composition-api").ComputedRef<Record<string, SelectOption[]>>;
37
- open: () => void;
37
+ toggle: () => void;
38
38
  close: () => void;
39
39
  deselect: (option: SelectOption) => void;
40
40
  innerItems: import("@vue/composition-api").Ref<HTMLElement[]>;
@@ -221,7 +221,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
221
221
  }[]>;
222
222
  resolvedSearchOptions: import("@vue/composition-api").ComputedRef<SelectOption[]>;
223
223
  groupedOptions: import("@vue/composition-api").ComputedRef<Record<string, SelectOption[]>>;
224
- open: () => void;
224
+ toggle: () => void;
225
225
  close: () => void;
226
226
  deselect: (option: SelectOption) => void;
227
227
  innerItems: import("@vue/composition-api").Ref<HTMLElement[]>;
@@ -0,0 +1,2 @@
1
+ export * from './dropdown-close';
2
+ export * from './dropdown-open';
@@ -0,0 +1,28 @@
1
+ import { isVue3 } from 'vue-demi';
2
+
3
+ const created$1 = (element, binding) => {
4
+ element.addEventListener('keydown', event => {
5
+ event.preventDefault();
6
+ if (['Escape'].includes(event.key)) {
7
+ binding.value(event);
8
+ }
9
+ });
10
+ };
11
+ const DropdownClose = {
12
+ [isVue3 ? 'created' : 'bind']: created$1
13
+ };
14
+
15
+ const created = (element, binding) => {
16
+ element.addEventListener('keydown', event => {
17
+ event.preventDefault();
18
+ if (['Enter', ' '].includes(event.key)) {
19
+ binding.value(event);
20
+ }
21
+ });
22
+ element.addEventListener('click', binding.value);
23
+ };
24
+ const DropdownOpen = {
25
+ [isVue3 ? 'created' : 'bind']: created
26
+ };
27
+
28
+ export { DropdownClose as D, DropdownOpen as a };
@@ -1,3 +1,4 @@
1
1
  export * from './components';
2
+ export * from './directives';
2
3
  export * from './hooks';
3
4
  export * from './utils/functions/text';
package/dist/v3/index.js CHANGED
@@ -59,7 +59,7 @@ export { s as OrRadioGroup } from './OrRadioGroup-00785e41.js';
59
59
  export { s as OrRadioV3 } from './OrRadio-0c1883f2.js';
60
60
  export { s as OrSearchV3 } from './OrSearch-15a70678.js';
61
61
  export { s as OrSelect } from './OrSelect-056731af.js';
62
- export { s as OrSelectV3 } from './OrSelect-63ada65d.js';
62
+ export { s as OrSelectV3 } from './OrSelect-9d300f55.js';
63
63
  export { s as OrSidebar, O as OrSidebarSide } from './OrSidebar-375c85a3.js';
64
64
  export { O as OrSidebarPlacement, s as OrSidebarV3 } from './OrSidebar-a62972f5.js';
65
65
  export { s as OrSkeletonCircle, a as OrSkeletonRect, b as OrSkeletonText, O as OrSkeletonTextSizes } from './OrSkeletonText-2b1610ce.js';
@@ -86,6 +86,7 @@ export { a as OrToastContainerV3, s as OrToastV3, t as TypesV3 } from './types-a
86
86
  export { p as PropsV3, a as useQueueV3, u as useToastV3 } from './useToast-0665462d.js';
87
87
  export { s as OrTooltip, a as OrTooltipContent } from './OrTooltip-121eae2b.js';
88
88
  export { s as OrTooltipV3 } from './OrTooltip-30e05f9e.js';
89
+ export { D as DropdownClose, a as DropdownOpen } from './dropdown-open-0d314aa4.js';
89
90
  export { u as useClassAttribute } from './useClassAttribute-47fdb016.js';
90
91
  export { u as useElevation } from './useElevation-0e973238.js';
91
92
  export { u as useOverflow } from './useOverflow-ac506c65.js';
package/dist/v3/index2.js CHANGED
@@ -59,7 +59,7 @@ export { s as OrRadioGroup } from './OrRadioGroup-00785e41.js';
59
59
  export { s as OrRadioV3 } from './OrRadio-0c1883f2.js';
60
60
  export { s as OrSearchV3 } from './OrSearch-15a70678.js';
61
61
  export { s as OrSelect } from './OrSelect-056731af.js';
62
- export { s as OrSelectV3 } from './OrSelect-63ada65d.js';
62
+ export { s as OrSelectV3 } from './OrSelect-9d300f55.js';
63
63
  export { s as OrSidebar, O as OrSidebarSide } from './OrSidebar-375c85a3.js';
64
64
  export { O as OrSidebarPlacement, s as OrSidebarV3 } from './OrSidebar-a62972f5.js';
65
65
  export { s as OrSkeletonCircle, a as OrSkeletonRect, b as OrSkeletonText, O as OrSkeletonTextSizes } from './OrSkeletonText-2b1610ce.js';
@@ -111,4 +111,5 @@ import 'sortablejs';
111
111
  import './useElevation-0e973238.js';
112
112
  import './useResponsive-a02e95b7.js';
113
113
  import '@vueuse/integrations/useFocusTrap';
114
+ import './dropdown-open-0d314aa4.js';
114
115
  import './useOverflow-ac506c65.js';
@@ -4,6 +4,7 @@ import '@vueuse/core';
4
4
  import { Editor } from '@tiptap/core';
5
5
  import StarterKit from '@tiptap/starter-kit';
6
6
  import Underline from '@tiptap/extension-underline';
7
+ import Link from '@tiptap/extension-link';
7
8
  import Highlight from '@tiptap/extension-highlight';
8
9
  import Placeholder from '@tiptap/extension-placeholder';
9
10
  import { s as script$1 } from './OrIconButton-b8066b5d.js';
@@ -78,7 +79,7 @@ var script = defineComponent({
78
79
  },
79
80
  toolbar: {
80
81
  type: Array,
81
- default: () => [['bold', 'italic', 'strike'], ['underline', 'highlight'], ['bulletList', 'orderedList'], ['undo', 'redo']]
82
+ default: () => [['bold', 'italic', 'strike'], ['underline', 'highlight'], ['link'], ['bulletList', 'orderedList'], ['undo', 'redo']]
82
83
  },
83
84
  description: {
84
85
  type: String,
@@ -141,17 +142,16 @@ var script = defineComponent({
141
142
  element: editorRef.value,
142
143
  content: props.modelValue,
143
144
  autofocus: props.autofocus,
144
- extensions: [StarterKit, Underline,
145
- // Link.configure({
146
- // openOnClick: true,
147
- // linkOnPaste: true,
148
- // protocols: ['ftp', 'mailto'],
149
- // validate: href => /^https?:\/\//.test(href),
150
- // HTMLAttributes: {
151
- // class: 'text-primary cursor-pointer',
152
- // },
153
- // }),
154
- Highlight, Placeholder.configure({
145
+ extensions: [StarterKit, Underline, Link.configure({
146
+ openOnClick: true,
147
+ linkOnPaste: true,
148
+ autolink: false,
149
+ protocols: ['ftp', 'mailto', 'http', 'https'],
150
+ validate: href => /^https?:\/\//.test(href),
151
+ HTMLAttributes: {
152
+ class: 'text-primary cursor-pointer'
153
+ }
154
+ }), Highlight, Placeholder.configure({
155
155
  placeholder: props.placeholder,
156
156
  emptyEditorClass: 'is-editor-empty text-outline'
157
157
  })],
@@ -175,12 +175,31 @@ var script = defineComponent({
175
175
  const handleToolbarClick = item => {
176
176
  if (item === 'bulletList' || item === 'orderedList') {
177
177
  item === 'bulletList' ? editor === null || editor === void 0 ? void 0 : editor.commands.toggleBulletList() : editor === null || editor === void 0 ? void 0 : editor.commands.toggleOrderedList();
178
+ } else if (item === 'link') {
179
+ setLink();
178
180
  } else if (item === 'undo' || item === 'redo') {
179
181
  item === 'undo' ? editor === null || editor === void 0 ? void 0 : editor.commands.undo() : editor === null || editor === void 0 ? void 0 : editor.commands.redo();
180
182
  } else {
181
183
  editor === null || editor === void 0 ? void 0 : editor.chain().focus().toggleMark(item).run();
182
184
  }
183
185
  };
186
+ const setLink = () => {
187
+ const previousUrl = editor === null || editor === void 0 ? void 0 : editor.getAttributes('link').href;
188
+ const url = window.prompt('URL', previousUrl);
189
+ // cancelled
190
+ if (url === null) {
191
+ return;
192
+ }
193
+ // empty
194
+ if (url === '') {
195
+ editor === null || editor === void 0 ? void 0 : editor.chain().focus().extendMarkRange('link').unsetLink().run();
196
+ return;
197
+ }
198
+ // update link
199
+ editor === null || editor === void 0 ? void 0 : editor.chain().focus().extendMarkRange('link').setLink({
200
+ href: url
201
+ }).run();
202
+ };
184
203
  const setActiveFormats = () => {
185
204
  const toolbarList = flatMap(props.toolbar);
186
205
  toolbarList.forEach(item => {
@@ -1,6 +1,7 @@
1
- export { s as OrSelectV3 } from './OrSelect-63ada65d.js';
1
+ export { s as OrSelectV3 } from './OrSelect-9d300f55.js';
2
2
  export { a as SelectSize } from './OrInputBox-634230b1.js';
3
3
  import 'vue-demi';
4
+ import './dropdown-open-0d314aa4.js';
4
5
  import './useClassAttribute-47fdb016.js';
5
6
  import './useOverflow-ac506c65.js';
6
7
  import '@vueuse/core';
@@ -1,7 +1,2 @@
1
- export { u as useClassAttribute } from './useClassAttribute-47fdb016.js';
2
- export { u as useElevation } from './useElevation-0e973238.js';
3
- export { u as useOverflow } from './useOverflow-ac506c65.js';
4
- export { u as useResponsive } from './useResponsive-a02e95b7.js';
5
- export { u as useToggle } from './useToggle-29e4d7c7.js';
1
+ export { D as DropdownClose, a as DropdownOpen } from './dropdown-open-0d314aa4.js';
6
2
  import 'vue-demi';
7
- import '@vueuse/core';
@@ -1,3 +1,7 @@
1
+ export { u as useClassAttribute } from './useClassAttribute-47fdb016.js';
2
+ export { u as useElevation } from './useElevation-0e973238.js';
3
+ export { u as useOverflow } from './useOverflow-ac506c65.js';
1
4
  export { u as useResponsive } from './useResponsive-a02e95b7.js';
2
- import '@vueuse/core';
5
+ export { u as useToggle } from './useToggle-29e4d7c7.js';
3
6
  import 'vue-demi';
7
+ import '@vueuse/core';
@@ -0,0 +1,3 @@
1
+ export { u as useResponsive } from './useResponsive-a02e95b7.js';
2
+ import '@vueuse/core';
3
+ import 'vue-demi';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onereach/ui-components",
3
- "version": "2.63.0-beta.1896.0",
3
+ "version": "2.63.0-beta.1907.0",
4
4
  "description": "Vue components library for v2/3",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/auto/index.js",
@@ -1,3 +1,7 @@
1
1
  import { DocsPage } from '@storybook/addon-docs';
2
2
 
3
+ ```ts
4
+ import { OrAvatarV3 as OrAvatar } from '@onereach/ui-components';
5
+ ```
6
+
3
7
  <DocsPage />
@@ -1,3 +1,7 @@
1
1
  import { DocsPage } from '@storybook/addon-docs';
2
2
 
3
+ ```ts
4
+ import { OrBottomSheetV3 as OrBottomSheet } from '@onereach/ui-components';
5
+ ```
6
+
3
7
  <DocsPage />
@@ -1,5 +1,9 @@
1
1
  import { DocsPage } from '@storybook/addon-docs';
2
2
 
3
+ ```ts
4
+ import { OrButtonV3 as OrButton } from '@onereach/ui-components';
5
+ ```
6
+
3
7
  <DocsPage />
4
8
 
5
9
  ## Migration Guide from V1
@@ -1,5 +1,9 @@
1
1
  import { DocsPage } from '@storybook/addon-docs';
2
2
 
3
+ ```ts
4
+ import { OrCardV3 as OrCard } from '@onereach/ui-components';
5
+ ```
6
+
3
7
  <DocsPage />
4
8
 
5
9
  ## Migration Guide from V1
@@ -1,5 +1,9 @@
1
1
  import { DocsPage } from '@storybook/addon-docs';
2
2
 
3
+ ```ts
4
+ import { OrCheckboxV3 as OrCheckbox } from '@onereach/ui-components';
5
+ ```
6
+
3
7
  <DocsPage />
4
8
 
5
9
  ## Migration Guide from V1
@@ -1,5 +1,9 @@
1
1
  import { DocsPage } from '@storybook/addon-docs';
2
2
 
3
+ ```ts
4
+ import { OrConfirmV3 as OrConfirm } from '@onereach/ui-components';
5
+ ```
6
+
3
7
  <DocsPage />
4
8
 
5
9
  ## Migration Guide from V1
@@ -1,3 +1,8 @@
1
1
  import { DocsPage } from '@storybook/addon-docs';
2
2
 
3
+ ```ts
4
+ import { OrErrorTagV3 as OrErrorTag } from '@onereach/ui-components';
5
+ ```
6
+
7
+
3
8
  <DocsPage />
@@ -1,3 +1,7 @@
1
1
  import { DocsPage } from '@storybook/addon-docs';
2
2
 
3
+ ```ts
4
+ import { OrErrorV3 as OrError } from '@onereach/ui-components';
5
+ ```
6
+
3
7
  <DocsPage />
@@ -1,3 +1,7 @@
1
1
  import { DocsPage } from '@storybook/addon-docs';
2
2
 
3
+ ```ts
4
+ import { OrExpansionPanelV3 as OrExpansionPanel } from '@onereach/ui-components';
5
+ ```
6
+
3
7
  <DocsPage />
@@ -1,3 +1,7 @@
1
1
  import { DocsPage } from '@storybook/addon-docs';
2
2
 
3
+ ```ts
4
+ import { OrFabV3 as OrFab } from '@onereach/ui-components';
5
+ ```
6
+
3
7
  <DocsPage />
@@ -1,3 +1,7 @@
1
1
  import { DocsPage } from '@storybook/addon-docs';
2
2
 
3
+ ```ts
4
+ import { OrHintV3 as OrHint } from '@onereach/ui-components';
5
+ ```
6
+
3
7
  <DocsPage />
@@ -1,5 +1,9 @@
1
1
  import { DocsPage } from '@storybook/addon-docs';
2
2
 
3
+ ```ts
4
+ import { OrIconButtonV3 as OrIconButton } from '@onereach/ui-components';
5
+ ```
6
+
3
7
  <DocsPage />
4
8
 
5
9
  ## Migration Guide from V1
@@ -1,5 +1,9 @@
1
1
  import { DocsPage } from '@storybook/addon-docs';
2
2
 
3
+ ```ts
4
+ import { OrIconV3 as OrIcon } from '@onereach/ui-components';
5
+ ```
6
+
3
7
  <DocsPage />
4
8
 
5
9
  ## Migration Guide from V1
@@ -1,3 +1,7 @@
1
1
  import { DocsPage } from '@storybook/addon-docs';
2
2
 
3
+ ```ts
4
+ import { OrInlineInputV3 as OrInlineInput } from '@onereach/ui-components';
5
+ ```
6
+
3
7
  <DocsPage />
@@ -1,3 +1,7 @@
1
1
  import { DocsPage } from '@storybook/addon-docs';
2
2
 
3
+ ```ts
4
+ import { OrInlineTextareaV3 as OrInlineTextarea } from '@onereach/ui-components';
5
+ ```
6
+
3
7
  <DocsPage />
@@ -1,5 +1,9 @@
1
1
  import { DocsPage } from '@storybook/addon-docs';
2
2
 
3
+ ```ts
4
+ import { OrInputV3 as OrInput } from '@onereach/ui-components';
5
+ ```
6
+
3
7
  <DocsPage />
4
8
 
5
9
  ## Migration Guide from V1
@@ -1,5 +1,9 @@
1
1
  import { DocsPage } from '@storybook/addon-docs';
2
2
 
3
+ ```ts
4
+ import { OrLabelV3 as OrLabel } from '@onereach/ui-components';
5
+ ```
6
+
3
7
  <DocsPage />
4
8
 
5
9
  ## Migration Guide from V1
@@ -1,3 +1,7 @@
1
1
  import { DocsPage } from '@storybook/addon-docs';
2
2
 
3
+ ```ts
4
+ import { OrLinkV3 as OrLink } from '@onereach/ui-components';
5
+ ```
6
+
3
7
  <DocsPage />
@@ -1,5 +1,9 @@
1
1
  import { DocsPage } from '@storybook/addon-docs';
2
2
 
3
+ ```ts
4
+ import { OrLoaderV3 as OrLoader } from '@onereach/ui-components';
5
+ ```
6
+
3
7
  <DocsPage />
4
8
 
5
9
  ## Migration Guide from V1
@@ -1,3 +1,7 @@
1
1
  import { DocsPage } from '@storybook/addon-docs';
2
2
 
3
+ ```ts
4
+ import { OrMenuItemV3 as OrMenuItem } from '@onereach/ui-components';
5
+ ```
6
+
3
7
  <DocsPage />
@@ -1,3 +1,7 @@
1
1
  import { DocsPage } from '@storybook/addon-docs';
2
2
 
3
+ ```ts
4
+ import { OrMenuV3 as OrMenu } from '@onereach/ui-components';
5
+ ```
6
+
3
7
  <DocsPage />
@@ -1,5 +1,9 @@
1
1
  import { DocsPage } from '@storybook/addon-docs';
2
2
 
3
+ ```ts
4
+ import { OrModalV3 as OrModal } from '@onereach/ui-components';
5
+ ```
6
+
3
7
  <DocsPage />
4
8
 
5
9
  ## Migration Guide from V1
@@ -1,3 +1,7 @@
1
1
  import { DocsPage } from '@storybook/addon-docs';
2
2
 
3
+ ```ts
4
+ import { OrNotificationV3 as OrNotification } from '@onereach/ui-components';
5
+ ```
6
+
3
7
  <DocsPage />
@@ -1,5 +1,9 @@
1
1
  import { DocsPage } from '@storybook/addon-docs';
2
2
 
3
+ ```ts
4
+ import { OrOverlayV3 as OrOverlay } from '@onereach/ui-components';
5
+ ```
6
+
3
7
  <DocsPage />
4
8
 
5
9
  ## Migration Guide from V1
@@ -1,5 +1,9 @@
1
1
  import { DocsPage } from '@storybook/addon-docs';
2
2
 
3
+ ```ts
4
+ import { OrPopoverV3 as OrPopover } from '@onereach/ui-components';
5
+ ```
6
+
3
7
  <DocsPage />
4
8
 
5
9
  ## Migration Guide from V1
@@ -1,5 +1,9 @@
1
1
  import { DocsPage } from '@storybook/addon-docs';
2
2
 
3
+ ```ts
4
+ import { OrProgressV3 as OrProgress } from '@onereach/ui-components';
5
+ ```
6
+
3
7
  <DocsPage />
4
8
 
5
9
  ## Migration Guide from V1
@@ -1,5 +1,9 @@
1
1
  import { DocsPage } from '@storybook/addon-docs';
2
2
 
3
+ ```ts
4
+ import { OrRadioV3 as OrRadio } from '@onereach/ui-components';
5
+ ```
6
+
3
7
  <DocsPage />
4
8
 
5
9
  ## Migration Guide from V1
@@ -45,7 +45,7 @@ import { useClassAttribute } from '../../hooks';
45
45
  import { Editor } from '@tiptap/core';
46
46
  import StarterKit from '@tiptap/starter-kit';
47
47
  import Underline from '@tiptap/extension-underline';
48
- // import Link from '@tiptap/extension-link';
48
+ import Link from '@tiptap/extension-link';
49
49
  import Highlight from '@tiptap/extension-highlight';
50
50
  import Placeholder from '@tiptap/extension-placeholder';
51
51
  import { OrIconButtonV3 as OrIconButton } from '../or-icon-button-v3';
@@ -79,7 +79,7 @@ export default defineComponent({
79
79
  },
80
80
  toolbar: {
81
81
  type: Array,
82
- default: () => [['bold', 'italic', 'strike'], ['underline', 'highlight'], ['bulletList', 'orderedList'], ['undo', 'redo']],
82
+ default: () => [['bold', 'italic', 'strike'], ['underline', 'highlight'], ['link'], ['bulletList', 'orderedList'], ['undo', 'redo']],
83
83
  },
84
84
  description: {
85
85
  type: String,
@@ -145,15 +145,16 @@ export default defineComponent({
145
145
  extensions: [
146
146
  StarterKit,
147
147
  Underline,
148
- // Link.configure({
149
- // openOnClick: true,
150
- // linkOnPaste: true,
151
- // protocols: ['ftp', 'mailto'],
152
- // validate: href => /^https?:\/\//.test(href),
153
- // HTMLAttributes: {
154
- // class: 'text-primary cursor-pointer',
155
- // },
156
- // }),
148
+ Link.configure({
149
+ openOnClick: true,
150
+ linkOnPaste: true,
151
+ autolink: false,
152
+ protocols: ['ftp', 'mailto', 'http', 'https'],
153
+ validate: href => /^https?:\/\//.test(href),
154
+ HTMLAttributes: {
155
+ class: 'text-primary cursor-pointer',
156
+ },
157
+ }),
157
158
  Highlight,
158
159
  Placeholder
159
160
  .configure({
@@ -185,6 +186,9 @@ export default defineComponent({
185
186
  if (item === 'bulletList' || item === 'orderedList') {
186
187
  item === 'bulletList' ? editor?.commands.toggleBulletList() : editor?.commands.toggleOrderedList();
187
188
  }
189
+ else if (item === 'link') {
190
+ setLink();
191
+ }
188
192
  else if (item === 'undo' || item === 'redo') {
189
193
  item === 'undo' ? editor?.commands.undo() : editor?.commands.redo();
190
194
  }
@@ -193,6 +197,29 @@ export default defineComponent({
193
197
  }
194
198
  };
195
199
 
200
+ const setLink = () => {
201
+ const previousUrl = editor?.getAttributes('link').href;
202
+ const url = window.prompt('URL', previousUrl);
203
+
204
+ // cancelled
205
+ if (url === null) {
206
+ return;
207
+ }
208
+
209
+ // empty
210
+ if (url === '') {
211
+ editor?.chain().focus().extendMarkRange('link').unsetLink().run();
212
+ return;
213
+ }
214
+
215
+ // update link
216
+ editor?.chain()
217
+ .focus()
218
+ .extendMarkRange('link')
219
+ .setLink({ href: url })
220
+ .run();
221
+ };
222
+
196
223
  const setActiveFormats = () => {
197
224
  const toolbarList = flatMap(props.toolbar) as string[];
198
225
  toolbarList.forEach((item) => {
@@ -1,5 +1,9 @@
1
1
  import { DocsPage } from '@storybook/addon-docs';
2
2
 
3
+ ```ts
4
+ import { OrSearchV3 as OrSearch } from '@onereach/ui-components';
5
+ ```
6
+
3
7
  <DocsPage />
4
8
 
5
9
  ## Migration Guide from V1
@@ -1,5 +1,9 @@
1
1
  import { DocsPage } from '@storybook/addon-docs';
2
2
 
3
+ ```ts
4
+ import { OrSelectV3 as OrSelect } from '@onereach/ui-components';
5
+ ```
6
+
3
7
  <DocsPage />
4
8
 
5
9
  ## Migration Guide from V1
@@ -21,7 +21,7 @@
21
21
 
22
22
  <OrInputBox
23
23
  ref="inputBox"
24
- v-dropdown-open="open"
24
+ v-dropdown-open="toggle"
25
25
  v-dropdown-close="close"
26
26
  :class="[popoverState === 'open' && 'rounded-b-0']"
27
27
  :size="size"
@@ -208,8 +208,7 @@
208
208
 
209
209
  <script lang="ts">
210
210
  import { computed, defineComponent, getCurrentInstance, onMounted, PropType, ref, watch } from 'vue-demi';
211
- import { DropdownClose } from '../../directives/dropdown-close';
212
- import { DropdownOpen } from '../../directives/dropdown-open';
211
+ import { DropdownClose, DropdownOpen } from '../../directives';
213
212
  import { useClassAttribute, useOverflow } from '../../hooks';
214
213
  import { OrCheckboxV3 as OrCheckbox } from '../or-checkbox-v3';
215
214
  import { OrErrorV3 as OrError } from '../or-error-v3';
@@ -465,12 +464,16 @@ export default defineComponent({
465
464
  });
466
465
 
467
466
  // Methods
468
- function open(): void {
467
+ function toggle(): void {
469
468
  if (!readonly.value && !props.disabled) {
470
469
  const popoverInstance = popover.value;
471
470
 
472
471
  if (popoverInstance) {
473
- (popoverInstance.open as () => void)();
472
+ if (popoverState.value === 'open') {
473
+ (popoverInstance.close as () => void)();
474
+ } else {
475
+ (popoverInstance.open as () => void)();
476
+ }
474
477
  }
475
478
  }
476
479
  }
@@ -515,7 +518,7 @@ export default defineComponent({
515
518
  internalSearchOptions,
516
519
  resolvedSearchOptions,
517
520
  groupedOptions,
518
- open,
521
+ toggle,
519
522
  close,
520
523
  deselect,
521
524
  innerItems,
@@ -1,3 +1,7 @@
1
1
  import { DocsPage } from '@storybook/addon-docs';
2
2
 
3
+ ```ts
4
+ import { OrSidebarV3 as OrSidebar } from '@onereach/ui-components';
5
+ ```
6
+
3
7
  <DocsPage />
@@ -1,5 +1,13 @@
1
1
  import { DocsPage } from '@storybook/addon-docs';
2
2
 
3
+ ```ts
4
+ import {
5
+ OrSkeletonCircleV3 as OrSkeletonCircle,
6
+ OrSkeletonRectV3 as OrSkeletonRect,
7
+ OrSkeletonTextV3 as OrSkeletonText,
8
+ } from '@onereach/ui-components';
9
+ ```
10
+
3
11
  <DocsPage />
4
12
 
5
13
  ## Migration Guide from V1
@@ -1,3 +1,7 @@
1
1
  import { DocsPage } from '@storybook/addon-docs';
2
2
 
3
+ ```ts
4
+ import { OrSwitchV3 as OrSwitch } from '@onereach/ui-components';
5
+ ```
6
+
3
7
  <DocsPage />
@@ -1,3 +1,7 @@
1
1
  import { DocsPage } from '@storybook/addon-docs';
2
2
 
3
+ ```ts
4
+ import { OrTabV3 as OrTab } from '@onereach/ui-components';
5
+ ```
6
+
3
7
  <DocsPage />
@@ -1,3 +1,7 @@
1
1
  import { DocsPage } from '@storybook/addon-docs';
2
2
 
3
+ ```ts
4
+ import { OrTabsV3 as OrTabs } from '@onereach/ui-components';
5
+ ```
6
+
3
7
  <DocsPage />
@@ -1,5 +1,9 @@
1
1
  import { DocsPage } from '@storybook/addon-docs';
2
2
 
3
+ ```ts
4
+ import { OrTagV3 as OrTag } from '@onereach/ui-components';
5
+ ```
6
+
3
7
  <DocsPage />
4
8
 
5
9
  ## Migration Guide from V1
@@ -1,3 +1,7 @@
1
1
  import { DocsPage } from '@storybook/addon-docs';
2
2
 
3
+ ```ts
4
+ import { OrTeleportV3 as OrTeleport } from '@onereach/ui-components';
5
+ ```
6
+
3
7
  <DocsPage />
@@ -1,3 +1,7 @@
1
1
  import { DocsPage } from '@storybook/addon-docs';
2
2
 
3
+ ```ts
4
+ import { OrTextV3 as OrText } from '@onereach/ui-components';
5
+ ```
6
+
3
7
  <DocsPage />
@@ -1,5 +1,9 @@
1
1
  import { DocsPage } from '@storybook/addon-docs';
2
2
 
3
+ ```ts
4
+ import { OrTextareaV3 as OrTextarea } from '@onereach/ui-components';
5
+ ```
6
+
3
7
  <DocsPage />
4
8
 
5
9
  ## Migration Guide from V1
@@ -1,5 +1,8 @@
1
1
  import { DocsPage } from '@storybook/addon-docs';
2
2
 
3
+ ```ts
4
+ import { OrTooltipV3 as OrTooltip } from '@onereach/ui-components';
5
+ ```
3
6
  <DocsPage />
4
7
 
5
8
  ## Migration Guide from V1
@@ -0,0 +1,2 @@
1
+ export * from './dropdown-close';
2
+ export * from './dropdown-open';
package/src/index.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export * from './components';
2
+ export * from './directives';
2
3
  export * from './hooks';
3
4
  export * from './utils/functions/text';