@onereach/ui-components 2.75.2-beta.2390.0 → 2.75.2-beta.2391.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 (151) hide show
  1. package/dist/bundled/v2/{OrCardCollection-e3986f07.js → OrCardCollection-04e767c2.js} +1 -1
  2. package/dist/bundled/v2/{OrConfirm-498fa802.js → OrConfirm-a76ff6d2.js} +1 -1
  3. package/dist/bundled/v2/{OrInlineInput-5f0b99f9.js → OrInlineInput-9304f205.js} +11 -25
  4. package/dist/bundled/v2/{OrInlineTextarea-975b8706.js → OrInlineTextarea-e0d28fc6.js} +11 -25
  5. package/dist/bundled/v2/{OrInput-822eb9f5.js → OrInput-b8511a0c.js} +12 -27
  6. package/dist/bundled/v2/{OrInputBox-9a31d211.js → OrInputBox-e54dcef9.js} +12 -2
  7. package/dist/bundled/v2/{OrModal-d845da2d.js → OrModal-5f094323.js} +4 -4
  8. package/dist/bundled/v2/{OrSearch-f9d46a70.js → OrSearch-60b64568.js} +2 -2
  9. package/dist/bundled/v2/{OrSelect-0c0c01d4.js → OrSelect-752bdd3b.js} +10 -27
  10. package/dist/bundled/v2/{OrTextarea-c56f19db.js → OrTextarea-5fdf63d0.js} +12 -27
  11. package/dist/bundled/v2/components/index.js +10 -11
  12. package/dist/bundled/v2/components/or-card-collection-v3/index.js +4 -5
  13. package/dist/bundled/v2/components/or-confirm-v3/index.js +3 -4
  14. package/dist/bundled/v2/components/or-inline-input-v3/OrInlineInput.vue.d.ts +7 -5
  15. package/dist/bundled/v2/components/or-inline-input-v3/index.js +1 -1
  16. package/dist/bundled/v2/components/or-inline-textarea-v3/OrInlineTextarea.vue.d.ts +7 -5
  17. package/dist/bundled/v2/components/or-inline-textarea-v3/index.js +1 -1
  18. package/dist/bundled/v2/components/or-input-box-v3/index.js +1 -2
  19. package/dist/bundled/v2/components/or-input-v3/OrInput.vue.d.ts +7 -5
  20. package/dist/bundled/v2/components/or-input-v3/index.js +2 -3
  21. package/dist/bundled/v2/components/or-modal-v3/index.js +1 -1
  22. package/dist/bundled/v2/components/or-search-v3/index.js +3 -4
  23. package/dist/bundled/v2/components/or-select-v3/OrSelect.vue.d.ts +7 -5
  24. package/dist/bundled/v2/components/or-select-v3/index.js +3 -4
  25. package/dist/bundled/v2/components/or-textarea-v3/OrTextarea.vue.d.ts +7 -5
  26. package/dist/bundled/v2/components/or-textarea-v3/index.js +2 -3
  27. package/dist/bundled/v2/index.js +11 -12
  28. package/dist/bundled/v3/{OrCardCollection.vue_vue_type_script_lang-f2fdaa33.js → OrCardCollection.vue_vue_type_script_lang-e71a0ea0.js} +1 -1
  29. package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-2bb4e530.js → OrConfirm.vue_vue_type_script_lang-b550c3d3.js} +2 -2
  30. package/dist/bundled/v3/{OrInlineInput.vue_vue_type_script_lang-18853dd7.js → OrInlineInput.vue_vue_type_script_lang-cd4a64f6.js} +5 -3
  31. package/dist/bundled/v3/{OrInlineTextarea.vue_vue_type_script_lang-3cb238d6.js → OrInlineTextarea.vue_vue_type_script_lang-a73ff1ee.js} +5 -3
  32. package/dist/bundled/v3/{OrInput-13a84d53.js → OrInput-6d49f353.js} +9 -12
  33. package/dist/bundled/v3/{OrInput.vue_vue_type_script_lang-09a6138d.js → OrInput.vue_vue_type_script_lang-af68d0e7.js} +7 -6
  34. package/dist/bundled/v3/{OrInputBox-44f37541.js → OrInputBox-358d4856.js} +1 -1
  35. package/dist/{esm/v2/OrInputBox.vue_rollup-plugin-vue_script-4ba46db4.js → bundled/v3/OrInputBox.vue_vue_type_script_lang-b387d4ba.js} +1 -1
  36. package/dist/bundled/v3/{OrModal.vue_vue_type_script_lang-3f3ce339.js → OrModal.vue_vue_type_script_lang-92339e0f.js} +4 -4
  37. package/dist/bundled/v3/{OrSearch.vue_vue_type_script_lang-9028a3c5.js → OrSearch.vue_vue_type_script_lang-8c37e5a7.js} +3 -3
  38. package/dist/bundled/v3/{OrSelect.vue_vue_type_script_lang-30c61027.js → OrSelect.vue_vue_type_script_lang-35ac0247.js} +8 -9
  39. package/dist/bundled/v3/{OrTextarea.vue_vue_type_script_lang-b2899ba6.js → OrTextarea.vue_vue_type_script_lang-de99a858.js} +7 -6
  40. package/dist/bundled/v3/components/index.js +12 -13
  41. package/dist/bundled/v3/components/or-card-collection-v3/index.js +6 -7
  42. package/dist/bundled/v3/components/or-confirm-v3/index.js +5 -6
  43. package/dist/bundled/v3/components/or-inline-input-v3/OrInlineInput.vue.d.ts +7 -5
  44. package/dist/bundled/v3/components/or-inline-input-v3/index.js +1 -1
  45. package/dist/bundled/v3/components/or-inline-textarea-v3/OrInlineTextarea.vue.d.ts +7 -5
  46. package/dist/bundled/v3/components/or-inline-textarea-v3/index.js +1 -1
  47. package/dist/bundled/v3/components/or-input-box-v3/index.js +1 -2
  48. package/dist/bundled/v3/components/or-input-v3/OrInput.vue.d.ts +7 -5
  49. package/dist/bundled/v3/components/or-input-v3/index.js +3 -4
  50. package/dist/bundled/v3/components/or-modal-v3/index.js +1 -1
  51. package/dist/bundled/v3/components/or-search-v3/index.js +5 -6
  52. package/dist/bundled/v3/components/or-select-v3/OrSelect.vue.d.ts +7 -5
  53. package/dist/bundled/v3/components/or-select-v3/index.js +5 -6
  54. package/dist/bundled/v3/components/or-textarea-v3/OrTextarea.vue.d.ts +7 -5
  55. package/dist/bundled/v3/components/or-textarea-v3/index.js +3 -4
  56. package/dist/bundled/v3/index.js +131 -142
  57. package/dist/esm/v2/{OrCardCollection-59455d23.js → OrCardCollection-f7856175.js} +2 -2
  58. package/dist/esm/v2/{OrConfirm-b31e3d3d.js → OrConfirm-98d62065.js} +1 -1
  59. package/dist/esm/v2/{OrInlineInput-36d79e50.js → OrInlineInput-df02ab5d.js} +11 -25
  60. package/dist/esm/v2/{OrInlineTextarea-e2d61e44.js → OrInlineTextarea-ad120656.js} +11 -25
  61. package/dist/esm/v2/{OrInput-06003aad.js → OrInput-3bb91436.js} +12 -27
  62. package/dist/{bundled/v3/OrInputBox.vue_vue_type_script_lang-c4f9c8ef.js → esm/v2/OrInputBox-53d1f66d.js} +53 -3
  63. package/dist/esm/v2/{OrModal-370cfc3b.js → OrModal-407f3ac7.js} +4 -4
  64. package/dist/esm/v2/{OrSearch-44645202.js → OrSearch-dad9b02f.js} +2 -2
  65. package/dist/esm/v2/{OrSelect-a51044ed.js → OrSelect-7ef80130.js} +10 -27
  66. package/dist/esm/v2/{OrTextarea-5fa93c9a.js → OrTextarea-0a64f718.js} +12 -27
  67. package/dist/esm/v2/components/index.js +10 -11
  68. package/dist/esm/v2/components/or-card-collection-v3/index.js +4 -5
  69. package/dist/esm/v2/components/or-confirm-v3/index.js +3 -4
  70. package/dist/esm/v2/components/or-inline-input-v3/OrInlineInput.vue.d.ts +7 -5
  71. package/dist/esm/v2/components/or-inline-input-v3/index.js +1 -1
  72. package/dist/esm/v2/components/or-inline-textarea-v3/OrInlineTextarea.vue.d.ts +7 -5
  73. package/dist/esm/v2/components/or-inline-textarea-v3/index.js +1 -1
  74. package/dist/esm/v2/components/or-input-box-v3/index.js +2 -3
  75. package/dist/esm/v2/components/or-input-v3/OrInput.vue.d.ts +7 -5
  76. package/dist/esm/v2/components/or-input-v3/index.js +2 -3
  77. package/dist/esm/v2/components/or-modal-v3/index.js +1 -1
  78. package/dist/esm/v2/components/or-search-v3/index.js +3 -4
  79. package/dist/esm/v2/components/or-select-v3/OrSelect.vue.d.ts +7 -5
  80. package/dist/esm/v2/components/or-select-v3/index.js +3 -4
  81. package/dist/esm/v2/components/or-textarea-v3/OrTextarea.vue.d.ts +7 -5
  82. package/dist/esm/v2/components/or-textarea-v3/index.js +2 -3
  83. package/dist/esm/v2/index.js +10 -11
  84. package/dist/esm/v3/{OrCardCollection-5c0d53e0.js → OrCardCollection-4cb41408.js} +1 -1
  85. package/dist/esm/v3/{OrConfirm-c7304c10.js → OrConfirm-19da64d1.js} +1 -1
  86. package/dist/esm/v3/{OrInlineInput-651c9155.js → OrInlineInput-cd3753ee.js} +14 -14
  87. package/dist/esm/v3/{OrInlineTextarea-d16af66a.js → OrInlineTextarea-4c5b0390.js} +14 -14
  88. package/dist/esm/v3/{OrInput-b3939d15.js → OrInput-ae9f6871.js} +13 -14
  89. package/dist/esm/v3/{OrModal-f9f2279b.js → OrModal-17c3a1cb.js} +4 -4
  90. package/dist/esm/v3/{OrSearch-d16d0331.js → OrSearch-6f6b4fcd.js} +1 -1
  91. package/dist/esm/v3/{OrSelect-19c2e7d2.js → OrSelect-96bf9b63.js} +13 -16
  92. package/dist/esm/v3/{OrTextarea-dfc6a453.js → OrTextarea-42d21f77.js} +13 -14
  93. package/dist/esm/v3/components/index.js +9 -9
  94. package/dist/esm/v3/components/or-card-collection-v3/index.js +3 -3
  95. package/dist/esm/v3/components/or-confirm-v3/index.js +2 -2
  96. package/dist/esm/v3/components/or-inline-input-v3/OrInlineInput.vue.d.ts +7 -5
  97. package/dist/esm/v3/components/or-inline-input-v3/index.js +1 -1
  98. package/dist/esm/v3/components/or-inline-textarea-v3/OrInlineTextarea.vue.d.ts +7 -5
  99. package/dist/esm/v3/components/or-inline-textarea-v3/index.js +1 -1
  100. package/dist/esm/v3/components/or-input-v3/OrInput.vue.d.ts +7 -5
  101. package/dist/esm/v3/components/or-input-v3/index.js +1 -1
  102. package/dist/esm/v3/components/or-modal-v3/index.js +1 -1
  103. package/dist/esm/v3/components/or-search-v3/index.js +2 -2
  104. package/dist/esm/v3/components/or-select-v3/OrSelect.vue.d.ts +7 -5
  105. package/dist/esm/v3/components/or-select-v3/index.js +2 -2
  106. package/dist/esm/v3/components/or-textarea-v3/OrTextarea.vue.d.ts +7 -5
  107. package/dist/esm/v3/components/or-textarea-v3/index.js +1 -1
  108. package/dist/esm/v3/index.js +9 -9
  109. package/package.json +2 -2
  110. package/src/components/or-inline-input-v3/OrInlineInput.vue +9 -12
  111. package/src/components/or-inline-input-v3/styles.ts +2 -2
  112. package/src/components/or-inline-textarea-v3/OrInlineTextarea.vue +9 -12
  113. package/src/components/or-inline-textarea-v3/styles.ts +2 -2
  114. package/src/components/or-input-v3/OrInput.vue +9 -12
  115. package/src/components/or-input-v3/styles.ts +2 -2
  116. package/src/components/or-modal-v3/OrModal.stories3.ts +19 -0
  117. package/src/components/or-modal-v3/styles.ts +1 -4
  118. package/src/components/or-select-v3/OrSelect.stories3.ts +0 -4
  119. package/src/components/or-select-v3/OrSelect.vue +8 -12
  120. package/src/components/or-select-v3/styles.ts +1 -4
  121. package/src/components/or-textarea-v3/OrTextarea.vue +9 -12
  122. package/src/components/or-textarea-v3/styles.ts +2 -2
  123. package/dist/bundled/v2/components/or-combined-input-v3/OrCombinedInput.vue.d.ts +0 -105
  124. package/dist/bundled/v2/components/or-combined-input-v3/index.d.ts +0 -2
  125. package/dist/bundled/v2/components/or-combined-input-v3/index.js +0 -162
  126. package/dist/bundled/v2/components/or-combined-input-v3/props.d.ts +0 -1
  127. package/dist/bundled/v2/components/or-combined-input-v3/styles.d.ts +0 -2
  128. package/dist/bundled/v2/props-78496a2d.js +0 -12
  129. package/dist/bundled/v3/components/or-combined-input-v3/OrCombinedInput.vue.d.ts +0 -105
  130. package/dist/bundled/v3/components/or-combined-input-v3/index.d.ts +0 -2
  131. package/dist/bundled/v3/components/or-combined-input-v3/index.js +0 -131
  132. package/dist/bundled/v3/components/or-combined-input-v3/props.d.ts +0 -1
  133. package/dist/bundled/v3/components/or-combined-input-v3/styles.d.ts +0 -2
  134. package/dist/bundled/v3/props-78496a2d.js +0 -12
  135. package/dist/esm/v2/OrInputBox-5c4b3104.js +0 -43
  136. package/dist/esm/v2/components/or-combined-input-v3/OrCombinedInput.vue.d.ts +0 -105
  137. package/dist/esm/v2/components/or-combined-input-v3/index.d.ts +0 -2
  138. package/dist/esm/v2/components/or-combined-input-v3/index.js +0 -159
  139. package/dist/esm/v2/components/or-combined-input-v3/props.d.ts +0 -1
  140. package/dist/esm/v2/components/or-combined-input-v3/styles.d.ts +0 -2
  141. package/dist/esm/v3/components/or-combined-input-v3/OrCombinedInput.vue.d.ts +0 -105
  142. package/dist/esm/v3/components/or-combined-input-v3/index.d.ts +0 -2
  143. package/dist/esm/v3/components/or-combined-input-v3/index.js +0 -130
  144. package/dist/esm/v3/components/or-combined-input-v3/props.d.ts +0 -1
  145. package/dist/esm/v3/components/or-combined-input-v3/styles.d.ts +0 -2
  146. package/src/components/or-combined-input-v3/OrCombinedInput.docs.mdx +0 -7
  147. package/src/components/or-combined-input-v3/OrCombinedInput.stories3.ts +0 -201
  148. package/src/components/or-combined-input-v3/OrCombinedInput.vue +0 -133
  149. package/src/components/or-combined-input-v3/index.ts +0 -2
  150. package/src/components/or-combined-input-v3/props.ts +0 -1
  151. package/src/components/or-combined-input-v3/styles.ts +0 -25
