ablok-components 0.0.5 → 0.0.8

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/README.md CHANGED
@@ -1,19 +1 @@
1
- # Vue 3 + TypeScript + Vite
2
-
3
- This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
4
-
5
- ## Recommended IDE Setup
6
-
7
- - [VS Code](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar)
8
-
9
- ## Type Support For `.vue` Imports in TS
10
-
11
- Since TypeScript cannot handle type information for `.vue` imports, they are shimmed to be a generic Vue component type by default. In most cases this is fine if you don't really care about component prop types outside of templates. However, if you wish to get actual prop types in `.vue` imports (for example to get props validation when using manual `h(...)` calls), you can enable Volar's Take Over mode by following these steps:
12
-
13
- 1. Run `Extensions: Show Built-in Extensions` from VS Code's command palette, look for `TypeScript and JavaScript Language Features`, then right click and select `Disable (Workspace)`. By default, Take Over mode will enable itself if the default TypeScript extension is disabled.
14
- 2. Reload the VS Code window by running `Developer: Reload Window` from the command palette.
15
-
16
- You can learn more about Take Over mode [here](https://github.com/johnsoncodehk/volar/discussions/471).
17
-
18
- adapted build lib according to:
19
- https://jivancic.com/posts/build-a-component-library.html#package-json-config
1
+ Run `npm install ablok-components`.
@@ -1,6 +1,6 @@
1
- import { defineComponent, resolveComponent, openBlock, createElementBlock, normalizeClass, createVNode, createElementVNode, renderSlot } from "vue";
1
+ import { defineComponent, resolveComponent, openBlock, createElementBlock, normalizeClass, createVNode, createElementVNode, renderSlot, computed, createBlock, createCommentVNode, unref, toDisplayString, ref, watch, withDirectives, vModelText, createTextVNode } from "vue";
2
2
  var baseIcon_vue_vue_type_style_index_0_lang = /* @__PURE__ */ (() => ".base-icon{display:inline-block}.base-icon svg{display:block;stroke-width:0;stroke:currentColor;fill:currentColor;width:1.5em;height:1.5em}.base-icon--xxl svg{width:12rem;height:12rem}.base-icon--xl svg{width:8rem;height:8rem}.base-icon--large svg{width:4rem;height:4rem}\n")();
3
- const _sfc_main$2 = /* @__PURE__ */ defineComponent({
3
+ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
4
4
  __name: "base-icon",
5
5
  props: {
6
6
  id: {
@@ -29,9 +29,9 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
29
29
  }
30
30
  });
31
31
  var loadingSpinner_vue_vue_type_style_index_0_lang = /* @__PURE__ */ (() => ".loading-spinner{min-width:2rem}\n")();
32
- const _hoisted_1$1 = { class: "loading-spinner d-block" };
32
+ const _hoisted_1$2 = { class: "loading-spinner d-block" };
33
33
  const _hoisted_2$1 = { class: "loading-spinner__animation" };
34
- const _hoisted_3 = {
34
+ const _hoisted_3$1 = {
35
35
  class: "d-block",
36
36
  version: "1.1",
37
37
  id: "L9",
@@ -56,7 +56,7 @@ const _hoisted_5 = /* @__PURE__ */ createElementVNode("animateTransform", {
56
56
  const _hoisted_6 = [
57
57
  _hoisted_5
58
58
  ];
59
- const _sfc_main$1 = /* @__PURE__ */ defineComponent({
59
+ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
60
60
  __name: "loading-spinner",
61
61
  props: {
62
62
  color: {
@@ -66,9 +66,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
66
66
  },
67
67
  setup(__props) {
68
68
  return (_ctx, _cache) => {
69
- return openBlock(), createElementBlock("span", _hoisted_1$1, [
69
+ return openBlock(), createElementBlock("span", _hoisted_1$2, [
70
70
  createElementVNode("span", _hoisted_2$1, [
71
- (openBlock(), createElementBlock("svg", _hoisted_3, [
71
+ (openBlock(), createElementBlock("svg", _hoisted_3$1, [
72
72
  createElementVNode("path", {
73
73
  fill: __props.color,
74
74
  d: "M73,50c0-12.7-10.3-23-23-23S27,37.3,27,50 M30.9,50c0-10.5,8.5-19.1,19.1-19.1S69.1,39.5,69.1,50"
@@ -80,30 +80,147 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
80
80
  };
81
81
  }
82
82
  });
83
- var baseButton_vue_vue_type_style_index_0_lang = /* @__PURE__ */ (() => ".btn{appearance:none;background:none;border:none}\n")();
84
- const _hoisted_1 = { class: "btn" };
85
- const _hoisted_2 = ["innerHTML"];
86
- const _sfc_main = /* @__PURE__ */ defineComponent({
83
+ var baseButton_vue_vue_type_style_index_0_lang = /* @__PURE__ */ (() => ".base-button{display:flex;justify-content:center;align-items:center;box-sizing:border-box;transition:all .2s ease;text-decoration:none;width:100%;margin:0;padding:1.036em 1.625em;appearance:none;outline:none;border:none;border-radius:.4375em;font-size:.875em;line-height:1.125em;text-transform:uppercase;font-weight:700}@media screen and (min-width: 600px){.base-button{width:auto}}.base-button .icon{width:16px;height:16px;margin-top:-1px}.base-button.s-collapsed>.caption{display:none}.base-button.s-pending{background-repeat:no-repeat;background-position:center center}.base-button.s-pending .caption{margin-left:25px;visibility:hidden}@media screen and (min-width: 600px){.base-button.s-pending{background-position:1.625em center}.base-button.s-pending .caption{visibility:visible}}.base-button[readonly],.base-button[disabled]{cursor:not-allowed}\n")();
84
+ const _hoisted_1$1 = ["type", "disabled", "href", "to"];
85
+ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
87
86
  __name: "base-button",
88
87
  props: {
89
- caption: {
88
+ type: null,
89
+ caption: null,
90
+ variant: null,
91
+ size: null,
92
+ icon: null,
93
+ href: null,
94
+ to: null,
95
+ disabled: { type: Boolean },
96
+ pending: { type: Boolean },
97
+ outlined: { type: Boolean },
98
+ rounded: { type: Boolean },
99
+ fab: { type: Boolean }
100
+ },
101
+ setup(__props) {
102
+ const props = __props;
103
+ const showCaption = computed(() => {
104
+ return props.caption && !props.fab;
105
+ });
106
+ return (_ctx, _cache) => {
107
+ const _component_base_icon = resolveComponent("base-icon");
108
+ return openBlock(), createElementBlock("button", {
109
+ type: __props.type,
110
+ disabled: __props.disabled,
111
+ href: __props.href,
112
+ to: __props.to,
113
+ class: normalizeClass({
114
+ disabled: __props.disabled,
115
+ pending: __props.pending,
116
+ rounded: __props.rounded,
117
+ outlined: __props.outlined,
118
+ fab: __props.fab,
119
+ "x-large": __props.size === "x-large",
120
+ "large": __props.size === "large",
121
+ "small": __props.size === "small",
122
+ "x-small": __props.size === "x-small"
123
+ })
124
+ }, [
125
+ renderSlot(_ctx.$slots, "default", {}, () => [
126
+ __props.icon ? (openBlock(), createBlock(_component_base_icon, {
127
+ key: 0,
128
+ id: __props.icon,
129
+ class: "base-button__caption"
130
+ }, null, 8, ["id"])) : createCommentVNode("", true),
131
+ unref(showCaption) ? (openBlock(), createElementBlock("span", {
132
+ key: 1,
133
+ class: normalizeClass(["base-button__caption", { "icon-padding": __props.icon }])
134
+ }, toDisplayString(__props.caption), 3)) : createCommentVNode("", true)
135
+ ])
136
+ ], 10, _hoisted_1$1);
137
+ };
138
+ }
139
+ });
140
+ function uniqueId() {
141
+ return (new Date().valueOf() + Math.random()).toString(36);
142
+ }
143
+ const _hoisted_1 = { class: "base-input" };
144
+ const _hoisted_2 = ["name", "id", "label", "placeholder", "pattern", "disabled", "read-only", "required", "maxlength"];
145
+ const _hoisted_3 = ["for"];
146
+ const _sfc_main = /* @__PURE__ */ defineComponent({
147
+ __name: "base-input",
148
+ props: {
149
+ modelValue: {
90
150
  type: String,
91
- default: "Base Button"
151
+ default: ""
92
152
  },
93
- size: {
153
+ name: {
94
154
  type: String,
95
- default: "default"
155
+ default: () => uniqueId()
156
+ },
157
+ id: {
158
+ type: String,
159
+ default: () => uniqueId()
160
+ },
161
+ label: {
162
+ type: String,
163
+ default: ""
164
+ },
165
+ placeholder: {
166
+ type: String,
167
+ default: ""
168
+ },
169
+ variant: {
170
+ type: String,
171
+ default: ""
172
+ },
173
+ disabled: {
174
+ type: Boolean,
175
+ default: false
176
+ },
177
+ readOnly: {
178
+ type: Boolean,
179
+ default: false
180
+ },
181
+ required: {
182
+ type: Boolean,
183
+ default: false
184
+ },
185
+ maxlength: {
186
+ type: Number
187
+ },
188
+ pattern: {
189
+ type: String,
190
+ default: null
96
191
  }
97
192
  },
98
- setup(__props) {
193
+ emits: ["update:modelValue"],
194
+ setup(__props, { emit }) {
195
+ const value = ref();
196
+ watch(value, async (update, before) => {
197
+ if (update !== before) {
198
+ emit("update:modelValue", update);
199
+ }
200
+ });
99
201
  return (_ctx, _cache) => {
100
- return openBlock(), createElementBlock("button", _hoisted_1, [
101
- createElementVNode("span", {
102
- class: "caption",
103
- innerHTML: __props.caption
104
- }, null, 8, _hoisted_2)
202
+ return openBlock(), createElementBlock("div", _hoisted_1, [
203
+ withDirectives(createElementVNode("input", {
204
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event),
205
+ name: __props.name,
206
+ id: __props.id,
207
+ label: `${__props.label}${__props.required ? " *" : ""}`,
208
+ placeholder: __props.placeholder,
209
+ pattern: __props.pattern,
210
+ disabled: __props.disabled,
211
+ "read-only": __props.readOnly,
212
+ required: __props.required,
213
+ maxlength: __props.maxlength
214
+ }, null, 8, _hoisted_2), [
215
+ [vModelText, value.value]
216
+ ]),
217
+ createElementVNode("label", { for: __props.id }, [
218
+ renderSlot(_ctx.$slots, "label", {}, () => [
219
+ createTextVNode(toDisplayString(__props.label), 1)
220
+ ])
221
+ ], 8, _hoisted_3)
105
222
  ]);
106
223
  };
107
224
  }
108
225
  });
109
- export { _sfc_main as BaseButton, _sfc_main$2 as BaseIcon, _sfc_main$1 as LoadingSpinner };
226
+ export { _sfc_main$1 as BaseButton, _sfc_main$3 as BaseIcon, _sfc_main as BaseInput, _sfc_main$2 as LoadingSpinner };
@@ -1,4 +1,4 @@
1
- (function(n,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(n=typeof globalThis!="undefined"?globalThis:n||self,e(n.AblokComponents={},n.Vue))})(this,function(n,e){"use strict";var g=(()=>`.base-icon{display:inline-block}.base-icon svg{display:block;stroke-width:0;stroke:currentColor;fill:currentColor;width:1.5em;height:1.5em}.base-icon--xxl svg{width:12rem;height:12rem}.base-icon--xl svg{width:8rem;height:8rem}.base-icon--large svg{width:4rem;height:4rem}
2
- `)();const s=e.defineComponent({__name:"base-icon",props:{id:{type:String,default:""},size:{type:String,default:"default"}},setup(t){return(o,i)=>{const f=e.resolveComponent("SvgSprite");return e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(["base-icon",{[`base-icon--${t.size}`]:t.size}])},[e.createVNode(f,{symbol:`icon-${t.id}`,role:"presentation"},null,8,["symbol"])],2)}}});var h=(()=>`.loading-spinner{min-width:2rem}
3
- `)();const a={class:"loading-spinner d-block"},r={class:"loading-spinner__animation"},l={class:"d-block",version:"1.1",id:"L9",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 100 100","enable-background":"new 0 0 0 0","xml:space":"preserve"},c=["fill"],d=[e.createElementVNode("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",dur:"1s",from:"0 50 50",to:"360 50 50",repeatCount:"indefinite"},null,-1)],p=e.defineComponent({__name:"loading-spinner",props:{color:{type:String,default:"#fff"}},setup(t){return(o,i)=>(e.openBlock(),e.createElementBlock("span",a,[e.createElementVNode("span",r,[(e.openBlock(),e.createElementBlock("svg",l,[e.createElementVNode("path",{fill:t.color,d:"M73,50c0-12.7-10.3-23-23-23S27,37.3,27,50 M30.9,50c0-10.5,8.5-19.1,19.1-19.1S69.1,39.5,69.1,50"},d,8,c)]))]),e.renderSlot(o.$slots,"default")]))}});var y=(()=>`.btn{appearance:none;background:none;border:none}
4
- `)();const _={class:"btn"},m=["innerHTML"],u=e.defineComponent({__name:"base-button",props:{caption:{type:String,default:"Base Button"},size:{type:String,default:"default"}},setup(t){return(o,i)=>(e.openBlock(),e.createElementBlock("button",_,[e.createElementVNode("span",{class:"caption",innerHTML:t.caption},null,8,m)]))}});n.BaseButton=u,n.BaseIcon=s,n.LoadingSpinner=p,Object.defineProperties(n,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
1
+ (function(t,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(t=typeof globalThis!="undefined"?globalThis:t||self,e(t.AblokComponents={},t.Vue))})(this,function(t,e){"use strict";var w=(()=>`.base-icon{display:inline-block}.base-icon svg{display:block;stroke-width:0;stroke:currentColor;fill:currentColor;width:1.5em;height:1.5em}.base-icon--xxl svg{width:12rem;height:12rem}.base-icon--xl svg{width:8rem;height:8rem}.base-icon--large svg{width:4rem;height:4rem}
2
+ `)();const r=e.defineComponent({__name:"base-icon",props:{id:{type:String,default:""},size:{type:String,default:"default"}},setup(n){return(o,l)=>{const a=e.resolveComponent("SvgSprite");return e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(["base-icon",{[`base-icon--${n.size}`]:n.size}])},[e.createVNode(a,{symbol:`icon-${n.id}`,role:"presentation"},null,8,["symbol"])],2)}}});var S=(()=>`.loading-spinner{min-width:2rem}
3
+ `)();const c={class:"loading-spinner d-block"},m={class:"loading-spinner__animation"},b={class:"d-block",version:"1.1",id:"L9",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 100 100","enable-background":"new 0 0 0 0","xml:space":"preserve"},u=["fill"],p=[e.createElementVNode("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",dur:"1s",from:"0 50 50",to:"360 50 50",repeatCount:"indefinite"},null,-1)],f=e.defineComponent({__name:"loading-spinner",props:{color:{type:String,default:"#fff"}},setup(n){return(o,l)=>(e.openBlock(),e.createElementBlock("span",c,[e.createElementVNode("span",m,[(e.openBlock(),e.createElementBlock("svg",b,[e.createElementVNode("path",{fill:n.color,d:"M73,50c0-12.7-10.3-23-23-23S27,37.3,27,50 M30.9,50c0-10.5,8.5-19.1,19.1-19.1S69.1,39.5,69.1,50"},p,8,u)]))]),e.renderSlot(o.$slots,"default")]))}});var _=(()=>`.base-button{display:flex;justify-content:center;align-items:center;box-sizing:border-box;transition:all .2s ease;text-decoration:none;width:100%;margin:0;padding:1.036em 1.625em;appearance:none;outline:none;border:none;border-radius:.4375em;font-size:.875em;line-height:1.125em;text-transform:uppercase;font-weight:700}@media screen and (min-width: 600px){.base-button{width:auto}}.base-button .icon{width:16px;height:16px;margin-top:-1px}.base-button.s-collapsed>.caption{display:none}.base-button.s-pending{background-repeat:no-repeat;background-position:center center}.base-button.s-pending .caption{margin-left:25px;visibility:hidden}@media screen and (min-width: 600px){.base-button.s-pending{background-position:1.625em center}.base-button.s-pending .caption{visibility:visible}}.base-button[readonly],.base-button[disabled]{cursor:not-allowed}
4
+ `)();const g=["type","disabled","href","to"],h=e.defineComponent({__name:"base-button",props:{type:null,caption:null,variant:null,size:null,icon:null,href:null,to:null,disabled:{type:Boolean},pending:{type:Boolean},outlined:{type:Boolean},rounded:{type:Boolean},fab:{type:Boolean}},setup(n){const o=n,l=e.computed(()=>o.caption&&!o.fab);return(a,i)=>{const d=e.resolveComponent("base-icon");return e.openBlock(),e.createElementBlock("button",{type:n.type,disabled:n.disabled,href:n.href,to:n.to,class:e.normalizeClass({disabled:n.disabled,pending:n.pending,rounded:n.rounded,outlined:n.outlined,fab:n.fab,"x-large":n.size==="x-large",large:n.size==="large",small:n.size==="small","x-small":n.size==="x-small"})},[e.renderSlot(a.$slots,"default",{},()=>[n.icon?(e.openBlock(),e.createBlock(d,{key:0,id:n.icon,class:"base-button__caption"},null,8,["id"])):e.createCommentVNode("",!0),e.unref(l)?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(["base-button__caption",{"icon-padding":n.icon}])},e.toDisplayString(n.caption),3)):e.createCommentVNode("",!0)])],10,g)}}});function s(){return(new Date().valueOf()+Math.random()).toString(36)}const y={class:"base-input"},x=["name","id","label","placeholder","pattern","disabled","read-only","required","maxlength"],k=["for"],B=e.defineComponent({__name:"base-input",props:{modelValue:{type:String,default:""},name:{type:String,default:()=>s()},id:{type:String,default:()=>s()},label:{type:String,default:""},placeholder:{type:String,default:""},variant:{type:String,default:""},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},maxlength:{type:Number},pattern:{type:String,default:null}},emits:["update:modelValue"],setup(n,{emit:o}){const l=e.ref();return e.watch(l,async(a,i)=>{a!==i&&o("update:modelValue",a)}),(a,i)=>(e.openBlock(),e.createElementBlock("div",y,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":i[0]||(i[0]=d=>l.value=d),name:n.name,id:n.id,label:`${n.label}${n.required?" *":""}`,placeholder:n.placeholder,pattern:n.pattern,disabled:n.disabled,"read-only":n.readOnly,required:n.required,maxlength:n.maxlength},null,8,x),[[e.vModelText,l.value]]),e.createElementVNode("label",{for:n.id},[e.renderSlot(a.$slots,"label",{},()=>[e.createTextVNode(e.toDisplayString(n.label),1)])],8,k)]))}});t.BaseButton=h,t.BaseIcon=r,t.BaseInput=B,t.LoadingSpinner=f,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
@@ -1,23 +1,37 @@
1
- declare const _default: import("vue").DefineComponent<{
2
- caption: {
3
- type: StringConstructor;
4
- default: string;
5
- };
6
- size: {
7
- type: StringConstructor;
8
- default: string;
9
- };
10
- }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
11
- caption: {
12
- type: StringConstructor;
13
- default: string;
14
- };
15
- size: {
16
- type: StringConstructor;
17
- default: string;
18
- };
19
- }>>, {
20
- caption: string;
21
- size: string;
22
- }>;
1
+ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
2
+ type?: "button" | "submit" | "reset" | undefined;
3
+ caption?: string | undefined;
4
+ variant?: string | undefined;
5
+ size?: string | undefined;
6
+ icon?: string | undefined;
7
+ href?: string | undefined;
8
+ to?: any;
9
+ disabled?: boolean | undefined;
10
+ pending?: boolean | undefined;
11
+ outlined?: boolean | undefined;
12
+ rounded?: boolean | undefined;
13
+ fab?: boolean | undefined;
14
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
15
+ type?: "button" | "submit" | "reset" | undefined;
16
+ caption?: string | undefined;
17
+ variant?: string | undefined;
18
+ size?: string | undefined;
19
+ icon?: string | undefined;
20
+ href?: string | undefined;
21
+ to?: any;
22
+ disabled?: boolean | undefined;
23
+ pending?: boolean | undefined;
24
+ outlined?: boolean | undefined;
25
+ rounded?: boolean | undefined;
26
+ fab?: boolean | undefined;
27
+ }>>>, {}>;
23
28
  export default _default;
29
+ declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
30
+ declare type __VLS_TypePropsToRuntimeProps<T> = {
31
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
32
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
33
+ } : {
34
+ type: import('vue').PropType<T[K]>;
35
+ required: true;
36
+ };
37
+ };
@@ -0,0 +1,103 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ modelValue: {
3
+ type: StringConstructor;
4
+ default: string;
5
+ };
6
+ name: {
7
+ type: StringConstructor;
8
+ default: () => string;
9
+ };
10
+ id: {
11
+ type: StringConstructor;
12
+ default: () => string;
13
+ };
14
+ label: {
15
+ type: StringConstructor;
16
+ default: string;
17
+ };
18
+ placeholder: {
19
+ type: StringConstructor;
20
+ default: string;
21
+ };
22
+ variant: {
23
+ type: StringConstructor;
24
+ default: string;
25
+ };
26
+ disabled: {
27
+ type: BooleanConstructor;
28
+ default: boolean;
29
+ };
30
+ readOnly: {
31
+ type: BooleanConstructor;
32
+ default: boolean;
33
+ };
34
+ required: {
35
+ type: BooleanConstructor;
36
+ default: boolean;
37
+ };
38
+ maxlength: {
39
+ type: NumberConstructor;
40
+ };
41
+ pattern: {
42
+ type: StringConstructor;
43
+ default: null;
44
+ };
45
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
46
+ modelValue: {
47
+ type: StringConstructor;
48
+ default: string;
49
+ };
50
+ name: {
51
+ type: StringConstructor;
52
+ default: () => string;
53
+ };
54
+ id: {
55
+ type: StringConstructor;
56
+ default: () => string;
57
+ };
58
+ label: {
59
+ type: StringConstructor;
60
+ default: string;
61
+ };
62
+ placeholder: {
63
+ type: StringConstructor;
64
+ default: string;
65
+ };
66
+ variant: {
67
+ type: StringConstructor;
68
+ default: string;
69
+ };
70
+ disabled: {
71
+ type: BooleanConstructor;
72
+ default: boolean;
73
+ };
74
+ readOnly: {
75
+ type: BooleanConstructor;
76
+ default: boolean;
77
+ };
78
+ required: {
79
+ type: BooleanConstructor;
80
+ default: boolean;
81
+ };
82
+ maxlength: {
83
+ type: NumberConstructor;
84
+ };
85
+ pattern: {
86
+ type: StringConstructor;
87
+ default: null;
88
+ };
89
+ }>> & {
90
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
91
+ }, {
92
+ required: boolean;
93
+ label: string;
94
+ pattern: string;
95
+ id: string;
96
+ modelValue: string;
97
+ variant: string;
98
+ disabled: boolean;
99
+ name: string;
100
+ placeholder: string;
101
+ readOnly: boolean;
102
+ }>;
103
+ export default _default;
@@ -0,0 +1 @@
1
+ export declare function uniqueId(): string;
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export { default as BaseIcon } from "./components/base-icon.vue";
2
2
  export { default as LoadingSpinner } from "./components/loading-spinner.vue";
3
3
  export { default as BaseButton } from "./components/base-button.vue";
4
+ export { default as BaseInput } from "./components/base-input.vue";
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .base-icon{display:inline-block}.base-icon svg{display:block;stroke-width:0;stroke:currentColor;fill:currentColor;width:1.5em;height:1.5em}.base-icon--xxl svg{width:12rem;height:12rem}.base-icon--xl svg{width:8rem;height:8rem}.base-icon--large svg{width:4rem;height:4rem}.loading-spinner{min-width:2rem}.btn{appearance:none;background:none;border:none}
1
+ .base-icon{display:inline-block}.base-icon svg{display:block;stroke-width:0;stroke:currentColor;fill:currentColor;width:1.5em;height:1.5em}.base-icon--xxl svg{width:12rem;height:12rem}.base-icon--xl svg{width:8rem;height:8rem}.base-icon--large svg{width:4rem;height:4rem}.loading-spinner{min-width:2rem}.base-button{display:flex;justify-content:center;align-items:center;box-sizing:border-box;transition:all .2s ease;text-decoration:none;width:100%;margin:0;padding:1.036em 1.625em;appearance:none;outline:none;border:none;border-radius:.4375em;font-size:.875em;line-height:1.125em;text-transform:uppercase;font-weight:700}@media screen and (min-width: 600px){.base-button{width:auto}}.base-button .icon{width:16px;height:16px;margin-top:-1px}.base-button.s-collapsed>.caption{display:none}.base-button.s-pending{background-repeat:no-repeat;background-position:center center}.base-button.s-pending .caption{margin-left:25px;visibility:hidden}@media screen and (min-width: 600px){.base-button.s-pending{background-position:1.625em center}.base-button.s-pending .caption{visibility:visible}}.base-button[readonly],.base-button[disabled]{cursor:not-allowed}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ablok-components",
3
3
  "private": false,
4
- "version": "0.0.5",
4
+ "version": "0.0.8",
5
5
  "scripts": {
6
6
  "dev": "vite",
7
7
  "build": "vue-tsc --noEmit && vite build",