@onereach/ui-components 2.75.2-beta.2393.0 → 2.76.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 (142) hide show
  1. package/dist/bundled/v2/{OrCardCollection-04e767c2.js → OrCardCollection-a9cc4cd6.js} +1 -1
  2. package/dist/bundled/v2/{OrConfirm-a76ff6d2.js → OrConfirm-de17ffd2.js} +1 -1
  3. package/dist/bundled/v2/{OrInlineInput-9304f205.js → OrInlineInput-20e93482.js} +9 -11
  4. package/dist/bundled/v2/{OrInlineTextarea-e0d28fc6.js → OrInlineTextarea-e849ae9b.js} +9 -11
  5. package/dist/bundled/v2/{OrInput-b8511a0c.js → OrInput-7e5430e1.js} +11 -12
  6. package/dist/bundled/v2/{OrInputBox-e54dcef9.js → OrInputBox-9a31d211.js} +2 -12
  7. package/dist/bundled/v2/{OrSearch-60b64568.js → OrSearch-b3f34499.js} +2 -2
  8. package/dist/bundled/v2/{OrSelect-752bdd3b.js → OrSelect-982350b0.js} +11 -10
  9. package/dist/bundled/v2/{OrTextarea-5fdf63d0.js → OrTextarea-53d756e4.js} +11 -12
  10. package/dist/bundled/v2/components/index.js +10 -9
  11. package/dist/bundled/v2/components/or-card-collection-v3/index.js +5 -4
  12. package/dist/bundled/v2/components/or-combined-input-v3/OrCombinedInput.vue.d.ts +105 -0
  13. package/dist/bundled/v2/components/or-combined-input-v3/index.d.ts +2 -0
  14. package/dist/bundled/v2/components/or-combined-input-v3/index.js +146 -0
  15. package/dist/bundled/v2/components/or-combined-input-v3/props.d.ts +1 -0
  16. package/dist/bundled/v2/components/or-combined-input-v3/styles.d.ts +2 -0
  17. package/dist/bundled/v2/components/or-confirm-v3/index.js +4 -3
  18. package/dist/bundled/v2/components/or-inline-input-v3/OrInlineInput.vue.d.ts +5 -7
  19. package/dist/bundled/v2/components/or-inline-input-v3/index.js +1 -1
  20. package/dist/bundled/v2/components/or-inline-textarea-v3/OrInlineTextarea.vue.d.ts +5 -7
  21. package/dist/bundled/v2/components/or-inline-textarea-v3/index.js +1 -1
  22. package/dist/bundled/v2/components/or-input-box-v3/index.js +2 -1
  23. package/dist/bundled/v2/components/or-input-v3/OrInput.vue.d.ts +5 -7
  24. package/dist/bundled/v2/components/or-input-v3/index.js +3 -2
  25. package/dist/bundled/v2/components/or-search-v3/index.js +4 -3
  26. package/dist/bundled/v2/components/or-select-v3/OrSelect.vue.d.ts +5 -7
  27. package/dist/bundled/v2/components/or-select-v3/index.js +4 -3
  28. package/dist/bundled/v2/components/or-textarea-v3/OrTextarea.vue.d.ts +5 -7
  29. package/dist/bundled/v2/components/or-textarea-v3/index.js +3 -2
  30. package/dist/bundled/v2/index.js +11 -10
  31. package/dist/bundled/v2/props-78496a2d.js +12 -0
  32. package/dist/bundled/v3/{OrCardCollection.vue_vue_type_script_lang-e71a0ea0.js → OrCardCollection.vue_vue_type_script_lang-fdf213e1.js} +1 -1
  33. package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-b550c3d3.js → OrConfirm.vue_vue_type_script_lang-7a81cfa6.js} +2 -2
  34. package/dist/bundled/v3/{OrInlineInput.vue_vue_type_script_lang-cd4a64f6.js → OrInlineInput.vue_vue_type_script_lang-18853dd7.js} +3 -5
  35. package/dist/bundled/v3/{OrInlineTextarea.vue_vue_type_script_lang-a73ff1ee.js → OrInlineTextarea.vue_vue_type_script_lang-3cb238d6.js} +3 -5
  36. package/dist/bundled/v3/{OrInput-6d49f353.js → OrInput-c514ceff.js} +5 -5
  37. package/dist/bundled/v3/{OrInput.vue_vue_type_script_lang-af68d0e7.js → OrInput.vue_vue_type_script_lang-09a6138d.js} +6 -7
  38. package/dist/bundled/v3/{OrInputBox-358d4856.js → OrInputBox-44f37541.js} +1 -1
  39. package/dist/{esm/v2/OrInputBox-53d1f66d.js → bundled/v3/OrInputBox.vue_vue_type_script_lang-c4f9c8ef.js} +3 -53
  40. package/dist/bundled/v3/{OrSearch.vue_vue_type_script_lang-8c37e5a7.js → OrSearch.vue_vue_type_script_lang-42283e88.js} +3 -3
  41. package/dist/bundled/v3/{OrSelect.vue_vue_type_script_lang-35ac0247.js → OrSelect.vue_vue_type_script_lang-c43b8138.js} +9 -8
  42. package/dist/bundled/v3/{OrTextarea.vue_vue_type_script_lang-de99a858.js → OrTextarea.vue_vue_type_script_lang-b2899ba6.js} +6 -7
  43. package/dist/bundled/v3/components/index.js +12 -11
  44. package/dist/bundled/v3/components/or-card-collection-v3/index.js +7 -6
  45. package/dist/bundled/v3/components/or-combined-input-v3/OrCombinedInput.vue.d.ts +105 -0
  46. package/dist/bundled/v3/components/or-combined-input-v3/index.d.ts +2 -0
  47. package/dist/bundled/v3/components/or-combined-input-v3/index.js +128 -0
  48. package/dist/bundled/v3/components/or-combined-input-v3/props.d.ts +1 -0
  49. package/dist/bundled/v3/components/or-combined-input-v3/styles.d.ts +2 -0
  50. package/dist/bundled/v3/components/or-confirm-v3/index.js +6 -5
  51. package/dist/bundled/v3/components/or-inline-input-v3/OrInlineInput.vue.d.ts +5 -7
  52. package/dist/bundled/v3/components/or-inline-input-v3/index.js +1 -1
  53. package/dist/bundled/v3/components/or-inline-textarea-v3/OrInlineTextarea.vue.d.ts +5 -7
  54. package/dist/bundled/v3/components/or-inline-textarea-v3/index.js +1 -1
  55. package/dist/bundled/v3/components/or-input-box-v3/index.js +2 -1
  56. package/dist/bundled/v3/components/or-input-v3/OrInput.vue.d.ts +5 -7
  57. package/dist/bundled/v3/components/or-input-v3/index.js +4 -3
  58. package/dist/bundled/v3/components/or-search-v3/index.js +6 -5
  59. package/dist/bundled/v3/components/or-select-v3/OrSelect.vue.d.ts +5 -7
  60. package/dist/bundled/v3/components/or-select-v3/index.js +6 -5
  61. package/dist/bundled/v3/components/or-textarea-v3/OrTextarea.vue.d.ts +5 -7
  62. package/dist/bundled/v3/components/or-textarea-v3/index.js +4 -3
  63. package/dist/bundled/v3/index.js +35 -34
  64. package/dist/bundled/v3/props-78496a2d.js +12 -0
  65. package/dist/esm/v2/{OrCardCollection-f7856175.js → OrCardCollection-77a9b0b5.js} +2 -2
  66. package/dist/esm/v2/{OrConfirm-98d62065.js → OrConfirm-81ae8af5.js} +1 -1
  67. package/dist/esm/v2/{OrInlineInput-df02ab5d.js → OrInlineInput-b003ddde.js} +9 -11
  68. package/dist/esm/v2/{OrInlineTextarea-ad120656.js → OrInlineTextarea-6349b529.js} +9 -11
  69. package/dist/esm/v2/{OrInput-3bb91436.js → OrInput-d4707fb9.js} +11 -12
  70. package/dist/esm/v2/OrInputBox-5c4b3104.js +43 -0
  71. package/dist/{bundled/v3/OrInputBox.vue_vue_type_script_lang-b387d4ba.js → esm/v2/OrInputBox.vue_rollup-plugin-vue_script-4ba46db4.js} +1 -1
  72. package/dist/esm/v2/{OrSearch-dad9b02f.js → OrSearch-5b257f78.js} +2 -2
  73. package/dist/esm/v2/{OrSelect-7ef80130.js → OrSelect-246d8584.js} +11 -10
  74. package/dist/esm/v2/{OrTextarea-0a64f718.js → OrTextarea-0bf9bf33.js} +11 -12
  75. package/dist/esm/v2/components/index.js +10 -9
  76. package/dist/esm/v2/components/or-card-collection-v3/index.js +5 -4
  77. package/dist/esm/v2/components/or-combined-input-v3/OrCombinedInput.vue.d.ts +105 -0
  78. package/dist/esm/v2/components/or-combined-input-v3/index.d.ts +2 -0
  79. package/dist/esm/v2/components/or-combined-input-v3/index.js +143 -0
  80. package/dist/esm/v2/components/or-combined-input-v3/props.d.ts +1 -0
  81. package/dist/esm/v2/components/or-combined-input-v3/styles.d.ts +2 -0
  82. package/dist/esm/v2/components/or-confirm-v3/index.js +4 -3
  83. package/dist/esm/v2/components/or-inline-input-v3/OrInlineInput.vue.d.ts +5 -7
  84. package/dist/esm/v2/components/or-inline-input-v3/index.js +1 -1
  85. package/dist/esm/v2/components/or-inline-textarea-v3/OrInlineTextarea.vue.d.ts +5 -7
  86. package/dist/esm/v2/components/or-inline-textarea-v3/index.js +1 -1
  87. package/dist/esm/v2/components/or-input-box-v3/index.js +3 -2
  88. package/dist/esm/v2/components/or-input-v3/OrInput.vue.d.ts +5 -7
  89. package/dist/esm/v2/components/or-input-v3/index.js +3 -2
  90. package/dist/esm/v2/components/or-search-v3/index.js +4 -3
  91. package/dist/esm/v2/components/or-select-v3/OrSelect.vue.d.ts +5 -7
  92. package/dist/esm/v2/components/or-select-v3/index.js +4 -3
  93. package/dist/esm/v2/components/or-textarea-v3/OrTextarea.vue.d.ts +5 -7
  94. package/dist/esm/v2/components/or-textarea-v3/index.js +3 -2
  95. package/dist/esm/v2/index.js +10 -9
  96. package/dist/esm/v3/{OrCardCollection-4cb41408.js → OrCardCollection-e8ab1e4f.js} +1 -1
  97. package/dist/esm/v3/{OrConfirm-19da64d1.js → OrConfirm-19397045.js} +1 -1
  98. package/dist/esm/v3/{OrInlineInput-cd3753ee.js → OrInlineInput-65127ed7.js} +7 -9
  99. package/dist/esm/v3/{OrInlineTextarea-4c5b0390.js → OrInlineTextarea-176a2701.js} +7 -9
  100. package/dist/esm/v3/{OrInput-ae9f6871.js → OrInput-209bd3fc.js} +7 -9
  101. package/dist/esm/v3/{OrSearch-6f6b4fcd.js → OrSearch-3bba0a99.js} +1 -1
  102. package/dist/esm/v3/{OrSelect-96bf9b63.js → OrSelect-ba567dd1.js} +9 -9
  103. package/dist/esm/v3/{OrTextarea-42d21f77.js → OrTextarea-14a6b456.js} +7 -9
  104. package/dist/esm/v3/components/index.js +8 -8
  105. package/dist/esm/v3/components/or-card-collection-v3/index.js +3 -3
  106. package/dist/esm/v3/components/or-combined-input-v3/OrCombinedInput.vue.d.ts +105 -0
  107. package/dist/esm/v3/components/or-combined-input-v3/index.d.ts +2 -0
  108. package/dist/esm/v3/components/or-combined-input-v3/index.js +127 -0
  109. package/dist/esm/v3/components/or-combined-input-v3/props.d.ts +1 -0
  110. package/dist/esm/v3/components/or-combined-input-v3/styles.d.ts +2 -0
  111. package/dist/esm/v3/components/or-confirm-v3/index.js +2 -2
  112. package/dist/esm/v3/components/or-inline-input-v3/OrInlineInput.vue.d.ts +5 -7
  113. package/dist/esm/v3/components/or-inline-input-v3/index.js +1 -1
  114. package/dist/esm/v3/components/or-inline-textarea-v3/OrInlineTextarea.vue.d.ts +5 -7
  115. package/dist/esm/v3/components/or-inline-textarea-v3/index.js +1 -1
  116. package/dist/esm/v3/components/or-input-v3/OrInput.vue.d.ts +5 -7
  117. package/dist/esm/v3/components/or-input-v3/index.js +1 -1
  118. package/dist/esm/v3/components/or-search-v3/index.js +2 -2
  119. package/dist/esm/v3/components/or-select-v3/OrSelect.vue.d.ts +5 -7
  120. package/dist/esm/v3/components/or-select-v3/index.js +2 -2
  121. package/dist/esm/v3/components/or-textarea-v3/OrTextarea.vue.d.ts +5 -7
  122. package/dist/esm/v3/components/or-textarea-v3/index.js +1 -1
  123. package/dist/esm/v3/index.js +8 -8
  124. package/package.json +4 -3
  125. package/src/components/or-combined-input-v3/OrCombinedInput.docs.mdx +7 -0
  126. package/src/components/or-combined-input-v3/OrCombinedInput.stories3.ts +201 -0
  127. package/src/components/or-combined-input-v3/OrCombinedInput.vue +127 -0
  128. package/src/components/or-combined-input-v3/index.ts +2 -0
  129. package/src/components/or-combined-input-v3/props.ts +1 -0
  130. package/src/components/or-combined-input-v3/styles.ts +25 -0
  131. package/src/components/or-inline-input-v3/OrInlineInput.vue +4 -7
  132. package/src/components/or-inline-input-v3/styles.ts +2 -2
  133. package/src/components/or-inline-textarea-v3/OrInlineTextarea.vue +4 -7
  134. package/src/components/or-inline-textarea-v3/styles.ts +2 -2
  135. package/src/components/or-input-v3/OrInput.vue +4 -7
  136. package/src/components/or-input-v3/styles.ts +2 -2
  137. package/src/components/or-select-v3/OrSelect.stories3.ts +4 -0
  138. package/src/components/or-select-v3/OrSelect.vue +4 -6
  139. package/src/components/or-select-v3/styles.ts +4 -1
  140. package/src/components/or-sidebar-v3/OrSidebar.stories3.ts +1 -1
  141. package/src/components/or-textarea-v3/OrTextarea.vue +4 -7
  142. package/src/components/or-textarea-v3/styles.ts +2 -2
