@deck9/ui 0.3.3 → 0.4.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.
Files changed (56) hide show
  1. package/dist/index.es.js +1 -0
  2. package/dist/index.umd.js +1 -0
  3. package/dist/src/Button/Button.vue.d.ts +111 -0
  4. package/dist/{Button → src/Button}/index.d.ts +0 -0
  5. package/dist/src/Checkbox/Checkbox.vue.d.ts +42 -0
  6. package/dist/{Checkbox → src/Checkbox}/index.d.ts +0 -0
  7. package/dist/src/Icon/Icon.vue.d.ts +20 -0
  8. package/dist/{Icon → src/Icon}/index.d.ts +0 -0
  9. package/dist/{Icon → src/Icon}/registerIcons.d.ts +0 -0
  10. package/dist/src/Input/Input.vue.d.ts +90 -0
  11. package/dist/{Input → src/Input}/index.d.ts +0 -0
  12. package/dist/src/Label/Label.vue.d.ts +23 -0
  13. package/dist/{Label → src/Label}/index.d.ts +0 -0
  14. package/dist/src/env.d.ts +8 -0
  15. package/dist/{index.d.ts → src/index.d.ts} +0 -0
  16. package/{src/types.ts → dist/src/types.d.ts} +0 -0
  17. package/package.json +30 -44
  18. package/.editorconfig +0 -5
  19. package/.eslintrc.js +0 -25
  20. package/.github/workflows/release-package.yml +0 -18
  21. package/.storybook/main.ts +0 -38
  22. package/.storybook/preview.ts +0 -39
  23. package/babel.config.js +0 -3
  24. package/dist/types.d.ts +0 -5
  25. package/dist/ui.es.js +0 -21
  26. package/dist/ui.umd.js +0 -21
  27. package/postcss.config.js +0 -6
  28. package/public/favicon.ico +0 -0
  29. package/public/fonts/Inter.var.woff2 +0 -0
  30. package/public/fonts/Recursive_VF_1.078--subset-GF_latin_basic.woff2 +0 -0
  31. package/public/index.html +0 -17
  32. package/src/Button/Button.stories.ts +0 -85
  33. package/src/Button/Button.vue +0 -126
  34. package/src/Button/index.ts +0 -1
  35. package/src/Checkbox/Checkbox.stories.ts +0 -34
  36. package/src/Checkbox/Checkbox.vue +0 -48
  37. package/src/Checkbox/index.ts +0 -1
  38. package/src/Icon/Icon.stories.ts +0 -47
  39. package/src/Icon/Icon.vue +0 -33
  40. package/src/Icon/IconCollection.vue +0 -29
  41. package/src/Icon/index.ts +0 -3
  42. package/src/Icon/registerIcons.ts +0 -37
  43. package/src/Icons.stories.mdx +0 -24
  44. package/src/Input/Input.stories.ts +0 -58
  45. package/src/Input/Input.vue +0 -75
  46. package/src/Input/index.ts +0 -1
  47. package/src/Label/Label.stories.ts +0 -14
  48. package/src/Label/Label.vue +0 -16
  49. package/src/Label/index.ts +0 -1
  50. package/src/Typography.stories.mdx +0 -51
  51. package/src/index.ts +0 -5
  52. package/src/shims-vue.d.ts +0 -6
  53. package/styles/app.less +0 -16
  54. package/tailwind.config.js +0 -50
  55. package/tsconfig.json +0 -42
  56. package/vite.config.ts +0 -35
