@fvc/alert 1.0.0 → 1.1.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/lib/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import e from"react";import{Alert as r}from"antd";import{Icon as
|
|
1
|
+
import e from"react";import{Alert as r}from"antd";import{Icon as n}from"@fvc/icons";var t=function(){return t=Object.assign||function(e){for(var r,n=1,t=arguments.length;n<t;n++)for(var o in r=arguments[n])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e},t.apply(this,arguments)};function o(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}"function"==typeof SuppressedError&&SuppressedError;var a,c={exports:{}};
|
|
2
2
|
/*!
|
|
3
3
|
Copyright (c) 2018 Jed Watson.
|
|
4
4
|
Licensed under the MIT License (MIT), see
|
|
5
5
|
http://jedwatson.github.io/classnames
|
|
6
|
-
*/var
|
|
6
|
+
*/var l,i=o((a||(a=1,l=c,function(){var e={}.hasOwnProperty;function r(){for(var e="",r=0;r<arguments.length;r++){var o=arguments[r];o&&(e=t(e,n(o)))}return e}function n(n){if("string"==typeof n||"number"==typeof n)return n;if("object"!=typeof n)return"";if(Array.isArray(n))return r.apply(null,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var o="";for(var a in n)e.call(n,a)&&n[a]&&(o=t(o,a));return o}function t(e,r){return r?e?e+" "+r:e+r:e}l.exports?(r.default=r,l.exports=r):window.classNames=r}()),c.exports));!function(e,r){void 0===r&&(r={});var n=r.insertAt;if("undefined"!=typeof document){var t=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&t.firstChild?t.insertBefore(o,t.firstChild):t.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}(".fvc-alert {\n position: relative;\n display: flex;\n align-items: flex-start;\n width: 336px;\n padding: 16px;\n border-radius: 8px;\n outline: none;\n border: none;\n background-color: var(--gray-50);\n gap: 16px;\n}\n.fvc-alert .fvc-alert-message {\n font-family: Roboto, Arial, sans-serif;\n font-weight: 400;\n font-size: 16px;\n line-height: 20px;\n color: var(--body-text-color-1000);\n}\n.fvc-alert .fvc-alert-icon {\n margin-right: 0;\n}\n.fvc-alert-size-small {\n padding: 8px 16px 8px 8px;\n gap: 8px;\n}\n.fvc-alert-size-small .fvc-alert-message {\n font-size: 14px;\n line-height: 16px;\n color: var(--body-text-color-1000);\n}\n.fvc-alert-size-small .fvc-alert-icon {\n width: 20px;\n height: 20px;\n}\n.fvc-alert-block {\n width: 100%;\n}\n.fvc-alert-info {\n background-color: var(--gray-50);\n}\n.fvc-alert-info .fvc-alert-message {\n color: var(--body-text-color-1000);\n}\n.fvc-alert-success {\n background-color: var(--button-text-color-500);\n}\n.fvc-alert-success .fvc-alert-message {\n color: var(--white-text-color-0);\n}\n.fvc-alert-error {\n background-color: var(--red-800);\n}\n.fvc-alert-error .fvc-alert-message {\n color: var(--white-text-color-0);\n}\n.fvc-alert-warning {\n background-color: var(--orange-200);\n}\n.fvc-alert-warning .fvc-alert-message {\n color: var(--body-text-color-1000);\n}\n.fvc-alert .fvc-alert-close-icon {\n position: absolute;\n top: 4px;\n right: 4px;\n width: 16px;\n height: 16px;\n background-color: var(--blue-gray-900);\n border-radius: 50%;\n margin: 0;\n padding: 0;\n}\n.fvc-alert .fvc-alert-close-icon > span {\n width: 7px;\n height: 7px;\n}\n.fvc-alert .fvc-alert-close-icon > span > svg {\n color: var(--white-text-color-0);\n}");var s="fvc-alert",f=function(r,t){if(t)return t;switch(r){case"info":return e.createElement(n.Info,{color:"var(--gray-900)","aria-label":"alert-info-icon"});case"warning":return e.createElement(n.InfoFilled,{color:"var(--gray-900)","aria-label":"alert-warning-icon"});case"success":return e.createElement(n.Done,{color:"var(--white-text-color-0)","aria-label":"alert-success-icon"});case"error":return e.createElement(n.WarningAmber,{color:"var(--white-text-color-0)","aria-label":"alert-error-icon"});default:return e.createElement(n.Info,{color:"var(--gray-900)","aria-label":"alert-default-icon"})}},p=function(n){var o,a=n.block,c=void 0!==a&&a,l=n.className,p=n.type,v=n.icon,u=n.size,d=void 0===u?"medium":u,g=function(e,r){var n={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&r.indexOf(t)<0&&(n[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(t=Object.getOwnPropertySymbols(e);o<t.length;o++)r.indexOf(t[o])<0&&Object.prototype.propertyIsEnumerable.call(e,t[o])&&(n[t[o]]=e[t[o]])}return n}(n,["block","className","type","icon","size"]),m=i(s,((o={})["".concat(s,"-block")]=!!c,o["".concat(s,"-size-").concat(d)]=!!d,o),l);return e.createElement(r,t({},g,{className:m,prefixCls:s,type:p,icon:f(p,v)}))};export{p as Alert};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fvc/alert",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"main": "./dist/lib/index.js",
|
|
5
5
|
"types": "./dist/lib/alert/src/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
20
|
"scripts": {
|
|
21
|
-
"build": "rm -rf dist && eslint --config ../../eslint.config.js . && bunx tsc --noEmit && rollup -c ./rollup.config.mjs"
|
|
21
|
+
"build": "rm -rf dist && rm -rf .rollup.cache && eslint --config ../../eslint.config.js . && bunx tsc --noEmit && rollup -c ./rollup.config.mjs"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"react": "^18.0.0",
|