@@ -0,0 +1,201 @@
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
+ };
@@ -0,0 +1,127 @@
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
+ <template v-if="!error">
32
+ <template v-if="hint">
33
+ <OrHint :disabled="disabled">
34
+ {{ hint }}
35
+ </OrHint>
36
+ </template>
37
+ </template>
38
+
39
+ <template v-if="typeof error === 'string'">
40
+ <OrError :disabled="disabled">
41
+ {{ error }}
42
+ </OrError>
43
+ </template>
44
+ </div>
45
+ </template>
46
+
47
+ <script lang="ts">
48
+ import { computed, defineComponent, PropType, ref } from 'vue-demi';
49
+ import { OrErrorV3 as OrError } from '../or-error-v3';
50
+ import { OrHintV3 as OrHint } from '../or-hint-v3';
51
+ import { OrLabelV3 as OrLabel } from '../or-label-v3';
52
+ import { CombinedInputSize } from './props';
53
+ import { CombinedInputControlGroup, CombinedInputRoot } from './styles';
54
+
55
+ export default defineComponent({
56
+ name: 'OrCombinedInput',
57
+
58
+ components: {
59
+ OrError,
60
+ OrHint,
61
+ OrLabel,
62
+ },
63
+
64
+ props: {
65
+ size: {
66
+ type: String as PropType<CombinedInputSize>,
67
+ default: CombinedInputSize.M,
68
+ },
69
+
70
+ label: {
71
+ type: String,
72
+ default: undefined,
73
+ },
74
+
75
+ hint: {
76
+ type: String,
77
+ default: undefined,
78
+ },
79
+
80
+ error: {
81
+ type: [String, Boolean],
82
+ default: undefined,
83
+ },
84
+
85
+ required: {
86
+ type: Boolean,
87
+ default: false,
88
+ },
89
+
90
+ readonly: {
91
+ type: Boolean,
92
+ default: false,
93
+ },
94
+
95
+ disabled: {
96
+ type: Boolean,
97
+ default: false,
98
+ },
99
+
100
+ disableDefaultStyles: {
101
+ type: Boolean,
102
+ default: false,
103
+ },
104
+ },
105
+
106
+ setup(props, context) {
107
+ // Refs
108
+ const root = ref<HTMLElement>();
109
+
110
+ // Styles
111
+ const rootStyles = computed(() => [
112
+ 'or-combined-input',
113
+ ...CombinedInputRoot,
114
+ ]);
115
+
116
+ const controlGroup = computed(() => [
117
+ ...CombinedInputControlGroup,
118
+ ]);
119
+
120
+ return {
121
+ root,
122
+ rootStyles,
123
+ controlGroup,
124
+ };
125
+ },
126
+ });
127
+ </script>
@@ -0,0 +1,2 @@
1
+ export { default as OrCombinedInputV3 } from './OrCombinedInput.vue';
2
+ export * from './props';
@@ -0,0 +1 @@
1
+ export { InputBoxSize as CombinedInputSize } from '../or-input-box-v3';
@@ -0,0 +1,25 @@
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
+ ];
@@ -6,7 +6,7 @@
6
6
  <div :class="['layout-row', 'gap-sm+']">
