Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@opentiny/vue-search

Package Overview
Dependencies
Maintainers
1
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opentiny/vue-search - npm Package Compare versions

Comparing version 2.10.1 to 2.11.0-alpha.0

154

lib/index.js

@@ -15,3 +15,3 @@ function _extends() {

}
import { defineComponent, $prefix, $props, $setup } from "@opentiny/vue-common";
import { defineComponent, $prefix, $setup, $props } from "@opentiny/vue-common";
import { t } from "@opentiny/vue-locale";

@@ -33,77 +33,81 @@ import PcTemplate from "./pc.js";

};
var ISearchProps = _extends({}, $props, {
mini: {
type: Boolean,
default: false
},
big: {
type: Boolean,
default: false
},
buttonText: {
type: String,
default: function _default() {
return t("ui.search.placeholder");
}
},
/**
* 设置为透明模式,配置为true时,边框变为透明且收缩后半透明显示,一般用在带有背景的场景
*/
transparent: {
type: Boolean,
default: false
},
/**
* 搜索的类型选项,格式为[{text:'文档',value:1},...],不配置时类型选择固定显示为All
*/
searchTypes: {
type: Array,
default: function _default2() {
return [];
}
},
/**
* 设置搜索输入框内的提示占位文本
*/
placeholder: {
type: String,
default: ""
},
modelValue: {
type: String,
default: ""
},
clearable: {
type: Boolean,
default: false
},
tabindex: {
type: String,
default: "1"
},
/**
* 配置搜索输入框enter键,enter按下触发搜索
*/
isEnterSearch: {
type: Boolean,
default: true
},
/**
* 配置主题色,primary:蓝 gray:灰
*/
themeType: {
type: String,
default: "primary",
validator: function validator(value) {
return ["primary", "gray"].includes(value);
}
},
showButton: {
type: Boolean,
default: false
},
changeBgColor: {
type: Boolean,
default: false
}
});
var Search = defineComponent({
name: $prefix + "Search",
props: _extends({}, $props, {
mini: {
type: Boolean,
default: false
},
big: {
type: Boolean,
default: false
},
buttonText: {
type: String,
default: function _default() {
return t("ui.search.placeholder");
}
},
/**
* 设置为透明模式,配置为true时,边框变为透明且收缩后半透明显示,一般用在带有背景的场景
*/
transparent: {
type: Boolean,
default: false
},
/**
* 搜索的类型选项,格式为[{text:'文档',value:1},...],不配置时类型选择固定显示为All
*/
searchTypes: {
type: Array,
default: function _default2() {
return [];
}
},
/**
* 设置搜索输入框内的提示占位文本
*/
placeholder: {
type: String,
default: ""
},
modelValue: String,
clearable: {
type: Boolean,
default: false
},
tabindex: {
type: String,
default: "1"
},
/**
* 配置搜索输入框enter键,enter按下触发搜索
*/
isEnterSearch: {
type: Boolean,
default: true
},
/**
* 配置主题色,primary:蓝 gray:灰
*/
themeType: {
type: String,
default: "primary",
validator: function validator(value) {
return ["primary", "gray"].includes(value);
}
},
showButton: {
type: Boolean,
default: false
},
changeBgColor: {
type: Boolean,
default: false
}
}),
props: ISearchProps,
setup: function setup(props, context) {

@@ -117,3 +121,3 @@ return $setup({

});
var version = "2.10.1";
var version = "2.11.0-alpha.0";
Search.model = {

@@ -120,0 +124,0 @@ prop: "modelValue",

@@ -62,10 +62,10 @@ import { renderless, api } from "@opentiny/vue-renderless/search/vue";

"search-default": "relative inline-block text-xs w-full px-3 sm:px-0",
"pc-search-line": "w-full border border-solid rounded-sm bg-white transition duration-300 ease-in-out border-separate hidden sm:inline-table",
"pc-search-line": "w-full border border-solid rounded-full lg:rounded bg-color-bg-1 transition duration-300 ease-in-out border-separate hidden sm:inline-table",
"pc-search-line-focus": "border-color-border-focus",
"pc-search-line-unfocus": "border-color-border hover:border-color-border-hover",
"pc-search-line-big": "h-[1.875rem]",
"pc-search-line-unbig": "h-[1.625rem]",
"pc-search-line-big": "h-[calc(theme(spacing.8)-2*theme(borderWidth.DEFAULT))]",
"pc-search-line-unbig": "h-[calc(theme(spacing.7)-2*theme(borderWidth.DEFAULT))]",
"pc-search-present": "table-cell relative align-middle right-0 text-color-text-primary w-px whitespace-nowrap",
"pc-search-present-big": "pl-4 text-sm leading-[1.875rem]",
"pc-search-present-unbig": "pl-3 text-xs leading-[1.625rem]",
"pc-search-present-big": "pl-4 text-sm leading-[calc(theme(spacing.8)-2*theme(borderWidth.DEFAULT))",
"pc-search-present-unbig": "pl-3 text-xs leading-[calc(theme(spacing.7)-2*theme(borderWidth.DEFAULT))]",
"pc-search-present-pointer": "cursor-pointer",

@@ -81,26 +81,26 @@ "pc-search-present-icon-outer": "h-4 leading-4 inline-block pl-2 pr-3 py-0 border-r border-solid border-color-border-separator cursor-pointer",

"pc-search-input-collapse-unbig": "pl-2",
"pc-search-input-big": "pl-3 text-sm h-[1.875rem] leading-[1.875rem]",
"pc-search-input-unbig": "text-xs h-[1.625rem] leading-[1.625rem]",
"pc-search-input-big": "pl-3 text-sm h-[calc(theme(spacing.8)-2*theme(borderWidth.DEFAULT))] leading-[calc(theme(spacing.8)-2*theme(borderWidth.DEFAULT))]",
"pc-search-input-unbig": "text-xs h-[calc(theme(spacing.7)-2*theme(borderWidth.DEFAULT))] leading-[calc(theme(spacing.7)-2*theme(borderWidth.DEFAULT))]",
"pc-search-input-btn-transtion": "table-cell relative align-middle right-0 w-8 text-center z-10",
"pc-search-input-btn-transtion-big": "h-[1.875rem] translate-x-4",
"pc-search-input-btn-transtion-unbig": "h-[1.625rem] translate-x-3.5",
"pc-search-input-btn-transtion-big": "h-[calc(theme(spacing.8)-2*theme(borderWidth.DEFAULT))] translate-x-4",
"pc-search-input-btn-transtion-unbig": "h-[calc(theme(spacing.7)-2*theme(borderWidth.DEFAULT))] translate-x-3.5",
"pc-search-input-btn-transtion-a": "no-underline block w-8",
"pc-search-input-btn-transtion-a-big": "leading-[1.875rem]",
"pc-search-input-btn-transtion-a-unbig": "leading-[1.625rem]",
"pc-search-input-btn-transtion-a-big": "leading-[calc(theme(spacing.8)-2*theme(borderWidth.DEFAULT))]",
"pc-search-input-btn-transtion-a-unbig": "leading-[calc(theme(spacing.7)-2*theme(borderWidth.DEFAULT))]",
"pc-search-input-btn-transtion-svg-size": "text-base fill-color-icon-primary hover:fill-color-icon-hover",
"pc-search-input-btn": "table-cell relative align-middle right-0 text-center",
"pc-search-input-btn-big": "h-[1.875rem] w-11",
"pc-search-input-btn-unbig": "h-[1.625rem] w-10",
"pc-search-input-btn-big": "h-[calc(theme(spacing.8)-2*theme(borderWidth.DEFAULT))] w-11",
"pc-search-input-btn-unbig": "h-[calc(theme(spacing.7)-2*theme(borderWidth.DEFAULT))] w-10",
"pc-search-input-btn-a": "no-underline block",
"pc-search-input-btn-a-big": "w-11 leading-[1.875rem]",
"pc-search-input-btn-a-unbig": "w-10 leading-[1.625rem]",
"pc-search-input-btn-a-big": "w-11 leading-[calc(theme(spacing.8)-2*theme(borderWidth.DEFAULT))]",
"pc-search-input-btn-a-unbig": "w-10 leading-[calc(theme(spacing.7)-2*theme(borderWidth.DEFAULT))]",
"pc-search-input-btn-icon-search-transparent": "fill-color-bg-1",
"pc-search-input-btn-icon-search": "text-base fill-color-none",
"search-selector": "absolute top-full left-0 overflow-hidden min-w-[4.25rem] border border-solid border-color-border rounded text-xs shadow bg-white text-color-text-primary mt-0.5 py-1 hidden sm:block",
"search-selector-body": "max-h-[18rem] overflow-x-hidden overflow-y-auto",
"search-selector-poplist-item": "px-3 min-h-[1.5rem] leading-6 max-w-full overflow-hidden text-left text-ellipsis whitespace-nowrap cursor-pointer hover:bg-color-bg-2",
"search-selector": "absolute top-full left-0 overflow-hidden min-w-[theme(spacing.18)] border border-solid border-color-border rounded text-xs shadow bg-white text-color-text-primary mt-0.5 py-1 hidden sm:block",
"search-selector-body": "max-h-[theme(spacing.72)] overflow-x-hidden overflow-y-auto",
"search-selector-poplist-item": "px-3 min-h-[theme(spacing.6)] leading-6 max-w-full overflow-hidden text-left text-ellipsis whitespace-nowrap cursor-pointer hover:bg-color-bg-2",
"search-selector-poplist-item-big": "text-sm",
"search-selector-poplist-item-unbig": "text-xs",
"mobile-search": "flex sm:hidden w-full items-center shrink-0",
"mobile-search-input": "bg-color-bg-4 pl-9 placeholder:text-color-none focus:placeholder:text-color-text-placeholder",
"mobile-search-input": "bg-color-bg-4 pl-9 placeholder:text-color-none focus:placeholder:text-color-text-placeholder rounded-full",
"mobile-search-input-bg-change": "bg-color-bg-1",

@@ -191,3 +191,3 @@ "mobile-search-svg-size": "text-base fill-color-none translate-x-1.5",

}
}, [_vm._v(_vm._s(_vm.state.searchValue.text))])];
}, [_vm._v(_vm._s(_vm.state.searchValue["text"]))])];
}, {

@@ -246,3 +246,3 @@ "slotScope": _vm.state.searchValue

return null;
return _vm.searchEnterKey($event);
return _vm.searchEnterKey.apply(null, arguments);
},

