sprintify-ui 0.0.0 → 0.0.1
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 +47 -158
- package/dist/sprintify-ui.es.js +2239 -0
- package/dist/style.css +4 -0
- package/dist/types/src/components/BaseAutocomplete.vue.d.ts +4 -4
- package/dist/types/src/components/index.d.ts +4 -1
- package/dist/types/src/index.d.ts +2 -1
- package/package.json +3 -2
- package/src/assets/main.css +1 -1
- package/src/components/BaseAutocomplete.vue +1 -1
- package/src/components/BaseBelongsTo.vue +1 -1
- package/src/components/BaseDataIterator.vue +1 -1
- package/src/components/BaseDataTable.vue +9 -9
- package/src/components/BaseDatePicker.vue +1 -1
- package/src/components/BaseFileUploader.vue +7 -7
- package/src/components/BaseMediaLibrary.vue +11 -10
- package/src/components/BaseTagAutocomplete.vue +4 -4
- package/src/components/BaseTagAutocompleteFetch.vue +1 -1
- package/src/components/index.ts +5 -4
- package/src/index.ts +8 -6
- package/src/utils/fileSizeFormat.ts +1 -1
- package/src/utils/toHumanList.ts +1 -1
package/dist/style.css
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
@charset "UTF-8";/*!
|
|
2
|
+
* Pikaday
|
|
3
|
+
* Copyright © 2014 David Bushell | BSD & MIT license | https://dbushell.com/
|
|
4
|
+
*/.pika-single{z-index:9999;display:block;position:relative;color:#333;background:#fff;border:1px solid #ccc;border-bottom-color:#bbb;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}.pika-single:before,.pika-single:after{content:" ";display:table}.pika-single:after{clear:both}.pika-single.is-hidden{display:none}.pika-single.is-bound{position:absolute;box-shadow:0 5px 15px -5px #00000080}.pika-lendar{float:left;width:240px;margin:8px}.pika-title{position:relative;text-align:center}.pika-label{display:inline-block;position:relative;z-index:9999;overflow:hidden;margin:0;padding:5px 3px;font-size:14px;line-height:20px;font-weight:700;background-color:#fff}.pika-title select{cursor:pointer;position:absolute;z-index:9998;margin:0;left:0;top:5px;opacity:0}.pika-prev,.pika-next{display:block;cursor:pointer;position:relative;outline:none;border:0;padding:0;width:20px;height:30px;text-indent:20px;white-space:nowrap;overflow:hidden;background-color:transparent;background-position:center center;background-repeat:no-repeat;background-size:75% 75%;opacity:.5}.pika-prev:hover,.pika-next:hover{opacity:1}.pika-prev,.is-rtl .pika-next{float:left;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAeCAYAAAAsEj5rAAAAUklEQVR42u3VMQoAIBADQf8Pgj+OD9hG2CtONJB2ymQkKe0HbwAP0xucDiQWARITIDEBEnMgMQ8S8+AqBIl6kKgHiXqQqAeJepBo/z38J/U0uAHlaBkBl9I4GwAAAABJRU5ErkJggg==)}.pika-next,.is-rtl .pika-prev{float:right;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAeCAYAAAAsEj5rAAAAU0lEQVR42u3VOwoAMAgE0dwfAnNjU26bYkBCFGwfiL9VVWoO+BJ4Gf3gtsEKKoFBNTCoCAYVwaAiGNQGMUHMkjGbgjk2mIONuXo0nC8XnCf1JXgArVIZAQh5TKYAAAAASUVORK5CYII=)}.pika-select{display:inline-block}.pika-table{width:100%;border-collapse:collapse;border-spacing:0;border:0}.pika-table th,.pika-table td{width:14.285714285714286%;padding:0}.pika-table th{color:#999;font-size:12px;line-height:25px;font-weight:700;text-align:center}.pika-button{cursor:pointer;display:block;box-sizing:border-box;-moz-box-sizing:border-box;outline:none;border:0;margin:0;width:100%;padding:5px;color:#666;font-size:12px;line-height:15px;text-align:right;background:#f5f5f5;height:initial}.pika-week{font-size:11px;color:#999}.is-today .pika-button{color:#3af;font-weight:700}.is-selected .pika-button,.has-event .pika-button{color:#fff;font-weight:700;background:#33aaff;box-shadow:inset 0 1px 3px #178fe5;border-radius:3px}.has-event .pika-button{background:#005da9;box-shadow:inset 0 1px 3px #0076c9}.is-disabled .pika-button,.is-inrange .pika-button{background:#D5E9F7}.is-startrange .pika-button{color:#fff;background:#6CB31D;box-shadow:none;border-radius:3px}.is-endrange .pika-button{color:#fff;background:#33aaff;box-shadow:none;border-radius:3px}.is-disabled .pika-button{pointer-events:none;cursor:default;color:#999;opacity:.3}.is-outside-current-month .pika-button{color:#999;opacity:.3}.is-selection-disabled{pointer-events:none;cursor:default}.pika-button:hover,.pika-row.pick-whole-week:hover .pika-button{color:#fff;background:#ff8000;box-shadow:none;border-radius:3px}.pika-table abbr{border-bottom:none;cursor:help}.pikaday-white{--backgroundColor: #ffffff;--textColor: #718096;--currentDateTextColor: #3182ce;--selectedDateBackgroundColor: #3182ce;--selectedDateTextColor: #ffffff;--labelTextColor: #4a5568;--weekDaysTextColor: #a0aec0;font-family:inherit;background-color:var(--backgroundColor);padding:.5rem;z-index:2000;margin:6px 0 0;--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);border-radius:.5rem}.pikaday-white .pika-title{width:100%;text-align:center;display:flex;justify-content:flex-start;margin-bottom:5px}.pikaday-white .pika-prev,.pikaday-white .pika-next{position:absolute;outline:none;padding:0;width:26px;height:26px;top:-1px;display:inline-block;margin-top:0;cursor:pointer;text-indent:-9999px;white-space:nowrap;overflow:hidden;background-color:transparent;background-position:center center;background-repeat:no-repeat;opacity:.7}.pikaday-white .pika-prev:hover,.pikaday-white .pika-next:hover{opacity:1}.pikaday-white .pika-prev{right:30px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23a0aec0'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M15 19l-7-7 7-7'%3E%3C/path%3E%3C/svg%3E")}.pikaday-white .pika-next{right:2px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23a0aec0'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 5l7 7-7 7'%3E%3C/path%3E%3C/svg%3E")}.pika-prev.is-disabled,.pika-next.is-disabled{cursor:default;opacity:.2}.pikaday-white .pika-label{margin-right:.375rem;border-radius:.25rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(203 213 225 / var(--tw-border-opacity));padding:.25rem .5rem;font-size:14px;font-weight:500;line-height:1}.pikaday-white .pika-label{position:relative}.pikaday-white .pika-select-month,.pikaday-white .pika-select-year{width:100%;cursor:pointer;position:absolute;z-index:9998;margin:0;left:0;top:0;opacity:0;padding:0}.pikaday-white table{width:100%;border-collapse:collapse}.pikaday-white table th{width:2em;height:2em;font-weight:400;color:var(--weekDaysTextColor);text-align:center}.pikaday-white table th abbr{text-decoration:none}.pikaday-white table td{padding:1px}.pikaday-white table td button{width:2em;height:2em;text-align:center;border-radius:9999px;background-color:var(--backgroundColor)}.pikaday-white table td button:hover{--tw-bg-opacity: 1;background-color:rgb(226 232 240 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(15 23 42 / var(--tw-text-opacity))}.pikaday-white table td.is-today button{color:var(--currentDateTextColor)}.pikaday-white table td.is-selected button{--tw-bg-opacity: 1;background-color:rgb(99 102 241 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity));font-weight:400}.pikaday-white table td button{color:var(--textColor)}.btn{position:relative;display:inline-block;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;border-radius:.375rem;border-width:1px;padding:.625rem 1rem;text-align:center;font-size:.875rem;line-height:1.25rem;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.1s}.btn:focus-visible{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-offset-width: 2px}.btn:disabled{cursor:not-allowed;opacity:.5}.btn{--tw-border-opacity: 1;border-color:rgb(203 213 225 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity))}.btn:hover{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity))}.btn:focus-visible{--tw-ring-opacity: 1;--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity))}.btn:hover:disabled{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.btn.btn-xs{padding:.25rem .5rem;font-size:.75rem;line-height:1rem}.btn.btn-sm{padding:.5rem .75rem;font-size:.875rem;line-height:1rem}.btn.btn-md{padding:.625rem 1rem;font-size:.875rem;line-height:1.25rem}.btn.btn-lg{padding:.75rem 1.25rem;font-size:1rem;line-height:1.5rem}.btn.btn-xl{padding:1rem 1.5rem;font-size:1rem;line-height:1.5rem}.btn-default{--tw-border-opacity: 1;border-color:rgb(203 213 225 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity))}.btn-default:hover{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity))}.btn-default:focus-visible{--tw-ring-opacity: 1;--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity))}.btn-default:hover:disabled{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.btn.btn-primary{border-color:transparent;--tw-bg-opacity: 1;background-color:rgb(99 102 241 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.btn.btn-primary:hover{--tw-bg-opacity: 1;background-color:rgb(67 56 202 / var(--tw-bg-opacity))}.btn.btn-primary:focus-visible{--tw-ring-opacity: 1;--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity))}.btn.btn-primary:hover:disabled{--tw-bg-opacity: 1;background-color:rgb(99 102 241 / var(--tw-bg-opacity))}.btn.btn-secondary{border-color:transparent;--tw-bg-opacity: 1;background-color:rgb(199 210 254 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(67 56 202 / var(--tw-text-opacity))}.btn.btn-secondary:hover{--tw-bg-opacity: 1;background-color:rgb(224 231 255 / var(--tw-bg-opacity))}.btn.btn-secondary:focus-visible{--tw-ring-opacity: 1;--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity))}.btn.btn-secondary:hover:disabled{--tw-bg-opacity: 1;background-color:rgb(224 231 255 / var(--tw-bg-opacity))}.btn.btn-secondary-outline{--tw-border-opacity: 1;border-color:rgb(129 140 248 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(199 210 254 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(67 56 202 / var(--tw-text-opacity))}.btn.btn-secondary-outline:hover{--tw-bg-opacity: 1;background-color:rgb(224 231 255 / var(--tw-bg-opacity))}.btn.btn-secondary-outline:focus-visible{--tw-ring-opacity: 1;--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity))}.btn.btn-secondary-outline:hover:disabled{--tw-bg-opacity: 1;background-color:rgb(224 231 255 / var(--tw-bg-opacity))}.btn.btn-slate-100{border-color:transparent;--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity))}.btn.btn-slate-100:hover{--tw-bg-opacity: 1;background-color:rgb(226 232 240 / var(--tw-bg-opacity))}.btn.btn-slate-100:focus-visible{--tw-ring-opacity: 1;--tw-ring-color: rgb(203 213 225 / var(--tw-ring-opacity))}.btn.btn-slate-100:hover:disabled{--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity))}.btn.btn-slate-100-outline{--tw-border-opacity: 1;border-color:rgb(226 232 240 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity))}.btn.btn-slate-100-outline:hover{--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity))}.btn.btn-slate-100-outline:focus-visible{--tw-ring-opacity: 1;--tw-ring-color: rgb(203 213 225 / var(--tw-ring-opacity))}.btn.btn-slate-100-outline:hover:disabled{--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity))}.btn.btn-slate-200{border-color:transparent;--tw-bg-opacity: 1;background-color:rgb(226 232 240 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(30 41 59 / var(--tw-text-opacity))}.btn.btn-slate-200:hover{--tw-bg-opacity: 1;background-color:rgb(203 213 225 / var(--tw-bg-opacity))}.btn.btn-slate-200:focus-visible{--tw-ring-opacity: 1;--tw-ring-color: rgb(203 213 225 / var(--tw-ring-opacity))}.btn.btn-slate-200:hover:disabled{--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity))}.btn.btn-slate-200-outline{--tw-border-opacity: 1;border-color:rgb(203 213 225 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(226 232 240 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(30 41 59 / var(--tw-text-opacity))}.btn.btn-slate-200-outline:hover{--tw-bg-opacity: 1;background-color:rgb(203 213 225 / var(--tw-bg-opacity))}.btn.btn-slate-200-outline:focus-visible{--tw-ring-opacity: 1;--tw-ring-color: rgb(203 213 225 / var(--tw-ring-opacity))}.btn.btn-slate-200-outline:hover:disabled{--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity))}.btn.btn-white{border-color:transparent;--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity))}.btn.btn-white:hover{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity))}.btn.btn-white:focus-visible{--tw-ring-opacity: 1;--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity))}.btn.btn-white:hover:disabled{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.btn.btn-white-outline{--tw-border-opacity: 1;border-color:rgb(203 213 225 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity))}.btn.btn-white-outline:hover{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity))}.btn.btn-white-outline:focus-visible{--tw-ring-opacity: 1;--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity))}.btn.btn-white-outline:hover:disabled{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.btn.btn-white-outline-primary{--tw-border-opacity: 1;border-color:rgb(129 140 248 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(79 70 229 / var(--tw-text-opacity))}.btn.btn-white-outline-primary:hover{--tw-bg-opacity: 1;background-color:rgb(224 231 255 / var(--tw-bg-opacity))}.btn.btn-white-outline-primary:focus-visible{--tw-ring-opacity: 1;--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity))}.btn.btn-white-outline-primary:hover:disabled{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.btn.btn-black{border-color:transparent;--tw-bg-opacity: 1;background-color:rgb(15 23 42 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.btn.btn-black:hover{--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity))}.btn.btn-black:focus-visible{--tw-ring-opacity: 1;--tw-ring-color: rgb(15 23 42 / var(--tw-ring-opacity))}.btn.btn-black:hover:disabled{--tw-bg-opacity: 1;background-color:rgb(15 23 42 / var(--tw-bg-opacity))}.btn.btn-danger{border-color:transparent;--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.btn.btn-danger:hover{--tw-bg-opacity: 1;background-color:rgb(185 28 28 / var(--tw-bg-opacity))}.btn.btn-danger:focus-visible{--tw-ring-opacity: 1;--tw-ring-color: rgb(252 165 165 / var(--tw-ring-opacity))}.btn.btn-danger:hover:disabled{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity))}.btn.btn-warning{border-color:transparent;--tw-bg-opacity: 1;background-color:rgb(250 204 21 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(113 63 18 / var(--tw-text-opacity))}.btn.btn-warning:hover{--tw-bg-opacity: 1;background-color:rgb(254 240 138 / var(--tw-bg-opacity))}.btn.btn-warning:focus-visible{--tw-ring-opacity: 1;--tw-ring-color: rgb(253 224 71 / var(--tw-ring-opacity))}.btn.btn-warning:hover:disabled{--tw-bg-opacity: 1;background-color:rgb(253 224 71 / var(--tw-bg-opacity))}.form-input-label{display:block;font-size:.875rem;line-height:1.25rem;line-height:1.25;--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity))}.form-input-error{font-size:.875rem;line-height:1.25rem;line-height:1.25;--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}input::-moz-placeholder,textarea::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(148 163 184 / var(--tw-placeholder-opacity))}input::placeholder,textarea::placeholder{--tw-placeholder-opacity: 1;color:rgb(148 163 184 / var(--tw-placeholder-opacity))}
|
|
@@ -29,7 +29,7 @@ declare const _default: {
|
|
|
29
29
|
type: StringConstructor;
|
|
30
30
|
};
|
|
31
31
|
inputClass: {
|
|
32
|
-
default:
|
|
32
|
+
default: string;
|
|
33
33
|
type: StringConstructor;
|
|
34
34
|
};
|
|
35
35
|
placeholder: {
|
|
@@ -90,7 +90,7 @@ declare const _default: {
|
|
|
90
90
|
type: StringConstructor;
|
|
91
91
|
};
|
|
92
92
|
inputClass: {
|
|
93
|
-
default:
|
|
93
|
+
default: string;
|
|
94
94
|
type: StringConstructor;
|
|
95
95
|
};
|
|
96
96
|
placeholder: {
|
|
@@ -164,7 +164,7 @@ declare const _default: {
|
|
|
164
164
|
type: StringConstructor;
|
|
165
165
|
};
|
|
166
166
|
inputClass: {
|
|
167
|
-
default:
|
|
167
|
+
default: string;
|
|
168
168
|
type: StringConstructor;
|
|
169
169
|
};
|
|
170
170
|
placeholder: {
|
|
@@ -215,7 +215,7 @@ declare const _default: {
|
|
|
215
215
|
type: StringConstructor;
|
|
216
216
|
};
|
|
217
217
|
inputClass: {
|
|
218
|
-
default:
|
|
218
|
+
default: string;
|
|
219
219
|
type: StringConstructor;
|
|
220
220
|
};
|
|
221
221
|
placeholder: {
|
|
@@ -115,6 +115,7 @@ declare const messages: {
|
|
|
115
115
|
};
|
|
116
116
|
};
|
|
117
117
|
};
|
|
118
|
+
import './assets/main.css';
|
|
118
119
|
interface SprintifyUIConfig {
|
|
119
120
|
i18n?: I18n<typeof messages, {}, {}, string, true>;
|
|
120
121
|
http?: AxiosInstance;
|
|
@@ -242,7 +243,7 @@ declare const pluginConfig: {
|
|
|
242
243
|
formatQueryString(params: Record<string, any>): string;
|
|
243
244
|
parseQueryString(params: string): Record<string, any>;
|
|
244
245
|
};
|
|
245
|
-
declare function install(app: App, config
|
|
246
|
+
declare function install(app: App, config?: SprintifyUIConfig): void;
|
|
246
247
|
declare const _default: {
|
|
247
248
|
install: typeof install;
|
|
248
249
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sprintify-ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.1",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "rimraf dist && vue-tsc && vite build",
|
|
6
6
|
"docs:dev": "vitepress dev docs",
|
|
@@ -94,6 +94,7 @@
|
|
|
94
94
|
".": {
|
|
95
95
|
"import": "./dist/sprintify-ui.es.js"
|
|
96
96
|
},
|
|
97
|
-
"./dist/style.css": "./dist/style.css"
|
|
97
|
+
"./dist/style.css": "./dist/style.css",
|
|
98
|
+
"./dist/lang/": "./src/lang/"
|
|
98
99
|
}
|
|
99
100
|
}
|
package/src/assets/main.css
CHANGED
|
@@ -28,7 +28,7 @@ import { Selection } from '@/types/types';
|
|
|
28
28
|
import { PropType } from 'vue';
|
|
29
29
|
import { RouteLocationRaw } from 'vue-router';
|
|
30
30
|
import { AxiosResponse } from 'axios';
|
|
31
|
-
import { config } from '
|
|
31
|
+
import { config } from '@/index';
|
|
32
32
|
|
|
33
33
|
const props = defineProps({
|
|
34
34
|
modelValue: {
|
|
@@ -216,7 +216,7 @@ import BaseCard from './BaseCard.vue';
|
|
|
216
216
|
import BaseCardRow from './BaseCardRow.vue';
|
|
217
217
|
import BasePaginationSimple from './BasePaginationSimple.vue';
|
|
218
218
|
import BaseModalSide from './BaseModalSide.vue';
|
|
219
|
-
import { config } from '
|
|
219
|
+
import { config } from '@/index';
|
|
220
220
|
|
|
221
221
|
const props = defineProps({
|
|
222
222
|
/**
|
|
@@ -163,8 +163,8 @@ import {
|
|
|
163
163
|
DataTableQuery,
|
|
164
164
|
MenuItemInterface,
|
|
165
165
|
} from '@/types/types';
|
|
166
|
-
import { useDialogsStore } from '../stores/dialogs';
|
|
167
|
-
import { useNotificationsStore } from '../stores/notifications';
|
|
166
|
+
//import { useDialogsStore } from '../stores/dialogs';
|
|
167
|
+
//import { useNotificationsStore } from '../stores/notifications';
|
|
168
168
|
import BaseDataIterator from './BaseDataIterator.vue';
|
|
169
169
|
import { isArray } from 'lodash';
|
|
170
170
|
|
|
@@ -173,14 +173,14 @@ import BaseCardRow from './BaseCardRow.vue';
|
|
|
173
173
|
import BaseTable from './BaseTable.vue';
|
|
174
174
|
import BaseTableColumn from './BaseTableColumn.vue';
|
|
175
175
|
import BaseDataTableToggleColumns from './BaseDataTableToggleColumns.vue';
|
|
176
|
-
import { config } from '
|
|
176
|
+
import { config } from '@/index';
|
|
177
177
|
|
|
178
178
|
const i18n = useI18n();
|
|
179
179
|
|
|
180
180
|
const http = config.http;
|
|
181
181
|
|
|
182
|
-
const dialogs = useDialogsStore();
|
|
183
|
-
const notifications = useNotificationsStore();
|
|
182
|
+
//const dialogs = useDialogsStore();
|
|
183
|
+
//const notifications = useNotificationsStore();
|
|
184
184
|
|
|
185
185
|
const table = ref(null) as Ref<null | InstanceType<typeof BaseTable>>;
|
|
186
186
|
|
|
@@ -381,14 +381,14 @@ const canDelete = (row: CollectionItem): boolean => {
|
|
|
381
381
|
};
|
|
382
382
|
|
|
383
383
|
function onDeleteClick(row: CollectionItem) {
|
|
384
|
-
dialogs.push({
|
|
384
|
+
/* dialogs.push({
|
|
385
385
|
title: i18n.t('sui.delete_record') + '?',
|
|
386
386
|
message: i18n.t('sui.delete_record_description'),
|
|
387
387
|
color: 'danger',
|
|
388
388
|
closeOnOutsideClick: false,
|
|
389
389
|
confirmText: i18n.t('sui.yes_delete'),
|
|
390
390
|
onConfirm: () => onDelete(row),
|
|
391
|
-
});
|
|
391
|
+
}); */
|
|
392
392
|
}
|
|
393
393
|
|
|
394
394
|
const onDelete = (row: CollectionItem) => {
|
|
@@ -398,11 +398,11 @@ const onDelete = (row: CollectionItem) => {
|
|
|
398
398
|
|
|
399
399
|
http.delete(props.deleteUrl(row)).then((response) => {
|
|
400
400
|
if (response.data && response.data.message) {
|
|
401
|
-
notifications.push({
|
|
401
|
+
/* notifications.push({
|
|
402
402
|
title: i18n.t('sui.success'),
|
|
403
403
|
text: response.data.message,
|
|
404
404
|
color: 'success',
|
|
405
|
-
});
|
|
405
|
+
}); */
|
|
406
406
|
}
|
|
407
407
|
emit('delete', row);
|
|
408
408
|
|
|
@@ -38,7 +38,7 @@ import { PropType, Ref } from 'vue';
|
|
|
38
38
|
import Pikaday from 'pikaday';
|
|
39
39
|
import { capitalize, padStart } from 'lodash';
|
|
40
40
|
import { DateTime, Info } from 'luxon';
|
|
41
|
-
import { config } from '
|
|
41
|
+
import { config } from '@/index';
|
|
42
42
|
|
|
43
43
|
const props = defineProps({
|
|
44
44
|
modelValue: {
|
|
@@ -32,15 +32,15 @@
|
|
|
32
32
|
</template>
|
|
33
33
|
|
|
34
34
|
<script lang="ts" setup>
|
|
35
|
-
import { config } from '
|
|
35
|
+
import { config } from '@/index';
|
|
36
36
|
import { PropType } from 'vue';
|
|
37
37
|
import { UploadedFile } from '@/types/UploadedFile';
|
|
38
38
|
import { toHumanList, fileSizeFormat } from '../utils';
|
|
39
|
-
import { useNotificationsStore } from '../stores/notifications';
|
|
39
|
+
//import { useNotificationsStore } from '../stores/notifications';
|
|
40
40
|
|
|
41
41
|
const http = config.http;
|
|
42
42
|
const i18n = useI18n();
|
|
43
|
-
const notifications = useNotificationsStore();
|
|
43
|
+
//const notifications = useNotificationsStore();
|
|
44
44
|
|
|
45
45
|
const props = defineProps({
|
|
46
46
|
disabled: {
|
|
@@ -91,13 +91,13 @@ async function onPictureUpload(file: File) {
|
|
|
91
91
|
|
|
92
92
|
try {
|
|
93
93
|
if (file.size > props.maxSize) {
|
|
94
|
-
notifications.push({
|
|
94
|
+
/* notifications.push({
|
|
95
95
|
color: 'danger',
|
|
96
96
|
title: i18n.t('sui.error'),
|
|
97
97
|
text: i18n.t('sui.the_file_size_must_not_exceed_x', {
|
|
98
98
|
x: fileSizeFormat(props.maxSize),
|
|
99
99
|
}),
|
|
100
|
-
});
|
|
100
|
+
}); */
|
|
101
101
|
return;
|
|
102
102
|
}
|
|
103
103
|
|
|
@@ -109,7 +109,7 @@ async function onPictureUpload(file: File) {
|
|
|
109
109
|
props.acceptedExtensions.length
|
|
110
110
|
) {
|
|
111
111
|
if (!props.acceptedExtensions.includes(extension)) {
|
|
112
|
-
notifications.push({
|
|
112
|
+
/* notifications.push({
|
|
113
113
|
color: 'danger',
|
|
114
114
|
title: i18n.t('sui.error'),
|
|
115
115
|
text:
|
|
@@ -119,7 +119,7 @@ async function onPictureUpload(file: File) {
|
|
|
119
119
|
' ' +
|
|
120
120
|
toHumanList(props.acceptedExtensions, i18n.t('sui.or')) +
|
|
121
121
|
'.',
|
|
122
|
-
});
|
|
122
|
+
}); */
|
|
123
123
|
return;
|
|
124
124
|
}
|
|
125
125
|
}
|
|
@@ -91,14 +91,15 @@ import { Media } from '@/types/Media';
|
|
|
91
91
|
import _, { cloneDeep, get } from 'lodash';
|
|
92
92
|
import { PropType } from 'vue';
|
|
93
93
|
import { MediaLibraryPayload } from '@/types/types';
|
|
94
|
-
import { useDialogsStore } from '../stores/dialogs';
|
|
95
|
-
import { useNotificationsStore } from '../stores/notifications';
|
|
94
|
+
//import { useDialogsStore } from '../stores/dialogs';
|
|
95
|
+
//import { useNotificationsStore } from '../stores/notifications';
|
|
96
96
|
import { capitalize } from 'lodash';
|
|
97
97
|
import { fileSizeFormat } from 'src/utils';
|
|
98
98
|
|
|
99
99
|
const i18n = useI18n();
|
|
100
|
-
|
|
101
|
-
const
|
|
100
|
+
|
|
101
|
+
//const dialogs = useDialogsStore();
|
|
102
|
+
//const notifications = useNotificationsStore();
|
|
102
103
|
|
|
103
104
|
const emit = defineEmits([
|
|
104
105
|
'update',
|
|
@@ -187,11 +188,11 @@ function onUploadSuccess(file: UploadedFile) {
|
|
|
187
188
|
}
|
|
188
189
|
|
|
189
190
|
if (numberOfFiles.value >= props.max && props.max > 1) {
|
|
190
|
-
notifications.push({
|
|
191
|
+
/* notifications.push({
|
|
191
192
|
title: i18n.t('sui.whoops'),
|
|
192
193
|
text: i18n.t('sui.you_can_upload_up_to_n_files', { count: props.max }),
|
|
193
194
|
color: 'danger',
|
|
194
|
-
});
|
|
195
|
+
}); */
|
|
195
196
|
return;
|
|
196
197
|
}
|
|
197
198
|
|
|
@@ -212,25 +213,25 @@ function onUploadSuccess(file: UploadedFile) {
|
|
|
212
213
|
}
|
|
213
214
|
|
|
214
215
|
function promptRemoveUploadedFile(index: number, length = 1) {
|
|
215
|
-
dialogs.push({
|
|
216
|
+
/* dialogs.push({
|
|
216
217
|
title: i18n.t('sui.remove_file'),
|
|
217
218
|
message: i18n.t('sui.remove_file_description'),
|
|
218
219
|
color: 'warning',
|
|
219
220
|
onConfirm() {
|
|
220
221
|
removeUploadedFile(index, length);
|
|
221
222
|
},
|
|
222
|
-
});
|
|
223
|
+
}); */
|
|
223
224
|
}
|
|
224
225
|
|
|
225
226
|
function promptRemoveMedia(index: number) {
|
|
226
|
-
dialogs.push({
|
|
227
|
+
/* dialogs.push({
|
|
227
228
|
title: i18n.t('sui.remove_file'),
|
|
228
229
|
message: i18n.t('sui.remove_file_description'),
|
|
229
230
|
color: 'warning',
|
|
230
231
|
onConfirm() {
|
|
231
232
|
removeMedia(index);
|
|
232
233
|
},
|
|
233
|
-
});
|
|
234
|
+
}); */
|
|
234
235
|
}
|
|
235
236
|
|
|
236
237
|
function removeUploadedFile(index: number, length = 1) {
|
|
@@ -82,7 +82,7 @@ import { cloneDeep, get } from 'lodash';
|
|
|
82
82
|
import { PropType, Ref, ComputedRef } from 'vue';
|
|
83
83
|
import { NormalizedOption, Option, OptionValue } from '@/types/types';
|
|
84
84
|
import { useInfiniteScroll } from '@vueuse/core';
|
|
85
|
-
import { useNotificationsStore } from '../../stores/notifications';
|
|
85
|
+
//import { useNotificationsStore } from '../../stores/notifications';
|
|
86
86
|
|
|
87
87
|
const props = defineProps({
|
|
88
88
|
modelValue: {
|
|
@@ -139,7 +139,7 @@ const emit = defineEmits([
|
|
|
139
139
|
]);
|
|
140
140
|
|
|
141
141
|
const i18n = useI18n();
|
|
142
|
-
const notifications = useNotificationsStore();
|
|
142
|
+
//const notifications = useNotificationsStore();
|
|
143
143
|
|
|
144
144
|
const timerId = ref(0);
|
|
145
145
|
const keywords = ref('');
|
|
@@ -307,11 +307,11 @@ const toggleOption = (option: NormalizedOption) => {
|
|
|
307
307
|
|
|
308
308
|
const addOption = (option: NormalizedOption) => {
|
|
309
309
|
if (props.max && normalizedModelValue.value.length >= props.max) {
|
|
310
|
-
notifications.push({
|
|
310
|
+
/* notifications.push({
|
|
311
311
|
title: i18n.t('sui.whoops'),
|
|
312
312
|
text: i18n.t('sui.you_cannot_select_more_than_x_items', { x: props.max }),
|
|
313
313
|
color: 'warning',
|
|
314
|
-
});
|
|
314
|
+
}); */
|
|
315
315
|
return;
|
|
316
316
|
}
|
|
317
317
|
|
package/src/components/index.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import BaseAlert from './BaseAlert.vue';
|
|
2
|
+
import BaseAutocomplete from './BaseAutocomplete.vue';
|
|
3
|
+
import BaseButton from './BaseButton.vue';
|
|
4
|
+
import { Icon } from '@iconify/vue';
|
|
2
5
|
|
|
3
|
-
export {
|
|
4
|
-
BaseButton,
|
|
5
|
-
}
|
|
6
|
+
export { BaseAlert, BaseAutocomplete, BaseButton, Icon };
|
package/src/index.ts
CHANGED
|
@@ -8,6 +8,8 @@ import fr from '@/lang/fr.json';
|
|
|
8
8
|
|
|
9
9
|
const messages = { en, fr };
|
|
10
10
|
|
|
11
|
+
import './assets/main.css';
|
|
12
|
+
|
|
11
13
|
interface SprintifyUIConfig {
|
|
12
14
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
13
15
|
i18n?: I18n<typeof messages, {}, {}, string, true>;
|
|
@@ -34,29 +36,29 @@ const pluginConfig = {
|
|
|
34
36
|
},
|
|
35
37
|
};
|
|
36
38
|
|
|
37
|
-
function install(app: App, config
|
|
39
|
+
function install(app: App, config?: SprintifyUIConfig) {
|
|
38
40
|
for (const key in components) {
|
|
39
41
|
// @ts-expect-error Will throw
|
|
40
42
|
app.component(key, components[key]);
|
|
41
43
|
}
|
|
42
44
|
|
|
43
|
-
if (config
|
|
45
|
+
if (config?.i18n) {
|
|
44
46
|
pluginConfig.i18n = config.i18n;
|
|
45
47
|
}
|
|
46
48
|
|
|
47
|
-
if (config
|
|
49
|
+
if (config?.http) {
|
|
48
50
|
pluginConfig.http = config.http;
|
|
49
51
|
}
|
|
50
52
|
|
|
51
|
-
if (config
|
|
53
|
+
if (config?.upload_url) {
|
|
52
54
|
pluginConfig.upload_url = config.upload_url;
|
|
53
55
|
}
|
|
54
56
|
|
|
55
|
-
if (config
|
|
57
|
+
if (config?.formatQueryString) {
|
|
56
58
|
pluginConfig.formatQueryString = config.formatQueryString;
|
|
57
59
|
}
|
|
58
60
|
|
|
59
|
-
if (config
|
|
61
|
+
if (config?.parseQueryString) {
|
|
60
62
|
pluginConfig.parseQueryString = config.parseQueryString;
|
|
61
63
|
}
|
|
62
64
|
}
|
package/src/utils/toHumanList.ts
CHANGED