@uva-glass/component-library 1.43.1 → 1.44.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/dist/assets/Spinner.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@keyframes
|
|
1
|
+
@keyframes _spin_jd5vi_11{0%{transform:rotate(0)}to{transform:rotate(360deg)}}._spinner-container_jd5vi_11{align-items:center;display:flex;justify-content:center;padding:2rem}._spinner_jd5vi_11{height:2rem;width:2rem}._spinner_jd5vi_11:after{border:.25rem solid hsl(0deg 0% 0% / 10%);border-radius:50%;content:" ";display:block;height:100%;transform-origin:50% 50%;width:100%}@media (prefers-reduced-motion: no-preference){._spinner_jd5vi_11:after{animation:_spin_jd5vi_11 1s cubic-bezier(.455,.03,.515,.955) infinite;border-left-color:var(--color-black)}}
|
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import '../../assets/Spinner.css';const
|
|
4
|
-
spinner:
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useState as a, useEffect as p } from "react";
|
|
3
|
+
import '../../assets/Spinner.css';const c = "_spinner_jd5vi_11", l = "_spin_jd5vi_11", i = {
|
|
4
|
+
"spinner-container": "_spinner-container_jd5vi_11",
|
|
5
|
+
spinner: c,
|
|
5
6
|
spin: l
|
|
6
|
-
},
|
|
7
|
-
const [
|
|
7
|
+
}, u = 250, m = ({ ariaValueText: r, showAfterMs: n = u }) => {
|
|
8
|
+
const [s, t] = a(() => n === 0);
|
|
8
9
|
return p(() => {
|
|
9
|
-
if (
|
|
10
|
+
if (n === 0)
|
|
10
11
|
return;
|
|
11
|
-
const
|
|
12
|
+
const o = window.setTimeout(() => {
|
|
12
13
|
t(!0);
|
|
13
|
-
},
|
|
14
|
+
}, n);
|
|
14
15
|
return () => {
|
|
15
|
-
window.clearTimeout(
|
|
16
|
+
window.clearTimeout(o);
|
|
16
17
|
};
|
|
17
|
-
}),
|
|
18
|
+
}), s ? /* @__PURE__ */ e("div", { className: i["spinner-container"], children: /* @__PURE__ */ e("div", { className: i.spinner, role: "progressbar", "aria-label": "Spinner", "aria-valuetext": r }) }) : null;
|
|
18
19
|
};
|
|
19
20
|
export {
|
|
20
|
-
|
|
21
|
+
m as Spinner
|
|
21
22
|
};
|
|
22
23
|
//# sourceMappingURL=Spinner.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Spinner.js","sources":["../../../src/components/Spinner/Spinner.tsx"],"sourcesContent":["import { useEffect, useState } from 'react';\n\nimport styles from './Spinner.module.css';\n\nconst DEFAULT_DELAY_IN_MS = 250;\n\nexport interface SpinnerProps {\n ariaValueText: string;\n /** Delay in milliseconds after which the spinner becomes visible. The default is 250. */\n showAfterMs?: number;\n}\n\nexport const Spinner = ({ ariaValueText, showAfterMs = DEFAULT_DELAY_IN_MS }: SpinnerProps) => {\n const [visible, setVisible] = useState(() => (showAfterMs === 0 ? true : false));\n\n useEffect(() => {\n if (showAfterMs === 0) {\n return;\n }\n const t = window.setTimeout(() => {\n setVisible(true);\n }, showAfterMs);\n\n return () => {\n window.clearTimeout(t);\n };\n });\n\n if (!visible) {\n return null;\n }\n\n return (\n <div className={styles['spinner']} role=\"progressbar\" aria-label=\"Spinner\" aria-valuetext={ariaValueText}></div>\n );\n};\n"],"names":["DEFAULT_DELAY_IN_MS","Spinner","ariaValueText","showAfterMs","visible","setVisible","useState","useEffect","t","
|
|
1
|
+
{"version":3,"file":"Spinner.js","sources":["../../../src/components/Spinner/Spinner.tsx"],"sourcesContent":["import { useEffect, useState } from 'react';\n\nimport styles from './Spinner.module.css';\n\nconst DEFAULT_DELAY_IN_MS = 250;\n\nexport interface SpinnerProps {\n ariaValueText: string;\n /** Delay in milliseconds after which the spinner becomes visible. The default is 250. */\n showAfterMs?: number;\n}\n\nexport const Spinner = ({ ariaValueText, showAfterMs = DEFAULT_DELAY_IN_MS }: SpinnerProps) => {\n const [visible, setVisible] = useState(() => (showAfterMs === 0 ? true : false));\n\n useEffect(() => {\n if (showAfterMs === 0) {\n return;\n }\n const t = window.setTimeout(() => {\n setVisible(true);\n }, showAfterMs);\n\n return () => {\n window.clearTimeout(t);\n };\n });\n\n if (!visible) {\n return null;\n }\n\n return (\n <div className={styles['spinner-container']}>\n <div className={styles['spinner']} role=\"progressbar\" aria-label=\"Spinner\" aria-valuetext={ariaValueText}></div>\n </div>\n );\n};\n"],"names":["DEFAULT_DELAY_IN_MS","Spinner","ariaValueText","showAfterMs","visible","setVisible","useState","useEffect","t","styles"],"mappings":";;;;;;GAIMA,IAAsB,KAQfC,IAAU,CAAC,EAAE,eAAAC,GAAe,aAAAC,IAAcH,QAAwC;AACvF,QAAA,CAACI,GAASC,CAAU,IAAIC,EAAS,MAAOH,MAAgB,CAAiB;AAe/E,SAbAI,EAAU,MAAM;AACd,QAAIJ,MAAgB;AAClB;AAEI,UAAAK,IAAI,OAAO,WAAW,MAAM;AAChC,MAAAH,EAAW,EAAI;AAAA,OACdF,CAAW;AAEd,WAAO,MAAM;AACX,aAAO,aAAaK,CAAC;AAAA,IAAA;AAAA,EACvB,CACD,GAEIJ,sBAKF,OAAI,EAAA,WAAWK,EAAO,mBAAmB,GACxC,4BAAC,OAAI,EAAA,WAAWA,EAAO,SAAY,MAAK,eAAc,cAAW,WAAU,kBAAgBP,GAAe,EAC5G,CAAA,IANO;AAQX;"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@uva-glass/component-library",
|
|
3
3
|
"author": "Team Glass - Frontend vrienden",
|
|
4
4
|
"private": false,
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.44.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"types": "dist/index.d.ts",
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@commitlint/cli": "^19.4.0",
|
|
43
43
|
"@commitlint/config-conventional": "^19.2.2",
|
|
44
|
-
"@react-aria/button": "^3.9.
|
|
45
|
-
"@react-aria/dialog": "^3.5.
|
|
46
|
-
"@react-aria/overlays": "^3.23.
|
|
44
|
+
"@react-aria/button": "^3.9.8",
|
|
45
|
+
"@react-aria/dialog": "^3.5.17",
|
|
46
|
+
"@react-aria/overlays": "^3.23.2",
|
|
47
47
|
"@react-types/dialog": "^3.5.12",
|
|
48
48
|
"@semantic-release/git": "^10.0.1",
|
|
49
49
|
"@semantic-release/gitlab": "^13.2.1",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"@storybook/react": "^8.2.9",
|
|
57
57
|
"@storybook/react-vite": "^8.2.9",
|
|
58
58
|
"@storybook/test": "^8.2.9",
|
|
59
|
-
"@types/node": "^20.
|
|
59
|
+
"@types/node": "^20.16.1",
|
|
60
60
|
"@types/react": "^18.3.3",
|
|
61
61
|
"@types/react-dom": "^18.3.0",
|
|
62
62
|
"@uva-glass/eslint-config": "^1.3.1",
|
|
@@ -78,17 +78,17 @@
|
|
|
78
78
|
"npm-run-all2": "^6.2.2",
|
|
79
79
|
"react": "^18.3.1",
|
|
80
80
|
"react-dom": "^18.3.1",
|
|
81
|
-
"react-router-dom": "^6.26.
|
|
82
|
-
"semantic-release": "^24.
|
|
81
|
+
"react-router-dom": "^6.26.1",
|
|
82
|
+
"semantic-release": "^24.1.0",
|
|
83
83
|
"storybook": "^8.2.9",
|
|
84
84
|
"style-dictionary": "^4.0.1",
|
|
85
|
-
"stylelint": "^16.8.
|
|
85
|
+
"stylelint": "^16.8.2",
|
|
86
86
|
"stylelint-config-recommended": "^14.0.1",
|
|
87
87
|
"stylelint-config-standard": "^36.0.1",
|
|
88
88
|
"stylelint-order": "^6.0.4",
|
|
89
89
|
"typescript": "^5.5.4",
|
|
90
|
-
"vite": "^5.4.
|
|
91
|
-
"vite-plugin-dts": "^4.0.
|
|
90
|
+
"vite": "^5.4.1",
|
|
91
|
+
"vite-plugin-dts": "^4.0.3",
|
|
92
92
|
"vite-plugin-lib-inject-css": "^2.1.1",
|
|
93
93
|
"vite-plugin-svgr": "^4.2.0",
|
|
94
94
|
"vite-tsconfig-paths": "^5.0.1"
|