@kizmann/nano-ui 0.9.2 → 0.9.4
Sign up to get free protection for your applications and to get access to all the features.
- package/demos/builder.html +401 -0
- package/demos/overview.html +1 -1
- package/dist/nano-ui.css +1 -1
- package/dist/nano-ui.js +3 -3
- package/dist/nano-ui.js.map +1 -1
- package/dist/themes/light.css +1 -1
- package/package.json +2 -2
- package/src/config/index.js +6 -0
- package/src/config/index.scss +3 -0
- package/src/config/src/builder/builder.js +866 -0
- package/src/config/src/builder/builder.scss +272 -0
- package/src/config/src/builder/prototypes/button/n-button-group.js +11 -0
- package/src/config/src/builder/prototypes/button/n-button.js +37 -0
- package/src/config/src/builder/prototypes/cascader/n-cascader.js +11 -0
- package/src/config/src/builder/prototypes/checkbox/n-checkbox-group.js +11 -0
- package/src/config/src/builder/prototypes/checkbox/n-checkbox.js +11 -0
- package/src/config/src/builder/prototypes/confirm/n-confirm.js +11 -0
- package/src/config/src/builder/prototypes/datepicker/n-datepicker.js +11 -0
- package/src/config/src/builder/prototypes/datetimepicker/n-datetimepicker.js +11 -0
- package/src/config/src/builder/prototypes/durationpicker/n-durationpicker.js +11 -0
- package/src/config/src/builder/prototypes/empty/n-empty.js +11 -0
- package/src/config/src/builder/prototypes/form/n-form-group.js +13 -0
- package/src/config/src/builder/prototypes/form/n-form-item.js +13 -0
- package/src/config/src/builder/prototypes/form/n-form.js +11 -0
- package/src/config/src/builder/prototypes/html/div.js +13 -0
- package/src/config/src/builder/prototypes/html/nano.js +11 -0
- package/src/config/src/builder/prototypes/html/span.js +11 -0
- package/src/config/src/builder/prototypes/info/n-info-column.js +11 -0
- package/src/config/src/builder/prototypes/info/n-info.js +11 -0
- package/src/config/src/builder/prototypes/input/n-input.js +40 -0
- package/src/config/src/builder/prototypes/input-number/n-input-number.js +49 -0
- package/src/config/src/builder/prototypes/loader/n-loader.js +11 -0
- package/src/config/src/builder/prototypes/modal/n-modal.js +11 -0
- package/src/config/src/builder/prototypes/popover/n-popover-group.js +11 -0
- package/src/config/src/builder/prototypes/popover/n-popover-item.js +11 -0
- package/src/config/src/builder/prototypes/popover/n-popover.js +11 -0
- package/src/config/src/builder/prototypes/radio/n-radio-group.js +11 -0
- package/src/config/src/builder/prototypes/radio/n-radio.js +11 -0
- package/src/config/src/builder/prototypes/rating/n-rating.js +11 -0
- package/src/config/src/builder/prototypes/select/n-select.js +11 -0
- package/src/config/src/builder/prototypes/slider/n-slider.js +11 -0
- package/src/config/src/builder/prototypes/switch/n-switch.js +31 -0
- package/src/config/src/builder/prototypes/table/n-table-column.js +11 -0
- package/src/config/src/builder/prototypes/table/n-table.js +11 -0
- package/src/config/src/builder/prototypes/tabs/n-tabs-item.js +11 -0
- package/src/config/src/builder/prototypes/tabs/n-tabs.js +11 -0
- package/src/config/src/builder/prototypes/tags/n-tags-item.js +11 -0
- package/src/config/src/builder/prototypes/tags/n-tags.js +11 -0
- package/src/config/src/builder/prototypes/textarea/n-textarea.js +11 -0
- package/src/config/src/builder/prototypes/timepicker/n-timepicker.js +11 -0
- package/src/config/src/builder/prototypes/transfer/n-transfer.js +11 -0
- package/src/config/src/reference-panel/reference-panel.js +196 -0
- package/src/config/src/reference-panel/reference-panel.scss +194 -0
- package/src/config/src/reference-picker/reference-picker.js +146 -0
- package/src/config/src/reference-picker/reference-picker.scss +3 -0
- package/src/form/src/form-group/form-group.js +5 -1
- package/src/index.scss +1 -0
- package/src/input/src/input/input.js +2 -0
- package/src/popover/src/popover/popover.scss +3 -3
- package/src/root/vars.scss +23 -0
- package/webservy.json +3 -1
- package/servy.json +0 -6
@@ -0,0 +1,146 @@
|
|
1
|
+
import { Arr, Obj, Any } from "@kizmann/pico-js";
|
2
|
+
|
3
|
+
export default {
|
4
|
+
|
5
|
+
name: 'NReferencePicker',
|
6
|
+
|
7
|
+
props: {
|
8
|
+
|
9
|
+
modelValue: {
|
10
|
+
default()
|
11
|
+
{
|
12
|
+
return '';
|
13
|
+
},
|
14
|
+
type: [String]
|
15
|
+
},
|
16
|
+
|
17
|
+
model: {
|
18
|
+
default()
|
19
|
+
{
|
20
|
+
return {};
|
21
|
+
},
|
22
|
+
type: [Object]
|
23
|
+
},
|
24
|
+
|
25
|
+
scope: {
|
26
|
+
default()
|
27
|
+
{
|
28
|
+
return {};
|
29
|
+
},
|
30
|
+
type: [Object]
|
31
|
+
},
|
32
|
+
|
33
|
+
size: {
|
34
|
+
default()
|
35
|
+
{
|
36
|
+
return 'md';
|
37
|
+
},
|
38
|
+
type: [String]
|
39
|
+
},
|
40
|
+
|
41
|
+
width: {
|
42
|
+
default()
|
43
|
+
{
|
44
|
+
return '100%';
|
45
|
+
},
|
46
|
+
type: [String]
|
47
|
+
},
|
48
|
+
|
49
|
+
height: {
|
50
|
+
default()
|
51
|
+
{
|
52
|
+
return '100%';
|
53
|
+
},
|
54
|
+
type: [String]
|
55
|
+
},
|
56
|
+
|
57
|
+
},
|
58
|
+
|
59
|
+
data()
|
60
|
+
{
|
61
|
+
return {
|
62
|
+
modal: false, tempValue: this.modelValue
|
63
|
+
};
|
64
|
+
},
|
65
|
+
|
66
|
+
methods: {
|
67
|
+
|
68
|
+
updateValue(value)
|
69
|
+
{
|
70
|
+
this.$emit('update:modelValue', this.tempValue = value);
|
71
|
+
}
|
72
|
+
|
73
|
+
},
|
74
|
+
|
75
|
+
renderModal()
|
76
|
+
{
|
77
|
+
if ( ! this.modal ) {
|
78
|
+
return null;
|
79
|
+
}
|
80
|
+
|
81
|
+
let modalProps = {
|
82
|
+
modelValue: true,
|
83
|
+
width: this.width,
|
84
|
+
height: this.height,
|
85
|
+
};
|
86
|
+
|
87
|
+
modalProps['onClose'] = () => {
|
88
|
+
this.modal = false;
|
89
|
+
};
|
90
|
+
|
91
|
+
let panelProps = {
|
92
|
+
model: this.model, scope: this.scope,
|
93
|
+
};
|
94
|
+
|
95
|
+
panelProps['onUpdate:modelValue'] = (value) => {
|
96
|
+
this.updateValue(value); this.modal = false;
|
97
|
+
};
|
98
|
+
|
99
|
+
let slots = {
|
100
|
+
//
|
101
|
+
};
|
102
|
+
|
103
|
+
slots['body'] = () => (
|
104
|
+
<NReferencePanel class="in-modal" {...panelProps} />
|
105
|
+
);
|
106
|
+
|
107
|
+
return (
|
108
|
+
<NModal {...modalProps} v-slots={slots} />
|
109
|
+
);
|
110
|
+
},
|
111
|
+
|
112
|
+
renderInput()
|
113
|
+
{
|
114
|
+
let inputProps = {
|
115
|
+
modelValue: this.tempValue,
|
116
|
+
icon: 'fa fa-expand',
|
117
|
+
size: this.size,
|
118
|
+
};
|
119
|
+
|
120
|
+
inputProps['onUpdate:modelValue'] = (value) => {
|
121
|
+
this.updateValue(value);
|
122
|
+
};
|
123
|
+
|
124
|
+
inputProps['onBlur'] = (e) => {
|
125
|
+
this.$emit('onBlur', e);
|
126
|
+
};
|
127
|
+
|
128
|
+
inputProps['onIconClick'] = () => {
|
129
|
+
this.modal = true;
|
130
|
+
};
|
131
|
+
|
132
|
+
return (
|
133
|
+
<NInput {...inputProps} />
|
134
|
+
);
|
135
|
+
},
|
136
|
+
|
137
|
+
render()
|
138
|
+
{
|
139
|
+
return (
|
140
|
+
<div class="n-reference-picker">
|
141
|
+
{[this.ctor('renderInput')(), this.ctor('renderModal')()]}
|
142
|
+
</div>
|
143
|
+
);
|
144
|
+
}
|
145
|
+
|
146
|
+
}
|
package/src/index.scss
CHANGED
@@ -68,7 +68,6 @@
|
|
68
68
|
line-height: 1.2;
|
69
69
|
}
|
70
70
|
|
71
|
-
|
72
71
|
.n-popover-option .n-image {
|
73
72
|
flex: 0 0 auto;
|
74
73
|
margin-top: -2px;
|
@@ -139,6 +138,7 @@
|
|
139
138
|
|
140
139
|
.n-popover--#{$suffix} .n-popover__body .n-popover-group,
|
141
140
|
.n-popover--#{$suffix} .n-popover__body .n-popover-option {
|
141
|
+
width: calc(100% + #{$-popover-padding * 2.4});
|
142
142
|
margin: 0 -#{$-popover-padding * 1.2};
|
143
143
|
}
|
144
144
|
|
@@ -153,8 +153,8 @@
|
|
153
153
|
}
|
154
154
|
|
155
155
|
.n-popover-option--#{$suffix} .n-image {
|
156
|
-
width: $-popover-font +
|
157
|
-
height: $-popover-font +
|
156
|
+
width: $-popover-font + 10;
|
157
|
+
height: $-popover-font + 10;
|
158
158
|
}
|
159
159
|
|
160
160
|
.n-popover-option--#{$suffix} .n-icon {
|
package/src/root/vars.scss
CHANGED
@@ -158,3 +158,26 @@ $colors: (
|
|
158
158
|
'dark': $color-danger-dark
|
159
159
|
),
|
160
160
|
) !default;
|
161
|
+
|
162
|
+
$colors-tags: (
|
163
|
+
'0': mix($color-secondary, $color-secondary, 65%),
|
164
|
+
'1': mix($color-primary, $color-secondary, 65%),
|
165
|
+
'2': mix($color-danger, $color-secondary, 65%),
|
166
|
+
'3': mix($color-success, $color-secondary, 65%),
|
167
|
+
'4': mix($color-warning, $color-secondary, 65%),
|
168
|
+
'5': mix($color-primary, $color-success, 65%),
|
169
|
+
'6': mix($color-secondary, $color-success, 65%),
|
170
|
+
'7': mix($color-danger, $color-success, 65%),
|
171
|
+
'8': mix($color-success, $color-success, 65%),
|
172
|
+
'9': mix($color-warning, $color-success, 65%),
|
173
|
+
'10': mix($color-primary, $color-danger, 65%),
|
174
|
+
'11': mix($color-secondary, $color-danger, 65%),
|
175
|
+
'12': mix($color-danger, $color-danger, 65%),
|
176
|
+
'13': mix($color-success, $color-danger, 65%),
|
177
|
+
'14': mix($color-warning, $color-danger, 65%),
|
178
|
+
'15': mix($color-primary, $color-warning, 65%),
|
179
|
+
'16': mix($color-secondary, $color-warning, 65%),
|
180
|
+
'17': mix($color-danger, $color-warning, 65%),
|
181
|
+
'18': mix($color-success, $color-warning, 65%),
|
182
|
+
'19': mix($color-warning, $color-warning, 65%),
|
183
|
+
) !default;
|
package/webservy.json
CHANGED