sprintify-ui 0.6.88 → 0.7.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/README.md +11 -11
- package/dist/sprintify-ui.es.js +245 -244
- package/dist/tailwindcss/theme.js +1 -1
- package/dist/types/components/index.d.ts +2 -2
- package/dist/types/index.d.ts +2 -1
- package/dist/types/stores/snackbars.d.ts +19 -0
- package/dist/types/types/index.d.ts +4 -4
- package/package.json +1 -1
- package/src/components/BaseApp.vue +2 -2
- package/src/components/{BaseAppNotifications.vue → BaseAppSnackbars.vue} +9 -9
- package/src/components/BaseCropper.stories.js +3 -3
- package/src/components/BaseCropperModal.stories.js +3 -3
- package/src/components/BaseDataTable.stories.js +3 -3
- package/src/components/BaseDataTable.vue +4 -4
- package/src/components/BaseFilePicker.stories.js +3 -3
- package/src/components/BaseFilePicker.vue +4 -4
- package/src/components/BaseFilePickerCrop.stories.js +3 -3
- package/src/components/BaseFileUploader.stories.js +3 -3
- package/src/components/BaseFileUploader.vue +3 -3
- package/src/components/BaseForm.stories.js +3 -0
- package/src/components/BaseForm.vue +4 -4
- package/src/components/BaseHasMany.stories.js +5 -5
- package/src/components/BaseMediaLibrary.vue +3 -3
- package/src/components/BaseTagAutocomplete.stories.js +11 -5
- package/src/components/BaseTagAutocomplete.vue +3 -3
- package/src/components/BaseTagAutocompleteFetch.stories.js +3 -3
- package/src/components/index.ts +2 -2
- package/src/index.ts +2 -1
- package/src/stores/{notifications.ts → snackbars.ts} +15 -13
- package/src/stories/List.stories.js +3 -3
- package/src/stories/PageShow.vue +4 -4
- package/src/types/index.ts +4 -4
- package/dist/types/stores/notifications.d.ts +0 -10
- /package/dist/types/components/{BaseAppNotifications.vue.d.ts → BaseAppSnackbars.vue.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -142,13 +142,13 @@ Components({
|
|
|
142
142
|
```
|
|
143
143
|
|
|
144
144
|
### Notifications and Dialogs
|
|
145
|
-
To use notifications and dialogs, your main layout must contain the `<
|
|
145
|
+
To use notifications and dialogs, your main layout must contain the `<BaseAppSnackbars>` and `<BaseAppDialogs>` components.
|
|
146
146
|
These components will observe the Pinia store and render dialogs and notifications.
|
|
147
147
|
|
|
148
148
|
```vue
|
|
149
149
|
<template>
|
|
150
150
|
<RouterView></RouterView>
|
|
151
|
-
<
|
|
151
|
+
<BaseAppSnackbars />
|
|
152
152
|
<BaseAppDialogs />
|
|
153
153
|
</template>
|
|
154
154
|
|
|
@@ -156,18 +156,18 @@ These components will observe the Pinia store and render dialogs and notificatio
|
|
|
156
156
|
</script>
|
|
157
157
|
```
|
|
158
158
|
|
|
159
|
-
#### Custom
|
|
159
|
+
#### Custom snackbars and dialogs
|
|
160
160
|
|
|
161
|
-
You may 100% customize the look and feel of dialogs and
|
|
161
|
+
You may 100% customize the look and feel of dialogs and snackbars by removing `<BaseApp>` and instead creating your own render logic. Here's a simple example to render snackbars:
|
|
162
162
|
|
|
163
163
|
```vue
|
|
164
164
|
<template>
|
|
165
165
|
<Teleport to="body">
|
|
166
166
|
<div class="pointer-events-none fixed inset-0 flex items-end justify-end p-6 md:p-8">
|
|
167
167
|
<div class="w-full max-w-sm">
|
|
168
|
-
<div v-for="
|
|
169
|
-
<h2>{{
|
|
170
|
-
<p>{{
|
|
168
|
+
<div v-for="snackbar in snackbars" :key="snackbar.id">
|
|
169
|
+
<h2>{{ snackbar.title }}</h2>
|
|
170
|
+
<p>{{ snackbar.text }}</p>
|
|
171
171
|
</div>
|
|
172
172
|
</div>
|
|
173
173
|
</div>
|
|
@@ -175,12 +175,12 @@ You may 100% customize the look and feel of dialogs and notifications by removin
|
|
|
175
175
|
</template>
|
|
176
176
|
|
|
177
177
|
<script lang="ts" setup>
|
|
178
|
-
import {
|
|
178
|
+
import { useSnackbarsStore } from 'sprintify-ui';
|
|
179
179
|
|
|
180
|
-
const
|
|
180
|
+
const snackbarsStore = useSnackbarsStore();
|
|
181
181
|
|
|
182
|
-
const
|
|
183
|
-
return
|
|
182
|
+
const snackbars = computed(() => {
|
|
183
|
+
return snackbarsStore.snackbars;
|
|
184
184
|
});
|
|
185
185
|
</script>
|
|
186
186
|
```
|