@@ -0,0 +1 @@
1
+ var e=Object.defineProperty,r=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable,n=(r,t,i)=>t in r?e(r,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):r[t]=i,a=(e,a)=>{for(var o in a||(a={}))t.call(a,o)&&n(e,o,a[o]);if(r)for(var o of r(a))i.call(a,o)&&n(e,o,a[o]);return e};import{defineComponent as o,computed as l,unref as s,openBlock as d,createBlock as u,mergeProps as c,createCommentVNode as p,createElementBlock as f,normalizeClass as g,createElementVNode as y,toDisplayString as m,createVNode as b}from"vue";import{FontAwesomeIcon as v}from"@fortawesome/vue-fontawesome";import{library as x}from"@fortawesome/fontawesome-svg-core";import*as h from"@fortawesome/free-solid-svg-icons";x.add(h.faChartPie,h.faCheck,h.faCheckCircle,h.faChevronDown,h.faChevronLeft,h.faChevronRight,h.faChevronUp,h.faCircleNotch,h.faClipboard,h.faCog,h.faDoorOpen,h.faEllipsisH,h.faEnvelope,h.faExclamationTriangle,h.faFingerprint,h.faGlobe,h.faHandPointRight,h.faInfoCircle,h.faPencilAlt,h.faPlayCircle,h.faPlus,h.faPlusCircle,h.faRobot,h.faSave,h.faShieldAlt,h.faTimes,h.faTrash,h.faUser,h.faUserShield);var k=[...Object.keys(x.definitions.fas)].sort();const C=o({props:{name:{type:String,required:!0,default:"user"}},setup(e){const r=e,t=l((()=>!!k.includes(r.name)||(console.warn("could not load icon, because it is not available",r.name),!1)));return(r,i)=>s(t)?(d(),u(s(v),c({key:0,icon:["fas",e.name]},r.$attrs),null,16,["icon"])):p("",!0)}}),q=["aria-label","tabindex"],w={key:0,class:"absolute inset-0 flex items-center justify-center"},S=o({props:{label:{type:String,required:!0},size:{type:null,required:!1,default:"medium"},type:{type:null,required:!1,default:"primary"},isLoading:{type:Boolean,required:!1,default:!1},isDisabled:{type:Boolean,required:!1,default:!1},icon:{type:String,required:!1},iconPosition:{type:null,required:!1,default:"right"}},emits:["onClick"],setup(e,{emit:r}){const t=e,i=l((()=>{const e={"text-white bg-blue-600 border-transparent hover:bg-blue-700 active:bg-blue-700 dark:ring-blue-800 ring-offset-2 dark:ring-offset-grey-900":"primary"===t.type,"text-blue-600 bg-grey-100 border-transparent hover:bg-blue-100 hover:text-blue-700 active:bg-grey-100 ring-blue-300 ring-offset-2 dark:ring-offset-grey-900":"light"===t.type,"text-grey-50 bg-grey-700 border-transparent hover:bg-grey-800 active:bg-grey-700 ring-grey-500 dark:ring-grey-400 dark:ring-opacity-50 ring-offset-2 dark:ring-offset-grey-900":"dark"===t.type},r={"pointer-events-none opacity-75 cursor-not-allowed":t.isDisabled},i={"px-4 py-1 text-xs leading-5 mono-100 rounded-lg":"small"===t.size,"px-5 py-2 text-sm leading-4 font-medium rounded-lg":"medium"===t.size,"px-8 py-3 text-base leading-6 font-medium rounded-lg":"large"===t.size};return a(a(a({},e),r),i)})),n=l((()=>{const e={"mr-2 -ml-1":["small","medium"].includes(t.size)&&"left"===t.iconPosition,"mr-4 -ml-2":["large"].includes(t.size)&&"left"===t.iconPosition},r={"ml-3 -mr-1":["small","medium"].includes(t.size)&&"right"===t.iconPosition,"ml-3 -mr-3":["large"].includes(t.size)&&"right"===t.iconPosition},i={"text-white":"primary"===t.type,"text-blue-600":"light"===t.type,"text-grey-50":"dark"===t.type};return a(a(a({},e),r),i)}));function o(){t.isDisabled||r("onClick")}return(r,t)=>(d(),f("button",{class:g(["relative inline-flex items-center focus:outline-none focus:ring active:ring transition duration-150 ease-in-out",s(i)]),type:"button","aria-label":e.label,tabindex:e.isDisabled?"-1":void 0,onClick:o},[y("div",{class:g(!e.isLoading||"invisible")},[e.icon&&"left"===e.iconPosition?(d(),u(C,{key:0,name:e.icon,class:g(s(n))},null,8,["name","class"])):p("",!0),y("span",null,m(e.label),1),e.icon&&"right"===e.iconPosition?(d(),u(C,{key:1,name:e.icon,class:g(s(n))},null,8,["name","class"])):p("",!0)],2),e.isLoading?(d(),f("span",w,[b(C,{class:"animate-spin",name:"circle-notch"})])):p("",!0)],10,q))}});var z,P=new Uint8Array(16);function D(){if(!z&&!(z="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return z(P)}var j=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function I(e){return"string"==typeof e&&j.test(e)}for(var O=[],R=0;R<256;++R)O.push((R+256).toString(16).substr(1));const V={class:"relative flex items-start"},B={class:"flex items-center h-5"},E=["checked","id"],L={class:"ml-2 text-sm leading-5"},U=["for"],T={key:0,class:"text-grey-700 dark:text-grey-400 mono-0 casual-60"},A=o({props:{id:{type:String,required:!1,default:function(e,r,t){var i=(e=e||{}).random||(e.rng||D)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,r){t=t||0;for(var n=0;n<16;++n)r[t+n]=i[n];return r}return function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=(O[e[r+0]]+O[e[r+1]]+O[e[r+2]]+O[e[r+3]]+"-"+O[e[r+4]]+O[e[r+5]]+"-"+O[e[r+6]]+O[e[r+7]]+"-"+O[e[r+8]]+O[e[r+9]]+"-"+O[e[r+10]]+O[e[r+11]]+O[e[r+12]]+O[e[r+13]]+O[e[r+14]]+O[e[r+15]]).toLowerCase();if(!I(t))throw TypeError("Stringified UUID is invalid");return t}(i)}()},label:{type:String,required:!0},modelValue:{type:Boolean,required:!0},description:{type:String,required:!1},checked:{type:Boolean,required:!1}},emits:["update:modelValue"],setup:e=>(r,t)=>(d(),f("div",V,[y("div",B,[y("input",{class:"h-4 w-4 border-grey-600 dark:text-blue-500 dark:border-grey-300 dark:checked:border-blue-500 dark:focus:ring-blue-900 dark:focus:ring-offset-grey-800 rounded-sm",type:"checkbox",checked:e.modelValue,id:e.id},null,8,E)]),y("div",L,[y("label",{for:e.id,class:"font-medium text-grey-900 dark:text-grey-200 casual-25"},m(e.label),9,U),e.description?(d(),f("p",T,m(e.description),1)):p("",!0)])]))}),H={class:"relative"},$=["placeholder","type","tabindex"],F=o({props:{type:{type:String,required:!0,default:"text"},placeholder:{type:String,required:!1},size:{type:null,required:!1,default:"medium"},icon:{type:String,required:!1},isDisabled:{type:Boolean,required:!1,default:!1}},emits:["onInput"],setup(e,{emit:r}){const t=e,i=l((()=>({"px-3 py-1 rounded font-normal":"small"===t.size,"px-4 py-3 rounded font-normal":"medium"===t.size,"px-6 py-3 rounded font-normal":"large"===t.size,"pl-10":t.icon&&"small"===t.size,"pl-12":t.icon&&("medium"===t.size||"large"===t.size)}))),n=l((()=>({"pointer-events-none opacity-50 cursor-not-allowed":t.isDisabled}))),o=l((()=>({"text-xs leading-4":"small"===t.size,"text-sm leading-4":"medium"===t.size,"text-base leading-4":"large"===t.size}))),u=function(e){r("onInput",(null==e?void 0:e.target).value)};return(r,t)=>(d(),f("div",H,[y("input",{class:g(["mono-50 bg-grey-50 text-grey-800 placeholder-grey-600 border-grey-300 dark:bg-grey-800 dark:text-grey-100 dark:placeholder-grey-400 dark:border-grey-700 focus:border-blue-400 focus:ring-blue-400 dark:focus:border-blue-800 dark:focus:ring-blue-800",a(a(a({},s(i)),s(o)),s(n))]),placeholder:e.placeholder,type:e.type,tabindex:e.isDisabled?"-1":void 0,onInput:u},null,42,$),e.icon?(d(),f("span",{key:0,class:g(["absolute left-0 inset-y-0 inline-flex items-center justify-center text-grey-700 dark:text-grey-100 px-4",s(o)])},[b(C,{name:e.icon},null,8,["name"])],2)):p("",!0)]))}}),G={class:"inline-block text-blue-900 text-sm font-medium"},N=["for"],J={key:0},K=o({props:{id:{type:String,required:!0},label:{type:String,required:!0},description:{type:String,required:!0}},setup:e=>(r,t)=>(d(),f("span",G,[y("label",{for:e.id},m(e.label),9,N),e.description?(d(),f("span",J,m(e.description),1)):p("",!0)]))});export{S as D9Button,A as D9Checkbox,C as D9Icon,F as D9Input,K as D9Label,k as icons};
@@ -0,0 +1 @@
1
+ var __defProp=Object.defineProperty,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,r,t)=>r in e?__defProp(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,__spreadValues=(e,r)=>{for(var t in r||(r={}))__hasOwnProp.call(r,t)&&__defNormalProp(e,t,r[t]);if(__getOwnPropSymbols)for(var t of __getOwnPropSymbols(r))__propIsEnum.call(r,t)&&__defNormalProp(e,t,r[t]);return e};!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("vue"),require("@fortawesome/vue-fontawesome"),require("@fortawesome/fontawesome-svg-core"),require("@fortawesome/free-solid-svg-icons")):"function"==typeof define&&define.amd?define(["exports","vue","@fortawesome/vue-fontawesome","@fortawesome/fontawesome-svg-core","@fortawesome/free-solid-svg-icons"],r):r((e="undefined"!=typeof globalThis?globalThis:e||self).ui={},e.Vue,e.vueFontawesome,e.fontawesomeSvgCore,e.fasIcons)}(this,(function(e,r,t,o,n){"use strict";function a(e){if(e&&e.__esModule)return e;var r={__proto__:null,[Symbol.toStringTag]:"Module"};return e&&Object.keys(e).forEach((function(t){if("default"!==t){var o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,o.get?o:{enumerable:!0,get:function(){return e[t]}})}})),r.default=e,Object.freeze(r)}var i=a(n);o.library.add(i.faChartPie,i.faCheck,i.faCheckCircle,i.faChevronDown,i.faChevronLeft,i.faChevronRight,i.faChevronUp,i.faCircleNotch,i.faClipboard,i.faCog,i.faDoorOpen,i.faEllipsisH,i.faEnvelope,i.faExclamationTriangle,i.faFingerprint,i.faGlobe,i.faHandPointRight,i.faInfoCircle,i.faPencilAlt,i.faPlayCircle,i.faPlus,i.faPlusCircle,i.faRobot,i.faSave,i.faShieldAlt,i.faTimes,i.faTrash,i.faUser,i.faUserShield);var l=[...Object.keys(o.library.definitions.fas)].sort();const s=r.defineComponent({props:{name:{type:String,required:!0,default:"user"}},setup(e){const o=e,n=r.computed((()=>!!l.includes(o.name)||(console.warn("could not load icon, because it is not available",o.name),!1)));return(o,a)=>r.unref(n)?(r.openBlock(),r.createBlock(r.unref(t.FontAwesomeIcon),r.mergeProps({key:0,icon:["fas",e.name]},o.$attrs),null,16,["icon"])):r.createCommentVNode("",!0)}}),d=["aria-label","tabindex"],u={key:0,class:"absolute inset-0 flex items-center justify-center"},c=r.defineComponent({props:{label:{type:String,required:!0},size:{type:null,required:!1,default:"medium"},type:{type:null,required:!1,default:"primary"},isLoading:{type:Boolean,required:!1,default:!1},isDisabled:{type:Boolean,required:!1,default:!1},icon:{type:String,required:!1},iconPosition:{type:null,required:!1,default:"right"}},emits:["onClick"],setup(e,{emit:t}){const o=e,n=r.computed((()=>{const e={"text-white bg-blue-600 border-transparent hover:bg-blue-700 active:bg-blue-700 dark:ring-blue-800 ring-offset-2 dark:ring-offset-grey-900":"primary"===o.type,"text-blue-600 bg-grey-100 border-transparent hover:bg-blue-100 hover:text-blue-700 active:bg-grey-100 ring-blue-300 ring-offset-2 dark:ring-offset-grey-900":"light"===o.type,"text-grey-50 bg-grey-700 border-transparent hover:bg-grey-800 active:bg-grey-700 ring-grey-500 dark:ring-grey-400 dark:ring-opacity-50 ring-offset-2 dark:ring-offset-grey-900":"dark"===o.type},r={"pointer-events-none opacity-75 cursor-not-allowed":o.isDisabled},t={"px-4 py-1 text-xs leading-5 mono-100 rounded-lg":"small"===o.size,"px-5 py-2 text-sm leading-4 font-medium rounded-lg":"medium"===o.size,"px-8 py-3 text-base leading-6 font-medium rounded-lg":"large"===o.size};return __spreadValues(__spreadValues(__spreadValues({},e),r),t)})),a=r.computed((()=>{const e={"mr-2 -ml-1":["small","medium"].includes(o.size)&&"left"===o.iconPosition,"mr-4 -ml-2":["large"].includes(o.size)&&"left"===o.iconPosition},r={"ml-3 -mr-1":["small","medium"].includes(o.size)&&"right"===o.iconPosition,"ml-3 -mr-3":["large"].includes(o.size)&&"right"===o.iconPosition},t={"text-white":"primary"===o.type,"text-blue-600":"light"===o.type,"text-grey-50":"dark"===o.type};return __spreadValues(__spreadValues(__spreadValues({},e),r),t)}));function i(){o.isDisabled||t("onClick")}return(t,o)=>(r.openBlock(),r.createElementBlock("button",{class:r.normalizeClass(["relative inline-flex items-center focus:outline-none focus:ring active:ring transition duration-150 ease-in-out",r.unref(n)]),type:"button","aria-label":e.label,tabindex:e.isDisabled?"-1":void 0,onClick:i},[r.createElementVNode("div",{class:r.normalizeClass(!e.isLoading||"invisible")},[e.icon&&"left"===e.iconPosition?(r.openBlock(),r.createBlock(s,{key:0,name:e.icon,class:r.normalizeClass(r.unref(a))},null,8,["name","class"])):r.createCommentVNode("",!0),r.createElementVNode("span",null,r.toDisplayString(e.label),1),e.icon&&"right"===e.iconPosition?(r.openBlock(),r.createBlock(s,{key:1,name:e.icon,class:r.normalizeClass(r.unref(a))},null,8,["name","class"])):r.createCommentVNode("",!0)],2),e.isLoading?(r.openBlock(),r.createElementBlock("span",u,[r.createVNode(s,{class:"animate-spin",name:"circle-notch"})])):r.createCommentVNode("",!0)],10,d))}});var p,f=new Uint8Array(16);function m(){if(!p&&!(p="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return p(f)}var g=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function y(e){return"string"==typeof e&&g.test(e)}for(var b=[],k=0;k<256;++k)b.push((k+256).toString(16).substr(1));const v={class:"relative flex items-start"},h={class:"flex items-center h-5"},_=["checked","id"],x={class:"ml-2 text-sm leading-5"},C=["for"],V={key:0,class:"text-grey-700 dark:text-grey-400 mono-0 casual-60"},w=r.defineComponent({props:{id:{type:String,required:!1,default:function(e,r,t){var o=(e=e||{}).random||(e.rng||m)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,r){t=t||0;for(var n=0;n<16;++n)r[t+n]=o[n];return r}return function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=(b[e[r+0]]+b[e[r+1]]+b[e[r+2]]+b[e[r+3]]+"-"+b[e[r+4]]+b[e[r+5]]+"-"+b[e[r+6]]+b[e[r+7]]+"-"+b[e[r+8]]+b[e[r+9]]+"-"+b[e[r+10]]+b[e[r+11]]+b[e[r+12]]+b[e[r+13]]+b[e[r+14]]+b[e[r+15]]).toLowerCase();if(!y(t))throw TypeError("Stringified UUID is invalid");return t}(o)}()},label:{type:String,required:!0},modelValue:{type:Boolean,required:!0},description:{type:String,required:!1},checked:{type:Boolean,required:!1}},emits:["update:modelValue"],setup:e=>(t,o)=>(r.openBlock(),r.createElementBlock("div",v,[r.createElementVNode("div",h,[r.createElementVNode("input",{class:"h-4 w-4 border-grey-600 dark:text-blue-500 dark:border-grey-300 dark:checked:border-blue-500 dark:focus:ring-blue-900 dark:focus:ring-offset-grey-800 rounded-sm",type:"checkbox",checked:e.modelValue,id:e.id},null,8,_)]),r.createElementVNode("div",x,[r.createElementVNode("label",{for:e.id,class:"font-medium text-grey-900 dark:text-grey-200 casual-25"},r.toDisplayString(e.label),9,C),e.description?(r.openBlock(),r.createElementBlock("p",V,r.toDisplayString(e.description),1)):r.createCommentVNode("",!0)])]))}),S={class:"relative"},P=["placeholder","type","tabindex"],B=r.defineComponent({props:{type:{type:String,required:!0,default:"text"},placeholder:{type:String,required:!1},size:{type:null,required:!1,default:"medium"},icon:{type:String,required:!1},isDisabled:{type:Boolean,required:!1,default:!1}},emits:["onInput"],setup(e,{emit:t}){const o=e,n=r.computed((()=>({"px-3 py-1 rounded font-normal":"small"===o.size,"px-4 py-3 rounded font-normal":"medium"===o.size,"px-6 py-3 rounded font-normal":"large"===o.size,"pl-10":o.icon&&"small"===o.size,"pl-12":o.icon&&("medium"===o.size||"large"===o.size)}))),a=r.computed((()=>({"pointer-events-none opacity-50 cursor-not-allowed":o.isDisabled}))),i=r.computed((()=>({"text-xs leading-4":"small"===o.size,"text-sm leading-4":"medium"===o.size,"text-base leading-4":"large"===o.size}))),l=function(e){t("onInput",(null==e?void 0:e.target).value)};return(t,o)=>(r.openBlock(),r.createElementBlock("div",S,[r.createElementVNode("input",{class:r.normalizeClass(["mono-50 bg-grey-50 text-grey-800 placeholder-grey-600 border-grey-300 dark:bg-grey-800 dark:text-grey-100 dark:placeholder-grey-400 dark:border-grey-700 focus:border-blue-400 focus:ring-blue-400 dark:focus:border-blue-800 dark:focus:ring-blue-800",__spreadValues(__spreadValues(__spreadValues({},r.unref(n)),r.unref(i)),r.unref(a))]),placeholder:e.placeholder,type:e.type,tabindex:e.isDisabled?"-1":void 0,onInput:l},null,42,P),e.icon?(r.openBlock(),r.createElementBlock("span",{key:0,class:r.normalizeClass(["absolute left-0 inset-y-0 inline-flex items-center justify-center text-grey-700 dark:text-grey-100 px-4",r.unref(i)])},[r.createVNode(s,{name:e.icon},null,8,["name"])],2)):r.createCommentVNode("",!0)]))}}),q={class:"inline-block text-blue-900 text-sm font-medium"},z=["for"],E={key:0},D=r.defineComponent({props:{id:{type:String,required:!0},label:{type:String,required:!0},description:{type:String,required:!0}},setup:e=>(t,o)=>(r.openBlock(),r.createElementBlock("span",q,[r.createElementVNode("label",{for:e.id},r.toDisplayString(e.label),9,z),e.description?(r.openBlock(),r.createElementBlock("span",E,r.toDisplayString(e.description),1)):r.createCommentVNode("",!0)]))});e.D9Button=c,e.D9Checkbox=w,e.D9Icon=s,e.D9Input=B,e.D9Label=D,e.icons=l,Object.defineProperty(e,"__esModule",{value:!0}),e[Symbol.toStringTag]="Module"}));
@@ -0,0 +1,111 @@
1
+ import { ColorScheme, PositionHorizontal, Size } from "../types";
2
+ declare const _sfc_main: import("vue").DefineComponent<{
3
+ label: {
4
+ type: StringConstructor;
5
+ required: true;
6
+ };
7
+ size: {
8
+ type: null;
9
+ required: false;
10
+ default: string;
11
+ };
12
+ type: {
13
+ type: null;
14
+ required: false;
15
+ default: string;
16
+ };
17
+ isLoading: {
18
+ type: BooleanConstructor;
19
+ required: false;
20
+ default: boolean;
21
+ };
22
+ isDisabled: {
23
+ type: BooleanConstructor;
24
+ required: false;
25
+ default: boolean;
26
+ };
27
+ icon: {
28
+ type: StringConstructor;
29
+ required: false;
30
+ };
31
+ iconPosition: {
32
+ type: null;
33
+ required: false;
34
+ default: string;
35
+ };
36
+ }, {
37
+ emit: (e: "onClick") => void;
38
+ props: {
39
+ label: string;
40
+ size: Size;
41
+ type: ColorScheme;
42
+ isLoading: boolean;
43
+ isDisabled: boolean;
44
+ icon?: string | undefined;
45
+ iconPosition: PositionHorizontal;
46
+ };
47
+ buttonClasses: import("vue").ComputedRef<{
48
+ "px-4 py-1 text-xs leading-5 mono-100 rounded-lg": boolean;
49
+ "px-5 py-2 text-sm leading-4 font-medium rounded-lg": boolean;
50
+ "px-8 py-3 text-base leading-6 font-medium rounded-lg": boolean;
51
+ "pointer-events-none opacity-75 cursor-not-allowed": boolean;
52
+ "text-white bg-blue-600 border-transparent hover:bg-blue-700 active:bg-blue-700 dark:ring-blue-800 ring-offset-2 dark:ring-offset-grey-900": boolean;
53
+ "text-blue-600 bg-grey-100 border-transparent hover:bg-blue-100 hover:text-blue-700 active:bg-grey-100 ring-blue-300 ring-offset-2 dark:ring-offset-grey-900": boolean;
54
+ "text-grey-50 bg-grey-700 border-transparent hover:bg-grey-800 active:bg-grey-700 ring-grey-500 dark:ring-grey-400 dark:ring-opacity-50 ring-offset-2 dark:ring-offset-grey-900": boolean;
55
+ }>;
56
+ iconClasses: import("vue").ComputedRef<{
57
+ "text-white": boolean;
58
+ "text-blue-600": boolean;
59
+ "text-grey-50": boolean;
60
+ "ml-3 -mr-1": boolean;
61
+ "ml-3 -mr-3": boolean;
62
+ "mr-2 -ml-1": boolean;
63
+ "mr-4 -ml-2": boolean;
64
+ }>;
65
+ onClick: () => void;
66
+ D9Icon: import("vue").DefineComponent<{
67
+ name: {
68
+ type: StringConstructor;
69
+ required: true;
70
+ default: string;
71
+ };
72
+ }, {
73
+ props: {
74
+ name: string;
75
+ };
76
+ isIconAvailable: import("vue").ComputedRef<boolean>;
77
+ FontAwesomeIcon: import("vue").ComponentPublicInstance<import("@fortawesome/vue-fontawesome").FontAwesomeIconProps, {}, {}, {}, {}, {}, import("@fortawesome/vue-fontawesome").FontAwesomeIconProps, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>>;
78
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
79
+ name?: unknown;
80
+ } & {
81
+ name: string;
82
+ } & {}>, {
83
+ name: string;
84
+ }>;
85
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "onClick"[], "onClick", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
86
+ label?: unknown;
87
+ size?: unknown;
88
+ type?: unknown;
89
+ isLoading?: unknown;
90
+ isDisabled?: unknown;
91
+ icon?: unknown;
92
+ iconPosition?: unknown;
93
+ } & {
94
+ label: string;
95
+ type: any;
96
+ size: any;
97
+ isLoading: boolean;
98
+ isDisabled: boolean;
99
+ iconPosition: any;
100
+ } & {
101
+ icon?: string | undefined;
102
+ }> & {
103
+ onOnClick?: ((...args: any[]) => any) | undefined;
104
+ }, {
105
+ type: any;
106
+ size: any;
107
+ isLoading: boolean;
108
+ isDisabled: boolean;
109
+ iconPosition: any;
110
+ }>;
111
+ export default _sfc_main;
File without changes
@@ -0,0 +1,42 @@
1
+ declare const _sfc_main: import("vue").DefineComponent<{
2
+ id: {
3
+ type: StringConstructor;
4
+ required: false;
5
+ default: string;
6
+ };
7
+ label: {
8
+ type: StringConstructor;
9
+ required: true;
10
+ };
11
+ modelValue: {
12
+ type: BooleanConstructor;
13
+ required: true;
14
+ };
15
+ description: {
16
+ type: StringConstructor;
17
+ required: false;
18
+ };
19
+ checked: {
20
+ type: BooleanConstructor;
21
+ required: false;
22
+ };
23
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
24
+ id?: unknown;
25
+ label?: unknown;
26
+ modelValue?: unknown;
27
+ description?: unknown;
28
+ checked?: unknown;
29
+ } & {
30
+ label: string;
31
+ id: string;
32
+ modelValue: boolean;
33
+ checked: boolean;
34
+ } & {
35
+ description?: string | undefined;
36
+ }> & {
37
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
38
+ }, {
39
+ id: string;
40
+ checked: boolean;
41
+ }>;
42
+ export default _sfc_main;
File without changes
@@ -0,0 +1,20 @@
1
+ declare const _sfc_main: import("vue").DefineComponent<{
2
+ name: {
3
+ type: StringConstructor;
4
+ required: true;
5
+ default: string;
6
+ };
7
+ }, {
8
+ props: {
9
+ name: string;
10
+ };
11
+ isIconAvailable: import("vue").ComputedRef<boolean>;
12
+ FontAwesomeIcon: import("vue").ComponentPublicInstance<import("@fortawesome/vue-fontawesome").FontAwesomeIconProps, {}, {}, {}, {}, {}, import("@fortawesome/vue-fontawesome").FontAwesomeIconProps, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>>;
13
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
14
+ name?: unknown;
15
+ } & {
16
+ name: string;
17
+ } & {}>, {
18
+ name: string;
19
+ }>;
20
+ export default _sfc_main;
File without changes
File without changes
@@ -0,0 +1,90 @@
1
+ import { Size } from "../types";
2
+ declare const _sfc_main: import("vue").DefineComponent<{
3
+ type: {
4
+ type: StringConstructor;
5
+ required: true;
6
+ default: string;
7
+ };
8
+ placeholder: {
9
+ type: StringConstructor;
10
+ required: false;
11
+ };
12
+ size: {
13
+ type: null;
14
+ required: false;
15
+ default: string;
16
+ };
17
+ icon: {
18
+ type: StringConstructor;
19
+ required: false;
20
+ };
21
+ isDisabled: {
22
+ type: BooleanConstructor;
23
+ required: false;
24
+ default: boolean;
25
+ };
26
+ }, {
27
+ props: {
28
+ type: string;
29
+ placeholder?: string | undefined;
30
+ size: Size;
31
+ icon?: string | undefined;
32
+ isDisabled: boolean;
33
+ };
34
+ emit: (e: "onInput", value: string) => void;
35
+ inputClasses: import("vue").ComputedRef<{
36
+ "px-3 py-1 rounded font-normal": boolean;
37
+ "px-4 py-3 rounded font-normal": boolean;
38
+ "px-6 py-3 rounded font-normal": boolean;
39
+ "pl-10": boolean | "" | undefined;
40
+ "pl-12": boolean | "" | undefined;
41
+ }>;
42
+ disabledClasses: import("vue").ComputedRef<{
43
+ "pointer-events-none opacity-50 cursor-not-allowed": boolean;
44
+ }>;
45
+ textSizeClasses: import("vue").ComputedRef<{
46
+ "text-xs leading-4": boolean;
47
+ "text-sm leading-4": boolean;
48
+ "text-base leading-4": boolean;
49
+ }>;
50
+ onInput: (payload: Event) => void;
51
+ D9Icon: import("vue").DefineComponent<{
52
+ name: {
53
+ type: StringConstructor;
54
+ required: true;
55
+ default: string;
56
+ };
57
+ }, {
58
+ props: {
59
+ name: string;
60
+ };
61
+ isIconAvailable: import("vue").ComputedRef<boolean>;
62
+ FontAwesomeIcon: import("vue").ComponentPublicInstance<import("@fortawesome/vue-fontawesome").FontAwesomeIconProps, {}, {}, {}, {}, {}, import("@fortawesome/vue-fontawesome").FontAwesomeIconProps, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>>;
63
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
64
+ name?: unknown;
65
+ } & {
66
+ name: string;
67
+ } & {}>, {
68
+ name: string;
69
+ }>;
70
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "onInput"[], "onInput", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
71
+ type?: unknown;
72
+ placeholder?: unknown;
73
+ size?: unknown;
74
+ icon?: unknown;
75
+ isDisabled?: unknown;
76
+ } & {
77
+ type: string;
78
+ size: any;
79
+ isDisabled: boolean;
80
+ } & {
81
+ icon?: string | undefined;
82
+ placeholder?: string | undefined;
83
+ }> & {
84
+ onOnInput?: ((...args: any[]) => any) | undefined;
85
+ }, {
86
+ type: string;
87
+ size: any;
88
+ isDisabled: boolean;
89
+ }>;
90
+ export default _sfc_main;
File without changes
@@ -0,0 +1,23 @@
1
+ declare const _sfc_main: import("vue").DefineComponent<{
2
+ id: {
3
+ type: StringConstructor;
4
+ required: true;
5
+ };
6
+ label: {
7
+ type: StringConstructor;
8
+ required: true;
9
+ };
10
+ description: {
11
+ type: StringConstructor;
12
+ required: true;
13
+ };
14
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
15
+ id?: unknown;
16
+ label?: unknown;
17
+ description?: unknown;
18
+ } & {
19
+ description: string;
20
+ label: string;
21
+ id: string;
22
+ } & {}>, {}>;
23
+ export default _sfc_main;
File without changes
@@ -0,0 +1,8 @@
1
+ /// <reference types="vite/client" />
2
+
3
+ declare module "*.vue" {
4
+ import { DefineComponent } from "vue";
5
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
6
+ const component: DefineComponent<{}, {}, any>;
7
+ export default component;
8
+ }
File without changes
File without changes
package/package.json CHANGED
@@ -1,21 +1,22 @@
1
1
  {
2
2
  "name": "@deck9/ui",
3
- "version": "0.3.3",
3
+ "version": "0.4.0",
4
4
  "description": "The UI components used in deck9 software applications.",
5
5
  "author": "Philipp Reinking <philipp@deck9.co> (https://deck9.co)",
6
6
  "scripts": {
7
- "build-storybook": "build-storybook",
7
+ "dev": "vite",
8
+ "check": "vue-tsc --noEmit",
9
+ "build": "vue-tsc --noEmit && vite build",
10
+ "serve": "vite preview",
8
11
  "storybook": "start-storybook -p 6006",
9
- "build": "vite build"
10
- },
11
- "main": "./dist/ui.umd.js",
12
- "module": "./dist/ui.es.js",
13
- "exports": {
14
- ".": {
15
- "import": "./dist/ui.es.js",
16
- "require": "./dist/ui.umd.js"
17
- }
12
+ "build-storybook": "build-storybook"
18
13
  },
14
+ "files": [
15
+ "dist"
16
+ ],
17
+ "main": "./dist/index.umd.js",
18
+ "module": "./dist/index.es.js",
19
+ "types": "./dist/src/index.d.ts",
19
20
  "dependencies": {
20
21
  "@deck9/tailwindcss-recursive-font-helper": "^1.0.0",
21
22
  "@fortawesome/fontawesome-svg-core": "^1.2.36",
@@ -24,51 +25,36 @@
24
25
  "@fortawesome/vue-fontawesome": "^3.0.0-4",
25
26
  "@tailwindcss/forms": "^0.3.3",
26
27
  "@tailwindcss/typography": "^0.4.1",
27
- "core-js": "^3.6.5",
28
- "rollup": "^2.57.0",
29
- "tailwindcss": "^2.2.7",
30
- "uuid": "^3.4.0"
28
+ "tailwindcss": "^2.2.15",
29
+ "uuid": "^8.3.2",
30
+ "vue": "^3.2.13"
31
31
  },
32
32
  "devDependencies": {
33
- "@babel/core": "^7.15.0",
34
- "@rollup/plugin-typescript": "^8.2.5",
35
- "@storybook/addon-a11y": "^6.3.7",
36
- "@storybook/addon-actions": "^6.3.7",
37
- "@storybook/addon-docs": "^6.3.7",
38
- "@storybook/addon-essentials": "^6.3.7",
39
- "@storybook/addon-links": "^6.3.7",
33
+ "@storybook/addon-a11y": "^6.3.8",
34
+ "@storybook/addon-actions": "^6.3.8",
35
+ "@storybook/addon-docs": "^6.3.8",
36
+ "@storybook/addon-essentials": "^6.3.8",
37
+ "@storybook/addon-links": "^6.3.8",
40
38
  "@storybook/addon-postcss": "^2.0.0",
41
- "@storybook/builder-webpack5": "^6.3.7",
42
- "@storybook/manager-webpack5": "^6.3.7",
43
- "@storybook/vue3": "^6.3.7",
39
+ "@storybook/builder-webpack5": "^6.3.8",
40
+ "@storybook/manager-webpack5": "^6.3.8",
41
+ "@storybook/vue3": "^6.3.8",
44
42
  "@types/uuid": "^8.3.1",
45
- "@typescript-eslint/eslint-plugin": "^4.29.2",
46
- "@typescript-eslint/parser": "^4.29.2",
43
+ "@typescript-eslint/eslint-plugin": "^4.31.2",
44
+ "@typescript-eslint/parser": "^4.31.2",
47
45
  "@vitejs/plugin-vue": "^1.9.0",
48
46
  "@vue/cli-plugin-babel": "^4.5.13",
49
47
  "@vue/cli-plugin-eslint": "^4.5.13",
50
- "@vue/cli-plugin-typescript": "~4.5.0",
51
- "@vue/cli-service": "^4.5.13",
52
- "@vue/compiler-sfc": "^3.0.0",
53
48
  "@vue/eslint-config-prettier": "^6.0.0",
54
49
  "@vue/eslint-config-typescript": "^7.0.0",
55
- "autoprefixer": "^10.3.2",
56
- "babel-eslint": "^10.1.0",
57
- "babel-loader": "^8.2.2",
58
- "css-loader": "^3.6.0",
59
- "eslint": "^7.32.0",
50
+ "eslint": "^6.8.0",
60
51
  "eslint-plugin-prettier": "^3.4.1",
61
- "eslint-plugin-vue": "^7.0.0",
62
- "less": "^4.1.1",
52
+ "eslint-plugin-vue": "^7.18.0",
63
53
  "less-loader": "^10.0.1",
64
- "postcss": "^8.3.6",
65
- "prettier": "^2.2.1",
66
54
  "storybook-dark-mode": "^1.0.8",
67
- "typescript": "~4.1.5",
55
+ "typescript": "^4.4.3",
68
56
  "vite": "^2.5.10",
69
- "vue": "^3.2.4",
70
- "vue-class-component": "^8.0.0-0",
71
- "vue-loader": "^16.5.0",
57
+ "vite-plugin-dts": "^0.8.1",
72
58
  "vue-tsc": "^0.3.0"
73
59
  },
74
60
  "browserslist": [
@@ -77,7 +63,7 @@
77
63
  "not dead"
78
64
  ],
79
65
  "bugs": {
80
- "url": "https://github.com/Deck9/ui/issues"
66
+ "url": "https://github.com/deck9/ui/issues"
81
67
  },
82
68
  "homepage": "https://github.com/Deck9/ui#readme",
83
69
  "keywords": [
package/.editorconfig DELETED
@@ -1,5 +0,0 @@
1
- root = true
2
-
3
- [*]
4
- indent_style = space
5
- indent_size = 2
package/.eslintrc.js DELETED
@@ -1,25 +0,0 @@
1
- module.exports = {
2
- root: true,
3
- env: {
4
- node: true,
5
- },
6
- extends: [
7
- "plugin:vue/vue3-essential",
8
- "eslint:recommended",
9
- "@vue/typescript/recommended",
10
- "@vue/prettier",
11
- "@vue/prettier/@typescript-eslint",
12
- ],
13
- parserOptions: {
14
- ecmaVersion: 2020,
15
- parser: "@typescript-eslint/parser",
16
- },
17
- rules: {
18
- "no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
19
- "no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
20
- },
21
- globals: {
22
- defineEmits: "readonly",
23
- defineProps: "readonly",
24
- },
25
- };
@@ -1,18 +0,0 @@
1
- name: Publish on NPM Registry
2
- on:
3
- release:
4
- types: [created]
5
- jobs:
6
- build:
7
- runs-on: ubuntu-latest
8
- steps:
9
- - uses: actions/checkout@v2
10
- # Setup .npmrc file to publish to npm
11
- - uses: actions/setup-node@v2
12
- with:
13
- node-version: 14
14
- registry-url: "https://registry.npmjs.org"
15
- # - run: npm ci
16
- - run: npm publish
17
- env:
18
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -1,38 +0,0 @@
1
- const path = require('path');
2
-
3
- module.exports = {
4
- "stories": [
5
- "../src/**/*.stories.mdx",
6
- "../src/**/*.stories.@(js|jsx|ts|tsx)"
7
- ],
8
- "addons": [
9
- "@storybook/addon-links",
10
- "@storybook/addon-essentials",
11
- "@storybook/addon-a11y",
12
- {
13
- name: '@storybook/addon-postcss',
14
- options: {
15
- postcssLoaderOptions: {
16
- implementation: require('postcss'),
17
- },
18
- },
19
- },
20
- "storybook-dark-mode",
21
- ],
22
- "core": {
23
- "builder": "webpack5"
24
- },
25
-
26
- webpackFinal: async (config) => {
27
-
28
- config.module.rules.push({
29
- test: /\.less$/,
30
- use: ['style-loader', 'css-loader', 'postcss-loader', 'less-loader'],
31
- include: path.resolve(__dirname, '../'),
32
- });
33
-
34
- config.resolve.alias["@"] = path.resolve(__dirname, '../src');
35
-
36
- return config;
37
- },
38
- }
@@ -1,39 +0,0 @@
1
- import "../styles/app.less";
2
-
3
- export const parameters = {
4
- actions: { argTypesRegex: "^on[A-Z].*" },
5
- controls: {
6
- matchers: {
7
- color: /(background|color)$/i,
8
- date: /Date$/,
9
- },
10
- },
11
- darkMode: {
12
- classTarget: 'html',
13
- stylePreview: true
14
- },
15
- backgrounds: {
16
- default: 'dark',
17
- values: [
18
- {
19
- name: 'white',
20
- value: '#ffffff',
21
- },
22
- {
23
- name: 'light',
24
- value: '#ebf1ff',
25
- },
26
- {
27
- name: 'dark',
28
- value: '#0f172a',
29
- },
30
- ],
31
- grid: {
32
- cellSize: 16,
33
- opacity: 0.2,
34
- cellAmount: 6,
35
- offsetX: 16, // default is 0 if story has 'fullscreen' layout, 16 if layout is 'padded'
36
- offsetY: 16, // default is 0 if story has 'fullscreen' layout, 16 if layout is 'padded'
37
- },
38
- },
39
- }
package/babel.config.js DELETED
@@ -1,3 +0,0 @@
1
- module.exports = {
2
- presets: ["@vue/cli-plugin-babel/preset"],
3
- };
package/dist/types.d.ts DELETED
@@ -1,5 +0,0 @@
1
- export declare type ColorScheme = "light" | "dark" | "primary";
2
- export declare type Size = "small" | "medium" | "large";
3
- export declare type PositionHorizontal = "left" | "right";
4
- export declare type PositionVertical = "top" | "bottom";
5
- export declare type PositionBoth = PositionHorizontal | PositionVertical | "center";