@onereach/ui-components-vue2 20.2.0 → 20.3.0-beta.5253.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.
- package/dist/esm/components/index.js +1 -1
- package/dist/esm/components/or-checkbox-group-v3/index.js +13 -4
- package/dist/esm/components/or-checkbox-v3/index.js +1 -1
- package/dist/esm/components/or-form-group-v3/index.d.ts +1 -0
- package/dist/esm/components/or-form-group-v3/index.js +23 -5
- package/dist/esm/components/or-form-group-v3/props.d.ts +5 -0
- package/dist/esm/components/or-form-group-v3/styles.d.ts +2 -0
- package/dist/esm/components/or-radio-v3/index.js +1 -1
- package/dist/esm/components/or-textarea-v3/index.js +6 -5
- package/dist/esm/index.js +1 -1
- package/package.json +2 -5
|
@@ -42,7 +42,7 @@ export { FabColor, OrFabV3 } from './or-fab-v3/index.js';
|
|
|
42
42
|
export { OrFilterPopoverV3 } from './or-filter-popover-v3/index.js';
|
|
43
43
|
export { OrFilterTriggerV3 } from './or-filter-trigger-v3/index.js';
|
|
44
44
|
export { OrFilterV3 } from './or-filter-v3/index.js';
|
|
45
|
-
export { FormGroupDirection, OrFormGroupV3 } from './or-form-group-v3/index.js';
|
|
45
|
+
export { FormGroupDirection, FormGroupSpacing, OrFormGroupV3 } from './or-form-group-v3/index.js';
|
|
46
46
|
export { OrHintV3 } from './or-hint-v3/index.js';
|
|
47
47
|
export { IconButtonColor, OrIconButtonV3 } from './or-icon-button-v3/index.js';
|
|
48
48
|
export { IconSize, IconVariant, OrIconV3 } from './or-icon-v3/index.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, toRef } from 'vue-demi';
|
|
2
|
-
import { a as re } from '../../useValidationAttributes-w0RCHARs-21132c84.js';
|
|
2
|
+
import { a as re, n as ne } from '../../useValidationAttributes-w0RCHARs-21132c84.js';
|
|
3
3
|
import { OrCheckboxTreeV3 as OrCheckboxTree } from '../or-checkbox-tree-v3/index.js';
|
|
4
|
-
import { OrFormGroupV3 as OrFormGroup, FormGroupDirection } from '../or-form-group-v3/index.js';
|
|
4
|
+
import { OrFormGroupV3 as OrFormGroup, FormGroupDirection, FormGroupSpacing } from '../or-form-group-v3/index.js';
|
|
5
5
|
import { n as normalizeComponent } from '../../normalize-component-cf2db48b.js';
|
|
6
6
|
import '../../dom-DzNS5tBj-6d9cf0ef.js';
|
|
7
7
|
import 'lodash/get';
|
|
@@ -62,12 +62,20 @@ var script = defineComponent({
|
|
|
62
62
|
readonly: {
|
|
63
63
|
type: Boolean,
|
|
64
64
|
default: false
|
|
65
|
+
},
|
|
66
|
+
spacing: {
|
|
67
|
+
type: String,
|
|
68
|
+
default: FormGroupSpacing.SM
|
|
65
69
|
}
|
|
66
70
|
},
|
|
67
71
|
setup(props, context) {
|
|
68
72
|
const proxyModelValue = re(toRef(props, 'modelValue'), context.emit);
|
|
73
|
+
const {
|
|
74
|
+
isMobile
|
|
75
|
+
} = ne();
|
|
69
76
|
return {
|
|
70
|
-
proxyModelValue
|
|
77
|
+
proxyModelValue,
|
|
78
|
+
isMobile
|
|
71
79
|
};
|
|
72
80
|
}
|
|
73
81
|
});
|
|
@@ -86,7 +94,8 @@ var __vue_render__ = function () {
|
|
|
86
94
|
"error": _vm.error,
|
|
87
95
|
"hint": _vm.hint,
|
|
88
96
|
"disabled": _vm.disabled,
|
|
89
|
-
"direction": _vm.direction
|
|
97
|
+
"direction": _vm.direction,
|
|
98
|
+
"spacing": _vm.isMobile ? 'none' : _vm.spacing
|
|
90
99
|
},
|
|
91
100
|
scopedSlots: _vm._u([{
|
|
92
101
|
key: "addon",
|
|
@@ -10,14 +10,19 @@ var FormGroupDirection;
|
|
|
10
10
|
FormGroupDirection["Horizontal"] = "horizontal";
|
|
11
11
|
})(FormGroupDirection || (FormGroupDirection = {}));
|
|
12
12
|
|
|
13
|
+
var FormGroupSpacing;
|
|
14
|
+
(function (FormGroupSpacing) {
|
|
15
|
+
FormGroupSpacing["NONE"] = "none";
|
|
16
|
+
FormGroupSpacing["SM"] = "sm";
|
|
17
|
+
FormGroupSpacing["MD"] = "md";
|
|
18
|
+
})(FormGroupSpacing || (FormGroupSpacing = {}));
|
|
19
|
+
|
|
13
20
|
const FormGroup = [
|
|
14
21
|
// Layout
|
|
15
22
|
'layout-column',
|
|
16
23
|
// Spacing
|
|
17
24
|
'gap-md md:gap-sm'];
|
|
18
|
-
const FormGroupContent = [
|
|
19
|
-
// Spacing
|
|
20
|
-
'gap-md md:gap-sm'];
|
|
25
|
+
const FormGroupContent = [];
|
|
21
26
|
const FormGroupContentDirections = {
|
|
22
27
|
[FormGroupDirection.Vertical]: [
|
|
23
28
|
// Layout
|
|
@@ -26,6 +31,15 @@ const FormGroupContentDirections = {
|
|
|
26
31
|
// Layout
|
|
27
32
|
'layout-row']
|
|
28
33
|
};
|
|
34
|
+
const FormGroupContentSpacing = {
|
|
35
|
+
[FormGroupSpacing.NONE]: [],
|
|
36
|
+
[FormGroupSpacing.SM]: [
|
|
37
|
+
// Spacing
|
|
38
|
+
'gap-sm'],
|
|
39
|
+
[FormGroupSpacing.MD]: [
|
|
40
|
+
// Spacing
|
|
41
|
+
'gap-md']
|
|
42
|
+
};
|
|
29
43
|
|
|
30
44
|
var script = defineComponent({
|
|
31
45
|
name: 'OrFormGroup',
|
|
@@ -58,13 +72,17 @@ var script = defineComponent({
|
|
|
58
72
|
disabled: {
|
|
59
73
|
type: Boolean,
|
|
60
74
|
default: false
|
|
75
|
+
},
|
|
76
|
+
spacing: {
|
|
77
|
+
type: String,
|
|
78
|
+
default: FormGroupSpacing.SM
|
|
61
79
|
}
|
|
62
80
|
},
|
|
63
81
|
setup(props) {
|
|
64
82
|
// Refs & Styles
|
|
65
83
|
const root = ref();
|
|
66
84
|
const rootStyles = computed(() => ['or-form-group-v3', ...FormGroup]);
|
|
67
|
-
const contentStyles = computed(() => [...FormGroupContent, ...FormGroupContentDirections[props.direction]]);
|
|
85
|
+
const contentStyles = computed(() => [...FormGroupContent, ...FormGroupContentDirections[props.direction], ...FormGroupContentSpacing[props.spacing]]);
|
|
68
86
|
return {
|
|
69
87
|
root,
|
|
70
88
|
rootStyles,
|
|
@@ -148,4 +166,4 @@ const __vue_component__ = /*#__PURE__*/normalizeComponent({
|
|
|
148
166
|
}, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined);
|
|
149
167
|
var OrFormGroup = __vue_component__;
|
|
150
168
|
|
|
151
|
-
export { FormGroupDirection, OrFormGroup as OrFormGroupV3 };
|
|
169
|
+
export { FormGroupDirection, FormGroupSpacing, OrFormGroup as OrFormGroupV3 };
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { FormGroupDirection } from './types';
|
|
2
|
+
import { FormGroupSpacing } from './props';
|
|
2
3
|
export declare const FormGroup: string[];
|
|
3
4
|
export declare const FormGroupContent: string[];
|
|
4
5
|
export declare const FormGroupContentDirections: Record<FormGroupDirection, string[]>;
|
|
6
|
+
export declare const FormGroupContentSpacing: Record<FormGroupSpacing, string[]>;
|
|
@@ -116,10 +116,11 @@ var script = defineComponent({
|
|
|
116
116
|
const control = ref();
|
|
117
117
|
const controlStyles = computed(() => [...TextareaControl, ...TextareaControlSizes[props.size], ...(_(props.rows) ? ['resize-none'] : [])]);
|
|
118
118
|
const controlInlineStyles = computed(() => {
|
|
119
|
+
var _a, _b, _c, _d, _e, _f;
|
|
119
120
|
if (control.value) {
|
|
120
|
-
const paddingTop = Number(getComputedStyle(control.value).getPropertyValue('padding-top').match(/^(?<value>\d+)px$/).groups.value);
|
|
121
|
-
const paddingBottom = Number(getComputedStyle(control.value).getPropertyValue('padding-bottom').match(/^(?<value>\d+)px$/).groups.value);
|
|
122
|
-
const lineHeight = Number(getComputedStyle(control.value).getPropertyValue('line-height').match(/^(?<value>\d+)px$/).groups.value);
|
|
121
|
+
const paddingTop = Number(((_b = (_a = getComputedStyle(control.value).getPropertyValue('padding-top').match(/^(?<value>\d+)px$/)) === null || _a === void 0 ? void 0 : _a.groups) === null || _b === void 0 ? void 0 : _b.value) || 0);
|
|
122
|
+
const paddingBottom = Number(((_d = (_c = getComputedStyle(control.value).getPropertyValue('padding-bottom').match(/^(?<value>\d+)px$/)) === null || _c === void 0 ? void 0 : _c.groups) === null || _d === void 0 ? void 0 : _d.value) || 0);
|
|
123
|
+
const lineHeight = Number(((_f = (_e = getComputedStyle(control.value).getPropertyValue('line-height').match(/^(?<value>\d+)px$/)) === null || _e === void 0 ? void 0 : _e.groups) === null || _f === void 0 ? void 0 : _f.value) || 0);
|
|
123
124
|
return {
|
|
124
125
|
minHeight: `${paddingTop + paddingBottom + (_(props.rows) ? props.rows.min : props.rows) * lineHeight}px`,
|
|
125
126
|
maxHeight: _(props.rows) && props.rows.max ? `${paddingTop + paddingBottom + props.rows.max * lineHeight}px` : undefined
|
|
@@ -172,7 +173,7 @@ var script = defineComponent({
|
|
|
172
173
|
}
|
|
173
174
|
});
|
|
174
175
|
|
|
175
|
-
var css_248z = "textarea[data-v-
|
|
176
|
+
var css_248z = "textarea[data-v-0a9f092e]{min-width:0;background:0 0;outline:0}";
|
|
176
177
|
styleInject(css_248z);
|
|
177
178
|
|
|
178
179
|
/* script */
|
|
@@ -296,7 +297,7 @@ var __vue_staticRenderFns__ = [];
|
|
|
296
297
|
/* style */
|
|
297
298
|
const __vue_inject_styles__ = undefined;
|
|
298
299
|
/* scoped */
|
|
299
|
-
const __vue_scope_id__ = "data-v-
|
|
300
|
+
const __vue_scope_id__ = "data-v-0a9f092e";
|
|
300
301
|
/* module identifier */
|
|
301
302
|
const __vue_module_identifier__ = undefined;
|
|
302
303
|
/* functional template */
|
package/dist/esm/index.js
CHANGED
|
@@ -48,7 +48,7 @@ export { FabColor, OrFabV3 } from './components/or-fab-v3/index.js';
|
|
|
48
48
|
export { OrFilterPopoverV3 } from './components/or-filter-popover-v3/index.js';
|
|
49
49
|
export { OrFilterTriggerV3 } from './components/or-filter-trigger-v3/index.js';
|
|
50
50
|
export { OrFilterV3 } from './components/or-filter-v3/index.js';
|
|
51
|
-
export { FormGroupDirection, OrFormGroupV3 } from './components/or-form-group-v3/index.js';
|
|
51
|
+
export { FormGroupDirection, FormGroupSpacing, OrFormGroupV3 } from './components/or-form-group-v3/index.js';
|
|
52
52
|
export { OrHintV3 } from './components/or-hint-v3/index.js';
|
|
53
53
|
export { IconButtonColor, OrIconButtonV3 } from './components/or-icon-button-v3/index.js';
|
|
54
54
|
export { IconSize, IconVariant, OrIconV3 } from './components/or-icon-v3/index.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onereach/ui-components-vue2",
|
|
3
|
-
"version": "20.
|
|
3
|
+
"version": "20.3.0-beta.5253.0",
|
|
4
4
|
"description": "Vue components library for v2",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"exports": {
|
|
@@ -24,8 +24,6 @@
|
|
|
24
24
|
"scripts": {
|
|
25
25
|
"build": "rollup --config rollup.config.js --preserveSymlinks --bundleConfigAsCjs",
|
|
26
26
|
"dev": "ROLLUP_WATCH=true pnpm build -w",
|
|
27
|
-
"make-symlinks": "./scripts/make-symlinks.sh",
|
|
28
|
-
"prepare": "pnpm make-symlinks",
|
|
29
27
|
"sync-deps": "node ./scripts/preinstall.js"
|
|
30
28
|
},
|
|
31
29
|
"dependencies": {
|
|
@@ -105,6 +103,5 @@
|
|
|
105
103
|
"publishConfig": {
|
|
106
104
|
"access": "public"
|
|
107
105
|
},
|
|
108
|
-
"npmUnpacked": "4.15.2"
|
|
109
|
-
"gitHead": "1b353dbcacd7ee2de511ccbef960b71b41b774ad"
|
|
106
|
+
"npmUnpacked": "4.15.2"
|
|
110
107
|
}
|