@maropost-ui/liquidsky-ui 0.1.41 → 0.1.45
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 +96 -54
- package/dist/components/AppDropdown/useDropdownData.d.ts.map +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/index.css +5 -1
- package/dist/index.js +15237 -18655
- package/dist/index.js.map +1 -1
- package/dist/stories/helpers/vue-story-docs.d.ts +31 -0
- package/dist/stories/helpers/vue-story-docs.d.ts.map +1 -0
- package/dist/types/NotificationIconProps.d.ts +2 -0
- package/dist/types/NotificationIconProps.d.ts.map +1 -1
- package/dist/types/SlVueTreeNextProps.d.ts +84 -0
- package/dist/types/SlVueTreeNextProps.d.ts.map +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/utils/deduplicateObjects.d.ts +36 -0
- package/dist/utils/deduplicateObjects.d.ts.map +1 -0
- package/dist/utils/deepMerge.d.ts +15 -0
- package/dist/utils/deepMerge.d.ts.map +1 -0
- package/dist/vuetify.d.ts.map +1 -1
- package/package.json +2 -3
package/README.md
CHANGED
|
@@ -40,6 +40,102 @@ import { AppBreadcrumb } from '@maropost-ui/liquidsky-ui'
|
|
|
40
40
|
|
|
41
41
|
------------------------------------------------------------------------
|
|
42
42
|
|
|
43
|
+
------------------------------------------------------------------------
|
|
44
|
+
### Liquidsky UI in Nuxt (Vue 3 + Vuetify)
|
|
45
|
+
|
|
46
|
+
Use these steps with **Nuxt 4** (`srcDir` defaults to the [`app/` directory](https://nuxt.com/docs/4.x/directory-structure)).
|
|
47
|
+
|
|
48
|
+
#### 1. Install packages
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
npm install @maropost-ui/liquidsky-ui
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Liquidsky ships Maropost’s Vuetify setup (themes, defaults, registration) and lists **Vuetify** and other runtime libraries as **dependencies** of the package, so they are installed automatically with **`@maropost-ui/liquidsky-ui`**. You do not add **`vuetify`** (or similar) as a separate install step in your app.
|
|
55
|
+
|
|
56
|
+
Nuxt already provides **Vue** and **Vue Router** for a normal app shell.
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
#### 2. Import Liquidsky global styles (`nuxt.config.ts`)
|
|
60
|
+
|
|
61
|
+
Liquidsky’s CSS entry wires up Vuetify and library styles:
|
|
62
|
+
|
|
63
|
+
```ts
|
|
64
|
+
export default defineNuxtConfig({
|
|
65
|
+
css: ['@maropost-ui/liquidsky-ui/styles'],
|
|
66
|
+
})
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
#### 3. Register the Liquidsky / Vuetify plugin (`app/plugins/**`)
|
|
70
|
+
|
|
71
|
+
Liquidsky’s default export installs **Vuetify** (defaults, directives, aliases). Plugins must live under **`app/plugins/`**, not project-root `plugins/`, so Nuxt 4 discovers them automatically.
|
|
72
|
+
|
|
73
|
+
Example `app/plugins/liquidsky-ui.ts`:
|
|
74
|
+
|
|
75
|
+
```ts
|
|
76
|
+
import LiquidskyUI from '@maropost-ui/liquidsky-ui'
|
|
77
|
+
|
|
78
|
+
export default defineNuxtPlugin({
|
|
79
|
+
name: 'liquidsky-ui',
|
|
80
|
+
enforce: 'post',
|
|
81
|
+
async setup(nuxtApp) {
|
|
82
|
+
// Liquidsky’s install() is async; Vue does not await app.use(). Awaiting avoids
|
|
83
|
+
// SSR rendering before Vuetify is registered.
|
|
84
|
+
await Promise.resolve(LiquidskyUI.install(nuxtApp.vueApp))
|
|
85
|
+
},
|
|
86
|
+
})
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Notes:
|
|
90
|
+
|
|
91
|
+
- Prefer **`LiquidskyUI.install`** + **`await`** as above rather than **`vueApp.use(LiquidskyUI)`**, so SSR waits for registration.
|
|
92
|
+
- To adjust Vuetify (themes, **`defaults`**, component overrides, etc.), pass a second argument to **`install`**. It is merged with Liquidsky’s built-in config (the same options shape as **`createLiquidSkyVuetify`** from **`@maropost-ui/liquidsky-ui`**):
|
|
93
|
+
|
|
94
|
+
```ts
|
|
95
|
+
await Promise.resolve(
|
|
96
|
+
LiquidskyUI.install(nuxtApp.vueApp, {
|
|
97
|
+
defaults: {
|
|
98
|
+
// e.g. change overlay attach away from ".maropost-app"
|
|
99
|
+
global: { attach: '#app' },
|
|
100
|
+
},
|
|
101
|
+
}),
|
|
102
|
+
)
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
#### 4. Wrap the shell with **`v-app`** (*`maropost-app` optional*)
|
|
106
|
+
|
|
107
|
+
Put a root **`v-app`** around your UI **[`app/app.vue`](https://nuxt.com/docs/4.x/directory-structure/app/app)** (often with **`v-main`** for page content)—that matches normal Vuetify usage for layout and app-wide behavior.
|
|
108
|
+
|
|
109
|
+
Adding **`class="maropost-app"`** is **optional**:
|
|
110
|
+
|
|
111
|
+
- With **Liquidsky’s defaults**, Vuetify uses **`defaults.global.attach: '.maropost-app'`**, so floated layers (menus, tooltips, dialogs) expect an element with that class. For example `<v-app class="maropost-app">` is an easy match.
|
|
112
|
+
- If you prefer not to use that class, override **`defaults.global.attach`** when you create/customize Liquidsky’s Vuetify instance so it points at your own wrapper—or another attach target—as long as it exists in the DOM.
|
|
113
|
+
|
|
114
|
+
```vue
|
|
115
|
+
<template>
|
|
116
|
+
<v-app class="maropost-app">
|
|
117
|
+
<!-- Nuxt replaces this with layouts/pages -->
|
|
118
|
+
<NuxtLayout />
|
|
119
|
+
</v-app>
|
|
120
|
+
</template>
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
#### 5. Use components
|
|
124
|
+
|
|
125
|
+
Import from the package wherever you need them:
|
|
126
|
+
|
|
127
|
+
```vue
|
|
128
|
+
<script setup lang="ts">
|
|
129
|
+
import { AppBreadcrumb, TheNotificationIcon } from '@maropost-ui/liquidsky-ui'
|
|
130
|
+
</script>
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
You may also keep using **`v-btn`**, **`v-tooltip`**, etc., after Liquidsky is installed—they are registered on the Vue app globally.
|
|
134
|
+
|
|
135
|
+
-------------------------------------------------------------------------
|
|
136
|
+
|
|
137
|
+
-------------------------------------------------------------------------
|
|
138
|
+
|
|
43
139
|
|
|
44
140
|
## @maropost-ui/liquidsky-ui Local Development Guide
|
|
45
141
|
Use these methods to test @maropost-ui/liquidsky-ui changes in your consuming project (e.g., commerce-frontend or commerce-backoffice) without publishing to npm. Both leverage npm's linking and packaging features for rapid iteration in your app workflow.
|
|
@@ -188,59 +284,5 @@ stories/
|
|
|
188
284
|
├── utils/ # Utility stories
|
|
189
285
|
```
|
|
190
286
|
|
|
191
|
-
## Best Practices for Auto-Documentation
|
|
192
|
-
|
|
193
|
-
### 1. Use JSDoc Comments
|
|
194
|
-
|
|
195
|
-
```typescript
|
|
196
|
-
/**
|
|
197
|
-
* @description Search functionality composable with route integration
|
|
198
|
-
* @example
|
|
199
|
-
* ```typescript
|
|
200
|
-
* const { keyword, submitSearch } = useSearch()
|
|
201
|
-
* submitSearch()
|
|
202
|
-
* ```
|
|
203
|
-
*/
|
|
204
|
-
export function useSearch(): SearchInterface
|
|
205
|
-
```
|
|
206
|
-
|
|
207
|
-
### 2. Document Component Props
|
|
208
|
-
|
|
209
|
-
```typescript
|
|
210
|
-
export interface SearchBarProps {
|
|
211
|
-
/** Search placeholder text */
|
|
212
|
-
placeholder?: string
|
|
213
|
-
/** Enable automatic route integration */
|
|
214
|
-
useRouteIntegration?: boolean
|
|
215
|
-
}
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
### 3. Provide Usage Examples
|
|
219
|
-
|
|
220
|
-
```vue
|
|
221
|
-
<!--
|
|
222
|
-
Usage Example:
|
|
223
|
-
<TheSearchBar
|
|
224
|
-
placeholder="Search products..."
|
|
225
|
-
@search="handleSearch"
|
|
226
|
-
/>
|
|
227
|
-
-->
|
|
228
|
-
```
|
|
229
|
-
|
|
230
|
-
### 4. Use TypeScript Types
|
|
231
|
-
|
|
232
|
-
```typescript
|
|
233
|
-
// Explicit return types help documentation
|
|
234
|
-
export function useValidation(): ValidationInterface {
|
|
235
|
-
// ...
|
|
236
|
-
}
|
|
237
|
-
```
|
|
238
|
-
|
|
239
|
-
## Contributing
|
|
240
|
-
|
|
241
|
-
1. Follow the existing code style and patterns
|
|
242
|
-
2. Add JSDoc comments for new functions and components
|
|
243
|
-
3. Update this README when adding new features
|
|
244
|
-
4. Ensure all components are properly typed with TypeScript
|
|
245
287
|
|
|
246
288
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDropdownData.d.ts","sourceRoot":"","sources":["../../../src/components/AppDropdown/useDropdownData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,KAAK,GAAG,EAAE,MAAM,KAAK,CAAC;AAErD,OAAO,KAAK,EAGV,kBAAkB,EAClB,WAAW,EACZ,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"useDropdownData.d.ts","sourceRoot":"","sources":["../../../src/components/AppDropdown/useDropdownData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,KAAK,GAAG,EAAE,MAAM,KAAK,CAAC;AAErD,OAAO,KAAK,EAGV,kBAAkB,EAClB,WAAW,EACZ,MAAM,8BAA8B,CAAC;AAGtC;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,CAAC,GAAG,GAAG,EAC7C,WAAW,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,EAC5B,OAAO,CAAC,EAAE,kBAAkB,CAAC,CAAC,CAAC,EAC/B,YAAY,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,EACtC,OAAO,GAAE,MAAM,EAAO,EACtB,WAAW,GAAE,CAAC,IAAI,EAAE,CAAC,KAAK,CAAe,EACzC,KAAK,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,EAC/B,MAAM,GAAE,GAAG,CAAC,MAAM,CAAW,EAC7B,YAAY,GAAE,GAAG,CAAC,CAAC,EAAE,CAAW,EAChC,KAAK,GAAE,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE,GAAG,SAAS,CAAkB,EAChD,iBAAiB,GAAE,MAAM,IAAe;;;;;;;;;;;;kCA2MH,OAAO;gCAST,OAAO;;EAgC3C"}
|
|
@@ -34,5 +34,6 @@ export { default as AlertModal } from "./AlertModal.vue";
|
|
|
34
34
|
export { default as TheOnboardingBanner } from "./TheOnboardingBanner.vue";
|
|
35
35
|
export { default as TheOnboardingScreenChecklists } from "./TheOnboardingScreenChecklists.vue";
|
|
36
36
|
export { default as AppButton } from "./AppButton.vue";
|
|
37
|
+
export { default as SlVueTreeNext } from "./SlVueTreeNext.vue";
|
|
37
38
|
export { default as timezoneList } from './TheTimezone/timezone.json';
|
|
38
39
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAE/E,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAChF,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AAC1F,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAEpF,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,+B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