@c1f/nf-alert 0.0.0-stage → 1.0.0-rc.1

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.
@@ -0,0 +1,2 @@
1
+ :root:not([data-nf-theme=oem]),[data-nf-theme=chalk],.nf-theme-chalk{--el-component-size:28px;--nf-color-primary:#17f;--nf-color-success:#67c23a;--nf-text-color:#303133;--nf-background-color:#fff;--el-color-primary:var(--nf-color-primary);--el-color-success:var(--nf-color-success);--el-text-color-primary:var(--nf-text-color);--el-bg-color:var(--nf-background-color)}:root:not([data-nf-theme=oem]) .el-button:not(.el-button--small):not(.el-button--large):not(.is-link),[data-nf-theme=chalk] .el-button:not(.el-button--small):not(.el-button--large):not(.is-link),.nf-theme-chalk .el-button:not(.el-button--small):not(.el-button--large):not(.is-link){height:var(--el-component-size);padding-top:6px;padding-bottom:6px}:root:not([data-nf-theme=oem]) .el-button:not(.el-button--small):not(.el-button--large):not(.is-link).is-circle,[data-nf-theme=chalk] .el-button:not(.el-button--small):not(.el-button--large):not(.is-link).is-circle,.nf-theme-chalk .el-button:not(.el-button--small):not(.el-button--large):not(.is-link).is-circle{width:var(--el-component-size);padding:6px}:root:not([data-nf-theme=oem]) .el-select:not(.el-select--small):not(.el-select--large)>.el-select__wrapper,[data-nf-theme=chalk] .el-select:not(.el-select--small):not(.el-select--large)>.el-select__wrapper,.nf-theme-chalk .el-select:not(.el-select--small):not(.el-select--large)>.el-select__wrapper{min-height:var(--el-component-size);padding-top:2px;padding-bottom:2px}:root:not([data-nf-theme=oem]) .el-input-tag:not(.el-input-tag--small):not(.el-input-tag--large),[data-nf-theme=chalk] .el-input-tag:not(.el-input-tag--small):not(.el-input-tag--large),.nf-theme-chalk .el-input-tag:not(.el-input-tag--small):not(.el-input-tag--large){--el-input-tag-padding:2px}:root:not([data-nf-theme=oem]) .el-cascader:not(.el-cascader--small):not(.el-cascader--large),[data-nf-theme=chalk] .el-cascader:not(.el-cascader--small):not(.el-cascader--large),.nf-theme-chalk .el-cascader:not(.el-cascader--small):not(.el-cascader--large){line-height:var(--el-component-size)}:root:not([data-nf-theme=oem]) .el-input-number:not(.el-input-number--small):not(.el-input-number--large),[data-nf-theme=chalk] .el-input-number:not(.el-input-number--small):not(.el-input-number--large),.nf-theme-chalk .el-input-number:not(.el-input-number--small):not(.el-input-number--large){line-height:calc(var(--el-component-size) - 2px)}:root:not([data-nf-theme=oem]) .el-input-number:not(.el-input-number--small):not(.el-input-number--large)>.el-input-number__increase,:root:not([data-nf-theme=oem]) .el-input-number:not(.el-input-number--small):not(.el-input-number--large)>.el-input-number__decrease,[data-nf-theme=chalk] .el-input-number:not(.el-input-number--small):not(.el-input-number--large)>.el-input-number__increase,[data-nf-theme=chalk] .el-input-number:not(.el-input-number--small):not(.el-input-number--large)>.el-input-number__decrease,.nf-theme-chalk .el-input-number:not(.el-input-number--small):not(.el-input-number--large)>.el-input-number__increase,.nf-theme-chalk .el-input-number:not(.el-input-number--small):not(.el-input-number--large)>.el-input-number__decrease{width:var(--el-component-size)}:root:not([data-nf-theme=oem]) .el-input-number:not(.el-input-number--small):not(.el-input-number--large) .el-input__wrapper,[data-nf-theme=chalk] .el-input-number:not(.el-input-number--small):not(.el-input-number--large) .el-input__wrapper,.nf-theme-chalk .el-input-number:not(.el-input-number--small):not(.el-input-number--large) .el-input__wrapper{padding-left:calc(var(--el-component-size) + 10px);padding-right:calc(var(--el-component-size) + 10px)}:root:not([data-nf-theme=oem]) .el-input-number:not(.el-input-number--small):not(.el-input-number--large).is-controls-right .el-input__wrapper,[data-nf-theme=chalk] .el-input-number:not(.el-input-number--small):not(.el-input-number--large).is-controls-right .el-input__wrapper,.nf-theme-chalk .el-input-number:not(.el-input-number--small):not(.el-input-number--large).is-controls-right .el-input__wrapper{padding-left:11px;padding-right:calc(var(--el-component-size) + 10px)}:root:not([data-nf-theme=oem]) .el-input-number:not(.el-input-number--small):not(.el-input-number--large).is-controls-right>.el-input-number__increase,:root:not([data-nf-theme=oem]) .el-input-number:not(.el-input-number--small):not(.el-input-number--large).is-controls-right>.el-input-number__decrease,[data-nf-theme=chalk] .el-input-number:not(.el-input-number--small):not(.el-input-number--large).is-controls-right>.el-input-number__increase,[data-nf-theme=chalk] .el-input-number:not(.el-input-number--small):not(.el-input-number--large).is-controls-right>.el-input-number__decrease,.nf-theme-chalk .el-input-number:not(.el-input-number--small):not(.el-input-number--large).is-controls-right>.el-input-number__increase,.nf-theme-chalk .el-input-number:not(.el-input-number--small):not(.el-input-number--large).is-controls-right>.el-input-number__decrease{--el-input-number-controls-height:calc((var(--el-component-size) - 2px) / 2)}:root:not([data-nf-theme=oem]) .el-input-number:not(.el-input-number--small):not(.el-input-number--large).is-without-controls .el-input__wrapper,[data-nf-theme=chalk] .el-input-number:not(.el-input-number--small):not(.el-input-number--large).is-without-controls .el-input__wrapper,.nf-theme-chalk .el-input-number:not(.el-input-number--small):not(.el-input-number--large).is-without-controls .el-input__wrapper{padding-left:11px;padding-right:11px}:root:not([data-nf-theme=oem]) .el-range-editor:not(.el-range-editor--small):not(.el-range-editor--large) .el-range-input,[data-nf-theme=chalk] .el-range-editor:not(.el-range-editor--small):not(.el-range-editor--large) .el-range-input,.nf-theme-chalk .el-range-editor:not(.el-range-editor--small):not(.el-range-editor--large) .el-range-input{height:calc(var(--el-component-size) - 2px);line-height:calc(var(--el-component-size) - 2px)}:root:not([data-nf-theme=oem]) .el-radio:not(.el-radio--small):not(.el-radio--large),:root:not([data-nf-theme=oem]) .el-switch:not(.el-switch--small):not(.el-switch--large),:root:not([data-nf-theme=oem]) .el-rate:not(.el-rate--small):not(.el-rate--large),:root:not([data-nf-theme=oem]) .el-slider:not(.el-slider--small):not(.el-slider--large):not(.is-vertical),[data-nf-theme=chalk] .el-radio:not(.el-radio--small):not(.el-radio--large),[data-nf-theme=chalk] .el-switch:not(.el-switch--small):not(.el-switch--large),[data-nf-theme=chalk] .el-rate:not(.el-rate--small):not(.el-rate--large),[data-nf-theme=chalk] .el-slider:not(.el-slider--small):not(.el-slider--large):not(.is-vertical),.nf-theme-chalk .el-radio:not(.el-radio--small):not(.el-radio--large),.nf-theme-chalk .el-switch:not(.el-switch--small):not(.el-switch--large),.nf-theme-chalk .el-rate:not(.el-rate--small):not(.el-rate--large),.nf-theme-chalk .el-slider:not(.el-slider--small):not(.el-slider--large):not(.is-vertical){height:var(--el-component-size)}:root:not([data-nf-theme=oem]) .el-checkbox:not(.el-checkbox--small):not(.el-checkbox--large),[data-nf-theme=chalk] .el-checkbox:not(.el-checkbox--small):not(.el-checkbox--large),.nf-theme-chalk .el-checkbox:not(.el-checkbox--small):not(.el-checkbox--large){--el-checkbox-height:var(--el-component-size)}:root:not([data-nf-theme=oem]) .el-radio-button:not(.el-radio-button--small):not(.el-radio-button--large)>.el-radio-button__inner,:root:not([data-nf-theme=oem]) .el-checkbox-button:not(.el-checkbox-button--small):not(.el-checkbox-button--large)>.el-checkbox-button__inner,[data-nf-theme=chalk] .el-radio-button:not(.el-radio-button--small):not(.el-radio-button--large)>.el-radio-button__inner,[data-nf-theme=chalk] .el-checkbox-button:not(.el-checkbox-button--small):not(.el-checkbox-button--large)>.el-checkbox-button__inner,.nf-theme-chalk .el-radio-button:not(.el-radio-button--small):not(.el-radio-button--large)>.el-radio-button__inner,.nf-theme-chalk .el-checkbox-button:not(.el-checkbox-button--small):not(.el-checkbox-button--large)>.el-checkbox-button__inner{height:var(--el-component-size);padding-top:6px;padding-bottom:6px}:root:not([data-nf-theme=oem]) .el-color-picker:not(.el-color-picker--small):not(.el-color-picker--large),[data-nf-theme=chalk] .el-color-picker:not(.el-color-picker--small):not(.el-color-picker--large),.nf-theme-chalk .el-color-picker:not(.el-color-picker--small):not(.el-color-picker--large){width:var(--el-component-size);height:var(--el-component-size)}:root:not([data-nf-theme=oem]) .el-segmented:not(.el-segmented--small):not(.el-segmented--large):not(.el-segmented--vertical),[data-nf-theme=chalk] .el-segmented:not(.el-segmented--small):not(.el-segmented--large):not(.el-segmented--vertical),.nf-theme-chalk .el-segmented:not(.el-segmented--small):not(.el-segmented--large):not(.el-segmented--vertical){min-height:var(--el-component-size)}:root:not([data-nf-theme=oem]) .el-pagination,[data-nf-theme=chalk] .el-pagination,.nf-theme-chalk .el-pagination{--el-pagination-button-width:var(--el-component-size);--el-pagination-button-height:var(--el-component-size)}:root:not([data-nf-theme=oem]) .el-form-item:not(.el-form-item--small):not(.el-form-item--large)>.el-form-item__content,[data-nf-theme=chalk] .el-form-item:not(.el-form-item--small):not(.el-form-item--large)>.el-form-item__content,.nf-theme-chalk .el-form-item:not(.el-form-item--small):not(.el-form-item--large)>.el-form-item__content{line-height:var(--el-component-size)}:root:not([data-nf-theme=oem]) .el-form-item:not(.el-form-item--small):not(.el-form-item--large):not(.el-form-item--label-top)>.el-form-item__label,:root:not([data-nf-theme=oem]) .el-form-item:not(.el-form-item--small):not(.el-form-item--large):not(.el-form-item--label-top)>.el-form-item__label-wrap>.el-form-item__label,[data-nf-theme=chalk] .el-form-item:not(.el-form-item--small):not(.el-form-item--large):not(.el-form-item--label-top)>.el-form-item__label,[data-nf-theme=chalk] .el-form-item:not(.el-form-item--small):not(.el-form-item--large):not(.el-form-item--label-top)>.el-form-item__label-wrap>.el-form-item__label,.nf-theme-chalk .el-form-item:not(.el-form-item--small):not(.el-form-item--large):not(.el-form-item--label-top)>.el-form-item__label,.nf-theme-chalk .el-form-item:not(.el-form-item--small):not(.el-form-item--large):not(.el-form-item--label-top)>.el-form-item__label-wrap>.el-form-item__label{height:var(--el-component-size);line-height:var(--el-component-size)}.nf-alert{box-sizing:border-box;opacity:1;background:#fff;border-radius:4px;align-items:center;width:100%;margin:0;padding:6px 12px;font-size:14px;transition:opacity .2s;display:flex;position:relative;overflow:hidden}.nf-alert.included-desc{padding:16px}.nf-alert.is-centered{justify-content:center}.nf-alert.is-closable .nf-alert__content{padding-right:28px}.nf-alert.is-light{color:#000000a6}.nf-alert.is-light .nf-alert__title,.nf-alert.is-light .is-big-title{color:#000000d9}.nf-alert.is-light .nf-alert__closebtn.is-customed{color:var(--nf-color-primary)}.nf-alert.nf-alert--success.is-light{background:#f0f9eb;border:1px solid #67c23a}.nf-alert.nf-alert--success.is-light .nf-alert__icon{color:#67c23a}.nf-alert.nf-alert--success.is-dark{background:#67c23a}.nf-alert.nf-alert--warning.is-light{background:#fdf6ec;border:1px solid #ff882e}.nf-alert.nf-alert--warning.is-light .nf-alert__icon{color:#ff882e}.nf-alert.nf-alert--warning.is-dark{background:#e6a23c}.nf-alert.nf-alert--error.is-light{background:#fef0f0;border:1px solid #f45959}.nf-alert.nf-alert--error.is-light .nf-alert__icon{color:#f45959}.nf-alert.nf-alert--error.is-dark{background:#f56c6c}.nf-alert.nf-alert--info.is-light{border:1px solid var(--nf-color-primary);background:#f4f4f5}.nf-alert.nf-alert--info.is-light .nf-alert__icon{color:var(--nf-color-primary)}.nf-alert.nf-alert--info.is-dark{background:#909399}.nf-alert.is-dark,.nf-alert.is-dark .nf-alert__icon{color:#fff}.nf-alert .nf-alert__content{overflow-wrap:anywhere;min-width:0;padding:0;line-height:22px}.nf-alert .nf-alert__heading{align-items:center;display:flex}.nf-alert .nf-alert__title{font-size:16px;font-weight:500;line-height:18px}.nf-alert .nf-alert__icon{fill:currentColor;flex-shrink:0;width:16px;height:16px;display:inline-block}.nf-alert .nf-alert__icon.is-big{width:24px;height:24px}.nf-alert .is-big-title{font-size:16px;font-weight:500}.nf-alert .nf-alert__description{font-size:14px;line-height:22px}.nf-alert .nf-alert__closebtn{min-width:16px;max-width:45%;height:16px;color:inherit;font:inherit;cursor:pointer;background:0 0;border:0;justify-content:center;align-items:center;margin:0;padding:0;font-size:16px;display:inline-flex;position:absolute;top:8px;right:12px}.nf-alert .nf-alert__closebtn:focus-visible{outline:2px solid var(--nf-color-primary);outline-offset:2px}.nf-alert .nf-alert__closebtn.is-customed{height:auto;font-size:13px;line-height:16px}.nf-alert .nf-alert__closebtn svg{fill:none;stroke:currentColor;stroke-width:2px;width:14px;height:14px}.nf-alert.included-desc .nf-alert__closebtn{top:12px;right:15px}.nf-alert-fade-enter-from,.nf-alert-fade-leave-to{opacity:0}.nf-alert-fade-enter-active,.nf-alert-fade-leave-active{transition:opacity .2s}@media (prefers-reduced-motion:reduce){.nf-alert,.nf-alert-fade-enter-active,.nf-alert-fade-leave-active{transition:none}}
2
+ /*$vite$:1*/
@@ -0,0 +1,100 @@
1
+ import { type PropType } from 'vue';
2
+ import type { AlertEffect, AlertType } from './types';
3
+ type __VLS_Slots = {
4
+ default?(): unknown;
5
+ title?(): unknown;
6
+ close?(props: {
7
+ close: () => void;
8
+ }): unknown;
9
+ };
10
+ declare function close(): void;
11
+ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
12
+ title: {
13
+ type: StringConstructor;
14
+ default: string;
15
+ };
16
+ description: {
17
+ type: StringConstructor;
18
+ default: string;
19
+ };
20
+ type: {
21
+ type: PropType<AlertType>;
22
+ default: string;
23
+ };
24
+ closable: {
25
+ type: BooleanConstructor;
26
+ default: boolean;
27
+ };
28
+ closeText: {
29
+ type: StringConstructor;
30
+ default: string;
31
+ };
32
+ showIcon: {
33
+ type: BooleanConstructor;
34
+ default: boolean;
35
+ };
36
+ center: {
37
+ type: BooleanConstructor;
38
+ default: boolean;
39
+ };
40
+ effect: {
41
+ type: PropType<AlertEffect>;
42
+ default: string;
43
+ };
44
+ }>, {
45
+ close: typeof close;
46
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
47
+ close: () => any;
48
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
49
+ title: {
50
+ type: StringConstructor;
51
+ default: string;
52
+ };
53
+ description: {
54
+ type: StringConstructor;
55
+ default: string;
56
+ };
57
+ type: {
58
+ type: PropType<AlertType>;
59
+ default: string;
60
+ };
61
+ closable: {
62
+ type: BooleanConstructor;
63
+ default: boolean;
64
+ };
65
+ closeText: {
66
+ type: StringConstructor;
67
+ default: string;
68
+ };
69
+ showIcon: {
70
+ type: BooleanConstructor;
71
+ default: boolean;
72
+ };
73
+ center: {
74
+ type: BooleanConstructor;
75
+ default: boolean;
76
+ };
77
+ effect: {
78
+ type: PropType<AlertEffect>;
79
+ default: string;
80
+ };
81
+ }>> & Readonly<{
82
+ onClose?: (() => any) | undefined;
83
+ }>, {
84
+ title: string;
85
+ description: string;
86
+ type: AlertType;
87
+ closable: boolean;
88
+ closeText: string;
89
+ showIcon: boolean;
90
+ center: boolean;
91
+ effect: AlertEffect;
92
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
93
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
94
+ declare const _default: typeof __VLS_export;
95
+ export default _default;
96
+ type __VLS_WithSlots<T, S> = T & {
97
+ new (): {
98
+ $slots: S;
99
+ };
100
+ };
@@ -0,0 +1,7 @@
1
+ import type NfAlert from './alert.vue';
2
+ declare module 'vue' {
3
+ interface GlobalComponents {
4
+ NfAlert: typeof NfAlert;
5
+ }
6
+ }
7
+ export {};
@@ -0,0 +1,8 @@
1
+ import type { Plugin } from 'vue';
2
+ import Alert from './alert.vue';
3
+ import './global';
4
+ import './style/index.scss';
5
+ export declare const NfAlert: typeof Alert & Plugin;
6
+ export type { AlertProps, AlertType, AlertEffect, AlertInstance } from './types';
7
+ export type NfAlertComponent = typeof Alert;
8
+ export default NfAlert;
@@ -0,0 +1,17 @@
1
+ export type AlertType = 'success' | 'warning' | 'info' | 'error';
2
+ export type AlertEffect = 'light' | 'dark';
3
+ export interface AlertProps {
4
+ /** Trusted HTML only; use the title slot for untrusted text. */
5
+ title?: string;
6
+ /** Trusted HTML only; the default slot takes precedence. */
7
+ description?: string;
8
+ type?: AlertType;
9
+ closable?: boolean;
10
+ closeText?: string;
11
+ showIcon?: boolean;
12
+ center?: boolean;
13
+ effect?: AlertEffect;
14
+ }
15
+ export interface AlertInstance {
16
+ close(): void;
17
+ }
package/package.json CHANGED
@@ -1,6 +1,59 @@
1
1
  {
2
2
  "name": "@c1f/nf-alert",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.0.0-rc.1",
4
+ "license": "MIT",
5
+ "homepage": "",
6
+ "keywords": [],
7
+ "bugs": {
8
+ "url": ""
9
+ },
10
+ "description": "Vue 3 alert with legacy appearance, four semantic types and dual themes",
11
+ "type": "module",
12
+ "repository": "",
13
+ "main": "./dist/cjs/index.cjs",
14
+ "module": "./dist/es/index.mjs",
15
+ "browser": "./dist/browser/index.js",
16
+ "types": "./dist/types/index.d.ts",
17
+ "style": "./dist/style/index.css",
18
+ "files": [
19
+ "dist",
20
+ "README.md",
21
+ "LICENSE"
22
+ ],
23
+ "sideEffects": [
24
+ "**/*.css",
25
+ "**/*.scss"
26
+ ],
27
+ "exports": {
28
+ ".": {
29
+ "types": "./dist/types/index.d.ts",
30
+ "browser": "./dist/browser/index.js",
31
+ "import": "./dist/es/index.mjs",
32
+ "require": "./dist/cjs/index.cjs"
33
+ },
34
+ "./browser": {
35
+ "import": "./dist/browser/index.js",
36
+ "require": "./dist/browser/index.umd.js"
37
+ },
38
+ "./style": "./dist/style/index.css",
39
+ "./style.css": "./dist/style/index.css",
40
+ "./global": "./dist/types/global.d.ts"
41
+ },
42
+ "dependencies": {
43
+ "@c1f/common-locale": "^1.0.0-rc.1",
44
+ "@c1f/nf-theme-chalk": "^1.0.0-rc.1"
45
+ },
46
+ "peerDependencies": {
47
+ "element-plus": "^2.14.7",
48
+ "vue": "^3.5.44"
49
+ },
50
+ "peerDependenciesMeta": {
51
+ "element-plus": {
52
+ "optional": true
53
+ }
54
+ },
55
+ "publishConfig": {
56
+ "access": "public"
57
+ },
58
+ "gitHead": "13e882c3b13939395ee8879b953de2b86451a7b9"
59
+ }