@nibssplc/cams-sdk-react 1.0.0-rc.46 → 1.0.0-rc.47
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 +18 -4
- package/dist/index.cjs.js +0 -30
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +0 -30
- package/dist/index.esm.js.map +1 -1
- package/dist/styles.css +3 -0
- package/package.json +7 -3
package/README.md
CHANGED
|
@@ -13,6 +13,19 @@ For MSAL mode, also install:
|
|
|
13
13
|
npm install @azure/msal-browser @azure/msal-react
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
+
### Importing Styles
|
|
17
|
+
|
|
18
|
+
The SDK includes bundled Tailwind CSS. Import it in your app entry point:
|
|
19
|
+
|
|
20
|
+
```tsx
|
|
21
|
+
import '@nibssplc/cams-sdk-react/dist/styles.css';
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
For Next.js, add to `app/layout.tsx` or `pages/_app.tsx`:
|
|
25
|
+
```tsx
|
|
26
|
+
import '@nibssplc/cams-sdk-react/dist/styles.css';
|
|
27
|
+
```
|
|
28
|
+
|
|
16
29
|
## Features
|
|
17
30
|
|
|
18
31
|
- ⚛️ React hooks for authentication
|
|
@@ -273,13 +286,14 @@ export default function RootLayout({ children }) {
|
|
|
273
286
|
|
|
274
287
|
## Styling
|
|
275
288
|
|
|
276
|
-
|
|
289
|
+
The SDK bundles all required Tailwind CSS, so you don't need to configure Tailwind in your project. Simply import the styles:
|
|
277
290
|
|
|
278
|
-
```
|
|
279
|
-
|
|
280
|
-
npx tailwindcss init
|
|
291
|
+
```tsx
|
|
292
|
+
import '@nibssplc/cams-sdk-react/dist/styles.css';
|
|
281
293
|
```
|
|
282
294
|
|
|
295
|
+
If your project already uses Tailwind, the SDK styles will work alongside your existing configuration.
|
|
296
|
+
|
|
283
297
|
## Examples
|
|
284
298
|
|
|
285
299
|
See the [examples](../../examples) directory for complete implementations:
|
package/dist/index.cjs.js
CHANGED
|
@@ -1844,36 +1844,6 @@ function DialogTitle(_a) {
|
|
|
1844
1844
|
|
|
1845
1845
|
var a="container_f782f4",i="inner_37f4c9",c="bar_409d0f";const r=({size:r=35,color:l="black",speed:d=1,stroke:o=3.5})=>jsxRuntimeExports.jsx("div",{className:a,style:{"--uib-size":r+"px","--uib-color":l,"--uib-speed":d+"s","--uib-stroke":o+"px"},children:jsxRuntimeExports.jsxs("div",{className:i,children:[jsxRuntimeExports.jsx("div",{className:c}),jsxRuntimeExports.jsx("div",{className:c}),jsxRuntimeExports.jsx("div",{className:c}),jsxRuntimeExports.jsx("div",{className:c})]})});
|
|
1846
1846
|
|
|
1847
|
-
function styleInject(css, ref) {
|
|
1848
|
-
if ( ref === void 0 ) ref = {};
|
|
1849
|
-
var insertAt = ref.insertAt;
|
|
1850
|
-
|
|
1851
|
-
if (typeof document === 'undefined') { return; }
|
|
1852
|
-
|
|
1853
|
-
var head = document.head || document.getElementsByTagName('head')[0];
|
|
1854
|
-
var style = document.createElement('style');
|
|
1855
|
-
style.type = 'text/css';
|
|
1856
|
-
|
|
1857
|
-
if (insertAt === 'top') {
|
|
1858
|
-
if (head.firstChild) {
|
|
1859
|
-
head.insertBefore(style, head.firstChild);
|
|
1860
|
-
} else {
|
|
1861
|
-
head.appendChild(style);
|
|
1862
|
-
}
|
|
1863
|
-
} else {
|
|
1864
|
-
head.appendChild(style);
|
|
1865
|
-
}
|
|
1866
|
-
|
|
1867
|
-
if (style.styleSheet) {
|
|
1868
|
-
style.styleSheet.cssText = css;
|
|
1869
|
-
} else {
|
|
1870
|
-
style.appendChild(document.createTextNode(css));
|
|
1871
|
-
}
|
|
1872
|
-
}
|
|
1873
|
-
|
|
1874
|
-
var css_248z = ".container_f782f4 {\n flex-shrink: 0;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n height: calc(var(--uib-size) * 0.9);\n width: var(--uib-size);\n}\n\n.inner_37f4c9 {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: var(--uib-size);\n height: calc(var(--uib-size) * 0.9);\n}\n\n.bar_409d0f {\n width: var(--uib-stroke);\n height: 100%;\n background-color: var(--uib-color);\n transition: background-color 0.3s ease;\n}\n\n.bar_409d0f:nth-child(1) {\n animation: grow_ca6a4e var(--uib-speed) ease-in-out calc(var(--uib-speed) * -0.45) infinite;\n}\n\n.bar_409d0f:nth-child(2) {\n animation: grow_ca6a4e var(--uib-speed) ease-in-out calc(var(--uib-speed) * -0.3) infinite;\n}\n\n.bar_409d0f:nth-child(3) {\n animation: grow_ca6a4e var(--uib-speed) ease-in-out calc(var(--uib-speed) * -0.15) infinite;\n}\n\n.bar_409d0f:nth-child(4) {\n animation: grow_ca6a4e var(--uib-speed) ease-in-out infinite;\n}\n\n@keyframes grow_ca6a4e {\n 0%, 100% {\n transform: scaleY(0.3);\n }\n 50% {\n transform: scaleY(1);\n }\n}";
|
|
1875
|
-
styleInject(css_248z);
|
|
1876
|
-
|
|
1877
1847
|
var LoadingSpinner = function (_a) {
|
|
1878
1848
|
var loadingText = _a.loadingText;
|
|
1879
1849
|
return (jsxRuntimeExports.jsxs("div", { className: "flex flex-col justify-center items-center h-full w-full py-10", children: [jsxRuntimeExports.jsx("script", { type: "module", defer: true, src: "https://cdn.jsdelivr.net/npm/ldrs/dist/auto/waveform.js" }), jsxRuntimeExports.jsx(r, { size: "35", stroke: "3.5", speed: "1", color: "green" }), loadingText && (jsxRuntimeExports.jsx("p", { className: "text-center font-semibold mt-3", children: "Loading..." }))] }));
|