@@ -279,4 +279,4 @@ "input": [function($event) {

}, [_c("a", {
class: _vm.m(_vm.gcls("pc-search-input-btn-transtion-a-big"), _vm.gcls({
"pc-search-input-btn-transtion-a": _vm.big
class: _vm.m(_vm.gcls("pc-search-input-btn-transtion-a"), _vm.gcls({
"pc-search-input-btn-transtion-a-big": _vm.big
}), _vm.gcls({

@@ -374,3 +374,3 @@ "pc-search-input-btn-transtion-a-unbig": !_vm.big

attrs: {
"input-class": _vm.m(_vm.gcls("mobile-search-input"), _vm.gcls({
"custom-class": _vm.m(_vm.gcls("mobile-search-input"), _vm.gcls({
"mobile-search-input-bg-change": _vm.changeBgColor

@@ -430,3 +430,3 @@ })),

}
}, [_vm._v(" 搜索 ")])], 1)], 1);
}, [_vm._v(_vm._s(_vm.t("ui.search.placeholder")))])], 1)], 1);
};

@@ -433,0 +433,0 @@ var staticRenderFns = [];

@@ -124,3 +124,3 @@ import { renderless, api } from "@opentiny/vue-renderless/search/vue";

return null;
return _vm.searchEnterKey($event);
return _vm.searchEnterKey.apply(null, arguments);
},

