@ptlm-azulejo/sidebar 0.0.1-alpha.87

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/CHANGELOG.md ADDED
@@ -0,0 +1,4 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
package/README.md ADDED
@@ -0,0 +1,54 @@
1
+ # Sidebar
2
+
3
+ TODO: describe what the Sidebar component does and when to use it.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @ptlm-azulejo/sidebar @ptlm-azulejo/themes
9
+ # or
10
+ yarn add @ptlm-azulejo/sidebar @ptlm-azulejo/themes
11
+ ```
12
+
13
+ ## Styles & theming
14
+
15
+ The component reads theme CSS variables, so it needs `@ptlm-azulejo/themes`. Import a
16
+ brand preset (it bundles the base tokens) and the component styles, then set the
17
+ brand class on the root element:
18
+
19
+ ```js
20
+ import '@ptlm-azulejo/themes/presets/leroy-merlin.css' // or /presets/adeo.css
21
+ import '@ptlm-azulejo/sidebar/style.css'
22
+ ```
23
+
24
+ ```html
25
+ <html class="preset-lm" data-theme="dark">
26
+ ```
27
+
28
+ > Without a preset **and** the `.preset-*` class, the component renders uncolored.
29
+ > See the [themes package](../themes/README.md) for brand switching, dark mode,
30
+ > and custom brands.
31
+
32
+ ## Props
33
+
34
+ | Name | Type | Default | Description |
35
+ | --- | --- | --- | --- |
36
+ | — | — | — | TODO: document the component props. |
37
+
38
+ ## Slots
39
+
40
+ | Name | Description |
41
+ | --- | --- |
42
+ | `default` | The content displayed in the component. |
43
+
44
+ ## Basic Usage
45
+
46
+ ```vue
47
+ <script setup>
48
+ import { AzSidebar } from '@ptlm-azulejo/sidebar'
49
+ </script>
50
+
51
+ <template>
52
+ <AzSidebar>Content</AzSidebar>
53
+ </template>
54
+ ```
@@ -0,0 +1,2 @@
1
+ export { default as AzSidebar } from './src/index.vue';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,iBAAiB,CAAA"}
package/dist/index.js ADDED
@@ -0,0 +1,206 @@
1
+ import { defineComponent as b, openBlock as r, createElementBlock as i, normalizeClass as a, createElementVNode as s, normalizeStyle as m, toDisplayString as p, createCommentVNode as l, Fragment as f, renderList as w, ref as g, computed as y, renderSlot as u, createVNode as h, unref as _, mergeDefaults as x } from "vue";
2
+ import { AzIconButton as C } from "@ptlm-azulejo/icon-button";
3
+ import "@ptlm-azulejo/icon-button/style.css";
4
+ const k = ["src", "alt"], S = /* @__PURE__ */ b({
5
+ __name: "SidebarHeader",
6
+ props: {
7
+ isCollapsed: { type: Boolean },
8
+ headerOptions: {}
9
+ },
10
+ setup(e) {
11
+ const t = {
12
+ sidebarHeaderContainer: "flex items-center gap-2",
13
+ sidebarHeaderLogo: "w-10 h-10 rounded flex-shrink-0",
14
+ sidebarHeaderTitle: "overflow-hidden whitespace-nowrap transition-all duration-300 font-200 font-semibold whitespace-nowrap"
15
+ };
16
+ return (n, c) => (r(), i("div", {
17
+ class: a(t.sidebarHeaderContainer)
18
+ }, [
19
+ s("img", {
20
+ class: a(t.sidebarHeaderLogo),
21
+ style: m(`background-color:${e.headerOptions.logoBgColor}`),
22
+ src: e.headerOptions.logoSrc,
23
+ alt: e.headerOptions.logoAlt
24
+ }, null, 14, k),
25
+ e.isCollapsed ? l("", !0) : (r(), i("h2", {
26
+ key: 0,
27
+ class: a(t.sidebarHeaderTitle)
28
+ }, p(e.headerOptions.sidebarTitle), 3))
29
+ ], 2));
30
+ }
31
+ }), v = (e, t) => {
32
+ const n = e.__vccOpts || e;
33
+ for (const [c, o] of t)
34
+ n[c] = o;
35
+ return n;
36
+ }, $ = /* @__PURE__ */ v(S, [["__scopeId", "data-v-1be64a50"]]), O = { key: 0 }, I = {
37
+ role: "navigation",
38
+ "aria-label": "sidebar shortcut items"
39
+ }, H = ["id", "href", "target"], B = ["id"], L = /* @__PURE__ */ b({
40
+ __name: "SidebarShortcuts",
41
+ props: {
42
+ isCollapsed: { type: Boolean },
43
+ shortcutOptions: {}
44
+ },
45
+ setup(e) {
46
+ const t = {
47
+ shortcutList: "h-12 flex items-center justify-start",
48
+ shortcutItem: "h-12 w-[70px] flex flex-col items-center justify-start gap-1",
49
+ shortcutItemIcon: "text-[24px] az az-",
50
+ shortcutItemLabel: "font-semibold text-[10px]"
51
+ };
52
+ return (n, c) => e.shortcutOptions.items && e.shortcutOptions.items.length > 0 ? (r(), i("section", O, [
53
+ s("nav", I, [
54
+ s("ul", {
55
+ role: "menu",
56
+ class: a(t.shortcutList)
57
+ }, [
58
+ (r(!0), i(f, null, w(e.shortcutOptions.items, (o) => (r(), i("div", {
59
+ key: o.id,
60
+ class: ""
61
+ }, [
62
+ o.type === "link" ? (r(), i("a", {
63
+ key: 0,
64
+ id: `shortcut-${o.id}`,
65
+ href: o.link,
66
+ target: o.target
67
+ }, [
68
+ s("div", {
69
+ class: a(t.shortcutItem)
70
+ }, [
71
+ s("i", {
72
+ class: a(`${t.shortcutItemIcon}${o.icon}`)
73
+ }, null, 2),
74
+ s("span", {
75
+ class: a([
76
+ "inline-block overflow-hidden whitespace-nowrap transition-all duration-300",
77
+ e.isCollapsed ? "max-w-0 opacity-0" : "max-w-xs opacity-100"
78
+ ])
79
+ }, [
80
+ s("p", {
81
+ class: a(t.shortcutItemLabel)
82
+ }, p(o.label), 3)
83
+ ], 2)
84
+ ], 2)
85
+ ], 8, H)) : l("", !0),
86
+ o.type === "button" ? (r(), i("button", {
87
+ key: 1,
88
+ id: `shortcut-${o.id}`
89
+ }, [
90
+ s("div", {
91
+ class: a(t.shortcutItem)
92
+ }, [
93
+ s("i", {
94
+ class: a(`${t.shortcutItemIcon}${o.icon}`)
95
+ }, null, 2),
96
+ s("span", {
97
+ class: a([
98
+ "inline-block overflow-hidden whitespace-nowrap transition-all duration-300",
99
+ e.isCollapsed ? "max-w-0 opacity-0" : "max-w-xs opacity-100"
100
+ ])
101
+ }, [
102
+ s("p", {
103
+ class: a(t.shortcutItemLabel)
104
+ }, p(o.label), 3)
105
+ ], 2)
106
+ ], 2)
107
+ ], 8, B)) : l("", !0)
108
+ ]))), 128))
109
+ ], 2)
110
+ ])
111
+ ])) : l("", !0);
112
+ }
113
+ }), z = {
114
+ showHeader: !0,
115
+ headerOptions: () => ({
116
+ showSearch: !0,
117
+ logoSrc: "",
118
+ logoAlt: "",
119
+ logoBgColor: "",
120
+ sidebarTitle: "Product name"
121
+ }),
122
+ showShortcuts: !0,
123
+ shortcutOptions: {
124
+ items: [
125
+ {
126
+ id: "dashboard",
127
+ label: "Dashboard",
128
+ icon: "ui-chevron-left",
129
+ type: "button",
130
+ onClick: () => console.log("dashboard")
131
+ }
132
+ ]
133
+ }
134
+ }, A = { class: "" }, D = { class: "" }, T = {
135
+ key: 0,
136
+ class: ""
137
+ }, j = {
138
+ key: 0,
139
+ class: ""
140
+ }, N = { class: "" }, V = {
141
+ class: "",
142
+ role: "navigation",
143
+ "aria-label": "navigation items"
144
+ }, E = { class: "" }, P = { class: "flex items-center justify-between" }, F = /* @__PURE__ */ b({
145
+ __name: "index",
146
+ props: /* @__PURE__ */ x({
147
+ showHeader: { type: Boolean },
148
+ headerOptions: {},
149
+ showShortcuts: { type: Boolean },
150
+ shortcutOptions: {}
151
+ }, z),
152
+ setup(e) {
153
+ const t = g(!1), n = y(() => t.value ? "4rem" : "300px"), c = {
154
+ sidebarContainer: "p-3 bg-white border-r transition-[width] duration-300 ease-in-out overflow-hidden whitespace-nowrap"
155
+ };
156
+ function o() {
157
+ t.value = !t.value;
158
+ }
159
+ return (d, W) => (r(), i("aside", {
160
+ class: a(c.sidebarContainer),
161
+ style: m({ width: n.value })
162
+ }, [
163
+ s("div", A, [
164
+ s("div", D, [
165
+ u(d.$slots, "header", {}, void 0, !0),
166
+ e.showHeader ? (r(), i("div", T, [
167
+ h($, {
168
+ "is-collapsed": t.value,
169
+ "header-options": e.headerOptions
170
+ }, null, 8, ["is-collapsed", "header-options"])
171
+ ])) : l("", !0)
172
+ ]),
173
+ s("div", null, [
174
+ u(d.$slots, "shortcuts", {}, void 0, !0),
175
+ e.showShortcuts ? (r(), i("div", j, [
176
+ h(L, {
177
+ "is-collapsed": t.value,
178
+ "shortcut-options": e.shortcutOptions
179
+ }, null, 8, ["is-collapsed", "shortcut-options"])
180
+ ])) : l("", !0)
181
+ ]),
182
+ s("section", N, [
183
+ s("nav", V, [
184
+ s("ul", E, [
185
+ u(d.$slots, "nav", {}, void 0, !0)
186
+ ])
187
+ ])
188
+ ]),
189
+ s("div", P, [
190
+ u(d.$slots, "footer", {}, void 0, !0),
191
+ h(_(C), {
192
+ class: "cursor-pointer",
193
+ ghost: "",
194
+ appearance: "inverse",
195
+ "aria-label": "Sidebar close button",
196
+ "icon-class": "az-ui-sidebar-collapse",
197
+ onClick: o
198
+ })
199
+ ])
200
+ ])
201
+ ], 6));
202
+ }
203
+ }), K = /* @__PURE__ */ v(F, [["__scopeId", "data-v-24046845"]]);
204
+ export {
205
+ K as AzSidebar
206
+ };
@@ -0,0 +1 @@
1
+ (function(a,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue"),require("@ptlm-azulejo/icon-button"),require("@ptlm-azulejo/icon-button/style.css")):typeof define=="function"&&define.amd?define(["exports","vue","@ptlm-azulejo/icon-button","@ptlm-azulejo/icon-button/style.css"],e):(a=typeof globalThis!="undefined"?globalThis:a||self,e(a.sidebar={},a.Vue,a["icon-button"]))})(this,function(a,e,c){"use strict";const d=["src","alt"],m=e.defineComponent({__name:"SidebarHeader",props:{isCollapsed:{type:Boolean},headerOptions:{}},setup(t){const o={sidebarHeaderContainer:"flex items-center gap-2",sidebarHeaderLogo:"w-10 h-10 rounded flex-shrink-0",sidebarHeaderTitle:"overflow-hidden whitespace-nowrap transition-all duration-300 font-200 font-semibold whitespace-nowrap"};return(n,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(o.sidebarHeaderContainer)},[e.createElementVNode("img",{class:e.normalizeClass(o.sidebarHeaderLogo),style:e.normalizeStyle(`background-color:${t.headerOptions.logoBgColor}`),src:t.headerOptions.logoSrc,alt:t.headerOptions.logoAlt},null,14,d),t.isCollapsed?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("h2",{key:0,class:e.normalizeClass(o.sidebarHeaderTitle)},e.toDisplayString(t.headerOptions.sidebarTitle),3))],2))}}),i=(t,o)=>{const n=t.__vccOpts||t;for(const[l,s]of o)n[l]=s;return n},h=i(m,[["__scopeId","data-v-1be64a50"]]),p={key:0},b={role:"navigation","aria-label":"sidebar shortcut items"},f=["id","href","target"],u=["id"],C=e.defineComponent({__name:"SidebarShortcuts",props:{isCollapsed:{type:Boolean},shortcutOptions:{}},setup(t){const o={shortcutList:"h-12 flex items-center justify-start",shortcutItem:"h-12 w-[70px] flex flex-col items-center justify-start gap-1",shortcutItemIcon:"text-[24px] az az-",shortcutItemLabel:"font-semibold text-[10px]"};return(n,l)=>t.shortcutOptions.items&&t.shortcutOptions.items.length>0?(e.openBlock(),e.createElementBlock("section",p,[e.createElementVNode("nav",b,[e.createElementVNode("ul",{role:"menu",class:e.normalizeClass(o.shortcutList)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.shortcutOptions.items,s=>(e.openBlock(),e.createElementBlock("div",{key:s.id,class:""},[s.type==="link"?(e.openBlock(),e.createElementBlock("a",{key:0,id:`shortcut-${s.id}`,href:s.link,target:s.target},[e.createElementVNode("div",{class:e.normalizeClass(o.shortcutItem)},[e.createElementVNode("i",{class:e.normalizeClass(`${o.shortcutItemIcon}${s.icon}`)},null,2),e.createElementVNode("span",{class:e.normalizeClass(["inline-block overflow-hidden whitespace-nowrap transition-all duration-300",t.isCollapsed?"max-w-0 opacity-0":"max-w-xs opacity-100"])},[e.createElementVNode("p",{class:e.normalizeClass(o.shortcutItemLabel)},e.toDisplayString(s.label),3)],2)],2)],8,f)):e.createCommentVNode("",!0),s.type==="button"?(e.openBlock(),e.createElementBlock("button",{key:1,id:`shortcut-${s.id}`},[e.createElementVNode("div",{class:e.normalizeClass(o.shortcutItem)},[e.createElementVNode("i",{class:e.normalizeClass(`${o.shortcutItemIcon}${s.icon}`)},null,2),e.createElementVNode("span",{class:e.normalizeClass(["inline-block overflow-hidden whitespace-nowrap transition-all duration-300",t.isCollapsed?"max-w-0 opacity-0":"max-w-xs opacity-100"])},[e.createElementVNode("p",{class:e.normalizeClass(o.shortcutItemLabel)},e.toDisplayString(s.label),3)],2)],2)],8,u)):e.createCommentVNode("",!0)]))),128))],2)])])):e.createCommentVNode("",!0)}}),k={showHeader:!0,headerOptions:()=>({showSearch:!0,logoSrc:"",logoAlt:"",logoBgColor:"",sidebarTitle:"Product name"}),showShortcuts:!0,shortcutOptions:{items:[{id:"dashboard",label:"Dashboard",icon:"ui-chevron-left",type:"button",onClick:()=>console.log("dashboard")}]}},y={class:""},g={class:""},w={key:0,class:""},E={key:0,class:""},V={class:""},_={class:"",role:"navigation","aria-label":"navigation items"},B={class:""},N={class:"flex items-center justify-between"},S=i(e.defineComponent({__name:"index",props:e.mergeDefaults({showHeader:{type:Boolean},headerOptions:{},showShortcuts:{type:Boolean},shortcutOptions:{}},k),setup(t){const o=e.ref(!1),n=e.computed(()=>o.value?"4rem":"300px"),l={sidebarContainer:"p-3 bg-white border-r transition-[width] duration-300 ease-in-out overflow-hidden whitespace-nowrap"};function s(){o.value=!o.value}return(r,x)=>(e.openBlock(),e.createElementBlock("aside",{class:e.normalizeClass(l.sidebarContainer),style:e.normalizeStyle({width:n.value})},[e.createElementVNode("div",y,[e.createElementVNode("div",g,[e.renderSlot(r.$slots,"header",{},void 0,!0),t.showHeader?(e.openBlock(),e.createElementBlock("div",w,[e.createVNode(h,{"is-collapsed":o.value,"header-options":t.headerOptions},null,8,["is-collapsed","header-options"])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",null,[e.renderSlot(r.$slots,"shortcuts",{},void 0,!0),t.showShortcuts?(e.openBlock(),e.createElementBlock("div",E,[e.createVNode(C,{"is-collapsed":o.value,"shortcut-options":t.shortcutOptions},null,8,["is-collapsed","shortcut-options"])])):e.createCommentVNode("",!0)]),e.createElementVNode("section",V,[e.createElementVNode("nav",_,[e.createElementVNode("ul",B,[e.renderSlot(r.$slots,"nav",{},void 0,!0)])])]),e.createElementVNode("div",N,[e.renderSlot(r.$slots,"footer",{},void 0,!0),e.createVNode(e.unref(c.AzIconButton),{class:"cursor-pointer",ghost:"",appearance:"inverse","aria-label":"Sidebar close button","icon-class":"az-ui-sidebar-collapse",onClick:s})])])],6))}}),[["__scopeId","data-v-24046845"]]);a.AzSidebar=S,Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})});
@@ -0,0 +1,14 @@
1
+ import { SidebarHeaderProps } from '../models/sidebar-header.models';
2
+
3
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<SidebarHeaderProps>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<SidebarHeaderProps>>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
4
+ export default _default;
5
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
6
+ type __VLS_TypePropsToRuntimeProps<T> = {
7
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
8
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
9
+ } : {
10
+ type: import('vue').PropType<T[K]>;
11
+ required: true;
12
+ };
13
+ };
14
+ //# sourceMappingURL=SidebarHeader.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SidebarHeader.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SidebarHeader.vue"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;;AAmFrE,wBAMG;AACH,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"}
@@ -0,0 +1,14 @@
1
+ import { SidebarShortcutsProps } from '../models/sidebar-shortcuts.models';
2
+
3
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<SidebarShortcutsProps>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<SidebarShortcutsProps>>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
4
+ export default _default;
5
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
6
+ type __VLS_TypePropsToRuntimeProps<T> = {
7
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
8
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
9
+ } : {
10
+ type: import('vue').PropType<T[K]>;
11
+ required: true;
12
+ };
13
+ };
14
+ //# sourceMappingURL=SidebarShortcuts.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SidebarShortcuts.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SidebarShortcuts.vue"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;;AAuM3E,wBAMG;AACH,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"}
@@ -0,0 +1,13 @@
1
+ import { Meta, StoryObj } from '@storybook/vue3';
2
+ import { default as Sidebar } from './index.vue';
3
+
4
+ declare const meta: Meta<typeof Sidebar>;
5
+ export default meta;
6
+ type Story = StoryObj<typeof meta>;
7
+ export declare const Default: Story;
8
+ export declare const WithoutHeader: Story;
9
+ export declare const WithoutSearch: Story;
10
+ export declare const WithShortcuts: Story;
11
+ export declare const CustomHeader: Story;
12
+ export declare const WithFooter: Story;
13
+ //# 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,CAAC;AACtD,OAAO,OAAO,MAAM,aAAa,CAAC;AAgClC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,OAAO,CAgL9B,CAAC;AACF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,aAAa,EAAE,KAI3B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAI3B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAI3B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAoB1B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAkBxB,CAAC"}
@@ -0,0 +1,77 @@
1
+ import { SidebarProps } from './models/sidebar.models';
2
+
3
+ declare function __VLS_template(): {
4
+ header?(_: {}): any;
5
+ shortcuts?(_: {}): any;
6
+ nav?(_: {}): any;
7
+ footer?(_: {}): any;
8
+ };
9
+ declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<SidebarProps>, {
10
+ showHeader: boolean;
11
+ headerOptions: () => {
12
+ showSearch: boolean;
13
+ logoSrc: string;
14
+ logoAlt: string;
15
+ logoBgColor: string;
16
+ sidebarTitle: string;
17
+ };
18
+ showShortcuts: boolean;
19
+ shortcutOptions: {
20
+ items: {
21
+ id: string;
22
+ label: string;
23
+ icon: string;
24
+ type: string;
25
+ onClick: () => void;
26
+ }[];
27
+ };
28
+ }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<SidebarProps>, {
29
+ showHeader: boolean;
30
+ headerOptions: () => {
31
+ showSearch: boolean;
32
+ logoSrc: string;
33
+ logoAlt: string;
34
+ logoBgColor: string;
35
+ sidebarTitle: string;
36
+ };
37
+ showShortcuts: boolean;
38
+ shortcutOptions: {
39
+ items: {
40
+ id: string;
41
+ label: string;
42
+ icon: string;
43
+ type: string;
44
+ onClick: () => void;
45
+ }[];
46
+ };
47
+ }>>> & Readonly<{}>, {
48
+ headerOptions: import('./models/sidebar-header.models').SidebarHeaderOptions;
49
+ shortcutOptions: import('./models/sidebar-shortcuts.models').SidebarShortcutsOptions;
50
+ showHeader: boolean;
51
+ showShortcuts: boolean;
52
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
53
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
54
+ export default _default;
55
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
56
+ type __VLS_TypePropsToRuntimeProps<T> = {
57
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
58
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
59
+ } : {
60
+ type: import('vue').PropType<T[K]>;
61
+ required: true;
62
+ };
63
+ };
64
+ type __VLS_WithDefaults<P, D> = {
65
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
66
+ default: D[K];
67
+ }> : P[K];
68
+ };
69
+ type __VLS_Prettify<T> = {
70
+ [K in keyof T]: T[K];
71
+ } & {};
72
+ type __VLS_WithTemplateSlots<T, S> = T & {
73
+ new (): {
74
+ $slots: S;
75
+ };
76
+ };
77
+ //# sourceMappingURL=index.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../src/index.vue"],"names":[],"mappings":"AAQA,OAAO,qCAAqC,CAAC;AAC7C,OAAO,EAAuB,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAuB5E,iBAAS,cAAc;oBAuMM,GAAG;uBACA,GAAG;iBACT,GAAG;oBACA,GAAG;EAK/B;AAeD,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4EAMnB,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"}
@@ -0,0 +1,12 @@
1
+ export interface SidebarHeaderProps {
2
+ isCollapsed: boolean;
3
+ headerOptions: SidebarHeaderOptions;
4
+ }
5
+ export interface SidebarHeaderOptions {
6
+ logoSrc?: string;
7
+ logoAlt?: string;
8
+ logoBgColor?: string;
9
+ showSearch?: boolean;
10
+ sidebarTitle?: string;
11
+ }
12
+ //# sourceMappingURL=sidebar-header.models.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sidebar-header.models.d.ts","sourceRoot":"","sources":["../../../src/models/sidebar-header.models.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,OAAO,CAAC;IACrB,aAAa,EAAE,oBAAoB,CAAC;CACrC;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB"}
@@ -0,0 +1,22 @@
1
+ export type SidebarShortcutsProps = {
2
+ isCollapsed: boolean;
3
+ shortcutOptions: SidebarShortcutsOptions;
4
+ };
5
+ export type SidebarShortcutsOptions = {
6
+ items: SidebarShortcutItem[];
7
+ };
8
+ export type SidebarShortcutItem = {
9
+ id: string;
10
+ label: string;
11
+ icon: string;
12
+ } & SidebarShortcutItemTypeOption;
13
+ type SidebarShortcutItemTypeOption = {
14
+ type: "button";
15
+ onClick: () => void;
16
+ } | {
17
+ type: "link";
18
+ link?: string;
19
+ target: "_blank" | "_self" | "_parent" | "_top";
20
+ };
21
+ export {};
22
+ //# sourceMappingURL=sidebar-shortcuts.models.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sidebar-shortcuts.models.d.ts","sourceRoot":"","sources":["../../../src/models/sidebar-shortcuts.models.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,qBAAqB,GAAG;IAClC,WAAW,EAAE,OAAO,CAAC;IACrB,eAAe,EAAE,uBAAuB,CAAC;CAC1C,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IACpC,KAAK,EAAE,mBAAmB,EAAE,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd,GAAG,6BAA6B,CAAC;AAElC,KAAK,6BAA6B,GAC9B;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,OAAO,EAAE,MAAM,IAAI,CAAA;CAAE,GACvC;IACE,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;CACjD,CAAC"}
@@ -0,0 +1,30 @@
1
+ import { SidebarHeaderOptions } from './sidebar-header.models';
2
+ import { SidebarShortcutsOptions } from './sidebar-shortcuts.models';
3
+
4
+ export type SidebarProps = {
5
+ showHeader?: boolean;
6
+ headerOptions?: SidebarHeaderOptions;
7
+ showShortcuts?: boolean;
8
+ shortcutOptions?: SidebarShortcutsOptions;
9
+ };
10
+ export declare const DefaultSidebarProps: {
11
+ showHeader: boolean;
12
+ headerOptions: () => {
13
+ showSearch: boolean;
14
+ logoSrc: string;
15
+ logoAlt: string;
16
+ logoBgColor: string;
17
+ sidebarTitle: string;
18
+ };
19
+ showShortcuts: boolean;
20
+ shortcutOptions: {
21
+ items: {
22
+ id: string;
23
+ label: string;
24
+ icon: string;
25
+ type: string;
26
+ onClick: () => void;
27
+ }[];
28
+ };
29
+ };
30
+ //# sourceMappingURL=sidebar.models.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sidebar.models.d.ts","sourceRoot":"","sources":["../../../src/models/sidebar.models.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAErE,MAAM,MAAM,YAAY,GAAG;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,aAAa,CAAC,EAAE,oBAAoB,CAAC;IACrC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,eAAe,CAAC,EAAE,uBAAuB,CAAC;CAC3C,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;CAqB/B,CAAC"}
package/dist/style.css ADDED
@@ -0,0 +1 @@
1
+ .font-200[data-v-1be64a50]{font-size:18px}/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */
package/package.json ADDED
@@ -0,0 +1,46 @@
1
+ {
2
+ "name": "@ptlm-azulejo/sidebar",
3
+ "version": "0.0.1-alpha.87",
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
+ "@ptlm-azulejo/themes": "*",
31
+ "@storybook/addon-essentials": "^7.0.0",
32
+ "@storybook/addon-interactions": "^7.0.0",
33
+ "@storybook/vue3": "^7.0.0",
34
+ "@storybook/vue3-vite": "^7.0.0",
35
+ "@tailwindcss/vite": "^4.0.0",
36
+ "storybook": "^7.0.0",
37
+ "tailwindcss": "^4.0.0",
38
+ "vue": "^3.3.4"
39
+ },
40
+ "peerDependencies": {
41
+ "vue": ">=3.0.0"
42
+ },
43
+ "dependencies": {
44
+ "@ptlm-azulejo/icon-button": "1.0.0-alpha.16"
45
+ }
46
+ }