@globalbrain/sefirot 4.4.2 → 4.5.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/lib/components/SAlert.vue +2 -2
- package/lib/http/Http.ts +16 -26
- package/lib/styles/base.css +3 -0
- package/lib/styles/variables.css +10 -10
- package/package.json +28 -28
|
@@ -55,14 +55,14 @@ withDefaults(defineProps<{
|
|
|
55
55
|
gap: 16px;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
.content :
|
|
58
|
+
.content :deep(p) {
|
|
59
59
|
margin: 0;
|
|
60
60
|
max-width: 65ch;
|
|
61
61
|
line-height: 24px;
|
|
62
62
|
font-size: 14px;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
.content :
|
|
65
|
+
.content :deep(a) {
|
|
66
66
|
font-weight: 500;
|
|
67
67
|
text-decoration: underline;
|
|
68
68
|
transition: color 0.25s;
|
package/lib/http/Http.ts
CHANGED
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
import { parse as parseContentDisposition } from '@tinyhttp/content-disposition'
|
|
2
2
|
import { parse as parseCookie } from '@tinyhttp/cookie'
|
|
3
3
|
import FileSaver from 'file-saver'
|
|
4
|
-
import {
|
|
5
|
-
FetchError,
|
|
6
|
-
type FetchOptions,
|
|
7
|
-
type FetchRequest,
|
|
8
|
-
type FetchResponse,
|
|
9
|
-
ofetch
|
|
10
|
-
} from 'ofetch'
|
|
4
|
+
import { FetchError, type FetchOptions, type FetchRequest, type FetchResponse, ofetch } from 'ofetch'
|
|
11
5
|
import { stringify } from 'qs'
|
|
12
6
|
import { type Lang } from '../composables/Lang'
|
|
13
7
|
import { isBlob, isError, isFormData, isRequest, isResponse, isString } from '../support/Utils'
|
|
@@ -15,8 +9,8 @@ import { isBlob, isError, isFormData, isRequest, isResponse, isString } from '..
|
|
|
15
9
|
type Awaitable<T> = T | PromiseLike<T>
|
|
16
10
|
|
|
17
11
|
export interface HttpClient {
|
|
18
|
-
|
|
19
|
-
raw
|
|
12
|
+
(request: FetchRequest, options?: Omit<FetchOptions, 'method'>): Promise<any>
|
|
13
|
+
raw(request: FetchRequest, options?: Omit<FetchOptions, 'method'>): Promise<FetchResponse<any>>
|
|
20
14
|
}
|
|
21
15
|
|
|
22
16
|
export interface HttpOptions {
|
|
@@ -36,7 +30,7 @@ export class Http {
|
|
|
36
30
|
private static payloadKey = '__payload__'
|
|
37
31
|
private static headers: () => Awaitable<Record<string, string>> = async () => ({})
|
|
38
32
|
|
|
39
|
-
static config(options: HttpOptions) {
|
|
33
|
+
static config(options: HttpOptions): void {
|
|
40
34
|
if (options.baseUrl) {
|
|
41
35
|
Http.baseUrl = options.baseUrl
|
|
42
36
|
}
|
|
@@ -72,15 +66,9 @@ export class Http {
|
|
|
72
66
|
return xsrfToken
|
|
73
67
|
}
|
|
74
68
|
|
|
75
|
-
private async buildRequest(
|
|
76
|
-
url: string,
|
|
77
|
-
_options: FetchOptions = {}
|
|
78
|
-
): Promise<[string, FetchOptions]> {
|
|
69
|
+
private async buildRequest(url: string, _options: FetchOptions = {}): Promise<[string, FetchOptions]> {
|
|
79
70
|
const { method, params, query, ...options } = _options
|
|
80
|
-
|
|
81
|
-
const xsrfToken
|
|
82
|
-
= ['POST', 'PUT', 'PATCH', 'DELETE'].includes(method || '') && (await this.ensureXsrfToken())
|
|
83
|
-
|
|
71
|
+
const xsrfToken = ['POST', 'PUT', 'PATCH', 'DELETE'].includes(method || '') && (await this.ensureXsrfToken())
|
|
84
72
|
const queryString = stringify({ ...params, ...query }, { encodeValuesOnly: true })
|
|
85
73
|
|
|
86
74
|
return [
|
|
@@ -101,12 +89,12 @@ export class Http {
|
|
|
101
89
|
]
|
|
102
90
|
}
|
|
103
91
|
|
|
104
|
-
private async performRequest<T>(url: string, options: FetchOptions = {}) {
|
|
105
|
-
return Http.client
|
|
92
|
+
private async performRequest<T>(url: string, options: FetchOptions = {}): Promise<T> {
|
|
93
|
+
return Http.client(...(await this.buildRequest(url, options)))
|
|
106
94
|
}
|
|
107
95
|
|
|
108
|
-
private async performRequestRaw<T>(url: string, options: FetchOptions = {}) {
|
|
109
|
-
return Http.client.raw
|
|
96
|
+
private async performRequestRaw<T>(url: string, options: FetchOptions = {}): Promise<FetchResponse<T>> {
|
|
97
|
+
return Http.client.raw(...(await this.buildRequest(url, options)))
|
|
110
98
|
}
|
|
111
99
|
|
|
112
100
|
async get<T = any>(url: string, options?: FetchOptions): Promise<T> {
|
|
@@ -174,7 +162,7 @@ export class Http {
|
|
|
174
162
|
FileSaver.saveAs(blob, filename as string)
|
|
175
163
|
}
|
|
176
164
|
|
|
177
|
-
private objectToFormData(obj: any, form?: FormData, namespace?: string, onlyFiles = false) {
|
|
165
|
+
private objectToFormData(obj: any, form?: FormData, namespace?: string, onlyFiles = false): FormData {
|
|
178
166
|
const fd = form || new FormData()
|
|
179
167
|
let formKey: string
|
|
180
168
|
|
|
@@ -211,9 +199,11 @@ export function isFetchError(e: unknown): e is FetchError {
|
|
|
211
199
|
&& (isString((e as FetchError).request) || isRequest((e as FetchError).request))
|
|
212
200
|
&& ((e as FetchError).response === undefined || isResponse((e as FetchError).response))
|
|
213
201
|
&& e.message.startsWith(
|
|
214
|
-
`[${
|
|
215
|
-
|
|
216
|
-
}
|
|
202
|
+
`[${
|
|
203
|
+
((e as FetchError).request as Request | undefined)?.method || (e as FetchError).options?.method || 'GET'
|
|
204
|
+
}] ${JSON.stringify(
|
|
205
|
+
((e as FetchError).request as Request | undefined)?.url || String((e as FetchError).request) || '/'
|
|
206
|
+
)}: `
|
|
217
207
|
))
|
|
218
208
|
)
|
|
219
209
|
}
|
package/lib/styles/base.css
CHANGED
package/lib/styles/variables.css
CHANGED
|
@@ -507,9 +507,9 @@
|
|
|
507
507
|
--button-fill-info-active-border-color: var(--c-border-info-3);
|
|
508
508
|
--button-fill-info-active-text-color: var(--c-white-1);
|
|
509
509
|
--button-fill-info-active-bg-color: var(--c-bg-info-3);
|
|
510
|
-
--button-fill-info-disabled-border-color: var(--c-
|
|
511
|
-
--button-fill-info-disabled-text-color: var(--c-white-
|
|
512
|
-
--button-fill-info-disabled-content-color: var(--c-white-
|
|
510
|
+
--button-fill-info-disabled-border-color: var(--c-blue-9);
|
|
511
|
+
--button-fill-info-disabled-text-color: var(--c-white-a2);
|
|
512
|
+
--button-fill-info-disabled-content-color: var(--c-white-a2);
|
|
513
513
|
--button-fill-info-disabled-bg-color: var(--c-blue-8);
|
|
514
514
|
|
|
515
515
|
--button-fill-success-border-color: var(--c-border-success-1);
|
|
@@ -523,9 +523,9 @@
|
|
|
523
523
|
--button-fill-success-active-border-color: var(--c-border-success-3);
|
|
524
524
|
--button-fill-success-active-text-color: var(--c-white);
|
|
525
525
|
--button-fill-success-active-bg-color: var(--c-bg-success-3);
|
|
526
|
-
--button-fill-success-disabled-border-color: var(--c-
|
|
527
|
-
--button-fill-success-disabled-text-color: var(--c-white-
|
|
528
|
-
--button-fill-success-disabled-content-color: var(--c-white-
|
|
526
|
+
--button-fill-success-disabled-border-color: var(--c-green-9);
|
|
527
|
+
--button-fill-success-disabled-text-color: var(--c-white-a2);
|
|
528
|
+
--button-fill-success-disabled-content-color: var(--c-white-a2);
|
|
529
529
|
--button-fill-success-disabled-bg-color: var(--c-green-8);
|
|
530
530
|
|
|
531
531
|
--button-fill-warning-border-color: var(--c-border-mute-1);
|
|
@@ -540,8 +540,8 @@
|
|
|
540
540
|
--button-fill-warning-active-text-color: var(--c-white);
|
|
541
541
|
--button-fill-warning-active-bg-color: var(--c-bg-warning-2);
|
|
542
542
|
--button-fill-warning-disabled-border-color: var(--c-border-mute-1);
|
|
543
|
-
--button-fill-warning-disabled-text-color: var(--c-text-warning-
|
|
544
|
-
--button-fill-warning-disabled-content-color: var(--c-text-warning-
|
|
543
|
+
--button-fill-warning-disabled-text-color: var(--c-text-warning-2);
|
|
544
|
+
--button-fill-warning-disabled-content-color: var(--c-text-warning-2);
|
|
545
545
|
--button-fill-warning-disabled-bg-color: var(--c-bg-mute-1);
|
|
546
546
|
|
|
547
547
|
--button-fill-danger-border-color: var(--c-border-mute-1);
|
|
@@ -556,8 +556,8 @@
|
|
|
556
556
|
--button-fill-danger-active-text-color: var(--c-white);
|
|
557
557
|
--button-fill-danger-active-bg-color: var(--c-bg-danger-2);
|
|
558
558
|
--button-fill-danger-disabled-border-color: var(--c-border-mute-1);
|
|
559
|
-
--button-fill-danger-disabled-text-color: var(--c-text-danger-
|
|
560
|
-
--button-fill-danger-disabled-content-color: var(--c-text-danger-
|
|
559
|
+
--button-fill-danger-disabled-text-color: var(--c-text-danger-2);
|
|
560
|
+
--button-fill-danger-disabled-content-color: var(--c-text-danger-2);
|
|
561
561
|
--button-fill-danger-disabled-bg-color: var(--c-bg-mute-1);
|
|
562
562
|
|
|
563
563
|
--button-outline-default-border-color: var(--c-border-mute-1);
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@globalbrain/sefirot",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "4.
|
|
5
|
-
"packageManager": "pnpm@9.
|
|
4
|
+
"version": "4.5.0",
|
|
5
|
+
"packageManager": "pnpm@9.12.1",
|
|
6
6
|
"description": "Vue Components for Global Brain Design System.",
|
|
7
7
|
"author": "Kia Ishii <ka.ishii@globalbrains.com>",
|
|
8
8
|
"license": "MIT",
|
|
@@ -48,53 +48,53 @@
|
|
|
48
48
|
"@types/body-scroll-lock": "^3.1.2",
|
|
49
49
|
"@types/lodash-es": "^4.17.12",
|
|
50
50
|
"@types/markdown-it": "^14.1.2",
|
|
51
|
-
"@vue/reactivity": "^3.5.
|
|
51
|
+
"@vue/reactivity": "^3.5.11",
|
|
52
52
|
"@vuelidate/core": "^2.0.3",
|
|
53
53
|
"@vuelidate/validators": "^2.0.4",
|
|
54
|
-
"@vueuse/core": "^11.0
|
|
54
|
+
"@vueuse/core": "^11.1.0",
|
|
55
55
|
"body-scroll-lock": "4.0.0-beta.0",
|
|
56
56
|
"dayjs": "^1.11.13",
|
|
57
57
|
"fuse.js": "^7.0.0",
|
|
58
58
|
"lodash-es": "^4.17.21",
|
|
59
59
|
"markdown-it": "^14.1.0",
|
|
60
60
|
"normalize.css": "^8.0.1",
|
|
61
|
-
"pinia": "^2.2.
|
|
62
|
-
"postcss": "^8.4.
|
|
61
|
+
"pinia": "^2.2.4",
|
|
62
|
+
"postcss": "^8.4.47",
|
|
63
63
|
"postcss-nested": "^6.2.0",
|
|
64
64
|
"v-calendar": "3.0.1",
|
|
65
|
-
"vue": "^3.5.
|
|
66
|
-
"vue-router": "^4.4.
|
|
65
|
+
"vue": "^3.5.11",
|
|
66
|
+
"vue-router": "^4.4.5"
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
|
-
"@sentry/browser": "^8.
|
|
69
|
+
"@sentry/browser": "^8.33.1",
|
|
70
70
|
"@tanstack/vue-virtual": "3.0.0-beta.62",
|
|
71
|
-
"@tinyhttp/content-disposition": "^2.2.
|
|
71
|
+
"@tinyhttp/content-disposition": "^2.2.2",
|
|
72
72
|
"@tinyhttp/cookie": "^2.1.1",
|
|
73
73
|
"@types/file-saver": "^2.0.7",
|
|
74
|
-
"@types/qs": "^6.9.
|
|
74
|
+
"@types/qs": "^6.9.16",
|
|
75
75
|
"file-saver": "^2.0.5",
|
|
76
76
|
"magic-string": "^0.30.11",
|
|
77
|
-
"ofetch": "^1.
|
|
77
|
+
"ofetch": "^1.4.0",
|
|
78
78
|
"qs": "^6.13.0",
|
|
79
|
-
"unplugin-icons": "^0.19.
|
|
79
|
+
"unplugin-icons": "^0.19.3"
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
82
82
|
"@globalbrain/eslint-config": "^1.7.1",
|
|
83
83
|
"@histoire/plugin-vue": "0.16.5",
|
|
84
84
|
"@iconify-json/ph": "^1.2.0",
|
|
85
85
|
"@iconify-json/ri": "^1.2.0",
|
|
86
|
-
"@release-it/conventional-changelog": "^8.0.
|
|
86
|
+
"@release-it/conventional-changelog": "^8.0.2",
|
|
87
87
|
"@types/body-scroll-lock": "^3.1.2",
|
|
88
88
|
"@types/lodash-es": "^4.17.12",
|
|
89
89
|
"@types/markdown-it": "^14.1.2",
|
|
90
|
-
"@types/node": "^22.5
|
|
91
|
-
"@vitejs/plugin-vue": "^5.1.
|
|
92
|
-
"@vitest/coverage-v8": "^2.
|
|
93
|
-
"@vue/reactivity": "^3.5.
|
|
90
|
+
"@types/node": "^22.7.5",
|
|
91
|
+
"@vitejs/plugin-vue": "^5.1.4",
|
|
92
|
+
"@vitest/coverage-v8": "^2.1.2",
|
|
93
|
+
"@vue/reactivity": "^3.5.11",
|
|
94
94
|
"@vue/test-utils": "^2.4.6",
|
|
95
95
|
"@vuelidate/core": "^2.0.3",
|
|
96
96
|
"@vuelidate/validators": "^2.0.4",
|
|
97
|
-
"@vueuse/core": "^11.0
|
|
97
|
+
"@vueuse/core": "^11.1.0",
|
|
98
98
|
"body-scroll-lock": "4.0.0-beta.0",
|
|
99
99
|
"dayjs": "^1.11.13",
|
|
100
100
|
"eslint": "8.57.0",
|
|
@@ -104,18 +104,18 @@
|
|
|
104
104
|
"lodash-es": "^4.17.21",
|
|
105
105
|
"markdown-it": "^14.1.0",
|
|
106
106
|
"normalize.css": "^8.0.1",
|
|
107
|
-
"pinia": "^2.2.
|
|
108
|
-
"postcss": "^8.4.
|
|
107
|
+
"pinia": "^2.2.4",
|
|
108
|
+
"postcss": "^8.4.47",
|
|
109
109
|
"postcss-nested": "^6.2.0",
|
|
110
110
|
"punycode": "^2.3.1",
|
|
111
|
-
"release-it": "^17.
|
|
112
|
-
"typescript": "~5.
|
|
111
|
+
"release-it": "^17.7.0",
|
|
112
|
+
"typescript": "~5.6.2",
|
|
113
113
|
"v-calendar": "3.0.1",
|
|
114
|
-
"vite": "^5.4.
|
|
115
|
-
"vitepress": "^1.
|
|
116
|
-
"vitest": "^2.
|
|
117
|
-
"vue": "^3.5.
|
|
118
|
-
"vue-router": "^4.4.
|
|
114
|
+
"vite": "^5.4.8",
|
|
115
|
+
"vitepress": "^1.4.0",
|
|
116
|
+
"vitest": "^2.1.2",
|
|
117
|
+
"vue": "^3.5.11",
|
|
118
|
+
"vue-router": "^4.4.5",
|
|
119
119
|
"vue-tsc": "^2.1.6"
|
|
120
120
|
}
|
|
121
121
|
}
|