@@ -127,0 +127,0 @@ "change": _vm.handleChange,

{
"name": "@opentiny/vue-search",
"version": "2.10.1",
"version": "2.11.0-alpha.0",
"description": "",

@@ -10,10 +10,10 @@ "main": "./lib/index.js",

"dependencies": {
"@opentiny/vue-renderless": "~3.10.0",
"@opentiny/vue-common": "~2.10.0",
"@opentiny/vue-icon": "~2.10.0",
"@opentiny/vue-theme": "~3.10.0",
"@opentiny/vue-theme-mobile": "~3.10.0",
"@opentiny/vue-input": "~2.10.0",
"@opentiny/vue-locale": "~2.10.0",
"@opentiny/vue-button": "~2.10.0"
"@opentiny/vue-renderless": "~3.11.0",
"@opentiny/vue-common": "~2.11.0",
"@opentiny/vue-icon": "~2.11.0",
"@opentiny/vue-theme": "~3.11.0",
"@opentiny/vue-theme-mobile": "~3.11.0",
"@opentiny/vue-input": "~2.11.0",
"@opentiny/vue-locale": "~2.11.0",
"@opentiny/vue-button": "~2.11.0"
},

@@ -20,0 +20,0 @@ "license": "MIT",

@@ -1,2 +0,2 @@

declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api/dist/vue-composition-api.js").ShallowUnwrapRef<() => import("vue").VNode> & import("@vue/composition-api/dist/vue-composition-api.js").Data, {}, {}, {
export declare const ISearchProps: {
mini: {

@@ -35,3 +35,6 @@ type: BooleanConstructor;

};
modelValue: StringConstructor;
modelValue: {
type: StringConstructor;
default: string;
};
clearable: {

@@ -74,79 +77,4 @@ type: BooleanConstructor;

tiny_chart_theme: ObjectConstructor;
}, {
big: boolean;
tiny_mode_root: boolean;
transparent: boolean;
searchTypes: unknown[];
placeholder: string;
buttonText: string;
themeType: string;
isEnterSearch: boolean;
tabindex: string;
clearable: boolean;
mini: boolean;
showButton: boolean;
changeBgColor: boolean;
} & {
tiny_mode?: string | undefined;
tiny_template?: unknown;
tiny_renderless?: Function | undefined;
tiny_theme?: string | undefined;
tiny_chart_theme?: Record<string, any> | undefined;
modelValue?: string | undefined;
}> & import("vue").VueConstructor<import("vue").default> & (new (...args: any[]) => import("@vue/composition-api/dist/vue-composition-api.js").ComponentRenderProxy<{
big: boolean;
tiny_mode_root: boolean;
transparent: boolean;
searchTypes: unknown[];
placeholder: string;
buttonText: string;
themeType: string;
isEnterSearch: boolean;
tabindex: string;
clearable: boolean;
mini: boolean;
showButton: boolean;
changeBgColor: boolean;
} & {
tiny_mode?: string | undefined;
tiny_template?: unknown;
tiny_renderless?: Function | undefined;
tiny_theme?: string | undefined;
tiny_chart_theme?: Record<string, any> | undefined;
modelValue?: string | undefined;
}, import("@vue/composition-api/dist/vue-composition-api.js").ShallowUnwrapRef<() => import("vue").VNode>, import("@vue/composition-api/dist/vue-composition-api.js").Data, {}, {}, {
big: boolean;
tiny_mode_root: boolean;
transparent: boolean;
searchTypes: unknown[];
placeholder: string;
buttonText: string;
themeType: string;
isEnterSearch: boolean;
tabindex: string;
clearable: boolean;
mini: boolean;
showButton: boolean;
changeBgColor: boolean;
} & {
tiny_mode?: string | undefined;
tiny_template?: unknown;
tiny_renderless?: Function | undefined;
tiny_theme?: string | undefined;
tiny_chart_theme?: Record<string, any> | undefined;
modelValue?: string | undefined;
}, {
big: boolean;
transparent: boolean;
searchTypes: unknown[];
placeholder: string;
buttonText: string;
themeType: string;
isEnterSearch: boolean;
tabindex: string;
clearable: boolean;
mini: boolean;
showButton: boolean;
changeBgColor: boolean;
}, true>);
};
declare const _default: any;
export default _default;

@@ -1,30 +0,2 @@

declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api/dist/vue-composition-api.js").ShallowUnwrapRef<{
t: (this: any, path: any, options?: any) => any;
vm: any;
f: (props: any, attrs?: {}) => {};
a: (attrs: any, filters: any, include: any) => {};
d: (props: any) => void;
dp: (props: any) => void;
gcls: (key: any) => any;
m: (...cssClasses: any[]) => string;
}> & import("@vue/composition-api/dist/vue-composition-api.js").Data, {}, {}, Readonly<{
[x: string]: any;
}>, {
[x: string]: any;
} & {}> & import("vue").VueConstructor<import("vue").default> & (new (...args: any[]) => import("@vue/composition-api/dist/vue-composition-api.js").ComponentRenderProxy<{
[x: string]: any;
} & {}, import("@vue/composition-api/dist/vue-composition-api.js").ShallowUnwrapRef<{
t: (this: any, path: any, options?: any) => any;
vm: any;
f: (props: any, attrs?: {}) => {};
a: (attrs: any, filters: any, include: any) => {};
d: (props: any) => void;
dp: (props: any) => void;
gcls: (key: any) => any;
m: (...cssClasses: any[]) => string;
}>, import("@vue/composition-api/dist/vue-composition-api.js").Data, {}, {}, {
[x: string]: any;
} & {}, {
[x: string]: any;
}, true>);
declare const _default: any;
export default _default;