7
7
  <OrInlineInputBox
8
8
  :size="size"
9
- :invalid="invalid"
9
+ :invalid="!!error"
10
10
  >
11
11
  <input
12
12
  ref="control"
@@ -40,7 +40,7 @@
40
40
  </template>
41
41
  </div>
42
42
 
43
- <template v-if="!invalid">
43
+ <template v-if="!error">
44
44
  <template v-if="hint || maxLength">
45
45
  <OrHint>
46
46
  {{ hint }}
@@ -55,7 +55,7 @@
55
55
  </template>
56
56
  </template>
57
57
 
58
- <template v-else>
58
+ <template v-if="typeof error === 'string'">
59
59
  <OrError>
60
60
  {{ error }}
61
61
 
@@ -127,7 +127,7 @@ export default defineComponent({
127
127
  },
128
128
 
129
129
  error: {
130
- type: String,
130
+ type: [String, Boolean],
131
131
  default: undefined,
132
132
  },
133
133
  },
@@ -188,8 +188,6 @@ export default defineComponent({
188
188
  const currentLength = computed(() => draftModelValue.value?.toString().length ?? 0);
189
189
  const maxLength = computed(() => controlAttributes.maxlength);
190
190
 
191
- const invalid = computed(() => !!props.error);
192
-
193
191
  const activated = ref(false);
194
192
 
195
193
  // Handlers
@@ -248,7 +246,6 @@ export default defineComponent({
248
246
  draftModelValue,
249
247
  currentLength,
250
248
  maxLength,
251
- invalid,
252
249
  activated,
253
250
  onFocus,
254
251
  onBlur,
@@ -9,8 +9,8 @@ export const InlineInputRoot: string[] = [
9
9
  ];
10
10
 
11
11
  export const InlineInputControl: string[] = [
12
- // Layout
13
- 'grow',
12
+ // Box
13
+ 'w-full',
14
14
 
15
15
  // Typography
16
16
  'typography-inherit',
@@ -6,7 +6,7 @@
6
6
  <div :class="['layout-row', 'gap-sm+']">
7
7
  <OrInlineInputBox
8
8
  :size="'s'"
9
- :invalid="invalid"
9
+ :invalid="!!error"
10
10
  >
11
11
  <textarea
12
12
  ref="control"
@@ -39,7 +39,7 @@
39
39
  </template>
40
40
  </div>
41
41
 
42
- <template v-if="!invalid">
42
+ <template v-if="!error">
43
43
  <template v-if="hint || maxLength">
44
44
  <OrHint>
45
45
  {{ hint }}
@@ -54,7 +54,7 @@
54
54
  </template>
55
55
  </template>
56
56
 
57
- <template v-else>
57
+ <template v-if="typeof error === 'string'">
58
58
  <OrError>
59
59
  {{ error }}
60
60
 
@@ -115,7 +115,7 @@ export default defineComponent({
115
115
  },
116
116
 
117
117
  error: {
118
- type: String,
118
+ type: [String, Boolean],
119
119
  default: undefined,
120
120
  },
121
121
  },
@@ -175,8 +175,6 @@ export default defineComponent({
175
175
  const currentLength = computed(() => draftModelValue.value?.toString().length ?? 0);
176
176
  const maxLength = computed(() => controlAttributes.maxlength);
177
177
 
178
- const invalid = computed(() => !!props.error);
179
-
180
178
  const activated = ref(false);
181
179
 
182
180
  // Handlers
@@ -235,7 +233,6 @@ export default defineComponent({
235
233
  draftModelValue,
236
234
  currentLength,
237
235
  maxLength,
238
- invalid,
239
236
  activated,
240
237
  onFocus,
241
238
  onBlur,
@@ -7,8 +7,8 @@ export const InlineTextareaRoot: string[] = [
7
7
  ];
8
8
 
9
9
  export const InlineTextareaControl: string[] = [
10
- // Layout
11
- 'grow',
10
+ // Box
11
+ 'w-full',
12
12
 
13
13
  // Typography
14
14
  'typography-inherit',
@@ -21,7 +21,7 @@
21
21
  <OrInputBox
22
22
  :variant="disableDefaultStyles ? 'unstyled' : 'styled'"
23
23
  :size="size"
24
- :invalid="invalid"
24
+ :invalid="!!error"
25
25
  :readonly="readonly || loading"
26
26
  :disabled="disabled"
27
27
  >
@@ -82,7 +82,7 @@
82
82
  </div>
83
83
  </OrInputBox>
84
84
 
85
- <template v-if="!invalid">
85
+ <template v-if="!error">
86
86
  <template v-if="hint || maxLength">
87
87
  <OrHint :disabled="disabled">
88
88
  {{ hint }}
@@ -97,7 +97,7 @@
97
97
  </template>
98
98
  </template>
99
99
 
100
- <template v-else>
100
+ <template v-if="typeof error === 'string'">
101
101
  <OrError :disabled="disabled">
102
102
  {{ error }}
103
103
 
@@ -175,7 +175,7 @@ export default defineComponent({
175
175
  },
176
176
 
177
177
  error: {
178
- type: String,
178
+ type: [String, Boolean],
179
179
  default: undefined,
180
180
  },
181
181
 
@@ -259,8 +259,6 @@ export default defineComponent({
259
259
  const currentLength = computed(() => proxyModelValue.value?.toString().length ?? 0);
260
260
  const maxLength = computed(() => controlAttributes.maxlength);
261
261
 
262
- const invalid = computed(() => !!props.error);
263
-
264
262
  const disclosed = ref(false);
265
263
 
266
264
  const { isMobile } = useResponsive();
@@ -283,7 +281,6 @@ export default defineComponent({
283
281
  proxyModelValue,
284
282
  currentLength,
285
283
  maxLength,
286
- invalid,
287
284
  disclosed,
288
285
  isMobile,
289
286
  focus,
@@ -7,8 +7,8 @@ export const InputRoot: string[] = [
7
7
  ];
8
8
 
9
9
  export const InputControl: string[] = [
10
- // Layout
11
- 'grow',
10
+ // Box
11
+ 'w-full',
12
12
 
13
13
  // Typography
14
14
  'typography-inherit',
@@ -104,6 +104,10 @@ export default {
104
104
  control: { type: 'boolean' },
105
105
  },
106
106
 
107
+ disableDefaultStyles: {
108
+ control: { type: 'boolean' },
109
+ },
110
+
107
111
  enableSearch: {
108
112
  control: { type: 'boolean' },
109
113
  },
@@ -25,7 +25,7 @@
25
25
  :class="[popoverState === 'open' && 'rounded-b-0']"
26
26
  :variant="disableDefaultStyles ? 'unstyled' : 'styled'"
27
27
  :size="size"
28
- :invalid="invalid"
28
+ :invalid="!!error"
29
29
  :readonly="readonly"
30
30
  :disabled="disabled"
31
31
  >
@@ -202,7 +202,7 @@
202
202
  </OrPopover>
203
203
  </OrInputBox>
204
204
 
205
- <template v-if="!invalid">
205
+ <template v-if="!error">
206
206
  <template v-if="hint">
207
207
  <OrHint :disabled="disabled">
208
208
  {{ hint }}
@@ -210,7 +210,7 @@
210
210
  </template>
211
211
  </template>
212
212
 
213
- <template v-else>
213
+ <template v-if="typeof error === 'string'">
214
214
  <OrError :disabled="disabled">
215
215
  {{ error }}
216
216
  </OrError>
@@ -306,7 +306,7 @@ export default defineComponent({
306
306
  },
307
307
 
308
308
  error: {
309
- type: String,
309
+ type: [String, Boolean],
310
310
  default: undefined,
311
311
  },
312
312
 
@@ -416,7 +416,6 @@ export default defineComponent({
416
416
  }
417
417
  });
418
418
 
419
- const invalid = computed(() => !!props.error);
420
419
  const readonly = computed(() => context.attrs.readonly as boolean);
421
420
 
422
421
  const selection = computed(() => {
@@ -519,7 +518,6 @@ export default defineComponent({
519
518
  noSearchResultsStyles,
520
519
  controlId,
521
520
  proxyModelValue,
522
- invalid,
523
521
  readonly,
524
522
  selection,
525
523
  searchText,
@@ -8,7 +8,10 @@ export const SelectRoot: string[] = [
8
8
 
9
9
  export const SelectControl: string[] = [
10
10
  // Layout
11
- 'layout-row grow',
11
+ 'layout-row',
12
+
13
+ // Box
14
+ 'w-full',
12
15
 
13
16
  // Overflow
14
17
  'overflow-hidden',
@@ -104,7 +104,7 @@ const DefaultTemplate: StoryFn<typeof OrSidebar> = (args) => ({
104
104
  class="theme-background-surface-1 dark:theme-background-surface-1-dark text-on-background dark:text-on-background-dark"
105
105
  style="flex-grow: 1; overflow: auto; padding: 16px"
106
106
  >
107
- ${Faker.lorem.paragraphs(100)}
107
+ ${Faker.lorem.paragraphs(10)}
108
108
  </div>
109
109
  <OrSidebar
110
110
  v-bind="args"
@@ -20,7 +20,7 @@
20
20
 
21
21
  <OrInputBox
22
22
  :size="size"
23
- :invalid="invalid"
23
+ :invalid="!!error"
24
24
  :readonly="readonly"
25
25
  :disabled="disabled"
26
26
  >
@@ -40,7 +40,7 @@
40
40
  />
41
41
  </OrInputBox>
42
42
 
43
- <template v-if="!invalid">
43
+ <template v-if="!error">
44
44
  <template v-if="hint || maxLength">
45
45
  <OrHint :disabled="disabled">
46
46
  {{ hint }}
@@ -55,7 +55,7 @@
55
55
  </template>
56
56
  </template>
57
57
 
58
- <template v-else>
58
+ <template v-if="typeof error === 'string'">
59
59
  <OrError :disabled="disabled">
60
60
  {{ error }}
61
61
 
@@ -122,7 +122,7 @@ export default defineComponent({
122
122
  },
123
123
 
124
124
  error: {
125
- type: String,
125
+ type: [String, Boolean],
126
126
  default: undefined,
127
127
  },
128
128
 
@@ -191,8 +191,6 @@ export default defineComponent({
191
191
  const currentLength = computed(() => proxyModelValue.value?.toString().length ?? 0);
192
192
  const maxLength = computed(() => controlAttributes.maxlength);
193
193
 
194
- const invalid = computed(() => !!props.error);
195
-
196
194
  // Methods
197
195
  function focus(): void {
198
196
  control.value?.focus();
@@ -211,7 +209,6 @@ export default defineComponent({
211
209
  proxyModelValue,
212
210
  currentLength,
213
211
  maxLength,
214
- invalid,
215
212
  focus,
216
213
  blur,
217
214
  };
@@ -7,8 +7,8 @@ export const TextareaRoot: string[] = [
7
7
  ];
8
8
 
9
9
  export const TextareaControl: string[] = [
10
- // Layout
11
- 'grow',
10
+ // Box
11
+ 'w-full',
12
12
 
13
13
  // Typography
14
14
  'typography-inherit',