@onereach/ui-components 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/OrCheckboxGroup.vue.d.ts +11 -1
- package/dist/esm/components/or-checkbox-group-v3/index.js +14 -5
- package/dist/esm/components/or-checkbox-v3/index.js +1 -1
- package/dist/esm/components/or-form-group-v3/OrFormGroup.vue.d.ts +10 -0
- 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 +4 -3
- package/dist/esm/index.js +1 -1
- package/package.json +3 -6
|
@@ -35,7 +35,7 @@ export { FabColor, OrFabV3 } from './or-fab-v3/index.js';
|
|
|
35
35
|
export { OrFilterPopoverV3 } from './or-filter-popover-v3/index.js';
|
|
36
36
|
export { OrFilterTriggerV3 } from './or-filter-trigger-v3/index.js';
|
|
37
37
|
export { OrFilterV3 } from './or-filter-v3/index.js';
|
|
38
|
-
export { FormGroupDirection, OrFormGroupV3 } from './or-form-group-v3/index.js';
|
|
38
|
+
export { FormGroupDirection, FormGroupSpacing, OrFormGroupV3 } from './or-form-group-v3/index.js';
|
|
39
39
|
export { OrHintV3 } from './or-hint-v3/index.js';
|
|
40
40
|
export { IconButtonColor, OrIconButtonV3 } from './or-icon-button-v3/index.js';
|
|
41
41
|
export { IconSize, IconVariant, OrIconV3 } from './or-icon-v3/index.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
2
|
import { CheckboxTreeNode } from '@onereach/ui-components.or-checkbox-tree-v3';
|
|
3
|
-
import { FormGroupDirection } from '@onereach/ui-components.or-form-group-v3';
|
|
3
|
+
import { FormGroupDirection, FormGroupSpacing } from '@onereach/ui-components.or-form-group-v3';
|
|
4
4
|
declare const _default: import("vue").DefineComponent<{
|
|
5
5
|
modelValue: {
|
|
6
6
|
type: PropType<string[]>;
|
|
@@ -34,8 +34,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
34
34
|
type: BooleanConstructor;
|
|
35
35
|
default: boolean;
|
|
36
36
|
};
|
|
37
|
+
spacing: {
|
|
38
|
+
type: PropType<Omit<FormGroupSpacing, "none">>;
|
|
39
|
+
default: FormGroupSpacing;
|
|
40
|
+
};
|
|
37
41
|
}, {
|
|
38
42
|
proxyModelValue: import("@onereach/ui-components-common/hooks").UseProxyModelValueReturn<string[]>;
|
|
43
|
+
isMobile: import("vue").ComputedRef<boolean>;
|
|
39
44
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
40
45
|
modelValue: {
|
|
41
46
|
type: PropType<string[]>;
|
|
@@ -69,6 +74,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
69
74
|
type: BooleanConstructor;
|
|
70
75
|
default: boolean;
|
|
71
76
|
};
|
|
77
|
+
spacing: {
|
|
78
|
+
type: PropType<Omit<FormGroupSpacing, "none">>;
|
|
79
|
+
default: FormGroupSpacing;
|
|
80
|
+
};
|
|
72
81
|
}>>, {
|
|
73
82
|
modelValue: string[];
|
|
74
83
|
label: string;
|
|
@@ -78,5 +87,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
78
87
|
options: CheckboxTreeNode[];
|
|
79
88
|
disabled: boolean;
|
|
80
89
|
readonly: boolean;
|
|
90
|
+
spacing: Omit<FormGroupSpacing, "none">;
|
|
81
91
|
}, {}>;
|
|
82
92
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, toRef, resolveComponent, openBlock, createBlock, withCtx, renderSlot, createElementBlock, Fragment, renderList } from 'vue';
|
|
2
|
-
import { r as re } from '../OrAutocompleteV3-fd7065f1.js';
|
|
2
|
+
import { r as re, n as ne } from '../OrAutocompleteV3-fd7065f1.js';
|
|
3
3
|
import { OrCheckboxTreeV3 as script$1 } from '../or-checkbox-tree-v3/index.js';
|
|
4
|
-
import { OrFormGroupV3 as script$2, FormGroupDirection } from '../or-form-group-v3/index.js';
|
|
4
|
+
import { OrFormGroupV3 as script$2, FormGroupDirection, FormGroupSpacing } from '../or-form-group-v3/index.js';
|
|
5
5
|
import '@vueuse/core';
|
|
6
6
|
import '@onereach/styles/screens.json';
|
|
7
7
|
import '@onereach/styles/tailwind.config.json';
|
|
@@ -73,12 +73,20 @@ var script = defineComponent({
|
|
|
73
73
|
readonly: {
|
|
74
74
|
type: Boolean,
|
|
75
75
|
default: false
|
|
76
|
+
},
|
|
77
|
+
spacing: {
|
|
78
|
+
type: String,
|
|
79
|
+
default: FormGroupSpacing.SM
|
|
76
80
|
}
|
|
77
81
|
},
|
|
78
82
|
setup(props, context) {
|
|
79
83
|
const proxyModelValue = re(toRef(props, 'modelValue'), context.emit);
|
|
84
|
+
const {
|
|
85
|
+
isMobile
|
|
86
|
+
} = ne();
|
|
80
87
|
return {
|
|
81
|
-
proxyModelValue
|
|
88
|
+
proxyModelValue,
|
|
89
|
+
isMobile
|
|
82
90
|
};
|
|
83
91
|
}
|
|
84
92
|
});
|
|
@@ -91,7 +99,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
91
99
|
error: _ctx.error,
|
|
92
100
|
hint: _ctx.hint,
|
|
93
101
|
disabled: _ctx.disabled,
|
|
94
|
-
direction: _ctx.direction
|
|
102
|
+
direction: _ctx.direction,
|
|
103
|
+
spacing: _ctx.isMobile ? 'none' : _ctx.spacing
|
|
95
104
|
}, {
|
|
96
105
|
addon: withCtx(() => [renderSlot(_ctx.$slots, "addon")]),
|
|
97
106
|
default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, option => {
|
|
@@ -107,7 +116,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
107
116
|
}, null, 8 /* PROPS */, ["modelValue", "item", "disabled", "readonly", "collapsible", "expanded"]);
|
|
108
117
|
}), 128 /* KEYED_FRAGMENT */))]),
|
|
109
118
|
_: 3 /* FORWARDED */
|
|
110
|
-
}, 8 /* PROPS */, ["label", "error", "hint", "disabled", "direction"]);
|
|
119
|
+
}, 8 /* PROPS */, ["label", "error", "hint", "disabled", "direction", "spacing"]);
|
|
111
120
|
}
|
|
112
121
|
|
|
113
122
|
script.render = render;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
2
|
import { FormGroupDirection } from './types';
|
|
3
|
+
import { FormGroupSpacing } from './props';
|
|
3
4
|
declare const _default: import("vue").DefineComponent<{
|
|
4
5
|
direction: {
|
|
5
6
|
type: PropType<"vertical" | "horizontal">;
|
|
@@ -25,6 +26,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
25
26
|
type: BooleanConstructor;
|
|
26
27
|
default: boolean;
|
|
27
28
|
};
|
|
29
|
+
spacing: {
|
|
30
|
+
type: PropType<"none" | "sm" | "md">;
|
|
31
|
+
default: FormGroupSpacing;
|
|
32
|
+
};
|
|
28
33
|
}, {
|
|
29
34
|
root: import("vue").Ref<HTMLElement | undefined>;
|
|
30
35
|
rootStyles: import("vue").ComputedRef<string[]>;
|
|
@@ -54,6 +59,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
54
59
|
type: BooleanConstructor;
|
|
55
60
|
default: boolean;
|
|
56
61
|
};
|
|
62
|
+
spacing: {
|
|
63
|
+
type: PropType<"none" | "sm" | "md">;
|
|
64
|
+
default: FormGroupSpacing;
|
|
65
|
+
};
|
|
57
66
|
}>>, {
|
|
58
67
|
direction: "vertical" | "horizontal";
|
|
59
68
|
label: string;
|
|
@@ -61,5 +70,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
61
70
|
error: string | boolean;
|
|
62
71
|
required: boolean;
|
|
63
72
|
disabled: boolean;
|
|
73
|
+
spacing: "none" | "sm" | "md";
|
|
64
74
|
}, {}>;
|
|
65
75
|
export default _default;
|
|
@@ -9,14 +9,19 @@ var FormGroupDirection;
|
|
|
9
9
|
FormGroupDirection["Horizontal"] = "horizontal";
|
|
10
10
|
})(FormGroupDirection || (FormGroupDirection = {}));
|
|
11
11
|
|
|
12
|
+
var FormGroupSpacing;
|
|
13
|
+
(function (FormGroupSpacing) {
|
|
14
|
+
FormGroupSpacing["NONE"] = "none";
|
|
15
|
+
FormGroupSpacing["SM"] = "sm";
|
|
16
|
+
FormGroupSpacing["MD"] = "md";
|
|
17
|
+
})(FormGroupSpacing || (FormGroupSpacing = {}));
|
|
18
|
+
|
|
12
19
|
const FormGroup = [
|
|
13
20
|
// Layout
|
|
14
21
|
'layout-column',
|
|
15
22
|
// Spacing
|
|
16
23
|
'gap-md md:gap-sm'];
|
|
17
|
-
const FormGroupContent = [
|
|
18
|
-
// Spacing
|
|
19
|
-
'gap-md md:gap-sm'];
|
|
24
|
+
const FormGroupContent = [];
|
|
20
25
|
const FormGroupContentDirections = {
|
|
21
26
|
[FormGroupDirection.Vertical]: [
|
|
22
27
|
// Layout
|
|
@@ -25,6 +30,15 @@ const FormGroupContentDirections = {
|
|
|
25
30
|
// Layout
|
|
26
31
|
'layout-row']
|
|
27
32
|
};
|
|
33
|
+
const FormGroupContentSpacing = {
|
|
34
|
+
[FormGroupSpacing.NONE]: [],
|
|
35
|
+
[FormGroupSpacing.SM]: [
|
|
36
|
+
// Spacing
|
|
37
|
+
'gap-sm'],
|
|
38
|
+
[FormGroupSpacing.MD]: [
|
|
39
|
+
// Spacing
|
|
40
|
+
'gap-md']
|
|
41
|
+
};
|
|
28
42
|
|
|
29
43
|
var script = defineComponent({
|
|
30
44
|
name: 'OrFormGroup',
|
|
@@ -57,13 +71,17 @@ var script = defineComponent({
|
|
|
57
71
|
disabled: {
|
|
58
72
|
type: Boolean,
|
|
59
73
|
default: false
|
|
74
|
+
},
|
|
75
|
+
spacing: {
|
|
76
|
+
type: String,
|
|
77
|
+
default: FormGroupSpacing.SM
|
|
60
78
|
}
|
|
61
79
|
},
|
|
62
80
|
setup(props) {
|
|
63
81
|
// Refs & Styles
|
|
64
82
|
const root = ref();
|
|
65
83
|
const rootStyles = computed(() => ['or-form-group-v3', ...FormGroup]);
|
|
66
|
-
const contentStyles = computed(() => [...FormGroupContent, ...FormGroupContentDirections[props.direction]]);
|
|
84
|
+
const contentStyles = computed(() => [...FormGroupContent, ...FormGroupContentDirections[props.direction], ...FormGroupContentSpacing[props.spacing]]);
|
|
67
85
|
return {
|
|
68
86
|
root,
|
|
69
87
|
rootStyles,
|
|
@@ -108,4 +126,4 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
108
126
|
script.render = render;
|
|
109
127
|
script.__file = "src/components/or-form-group-v3/OrFormGroup.vue";
|
|
110
128
|
|
|
111
|
-
export { FormGroupDirection, script as OrFormGroupV3 };
|
|
129
|
+
export { FormGroupDirection, FormGroupSpacing, script 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[]>;
|
|
@@ -129,10 +129,11 @@ var script = defineComponent({
|
|
|
129
129
|
const control = ref();
|
|
130
130
|
const controlStyles = computed(() => [...TextareaControl, ...TextareaControlSizes[props.size], ...(_(props.rows) ? ['resize-none'] : [])]);
|
|
131
131
|
const controlInlineStyles = computed(() => {
|
|
132
|
+
var _a, _b, _c, _d, _e, _f;
|
|
132
133
|
if (control.value) {
|
|
133
|
-
const paddingTop = Number(getComputedStyle(control.value).getPropertyValue('padding-top').match(/^(?<value>\d+)px$/).groups.value);
|
|
134
|
-
const paddingBottom = Number(getComputedStyle(control.value).getPropertyValue('padding-bottom').match(/^(?<value>\d+)px$/).groups.value);
|
|
135
|
-
const lineHeight = Number(getComputedStyle(control.value).getPropertyValue('line-height').match(/^(?<value>\d+)px$/).groups.value);
|
|
134
|
+
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);
|
|
135
|
+
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);
|
|
136
|
+
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);
|
|
136
137
|
return {
|
|
137
138
|
minHeight: `${paddingTop + paddingBottom + (_(props.rows) ? props.rows.min : props.rows) * lineHeight}px`,
|
|
138
139
|
maxHeight: _(props.rows) && props.rows.max ? `${paddingTop + paddingBottom + props.rows.max * lineHeight}px` : undefined
|
package/dist/esm/index.js
CHANGED
|
@@ -58,7 +58,7 @@ export { EditorState } from '@codemirror/state';
|
|
|
58
58
|
export { OrDatePickerV3 } from './components/or-date-picker-v3/index.js';
|
|
59
59
|
export { OrErrorV3 } from './components/or-error-v3/index.js';
|
|
60
60
|
export { ExpansionPanelBackgroundColor, ExpansionPanelColor, ExpansionPanelVariant, OrExpansionPanelV3 } from './components/or-expansion-panel-v3/index.js';
|
|
61
|
-
export { FormGroupDirection, OrFormGroupV3 } from './components/or-form-group-v3/index.js';
|
|
61
|
+
export { FormGroupDirection, FormGroupSpacing, OrFormGroupV3 } from './components/or-form-group-v3/index.js';
|
|
62
62
|
export { OrHintV3 } from './components/or-hint-v3/index.js';
|
|
63
63
|
export { IconButtonColor, OrIconButtonV3 } from './components/or-icon-button-v3/index.js';
|
|
64
64
|
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",
|
|
3
|
-
"version": "20.
|
|
3
|
+
"version": "20.3.0-beta.5253.0",
|
|
4
4
|
"description": "Vue components library for v3",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"exports": {
|
|
@@ -29,9 +29,7 @@
|
|
|
29
29
|
],
|
|
30
30
|
"scripts": {
|
|
31
31
|
"build": "rollup --config rollup.config.js --preserveSymlinks --bundleConfigAsCjs",
|
|
32
|
-
"dev": "ROLLUP_WATCH=true pnpm build -w"
|
|
33
|
-
"make-symlinks": "./scripts/make-symlinks.sh",
|
|
34
|
-
"prepare": "pnpm make-symlinks"
|
|
32
|
+
"dev": "ROLLUP_WATCH=true pnpm build -w"
|
|
35
33
|
},
|
|
36
34
|
"dependencies": {
|
|
37
35
|
"@codemirror/commands": "6.2.4",
|
|
@@ -106,6 +104,5 @@
|
|
|
106
104
|
"publishConfig": {
|
|
107
105
|
"access": "public"
|
|
108
106
|
},
|
|
109
|
-
"npmUnpacked": "4.15.2"
|
|
110
|
-
"gitHead": "1b353dbcacd7ee2de511ccbef960b71b41b774ad"
|
|
107
|
+
"npmUnpacked": "4.15.2"
|
|
111
108
|
}
|