@@ -1,30 +0,2 @@

declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api/dist/vue-composition-api.js").ShallowUnwrapRef<{
t: (this: any, path: any, options?: any) => any;
vm: any;
f: (props: any, attrs?: {}) => {};
a: (attrs: any, filters: any, include: any) => {};
d: (props: any) => void;
dp: (props: any) => void;
gcls: (key: any) => any;
m: (...cssClasses: any[]) => string;
}> & import("@vue/composition-api/dist/vue-composition-api.js").Data, {}, {}, Readonly<{
[x: string]: any;
}>, {
[x: string]: any;
} & {}> & import("vue").VueConstructor<import("vue").default> & (new (...args: any[]) => import("@vue/composition-api/dist/vue-composition-api.js").ComponentRenderProxy<{
[x: string]: any;
} & {}, import("@vue/composition-api/dist/vue-composition-api.js").ShallowUnwrapRef<{
t: (this: any, path: any, options?: any) => any;
vm: any;
f: (props: any, attrs?: {}) => {};
a: (attrs: any, filters: any, include: any) => {};
d: (props: any) => void;
dp: (props: any) => void;
gcls: (key: any) => any;
m: (...cssClasses: any[]) => string;
}>, import("@vue/composition-api/dist/vue-composition-api.js").Data, {}, {}, {
[x: string]: any;
} & {}, {
[x: string]: any;
}, true>);
declare const _default: any;
export default _default;

