@well-insight/ui 0.1.5 → 0.1.6
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/CHANGELOG.md +6 -0
- package/README.md +21 -2
- package/README.zh-CN.md +22 -3
- package/dist/component-registry.d.ts +5 -0
- package/dist/component-registry.d.ts.map +1 -0
- package/dist/components/AutoComplete/AutoComplete.vue.d.ts +3 -3
- package/dist/components/Button/Button.vue.d.ts +3 -3
- package/dist/components/CascadeSelect/CascadeSelect.vue.d.ts +2 -2
- package/dist/components/Checkbox/Checkbox.vue.d.ts +2 -2
- package/dist/components/ConfirmDialog/ConfirmDialog.vue.d.ts +2 -2
- package/dist/components/ConfirmPopup/ConfirmPopup.vue.d.ts +4 -4
- package/dist/components/DatePicker/DatePicker.vue.d.ts +4 -4
- package/dist/components/Dialog/Dialog.vue.d.ts +4 -4
- package/dist/components/Dock/Dock.vue.d.ts +1 -1
- package/dist/components/Drawer/Drawer.vue.d.ts +2 -2
- package/dist/components/Dropdown/Dropdown.vue.d.ts +2 -2
- package/dist/components/FileUpload/FileUpload.vue.d.ts +5 -5
- package/dist/components/Inplace/Inplace.vue.d.ts +1 -1
- package/dist/components/Input/Input.vue.d.ts +6 -6
- package/dist/components/InputColor/InputColor.vue.d.ts +1 -1
- package/dist/components/InputNumber/InputNumber.vue.d.ts +2 -2
- package/dist/components/InputOtp/InputOtp.vue.d.ts +1 -1
- package/dist/components/InputPassword/InputPassword.vue.d.ts +2 -2
- package/dist/components/InputTags/InputTags.vue.d.ts +1 -1
- package/dist/components/Knob/Knob.vue.d.ts +2 -2
- package/dist/components/Listbox/Listbox.vue.d.ts +1 -1
- package/dist/components/Pagination/Pagination.vue.d.ts +3 -3
- package/dist/components/ProgressBar/ProgressBar.vue.d.ts +1 -1
- package/dist/components/Radio/Radio.vue.d.ts +1 -1
- package/dist/components/Rating/Rating.vue.d.ts +1 -1
- package/dist/components/Select/Select.vue.d.ts +7 -7
- package/dist/components/SelectButton/SelectButton.vue.d.ts +1 -1
- package/dist/components/Slider/Slider.vue.d.ts +1 -1
- package/dist/components/SpeedDial/SpeedDial.vue.d.ts +1 -1
- package/dist/components/SplitButton/SplitButton.vue.d.ts +1 -1
- package/dist/components/Switch/Switch.vue.d.ts +2 -2
- package/dist/components/Table/Table.vue.d.ts +7 -7
- package/dist/components/Tabs/Tabs.vue.d.ts +2 -2
- package/dist/components/Textarea/Textarea.vue.d.ts +4 -4
- package/dist/components/ToggleButton/ToggleButton.vue.d.ts +1 -1
- package/dist/components/Tree/Tree.vue.d.ts +4 -4
- package/dist/components/Tree/Tree.vue.d.ts.map +1 -1
- package/dist/components/TreeSelect/TreeSelect.vue.d.ts +2 -2
- package/dist/components/TreeSelect/TreeSelectNodeItem.vue.d.ts +2 -2
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6809 -6706
- package/dist/shared/config.d.ts +34 -7
- package/dist/shared/config.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/shared/config.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { App, InjectionKey, MaybeRefOrGetter, ComputedRef } from 'vue';
|
|
1
|
+
import { App, Component, InjectionKey, MaybeRefOrGetter, Plugin, ComputedRef } from 'vue';
|
|
2
2
|
import { WiLocaleConfig } from '../locale/types';
|
|
3
3
|
import { DensityPreference } from '../theme';
|
|
4
4
|
import { WiAppendTo } from './overlay';
|
|
@@ -23,29 +23,56 @@ export interface WiGlobalConfig {
|
|
|
23
23
|
/** Shared UI copy. Pass `zhCN` / `enUS` or a partial override. Default is Chinese. */
|
|
24
24
|
locale?: WiLocaleConfig;
|
|
25
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* Options for `app.use(WellInsight, options)` / `createWellInsight(options)`.
|
|
28
|
+
*
|
|
29
|
+
* By default every public component is registered globally.
|
|
30
|
+
* Pass `components: false` to only install config, or pass a list for partial registration.
|
|
31
|
+
*/
|
|
32
|
+
export interface WiInstallerOptions extends WiGlobalConfig {
|
|
33
|
+
/**
|
|
34
|
+
* Components to register globally.
|
|
35
|
+
* - omit / `undefined`: register all
|
|
36
|
+
* - `false` / `[]`: register none (config only)
|
|
37
|
+
* - `Component[]`: register the given components (matched by registry name)
|
|
38
|
+
*/
|
|
39
|
+
components?: Component[] | false;
|
|
40
|
+
}
|
|
26
41
|
export declare const WI_CONFIG_KEY: InjectionKey<MaybeRefOrGetter<WiGlobalConfig>>;
|
|
27
42
|
export declare function getDefaultWiConfig(): WiGlobalConfig;
|
|
28
43
|
export declare function provideWiConfig(config: MaybeRefOrGetter<WiGlobalConfig>): void;
|
|
29
44
|
export declare function useWiConfig(): ComputedRef<WiGlobalConfig>;
|
|
30
45
|
/** Resolve overlay mount target: local props > ConfigProvider > body. */
|
|
31
46
|
export declare function resolveConfiguredAppendTo(local: WiAppendTo | undefined, configAppendTo: WiAppendTo | undefined): WiAppendTo;
|
|
47
|
+
/** Shared install used by `createWellInsight` and the default plugin. */
|
|
48
|
+
export declare function installWellInsight(app: App, options?: WiInstallerOptions): void;
|
|
32
49
|
/**
|
|
33
|
-
* Vue plugin entry
|
|
50
|
+
* Vue plugin entry: global defaults + full component registration.
|
|
34
51
|
*
|
|
35
52
|
* @example
|
|
36
53
|
* ```ts
|
|
37
54
|
* import { createApp } from 'vue'
|
|
38
55
|
* import { createWellInsight } from '@well-insight/ui'
|
|
56
|
+
* import '@well-insight/ui/styles.css'
|
|
39
57
|
*
|
|
40
|
-
* createApp(App).use(createWellInsight({
|
|
58
|
+
* createApp(App).use(createWellInsight({ size: 'small', density: 'compact' })).mount('#app')
|
|
59
|
+
* // templates can use <WiButton> without importing
|
|
41
60
|
* ```
|
|
61
|
+
*
|
|
62
|
+
* Config only (no global components):
|
|
63
|
+
* ```ts
|
|
64
|
+
* createWellInsight({ size: 'small', components: false })
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
67
|
+
export declare function createWellInsight(options?: WiInstallerOptions): Plugin;
|
|
68
|
+
/**
|
|
69
|
+
* Default plugin:
|
|
70
|
+
* `app.use(WellInsight)` or `app.use(WellInsight, { size: 'small' })`.
|
|
42
71
|
*/
|
|
43
|
-
export declare
|
|
44
|
-
install(app: App): void;
|
|
45
|
-
};
|
|
72
|
+
export declare const WellInsight: Plugin;
|
|
46
73
|
declare module 'vue' {
|
|
47
74
|
interface ComponentCustomProperties {
|
|
48
|
-
$
|
|
75
|
+
$wi?: WiGlobalConfig;
|
|
49
76
|
}
|
|
50
77
|
}
|
|
51
78
|
//# sourceMappingURL=config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/shared/config.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/shared/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,GAAG,EACR,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,MAAM,EAEZ,MAAM,KAAK,CAAA;AAGZ,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AACrD,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AAE3C,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAE1D,MAAM,MAAM,SAAS,GAAG,iBAAiB,CAAA;AACzC,YAAY,EAAE,cAAc,EAAE,CAAA;AAE9B,+CAA+C;AAC/C,MAAM,WAAW,cAAc;IAC7B,kEAAkE;IAClE,QAAQ,CAAC,EAAE,UAAU,CAAA;IACrB,oEAAoE;IACpE,IAAI,CAAC,EAAE,WAAW,CAAA;IAClB,mCAAmC;IACnC,YAAY,CAAC,EAAE,cAAc,CAAA;IAC7B,4EAA4E;IAC5E,MAAM,CAAC,EAAE,MAAM,CAAA;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