oasis-chat 0.0.1 → 0.0.3
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/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +7 -0
- package/dist/index.es.js +7 -8
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +6 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function i({label:n="클릭",className:o="",onClick:t}={}){const e=document.createElement("button");return e.type="button",e.className=["inline-flex items-center justify-center rounded-md","bg-blue-600 text-white","px-4 py-2 text-sm font-medium","shadow-sm hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500","disabled:opacity-50 disabled:cursor-not-allowed",o].filter(Boolean).join(" "),e.textContent=n,e.addEventListener("click",u=>{typeof t=="function"&&t(u)}),e}exports.createButton=i;
|
|
2
2
|
//# sourceMappingURL=index.cjs.js.map
|
package/dist/index.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs.js","sources":["../src/
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":["../src/index.js"],"sourcesContent":["export function createButton({ label = '클릭', className = '', onClick } = {}) {\n const button = document.createElement('button');\n button.type = 'button';\n button.className = [\n 'inline-flex items-center justify-center rounded-md',\n 'bg-blue-600 text-white',\n 'px-4 py-2 text-sm font-medium',\n 'shadow-sm hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500',\n 'disabled:opacity-50 disabled:cursor-not-allowed',\n className,\n ]\n .filter(Boolean)\n .join(' ');\n button.textContent = label;\n button.addEventListener('click', (e) => {\n if (typeof onClick === 'function') {\n onClick(e);\n }\n });\n return button;\n}\n"],"names":["createButton","label","className","onClick","button","e"],"mappings":"gFAAO,SAASA,EAAa,CAAE,MAAAC,EAAQ,KAAM,UAAAC,EAAY,GAAI,QAAAC,CAAO,EAAK,GAAI,CAC3E,MAAMC,EAAS,SAAS,cAAc,QAAQ,EAC9C,OAAAA,EAAO,KAAO,SACdA,EAAO,UAAY,CACjB,qDACA,yBACA,gCACA,kFACA,kDACAF,CACJ,EACK,OAAO,OAAO,EACd,KAAK,GAAG,EACXE,EAAO,YAAcH,EACrBG,EAAO,iBAAiB,QAAUC,GAAM,CAClC,OAAOF,GAAY,YACrBA,EAAQE,CAAC,CAEb,CAAC,EACMD,CACT"}
|
package/dist/index.d.ts
ADDED
package/dist/index.es.js
CHANGED
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
return t.type = "button", t.className = i(
|
|
1
|
+
function i({ label: n = "클릭", className: o = "", onClick: t } = {}) {
|
|
2
|
+
const e = document.createElement("button");
|
|
3
|
+
return e.type = "button", e.className = [
|
|
5
4
|
"inline-flex items-center justify-center rounded-md",
|
|
6
5
|
"bg-blue-600 text-white",
|
|
7
6
|
"px-4 py-2 text-sm font-medium",
|
|
8
7
|
"shadow-sm hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500",
|
|
9
8
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
10
9
|
o
|
|
11
|
-
),
|
|
12
|
-
typeof
|
|
13
|
-
}),
|
|
10
|
+
].filter(Boolean).join(" "), e.textContent = n, e.addEventListener("click", (u) => {
|
|
11
|
+
typeof t == "function" && t(u);
|
|
12
|
+
}), e;
|
|
14
13
|
}
|
|
15
14
|
export {
|
|
16
|
-
|
|
15
|
+
i as createButton
|
|
17
16
|
};
|
|
18
17
|
//# sourceMappingURL=index.es.js.map
|
package/dist/index.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es.js","sources":["../src/
|
|
1
|
+
{"version":3,"file":"index.es.js","sources":["../src/index.js"],"sourcesContent":["export function createButton({ label = '클릭', className = '', onClick } = {}) {\n const button = document.createElement('button');\n button.type = 'button';\n button.className = [\n 'inline-flex items-center justify-center rounded-md',\n 'bg-blue-600 text-white',\n 'px-4 py-2 text-sm font-medium',\n 'shadow-sm hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500',\n 'disabled:opacity-50 disabled:cursor-not-allowed',\n className,\n ]\n .filter(Boolean)\n .join(' ');\n button.textContent = label;\n button.addEventListener('click', (e) => {\n if (typeof onClick === 'function') {\n onClick(e);\n }\n });\n return button;\n}\n"],"names":["createButton","label","className","onClick","button","e"],"mappings":"AAAO,SAASA,EAAa,EAAE,OAAAC,IAAQ,MAAM,WAAAC,IAAY,IAAI,SAAAC,EAAO,IAAK,IAAI;AAC3E,QAAMC,IAAS,SAAS,cAAc,QAAQ;AAC9C,SAAAA,EAAO,OAAO,UACdA,EAAO,YAAY;AAAA,IACjB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACAF;AAAA,EACJ,EACK,OAAO,OAAO,EACd,KAAK,GAAG,GACXE,EAAO,cAAcH,GACrBG,EAAO,iBAAiB,SAAS,CAACC,MAAM;AACtC,IAAI,OAAOF,KAAY,cACrBA,EAAQE,CAAC;AAAA,EAEb,CAAC,GACMD;AACT;"}
|
package/dist/index.umd.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(e,t){typeof exports=="object"&&typeof module<"u"?t(exports
|
|
1
|
+
(function(e,t){typeof exports=="object"&&typeof module<"u"?t(exports):typeof define=="function"&&define.amd?define(["exports"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.OasisButton={}))})(this,(function(e){"use strict";function t({label:i="클릭",className:u="",onClick:o}={}){const n=document.createElement("button");return n.type="button",n.className=["inline-flex items-center justify-center rounded-md","bg-blue-600 text-white","px-4 py-2 text-sm font-medium","shadow-sm hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500","disabled:opacity-50 disabled:cursor-not-allowed",u].filter(Boolean).join(" "),n.textContent=i,n.addEventListener("click",s=>{typeof o=="function"&&o(s)}),n}e.createButton=t,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}));
|
|
2
2
|
//# sourceMappingURL=index.umd.js.map
|
package/dist/index.umd.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.umd.js","sources":["../src/
|
|
1
|
+
{"version":3,"file":"index.umd.js","sources":["../src/index.js"],"sourcesContent":["export function createButton({ label = '클릭', className = '', onClick } = {}) {\n const button = document.createElement('button');\n button.type = 'button';\n button.className = [\n 'inline-flex items-center justify-center rounded-md',\n 'bg-blue-600 text-white',\n 'px-4 py-2 text-sm font-medium',\n 'shadow-sm hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500',\n 'disabled:opacity-50 disabled:cursor-not-allowed',\n className,\n ]\n .filter(Boolean)\n .join(' ');\n button.textContent = label;\n button.addEventListener('click', (e) => {\n if (typeof onClick === 'function') {\n onClick(e);\n }\n });\n return button;\n}\n"],"names":["createButton","label","className","onClick","button","e"],"mappings":"oOAAO,SAASA,EAAa,CAAE,MAAAC,EAAQ,KAAM,UAAAC,EAAY,GAAI,QAAAC,CAAO,EAAK,GAAI,CAC3E,MAAMC,EAAS,SAAS,cAAc,QAAQ,EAC9C,OAAAA,EAAO,KAAO,SACdA,EAAO,UAAY,CACjB,qDACA,yBACA,gCACA,kFACA,kDACAF,CACJ,EACK,OAAO,OAAO,EACd,KAAK,GAAG,EACXE,EAAO,YAAcH,EACrBG,EAAO,iBAAiB,QAAUC,GAAM,CAClC,OAAOF,GAAY,YACrBA,EAAQE,CAAC,CAEb,CAAC,EACMD,CACT"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oasis-chat",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "Vanilla JS button component with no runtime deps.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"scripts": {
|
|
@@ -16,6 +16,10 @@
|
|
|
16
16
|
"dist",
|
|
17
17
|
"README.md"
|
|
18
18
|
],
|
|
19
|
+
"publishConfig": {
|
|
20
|
+
"access": "public",
|
|
21
|
+
"registry": "https://registry.npmjs.org/"
|
|
22
|
+
},
|
|
19
23
|
"main": "./dist/index.cjs.js",
|
|
20
24
|
"module": "./dist/index.es.js",
|
|
21
25
|
"types": "./dist/index.d.ts",
|
|
@@ -25,6 +29,7 @@
|
|
|
25
29
|
".": {
|
|
26
30
|
"import": "./dist/index.es.js",
|
|
27
31
|
"require": "./dist/index.cjs.js",
|
|
32
|
+
"types": "./dist/index.d.ts",
|
|
28
33
|
"default": "./dist/index.es.js"
|
|
29
34
|
}
|
|
30
35
|
},
|