@@ -1,30 +0,2 @@

declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api/dist/vue-composition-api.js").ShallowUnwrapRef<{
t: (this: any, path: any, options?: any) => any;
vm: any;
f: (props: any, attrs?: {}) => {};
a: (attrs: any, filters: any, include: any) => {};
d: (props: any) => void;
dp: (props: any) => void;
gcls: (key: any) => any;
m: (...cssClasses: any[]) => string;
}> & import("@vue/composition-api/dist/vue-composition-api.js").Data, {}, {}, Readonly<{
[x: string]: any;
}>, {
[x: string]: any;
} & {}> & import("vue").VueConstructor<import("vue").default> & (new (...args: any[]) => import("@vue/composition-api/dist/vue-composition-api.js").ComponentRenderProxy<{
[x: string]: any;
} & {}, import("@vue/composition-api/dist/vue-composition-api.js").ShallowUnwrapRef<{
t: (this: any, path: any, options?: any) => any;
vm: any;
f: (props: any, attrs?: {}) => {};
a: (attrs: any, filters: any, include: any) => {};
d: (props: any) => void;
dp: (props: any) => void;
gcls: (key: any) => any;
m: (...cssClasses: any[]) => string;
}>, import("@vue/composition-api/dist/vue-composition-api.js").Data, {}, {}, {
[x: string]: any;
} & {}, {
[x: string]: any;
}, true>);
declare const _default: any;
export default _default;
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc