@azulejo-kit/button 1.3.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/LICENSE.md +21 -0
- package/README.md +44 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +68 -0
- package/dist/index.umd.cjs +1 -0
- package/dist/src/index.stories.d.ts +19 -0
- package/dist/src/index.stories.d.ts.map +1 -0
- package/dist/src/index.vue.d.ts +125 -0
- package/dist/src/index.vue.d.ts.map +1 -0
- package/dist/style.css +1 -0
- package/package.json +43 -0
package/LICENSE.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Button
|
|
2
|
+
|
|
3
|
+
Buttons are key interactive elements used to perform actions and can be used as standalone element, or as part of another component. Their appearance depends on the type of action required from the user and the context in which they are used.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @azulejo-kit/button
|
|
9
|
+
# or
|
|
10
|
+
yarn add @azulejo-kit/button
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Props
|
|
14
|
+
|
|
15
|
+
| Name | Type | Default | Description |
|
|
16
|
+
| --- | --- | --- | --- |
|
|
17
|
+
| `appearance` | `"standard"` \| `"danger"` \| `"inverse"` \| `"accent"` | `"standard"` | Defines the visual style of the button. |
|
|
18
|
+
| `size` | `"s"` \| `"m"` \| `"l"` | `"m"` | Determines the size of the button. |
|
|
19
|
+
| `disabled` | `boolean` | — | If `true`, disables the button, making it non-interactive. |
|
|
20
|
+
| `ghost` | `boolean` | — | If `true`, applies a "ghost" style to the button. |
|
|
21
|
+
| `outlined` | `boolean` | — | If `true`, the button gets an outlined style. |
|
|
22
|
+
| `iconPosition` | `"left"` \| `"right"` \| `"only"` | — | Controls the positioning of an icon in the button. |
|
|
23
|
+
| `type` | `"button"` \| `"reset"` \| `"submit"` | `"button"` | Specifies the button's HTML `type` attribute. |
|
|
24
|
+
| `isLoading` | `boolean` | — | If `true`, a loading state is displayed. |
|
|
25
|
+
|
|
26
|
+
## Slots
|
|
27
|
+
|
|
28
|
+
| Name | Description |
|
|
29
|
+
| --- | --- |
|
|
30
|
+
| `default` | The content displayed in the button. |
|
|
31
|
+
| `icon` | Use this slot to insert an icon for the Button. |
|
|
32
|
+
|
|
33
|
+
## Basic Usage
|
|
34
|
+
|
|
35
|
+
```vue
|
|
36
|
+
<script setup>
|
|
37
|
+
import { AzButton } from '@azulejo-kit/button'
|
|
38
|
+
</script>
|
|
39
|
+
|
|
40
|
+
<template>
|
|
41
|
+
<AzButton appearance="standard" size="m">Click me</AzButton>
|
|
42
|
+
<AzButton appearance="danger" ghost>Delete</AzButton>
|
|
43
|
+
</template>
|
|
44
|
+
```
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,iBAAiB,CAAA"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { defineComponent as c, computed as b, openBlock as o, createElementBlock as s, normalizeClass as r, renderSlot as a, createCommentVNode as l, createElementVNode as u, normalizeStyle as y, createTextVNode as p } from "vue";
|
|
2
|
+
const m = ["disabled", "type"], g = {
|
|
3
|
+
key: 0,
|
|
4
|
+
class: "btn__icon"
|
|
5
|
+
}, $ = {
|
|
6
|
+
key: 1,
|
|
7
|
+
class: "btn__icon",
|
|
8
|
+
style: { position: "absolute" }
|
|
9
|
+
}, f = {
|
|
10
|
+
key: 2,
|
|
11
|
+
class: "btn__icon"
|
|
12
|
+
}, h = {
|
|
13
|
+
key: 4,
|
|
14
|
+
class: "btn__icon"
|
|
15
|
+
}, z = /* @__PURE__ */ c({
|
|
16
|
+
__name: "index",
|
|
17
|
+
props: {
|
|
18
|
+
appearance: { default: "standard" },
|
|
19
|
+
size: { default: "m" },
|
|
20
|
+
disabled: { type: Boolean },
|
|
21
|
+
ghost: { type: Boolean },
|
|
22
|
+
outlined: { type: Boolean },
|
|
23
|
+
iconPosition: {},
|
|
24
|
+
type: { default: "button" },
|
|
25
|
+
isLoading: { type: Boolean }
|
|
26
|
+
},
|
|
27
|
+
setup(n) {
|
|
28
|
+
const e = n, d = b(() => ({
|
|
29
|
+
[`btn--${e.appearance}`]: e.appearance && e.appearance !== "standard",
|
|
30
|
+
[`btn--${e.size}`]: e.size && e.size !== "m",
|
|
31
|
+
"btn--ghost": e.ghost,
|
|
32
|
+
"btn--outlined": e.outlined,
|
|
33
|
+
"btn--icon-only": e.iconPosition === "only"
|
|
34
|
+
}));
|
|
35
|
+
return (t, i) => (o(), s("button", {
|
|
36
|
+
class: r(["btn", d.value]),
|
|
37
|
+
disabled: n.disabled,
|
|
38
|
+
type: n.type
|
|
39
|
+
}, [
|
|
40
|
+
t.$slots.icon && n.iconPosition === "left" && !n.isLoading ? (o(), s("span", g, [
|
|
41
|
+
a(t.$slots, "icon")
|
|
42
|
+
])) : l("", !0),
|
|
43
|
+
n.isLoading ? (o(), s("span", $, [...i[0] || (i[0] = [
|
|
44
|
+
u("span", {
|
|
45
|
+
class: "btn__spinner",
|
|
46
|
+
"aria-hidden": "true"
|
|
47
|
+
}, null, -1)
|
|
48
|
+
])])) : l("", !0),
|
|
49
|
+
t.$slots.icon && n.iconPosition === "only" ? (o(), s("span", f, [
|
|
50
|
+
a(t.$slots, "icon")
|
|
51
|
+
])) : (o(), s("span", {
|
|
52
|
+
key: 3,
|
|
53
|
+
class: "btn__label",
|
|
54
|
+
style: y({ visibility: n.isLoading ? "hidden" : "visible" })
|
|
55
|
+
}, [
|
|
56
|
+
a(t.$slots, "default", {}, () => [
|
|
57
|
+
i[1] || (i[1] = p("Clica aqui", -1))
|
|
58
|
+
])
|
|
59
|
+
], 4)),
|
|
60
|
+
t.$slots.icon && n.iconPosition === "right" && !n.isLoading ? (o(), s("span", h, [
|
|
61
|
+
a(t.$slots, "icon")
|
|
62
|
+
])) : l("", !0)
|
|
63
|
+
], 10, m));
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
export {
|
|
67
|
+
z as AzButton
|
|
68
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(o,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(o=typeof globalThis!="undefined"?globalThis:o||self,e(o.button={},o.Vue))})(this,function(o,e){"use strict";const l=["disabled","type"],a={key:0,class:"btn__icon"},d={key:1,class:"btn__icon",style:{position:"absolute"}},c={key:2,class:"btn__icon"},r={key:4,class:"btn__icon"},b=e.defineComponent({__name:"index",props:{appearance:{default:"standard"},size:{default:"m"},disabled:{type:Boolean},ghost:{type:Boolean},outlined:{type:Boolean},iconPosition:{},type:{default:"button"},isLoading:{type:Boolean}},setup(n){const t=n,p=e.computed(()=>({[`btn--${t.appearance}`]:t.appearance&&t.appearance!=="standard",[`btn--${t.size}`]:t.size&&t.size!=="m","btn--ghost":t.ghost,"btn--outlined":t.outlined,"btn--icon-only":t.iconPosition==="only"}));return(i,s)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["btn",p.value]),disabled:n.disabled,type:n.type},[i.$slots.icon&&n.iconPosition==="left"&&!n.isLoading?(e.openBlock(),e.createElementBlock("span",a,[e.renderSlot(i.$slots,"icon")])):e.createCommentVNode("",!0),n.isLoading?(e.openBlock(),e.createElementBlock("span",d,[...s[0]||(s[0]=[e.createElementVNode("span",{class:"btn__spinner","aria-hidden":"true"},null,-1)])])):e.createCommentVNode("",!0),i.$slots.icon&&n.iconPosition==="only"?(e.openBlock(),e.createElementBlock("span",c,[e.renderSlot(i.$slots,"icon")])):(e.openBlock(),e.createElementBlock("span",{key:3,class:"btn__label",style:e.normalizeStyle({visibility:n.isLoading?"hidden":"visible"})},[e.renderSlot(i.$slots,"default",{},()=>[s[1]||(s[1]=e.createTextVNode("Clica aqui",-1))])],4)),i.$slots.icon&&n.iconPosition==="right"&&!n.isLoading?(e.openBlock(),e.createElementBlock("span",r,[e.renderSlot(i.$slots,"icon")])):e.createCommentVNode("",!0)],10,l))}});o.AzButton=b,Object.defineProperty(o,Symbol.toStringTag,{value:"Module"})});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/vue3';
|
|
2
|
+
import { default as Button } from './index.vue';
|
|
3
|
+
|
|
4
|
+
declare const meta: Meta<typeof Button>;
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<typeof meta>;
|
|
7
|
+
export declare const Primary: Story;
|
|
8
|
+
export declare const Secondary: Story;
|
|
9
|
+
export declare const Ghost: Story;
|
|
10
|
+
export declare const Disabled: Story;
|
|
11
|
+
export declare const Small: Story;
|
|
12
|
+
export declare const Large: Story;
|
|
13
|
+
export declare const Accent: Story;
|
|
14
|
+
export declare const Danger: Story;
|
|
15
|
+
export declare const Inverse: Story;
|
|
16
|
+
export declare const Loading: Story;
|
|
17
|
+
export declare const Outlined: Story;
|
|
18
|
+
export declare const Submit: Story;
|
|
19
|
+
//# sourceMappingURL=index.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.stories.d.ts","sourceRoot":"","sources":["../../src/index.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AACrD,OAAO,MAAM,MAAM,aAAa,CAAA;AAEhC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,MAAM,CA+E7B,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAElC,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,KAKvB,CAAA;AAED,eAAO,MAAM,KAAK,EAAE,KAKnB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KAKtB,CAAA;AAED,eAAO,MAAM,KAAK,EAAE,KAKnB,CAAA;AAED,eAAO,MAAM,KAAK,EAAE,KAKnB,CAAA;AAED,eAAO,MAAM,MAAM,EAAE,KAKpB,CAAA;AAED,eAAO,MAAM,MAAM,EAAE,KAKpB,CAAA;AAED,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAA;AAED,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KAKtB,CAAA;AAED,eAAO,MAAM,MAAM,EAAE,KAKpB,CAAA"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { VNode } from 'vue';
|
|
2
|
+
|
|
3
|
+
declare function __VLS_template(): Readonly<{
|
|
4
|
+
/**
|
|
5
|
+
* The content displayed in the button.
|
|
6
|
+
*/
|
|
7
|
+
default: string;
|
|
8
|
+
/**
|
|
9
|
+
* Use this slot to insert an icon for the Button.
|
|
10
|
+
*/
|
|
11
|
+
icon?: () => VNode[];
|
|
12
|
+
}> & {
|
|
13
|
+
/**
|
|
14
|
+
* The content displayed in the button.
|
|
15
|
+
*/
|
|
16
|
+
default: string;
|
|
17
|
+
/**
|
|
18
|
+
* Use this slot to insert an icon for the Button.
|
|
19
|
+
*/
|
|
20
|
+
icon?: () => VNode[];
|
|
21
|
+
};
|
|
22
|
+
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
23
|
+
/**
|
|
24
|
+
* Defines the visual style of the button.
|
|
25
|
+
*/
|
|
26
|
+
appearance?: "standard" | "accent" | "danger" | "inverse";
|
|
27
|
+
/**
|
|
28
|
+
* Determines the size of the button.
|
|
29
|
+
*/
|
|
30
|
+
size?: "s" | "m" | "l";
|
|
31
|
+
/**
|
|
32
|
+
* If `true`, disables the button, making it non-interactive.
|
|
33
|
+
*/
|
|
34
|
+
disabled?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* If `true`, applies a "ghost" style to the button, typically a transparent background with a border.
|
|
37
|
+
*/
|
|
38
|
+
ghost?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* If `true`, the button gets an outlined style, usually with just the border and no solid background.
|
|
41
|
+
*/
|
|
42
|
+
outlined?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Controls the positioning of an icon in the button.
|
|
45
|
+
*/
|
|
46
|
+
iconPosition?: "left" | "right" | "only";
|
|
47
|
+
/**
|
|
48
|
+
* Specifies the button's HTML `type` attribute.
|
|
49
|
+
*/
|
|
50
|
+
type?: "button" | "reset" | "submit";
|
|
51
|
+
/**
|
|
52
|
+
* If `true`, a loading state is displayed.
|
|
53
|
+
*/
|
|
54
|
+
isLoading?: boolean;
|
|
55
|
+
}>, {
|
|
56
|
+
appearance: string;
|
|
57
|
+
size: string;
|
|
58
|
+
type: string;
|
|
59
|
+
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
60
|
+
/**
|
|
61
|
+
* Defines the visual style of the button.
|
|
62
|
+
*/
|
|
63
|
+
appearance?: "standard" | "accent" | "danger" | "inverse";
|
|
64
|
+
/**
|
|
65
|
+
* Determines the size of the button.
|
|
66
|
+
*/
|
|
67
|
+
size?: "s" | "m" | "l";
|
|
68
|
+
/**
|
|
69
|
+
* If `true`, disables the button, making it non-interactive.
|
|
70
|
+
*/
|
|
71
|
+
disabled?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* If `true`, applies a "ghost" style to the button, typically a transparent background with a border.
|
|
74
|
+
*/
|
|
75
|
+
ghost?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* If `true`, the button gets an outlined style, usually with just the border and no solid background.
|
|
78
|
+
*/
|
|
79
|
+
outlined?: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Controls the positioning of an icon in the button.
|
|
82
|
+
*/
|
|
83
|
+
iconPosition?: "left" | "right" | "only";
|
|
84
|
+
/**
|
|
85
|
+
* Specifies the button's HTML `type` attribute.
|
|
86
|
+
*/
|
|
87
|
+
type?: "button" | "reset" | "submit";
|
|
88
|
+
/**
|
|
89
|
+
* If `true`, a loading state is displayed.
|
|
90
|
+
*/
|
|
91
|
+
isLoading?: boolean;
|
|
92
|
+
}>, {
|
|
93
|
+
appearance: string;
|
|
94
|
+
size: string;
|
|
95
|
+
type: string;
|
|
96
|
+
}>>> & Readonly<{}>, {
|
|
97
|
+
appearance: "standard" | "accent" | "danger" | "inverse";
|
|
98
|
+
size: "s" | "m" | "l";
|
|
99
|
+
type: "button" | "reset" | "submit";
|
|
100
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
101
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
102
|
+
export default _default;
|
|
103
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
104
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
105
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
106
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
107
|
+
} : {
|
|
108
|
+
type: import('vue').PropType<T[K]>;
|
|
109
|
+
required: true;
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
type __VLS_WithDefaults<P, D> = {
|
|
113
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
114
|
+
default: D[K];
|
|
115
|
+
}> : P[K];
|
|
116
|
+
};
|
|
117
|
+
type __VLS_Prettify<T> = {
|
|
118
|
+
[K in keyof T]: T[K];
|
|
119
|
+
} & {};
|
|
120
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
121
|
+
new (): {
|
|
122
|
+
$slots: S;
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
//# sourceMappingURL=index.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../src/index.vue"],"names":[],"mappings":"AAEA,OAAO,EAAY,KAAK,KAAK,EAAE,MAAM,KAAK,CAAA;AAgF1C,iBAAS,cAAc;IA5BrB;;OAEG;aACM,MAAM;IACf;;OAEG;WACI,MAAM,KAAK,EAAE;;IAPpB;;OAEG;aACM,MAAM;IACf;;OAEG;WACI,MAAM,KAAK,EAAE;EA6JrB;AA0CD,QAAA,MAAM,eAAe;IAMjB;;OAEG;iBACU,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS;IACzD;;OAEG;WACI,GAAG,GAAG,GAAG,GAAG,GAAG;IACtB;;OAEG;eACQ,OAAO;IAClB;;OAEG;YACK,OAAO;IACf;;OAEG;eACQ,OAAO;IAClB;;OAEG;mBACY,MAAM,GAAG,OAAO,GAAG,MAAM;IACxC;;OAEG;WACI,QAAQ,GAAG,OAAO,GAAG,QAAQ;IACpC;;OAEG;gBACS,OAAO;;;;;;IA/BnB;;OAEG;iBACU,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS;IACzD;;OAEG;WACI,GAAG,GAAG,GAAG,GAAG,GAAG;IACtB;;OAEG;eACQ,OAAO;IAClB;;OAEG;YACK,OAAO;IACf;;OAEG;eACQ,OAAO;IAClB;;OAEG;mBACY,MAAM,GAAG,OAAO,GAAG,MAAM;IACxC;;OAEG;WACI,QAAQ,GAAG,OAAO,GAAG,QAAQ;IACpC;;OAEG;gBACS,OAAO;;;;;;gBA5BN,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS;UAIlD,GAAG,GAAG,GAAG,GAAG,GAAG;UAoBf,QAAQ,GAAG,OAAO,GAAG,QAAQ;4EAMtC,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AACxG,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC;AAC9M,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAE1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QACxE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KACb,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACT,CAAC;AACN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC;AACxD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
|
package/dist/style.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-font-weight:initial;--tw-duration:initial}}}.btn{cursor:pointer;justify-content:center;align-items:center;gap:calc(var(--spacing,.25rem) * 2);border-radius:var(--radius-l,.375rem);border-style:var(--tw-border-style);padding-inline:calc(var(--spacing,.25rem) * 4);padding-block:calc(var(--spacing,.25rem) * 2);font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25 / .875)));--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500);transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function,cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration,var(--default-transition-duration,.15s));--tw-duration:.2s;border-width:1px;border-color:#0000;border-top-left-radius:.25rem;border-bottom-left-radius:.25rem;transition-duration:.2s;display:inline-flex;position:relative}.btn:disabled{cursor:not-allowed;opacity:.5}.btn{background-color:var(--color-brand,#007a3e);color:var(--color-white,#fff)}@media (hover:hover){.btn:hover{background-color:var(--color-brand-dark,#005f30)}}.btn--s{padding-inline:calc(var(--spacing,.25rem) * 3);padding-block:calc(var(--spacing,.25rem) * 1);font-size:var(--text-xs,.75rem);line-height:var(--tw-leading,var(--text-xs--line-height,calc(1 / .75)))}.btn--l{padding-inline:calc(var(--spacing,.25rem) * 6);padding-block:calc(var(--spacing,.25rem) * 3);font-size:var(--text-base,1rem);line-height:var(--tw-leading,var(--text-base--line-height, 1.5 ))}.btn--accent{background-color:var(--color-primary-01-400,#78be20);color:var(--color-white,#fff)}@media (hover:hover){.btn--accent:hover{background-color:var(--color-primary-01-500,#46a610)}}.btn--danger{background-color:var(--color-danger-500,#ea302d);color:var(--color-white,#fff)}@media (hover:hover){.btn--danger:hover{background-color:var(--color-danger-600,#c61112)}}.btn--inverse{border-color:var(--color-white,#fff);background-color:var(--color-white,#fff);color:var(--color-primary,#007a3e)}@media (hover:hover){.btn--inverse:hover{background-color:var(--color-grey-100,#e6e6e6)}}.btn--ghost{color:var(--color-primary,#007a3e);background-color:#0000;border-color:#0000}@media (hover:hover){.btn--ghost:hover{background-color:var(--color-primary-light,#f0faf5)}}.btn--outlined{border-color:var(--color-primary,#007a3e);color:var(--color-primary,#007a3e);background-color:#0000}@media (hover:hover){.btn--outlined:hover{background-color:var(--color-primary-light,#f0faf5)}}.btn--icon-only{padding-inline:calc(var(--spacing,.25rem) * 2)}.btn__icon{height:calc(var(--spacing,.25rem) * 4);width:calc(var(--spacing,.25rem) * 4);justify-content:center;align-items:center;display:flex}.btn__spinner{height:calc(var(--spacing,.25rem) * 4);width:calc(var(--spacing,.25rem) * 4);animation:var(--animate-spin,spin 1s linear infinite);border-style:var(--tw-border-style);border-width:2px;border-color:#0000 currentColor currentColor;border-radius:3.40282e38px;display:block}.btn__label{display:inline-block}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}
|
package/package.json
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@azulejo-kit/button",
|
|
3
|
+
"version": "1.3.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "./dist/index.umd.cjs",
|
|
6
|
+
"module": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js",
|
|
12
|
+
"require": "./dist/index.umd.cjs"
|
|
13
|
+
},
|
|
14
|
+
"./style.css": "./dist/style.css"
|
|
15
|
+
},
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "vite build",
|
|
18
|
+
"test": "vitest --run --passWithNoTests",
|
|
19
|
+
"storybook": "storybook dev -p 6006",
|
|
20
|
+
"build-storybook": "storybook build"
|
|
21
|
+
},
|
|
22
|
+
"publishConfig": {
|
|
23
|
+
"access": "public",
|
|
24
|
+
"registry": "https://registry.npmjs.org"
|
|
25
|
+
},
|
|
26
|
+
"files": [
|
|
27
|
+
"dist/*"
|
|
28
|
+
],
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@storybook/addon-essentials": "^7.0.0",
|
|
31
|
+
"@storybook/addon-interactions": "^7.0.0",
|
|
32
|
+
"@storybook/vue3": "^7.0.0",
|
|
33
|
+
"@storybook/vue3-vite": "^7.0.0",
|
|
34
|
+
"@tailwindcss/vite": "^4.0.0",
|
|
35
|
+
"storybook": "^7.0.0",
|
|
36
|
+
"tailwindcss": "^4.0.0",
|
|
37
|
+
"vue": "^3.3.4"
|
|
38
|
+
},
|
|
39
|
+
"peerDependencies": {
|
|
40
|
+
"vue": ">=3.0.0"
|
|
41
|
+
},
|
|
42
|
+
"gitHead": "a6711e085fc4b083654f8223f01f7a3462e0c66f"
|
|
43
|
+
}
|