@@ -1,130 +0,0 @@
1
- import { defineComponent, ref, computed } from 'vue-demi';
2
- import { s as script$1 } from '../../OrError-19198748.js';
3
- import { s as script$2 } from '../../OrHint-6863124f.js';
4
- import { s as script$3 } from '../../OrLabel-f700f9fb.js';
5
- import { a as InputBoxSize } from '../../OrInputBox-2467d7e4.js';
6
- export { a as CombinedInputSize } from '../../OrInputBox-2467d7e4.js';
7
- import { resolveComponent, openBlock, createElementBlock, normalizeClass, createBlock, withCtx, renderSlot, createTextVNode, toDisplayString, createCommentVNode, createElementVNode, withDirectives, vShow, createVNode } from 'vue';
8
-
9
- const CombinedInputRoot = [
10
- // Layout
11
- 'layout-column',
12
- // Spacing
13
- 'gap-xs'];
14
- const CombinedInputControlGroup = [
15
- // Layout
16
- 'layout-row',
17
- // Box
18
- 'w-full',
19
- // Shape (.or-input-box)
20
- '[&_.or-input-box]:first-child:rounded-r-0', '[&_.or-input-box]:intermediate-child:rounded-0', '[&_.or-input-box]:last-child:rounded-l-0',
21
- // Spacing (.or-input-box)
22
- '[&_.or-input-box]:first-child:mr-[-1px]', '[&_.or-input-box]:intermediate-child:border-x-0', '[&_.or-input-box]:last-child:ml-[-1px]'];
23
-
24
- var script = defineComponent({
25
- name: 'OrCombinedInput',
26
- components: {
27
- OrError: script$1,
28
- OrHint: script$2,
29
- OrLabel: script$3
30
- },
31
- props: {
32
- size: {
33
- type: String,
34
- default: InputBoxSize.M
35
- },
36
- label: {
37
- type: String,
38
- default: undefined
39
- },
40
- hint: {
41
- type: String,
42
- default: undefined
43
- },
44
- error: {
45
- type: [String, Boolean],
46
- default: undefined
47
- },
48
- required: {
49
- type: Boolean,
50
- default: false
51
- },
52
- readonly: {
53
- type: Boolean,
54
- default: false
55
- },
56
- disabled: {
57
- type: Boolean,
58
- default: false
59
- },
60
- disableDefaultStyles: {
61
- type: Boolean,
62
- default: false
63
- }
64
- },
65
- setup(props, context) {
66
- // Refs
67
- const root = ref();
68
- // Styles
69
- const rootStyles = computed(() => ['or-combined-input', ...CombinedInputRoot]);
70
- const controlGroup = computed(() => [...CombinedInputControlGroup]);
71
- return {
72
- root,
73
- rootStyles,
74
- controlGroup
75
- };
76
- }
77
- });
78
-
79
- const _hoisted_1 = {
80
- class: /*#__PURE__*/normalizeClass(['contents'])
81
- };
82
- const _hoisted_2 = {
83
- class: /*#__PURE__*/normalizeClass(['contents'])
84
- };
85
- function render(_ctx, _cache, $props, $setup, $data, $options) {
86
- const _component_OrLabel = resolveComponent("OrLabel");
87
- const _component_OrHint = resolveComponent("OrHint");
88
- const _component_OrError = resolveComponent("OrError");
89
- return openBlock(), createElementBlock("div", {
90
- ref: "root",
91
- class: normalizeClass(_ctx.rootStyles)
92
- }, [_ctx.label ? (openBlock(), createBlock(_component_OrLabel, {
93
- key: 0,
94
- variant: 'input',
95
- required: _ctx.required,
96
- disabled: _ctx.disabled
97
- }, {
98
- addon: withCtx(() => [renderSlot(_ctx.$slots, "addon")]),
99
- default: withCtx(() => [createTextVNode(toDisplayString(_ctx.label) + " ", 1 /* TEXT */)]),
100
-
101
- _: 3 /* FORWARDED */
102
- }, 8 /* PROPS */, ["required", "disabled"])) : createCommentVNode("v-if", true), createElementVNode("div", {
103
- class: normalizeClass(_ctx.controlGroup)
104
- }, [renderSlot(_ctx.$slots, "default", {
105
- size: _ctx.size,
106
- error: !!_ctx.error,
107
- required: _ctx.required,
108
- readonly: _ctx.readonly,
109
- disabled: _ctx.disabled,
110
- disableDefaultStyles: _ctx.disableDefaultStyles
111
- })], 2 /* CLASS */), withDirectives(createElementVNode("div", _hoisted_1, [_ctx.hint ? (openBlock(), createBlock(_component_OrHint, {
112
- key: 0,
113
- disabled: _ctx.disabled
114
- }, {
115
- default: withCtx(() => [createTextVNode(toDisplayString(_ctx.hint), 1 /* TEXT */)]),
116
-
117
- _: 1 /* STABLE */
118
- }, 8 /* PROPS */, ["disabled"])) : createCommentVNode("v-if", true)], 512 /* NEED_PATCH */), [[vShow, !_ctx.error]]), withDirectives(createElementVNode("div", _hoisted_2, [createVNode(_component_OrError, {
119
- disabled: _ctx.disabled
120
- }, {
121
- default: withCtx(() => [createTextVNode(toDisplayString(_ctx.error), 1 /* TEXT */)]),
122
-
123
- _: 1 /* STABLE */
124
- }, 8 /* PROPS */, ["disabled"])], 512 /* NEED_PATCH */), [[vShow, typeof _ctx.error === 'string']])], 2 /* CLASS */);
125
- }
126
-
127
- script.render = render;
128
- script.__file = "src/components/or-combined-input-v3/OrCombinedInput.vue";
129
-
130
- export { script as OrCombinedInputV3 };
@@ -1 +0,0 @@
1
- export { InputBoxSize as CombinedInputSize } from '../or-input-box-v3';
@@ -1,2 +0,0 @@
1
- export declare const CombinedInputRoot: string[];
2
- export declare const CombinedInputControlGroup: string[];
@@ -1,7 +0,0 @@
1
- import { DocsPage } from '@storybook/addon-docs';
2
-
3
- ```ts
4
- import { OrCombinedInputV3 as OrCombinedInput } from '@onereach/ui-components';
5
- ```
6
-
7
- <DocsPage />
@@ -1,201 +0,0 @@
1
- import { Meta, StoryFn } from '@storybook/vue3';
2
- import { ref, watch } from 'vue-demi';
3
- import { OrIconV3 as OrIcon } from '../or-icon-v3';
4
- import { OrInputV3 as OrInput } from '../or-input-v3';
5
- import { OrSelectV3 as OrSelect, SelectOption } from '../or-select-v3';
6
- import OrCombinedInputDocs from './OrCombinedInput.docs.mdx';
7
- import OrCombinedInput from './OrCombinedInput.vue';
8
- import { CombinedInputSize } from './props';
9
-
10
- export default {
11
- title: 'Components/Forms/Combined Input',
12
- component: OrCombinedInput,
13
-
14
- argTypes: {
15
- // Slots
16
- default: {
17
- type: {
18
- name: 'string',
19
- required: true,
20
- },
21
-
22
- control: { type: 'text' },
23
- },
24
-
25
- addon: {
26
- type: {
27
- name: 'string',
28
- required: false,
29
- },
30
-
31
- control: { type: 'text' },
32
- },
33
-
34
- // Props
35
- size: {
36
- control: { type: 'select' },
37
- options: Object.values(CombinedInputSize),
38
- },
39
-
40
- label: {
41
- control: { type: 'text' },
42
- },
43
-
44
- hint: {
45
- control: { type: 'text' },
46
- },
47
-
48
- error: {
49
- control: { type: 'text' },
50
- },
51
-
52
- required: {
53
- control: { type: 'boolean' },
54
- },
55
-
56
- readonly: {
57
- control: { type: 'boolean' },
58
- },
59
-
60
- disabled: {
61
- control: { type: 'boolean' },
62
- },
63
-
64
- disableDefaultStyles: {
65
- control: { type: 'boolean' },
66
- },
67
- },
68
-
69
- parameters: {
70
- docs: {
71
- page: OrCombinedInputDocs,
72
- },
73
-
74
- design: {
75
- type: 'figma',
76
- url: 'https://www.figma.com/file/o7DdkaznUW2PtX4wiSuhhQ/Core?node-id=4423%3A39753&t=grpHUrgJi4X2W67L-4',
77
- },
78
- },
79
- } as Meta<typeof OrCombinedInput>;
80
-
81
- const Template: StoryFn<typeof OrCombinedInput> = (args) => ({
82
- components: {
83
- OrCombinedInput,
84
- OrIcon,
85
- OrInput,
86
- OrSelect,
87
- },
88
-
89
- setup() {
90
- // State
91
- const options = Array.from<string, SelectOption>([
92
- 'Alfa',
93
- 'Bravo',
94
- 'Charlie',
95
- 'Delta',
96
- 'Echo',
97
- 'Foxtrot',
98
- 'Golf',
99
- 'Hotel',
100
- 'India',
101
- 'Juliett',
102
- 'Kilo',
103
- 'Lima',
104
- 'Mike',
105
- 'November',
106
- 'Oscar',
107
- 'Papa',
108
- 'Quebec',
109
- 'Romeo',
110
- 'Sierra',
111
- 'Tango',
112
- 'Uniform',
113
- 'Victor',
114
- 'Whiskey',
115
- 'X-Ray',
116
- 'Yankee',
117
- 'Zulu',
118
- ], (item) => ({
119
- value: item.toLowerCase(),
120
- label: item,
121
- }));
122
-
123
- const selectModel = ref<string>();
124
- const inputModel = ref<string>();
125
-
126
- // Effects
127
- watch([selectModel, inputModel], (values) => {
128
- console.debug(values);
129
- });
130
-
131
- return {
132
- args,
133
- options,
134
- selectModel,
135
- inputModel,
136
- };
137
- },
138
-
139
- template: `
140
- <OrCombinedInput v-bind="args">
141
- ${args.default}
142
- ${args.addon}
143
- </OrCombinedInput>
144
- `,
145
- });
146
-
147
- export const Default = Template.bind({});
148
-
149
- Default.args = {
150
- // Slots
151
- default: `
152
- <template v-slot="props">
153
- <OrSelect
154
- class="basis-1/4"
155
- v-model="selectModel"
156
- v-bind="props"
157
- :options="options"
158
- />
159
-
160
- <OrInput
161
- class="basis-3/4"
162
- v-model="inputModel"
163
- v-bind="props"
164
- />
165
- </template>
166
- `,
167
-
168
- // Props
169
- label: 'Combined Input',
170
- };
171
-
172
- export const Addon = Template.bind({});
173
-
174
- Addon.args = {
175
- ...Default.args,
176
-
177
- // Slots
178
- addon: `
179
- <template v-slot:addon>
180
- <OrIcon icon="info" />
181
- </template>
182
- `,
183
- };
184
-
185
- export const Hint = Template.bind({});
186
-
187
- Hint.args = {
188
- ...Default.args,
189
-
190
- // Props
191
- hint: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
192
- };
193
-
194
- export const Error = Template.bind({});
195
-
196
- Error.args = {
197
- ...Default.args,
198
-
199
- // Props
200
- error: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
201
- };
@@ -1,133 +0,0 @@
1
- <template>
2
- <div
3
- ref="root"
4
- :class="rootStyles"
5
- >
6
- <template v-if="label">
7
- <OrLabel
8
- :variant="'input'"
9
- :required="required"
10
- :disabled="disabled"
11
- >
12
- {{ label }}
13
-
14
- <template v-slot:addon>
15
- <slot name="addon" />
16
- </template>
17
- </OrLabel>
18
- </template>
19
-
20
- <div :class="controlGroup">
21
- <slot
22
- :size="size"
23
- :error="!!error"
24
- :required="required"
25
- :readonly="readonly"
26
- :disabled="disabled"
27
- :disable-default-styles="disableDefaultStyles"
28
- />
29
- </div>
30
-
31
- <div
32
- v-show="!error"
33
- :class="['contents']"
34
- >
35
- <template v-if="hint">
36
- <OrHint :disabled="disabled">
37
- {{ hint }}
38
- </OrHint>
39
- </template>
40
- </div>
41
-
42
- <div
43
- v-show="typeof error === 'string'"
44
- :class="['contents']"
45
- >
46
- <OrError :disabled="disabled">
47
- {{ error }}
48
- </OrError>
49
- </div>
50
- </div>
51
- </template>
52
-
53
- <script lang="ts">
54
- import { computed, defineComponent, PropType, ref } from 'vue-demi';
55
- import { OrErrorV3 as OrError } from '../or-error-v3';
56
- import { OrHintV3 as OrHint } from '../or-hint-v3';
57
- import { OrLabelV3 as OrLabel } from '../or-label-v3';
58
- import { CombinedInputSize } from './props';
59
- import { CombinedInputControlGroup, CombinedInputRoot } from './styles';
60
-
61
- export default defineComponent({
62
- name: 'OrCombinedInput',
63
-
64
- components: {
65
- OrError,
66
- OrHint,
67
- OrLabel,
68
- },
69
-
70
- props: {
71
- size: {
72
- type: String as PropType<CombinedInputSize>,
73
- default: CombinedInputSize.M,
74
- },
75
-
76
- label: {
77
- type: String,
78
- default: undefined,
79
- },
80
-
81
- hint: {
82
- type: String,
83
- default: undefined,
84
- },
85
-
86
- error: {
87
- type: [String, Boolean],
88
- default: undefined,
89
- },
90
-
91
- required: {
92
- type: Boolean,
93
- default: false,
94
- },
95
-
96
- readonly: {
97
- type: Boolean,
98
- default: false,
99
- },
100
-
101
- disabled: {
102
- type: Boolean,
103
- default: false,
104
- },
105
-
106
- disableDefaultStyles: {
107
- type: Boolean,
108
- default: false,
109
- },
110
- },
111
-
112
- setup(props, context) {
113
- // Refs
114
- const root = ref<HTMLElement>();
115
-
116
- // Styles
117
- const rootStyles = computed(() => [
118
- 'or-combined-input',
119
- ...CombinedInputRoot,
120
- ]);
121
-
122
- const controlGroup = computed(() => [
123
- ...CombinedInputControlGroup,
124
- ]);
125
-
126
- return {
127
- root,
128
- rootStyles,
129
- controlGroup,
130
- };
131
- },
132
- });
133
- </script>
@@ -1,2 +0,0 @@
1
- export { default as OrCombinedInputV3 } from './OrCombinedInput.vue';
2
- export * from './props';
@@ -1 +0,0 @@
1
- export { InputBoxSize as CombinedInputSize } from '../or-input-box-v3';
@@ -1,25 +0,0 @@
1
- export const CombinedInputRoot: string[] = [
2
- // Layout
3
- 'layout-column',
4
-
5
- // Spacing
6
- 'gap-xs',
7
- ];
8
-
9
- export const CombinedInputControlGroup: string[] = [
10
- // Layout
11
- 'layout-row',
12
-
13
- // Box
14
- 'w-full',
15
-
16
- // Shape (.or-input-box)
17
- '[&_.or-input-box]:first-child:rounded-r-0',
18
- '[&_.or-input-box]:intermediate-child:rounded-0',
19
- '[&_.or-input-box]:last-child:rounded-l-0',
20
-
21
- // Spacing (.or-input-box)
22
- '[&_.or-input-box]:first-child:mr-[-1px]',
23
- '[&_.or-input-box]:intermediate-child:border-x-0',
24
- '[&_.or-input-box]:last-child:ml-[-1px]',
25
- ];