@kirill.konshin/utils 0.0.19 → 0.0.20
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/.ctirc +19 -10
- package/.storybook/main.ts +1 -20
- package/.storybook/preview.ts +1 -16
- package/.turbo/turbo-build.log +9 -66
- package/CHANGELOG.md +21 -0
- package/README.md +6 -0
- package/dist/bootstrap/index.d.ts +1 -12
- package/dist/bootstrap/index.d.ts.map +1 -1
- package/dist/browser/index.d.ts +2 -0
- package/dist/browser/index.d.ts.map +1 -0
- package/dist/core/index.d.ts +1 -9
- package/dist/core/index.d.ts.map +1 -1
- package/dist/electron/index.d.ts +1 -2
- package/dist/electron/index.d.ts.map +1 -1
- package/dist/electron-builder/index.d.ts +1 -2
- package/dist/electron-builder/index.d.ts.map +1 -1
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +27 -0
- package/dist/mui/index.d.ts +1 -4
- package/dist/mui/index.d.ts.map +1 -1
- package/dist/next/index.d.ts +1 -5
- package/dist/next/index.d.ts.map +1 -1
- package/dist/node/index.d.ts +2 -0
- package/dist/node/index.d.ts.map +1 -0
- package/dist/react/index.d.ts +1 -5
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react-native/index.d.ts +1 -3
- package/dist/react-native/index.d.ts.map +1 -1
- package/dist/tailwind/index.d.ts +1 -2
- package/dist/tailwind/index.d.ts.map +1 -1
- package/dist/worker/index.d.ts +2 -0
- package/dist/worker/index.d.ts.map +1 -0
- package/package.json +41 -99
- package/src/bootstrap/index.ts +2 -12
- package/src/browser/index.ts +2 -0
- package/src/core/index.ts +2 -9
- package/src/electron/index.ts +2 -2
- package/src/electron-builder/index.ts +2 -2
- package/src/index.ts +12 -0
- package/src/mui/index.ts +2 -4
- package/src/next/index.ts +2 -5
- package/src/node/index.ts +2 -0
- package/src/react/index.ts +2 -5
- package/src/react-native/index.ts +2 -3
- package/src/tailwind/index.ts +2 -2
- package/src/worker/index.ts +2 -0
- package/tsconfig.json +2 -15
- package/vite.config.ts +2 -56
- package/.turbo/turbo-test.log +0 -171
- package/builders/.swcrc +0 -18
- package/builders/build.config.ts +0 -11
- package/builders/bun.build.js +0 -23
- package/builders/package.json +0 -209
- package/builders/perf.mjs +0 -63
- package/builders/rollup.config.mjs +0 -50
- package/builders/rslib.config.ts +0 -26
- package/builders/tsconfig.json +0 -21
- package/builders/tsup.config.ts +0 -20
- package/builders/turbo.json +0 -24
- package/builders/vite.config.ts +0 -37
- package/demo/worker-demo.ts +0 -73
- package/dist/bootstrap/adaptiveContainer.d.ts +0 -4
- package/dist/bootstrap/adaptiveContainer.d.ts.map +0 -1
- package/dist/bootstrap/adaptiveContainer.js +0 -11
- package/dist/bootstrap/adaptiveContainer.js.map +0 -1
- package/dist/bootstrap/controls.d.ts +0 -38
- package/dist/bootstrap/controls.d.ts.map +0 -1
- package/dist/bootstrap/controls.js +0 -78
- package/dist/bootstrap/controls.js.map +0 -1
- package/dist/bootstrap/controls.stories.d.ts +0 -9
- package/dist/bootstrap/controls.stories.d.ts.map +0 -1
- package/dist/bootstrap/error.d.ts +0 -9
- package/dist/bootstrap/error.d.ts.map +0 -1
- package/dist/bootstrap/error.js +0 -27
- package/dist/bootstrap/error.js.map +0 -1
- package/dist/bootstrap/error.stories.d.ts +0 -8
- package/dist/bootstrap/error.stories.d.ts.map +0 -1
- package/dist/bootstrap/field.d.ts +0 -11
- package/dist/bootstrap/field.d.ts.map +0 -1
- package/dist/bootstrap/field.js +0 -29
- package/dist/bootstrap/field.js.map +0 -1
- package/dist/bootstrap/field.stories.d.ts +0 -8
- package/dist/bootstrap/field.stories.d.ts.map +0 -1
- package/dist/bootstrap/footer.d.ts +0 -10
- package/dist/bootstrap/footer.d.ts.map +0 -1
- package/dist/bootstrap/footer.js +0 -45
- package/dist/bootstrap/footer.js.map +0 -1
- package/dist/bootstrap/globalLoading.d.ts +0 -6
- package/dist/bootstrap/globalLoading.d.ts.map +0 -1
- package/dist/bootstrap/globalLoading.js +0 -10
- package/dist/bootstrap/globalLoading.js.map +0 -1
- package/dist/bootstrap/globalLoading.stories.d.ts +0 -7
- package/dist/bootstrap/globalLoading.stories.d.ts.map +0 -1
- package/dist/bootstrap/index.js +0 -35
- package/dist/bootstrap/loading.d.ts +0 -10
- package/dist/bootstrap/loading.d.ts.map +0 -1
- package/dist/bootstrap/loading.js +0 -19
- package/dist/bootstrap/loading.js.map +0 -1
- package/dist/bootstrap/loading.stories.d.ts +0 -9
- package/dist/bootstrap/loading.stories.d.ts.map +0 -1
- package/dist/bootstrap/responsiveHelper.d.ts +0 -8
- package/dist/bootstrap/responsiveHelper.d.ts.map +0 -1
- package/dist/bootstrap/responsiveHelper.js +0 -46
- package/dist/bootstrap/responsiveHelper.js.map +0 -1
- package/dist/bootstrap/screen.d.ts +0 -22
- package/dist/bootstrap/screen.d.ts.map +0 -1
- package/dist/bootstrap/screen.js +0 -80
- package/dist/bootstrap/screen.js.map +0 -1
- package/dist/bootstrap/screen.stories.d.ts +0 -14
- package/dist/bootstrap/screen.stories.d.ts.map +0 -1
- package/dist/bootstrap/toaster.d.ts +0 -11
- package/dist/bootstrap/toaster.d.ts.map +0 -1
- package/dist/bootstrap/toaster.js +0 -34
- package/dist/bootstrap/toaster.js.map +0 -1
- package/dist/bootstrap/toaster.stories.d.ts +0 -8
- package/dist/bootstrap/toaster.stories.d.ts.map +0 -1
- package/dist/bootstrap/useModal.d.ts +0 -23
- package/dist/bootstrap/useModal.d.ts.map +0 -1
- package/dist/bootstrap/useModal.js +0 -50
- package/dist/bootstrap/useModal.js.map +0 -1
- package/dist/bootstrap/useModal.stories.d.ts +0 -9
- package/dist/bootstrap/useModal.stories.d.ts.map +0 -1
- package/dist/bootstrap/useWrappedForm.d.ts +0 -14
- package/dist/bootstrap/useWrappedForm.d.ts.map +0 -1
- package/dist/bootstrap/useWrappedForm.js +0 -32
- package/dist/bootstrap/useWrappedForm.js.map +0 -1
- package/dist/core/cache.d.ts +0 -120
- package/dist/core/cache.d.ts.map +0 -1
- package/dist/core/cache.js +0 -107
- package/dist/core/cache.js.map +0 -1
- package/dist/core/cache.test.d.ts +0 -2
- package/dist/core/cache.test.d.ts.map +0 -1
- package/dist/core/errors.d.ts +0 -2
- package/dist/core/errors.d.ts.map +0 -1
- package/dist/core/errors.js +0 -15
- package/dist/core/errors.js.map +0 -1
- package/dist/core/files.d.ts +0 -4
- package/dist/core/files.d.ts.map +0 -1
- package/dist/core/files.js +0 -31
- package/dist/core/files.js.map +0 -1
- package/dist/core/index.js +0 -35
- package/dist/core/index.js.map +0 -1
- package/dist/core/ls.d.ts +0 -6
- package/dist/core/ls.d.ts.map +0 -1
- package/dist/core/ls.js +0 -12
- package/dist/core/ls.js.map +0 -1
- package/dist/core/measure.d.ts +0 -35
- package/dist/core/measure.d.ts.map +0 -1
- package/dist/core/measure.js +0 -60
- package/dist/core/measure.js.map +0 -1
- package/dist/core/mutex.d.ts +0 -6
- package/dist/core/mutex.d.ts.map +0 -1
- package/dist/core/mutex.js +0 -26
- package/dist/core/mutex.js.map +0 -1
- package/dist/core/worker.d.ts +0 -98
- package/dist/core/worker.d.ts.map +0 -1
- package/dist/core/worker.js +0 -240
- package/dist/core/worker.js.map +0 -1
- package/dist/core/worker.test.d.ts +0 -2
- package/dist/core/worker.test.d.ts.map +0 -1
- package/dist/core/workerUtils.d.ts +0 -3
- package/dist/core/workerUtils.d.ts.map +0 -1
- package/dist/core/workerUtils.js +0 -31
- package/dist/core/workerUtils.js.map +0 -1
- package/dist/core/wrpc.d.ts +0 -45
- package/dist/core/wrpc.d.ts.map +0 -1
- package/dist/core/wrpc.fixture.d.ts +0 -26
- package/dist/core/wrpc.fixture.d.ts.map +0 -1
- package/dist/core/wrpc.js +0 -242
- package/dist/core/wrpc.js.map +0 -1
- package/dist/core/wrpc.test.d.ts +0 -1
- package/dist/core/wrpc.test.d.ts.map +0 -1
- package/dist/electron/createWindow.d.ts +0 -23
- package/dist/electron/createWindow.d.ts.map +0 -1
- package/dist/electron/createWindow.js +0 -160
- package/dist/electron/createWindow.js.map +0 -1
- package/dist/electron/index.js +0 -9
- package/dist/electron/index.js.map +0 -1
- package/dist/electron/updater.d.ts +0 -2
- package/dist/electron/updater.d.ts.map +0 -1
- package/dist/electron/updater.js +0 -47
- package/dist/electron/updater.js.map +0 -1
- package/dist/electron-builder/builder.d.ts +0 -8
- package/dist/electron-builder/builder.d.ts.map +0 -1
- package/dist/electron-builder/builder.js +0 -130
- package/dist/electron-builder/builder.js.map +0 -1
- package/dist/electron-builder/images.d.ts +0 -7
- package/dist/electron-builder/images.d.ts.map +0 -1
- package/dist/electron-builder/images.js +0 -25
- package/dist/electron-builder/images.js.map +0 -1
- package/dist/electron-builder/index.js +0 -7
- package/dist/electron-builder/index.js.map +0 -1
- package/dist/mui/formControlFieldset.d.ts +0 -5
- package/dist/mui/formControlFieldset.d.ts.map +0 -1
- package/dist/mui/formControlFieldset.js +0 -28
- package/dist/mui/formControlFieldset.js.map +0 -1
- package/dist/mui/formControlFieldset.stories.d.ts +0 -7
- package/dist/mui/formControlFieldset.stories.d.ts.map +0 -1
- package/dist/mui/formLabelLegend.d.ts +0 -4
- package/dist/mui/formLabelLegend.d.ts.map +0 -1
- package/dist/mui/formLabelLegend.js +0 -12
- package/dist/mui/formLabelLegend.js.map +0 -1
- package/dist/mui/genericControl.d.ts +0 -7
- package/dist/mui/genericControl.d.ts.map +0 -1
- package/dist/mui/genericControl.js +0 -21
- package/dist/mui/genericControl.js.map +0 -1
- package/dist/mui/index.js +0 -11
- package/dist/mui/index.js.map +0 -1
- package/dist/mui/readOnly.d.ts +0 -6
- package/dist/mui/readOnly.d.ts.map +0 -1
- package/dist/mui/readOnly.js +0 -7
- package/dist/mui/readOnly.js.map +0 -1
- package/dist/next/appLink.d.ts +0 -8
- package/dist/next/appLink.d.ts.map +0 -1
- package/dist/next/appLink.js +0 -34
- package/dist/next/appLink.js.map +0 -1
- package/dist/next/index.js +0 -15
- package/dist/next/index.js.map +0 -1
- package/dist/next/measure.d.ts +0 -15
- package/dist/next/measure.d.ts.map +0 -1
- package/dist/next/measure.js +0 -9
- package/dist/next/measure.js.map +0 -1
- package/dist/next/noSSR.d.ts +0 -29
- package/dist/next/noSSR.d.ts.map +0 -1
- package/dist/next/noSSR.js +0 -13
- package/dist/next/noSSR.js.map +0 -1
- package/dist/next/redirect.d.ts +0 -6
- package/dist/next/redirect.d.ts.map +0 -1
- package/dist/next/useIsInner.d.ts +0 -3
- package/dist/next/useIsInner.d.ts.map +0 -1
- package/dist/next/useIsInner.js +0 -15
- package/dist/next/useIsInner.js.map +0 -1
- package/dist/react/apiCall.d.ts +0 -6
- package/dist/react/apiCall.d.ts.map +0 -1
- package/dist/react/apiCall.js +0 -24
- package/dist/react/apiCall.js.map +0 -1
- package/dist/react/form/client.d.ts +0 -7
- package/dist/react/form/client.d.ts.map +0 -1
- package/dist/react/form/client.js +0 -46
- package/dist/react/form/client.js.map +0 -1
- package/dist/react/form/form.d.ts +0 -59
- package/dist/react/form/form.d.ts.map +0 -1
- package/dist/react/form/form.js +0 -89
- package/dist/react/form/form.js.map +0 -1
- package/dist/react/form/index.d.ts +0 -3
- package/dist/react/form/index.d.ts.map +0 -1
- package/dist/react/index.js +0 -26
- package/dist/react/index.js.map +0 -1
- package/dist/react/keyboard.d.ts +0 -10
- package/dist/react/keyboard.d.ts.map +0 -1
- package/dist/react/keyboard.js +0 -38
- package/dist/react/keyboard.js.map +0 -1
- package/dist/react/useFetch.d.ts +0 -2
- package/dist/react/useFetch.d.ts.map +0 -1
- package/dist/react/useFetch.js +0 -20
- package/dist/react/useFetch.js.map +0 -1
- package/dist/react/useFetcher.d.ts +0 -10
- package/dist/react/useFetcher.d.ts.map +0 -1
- package/dist/react/useFetcher.js +0 -43
- package/dist/react/useFetcher.js.map +0 -1
- package/dist/react-native/index.js +0 -9
- package/dist/react-native/index.js.map +0 -1
- package/dist/react-native/share.d.ts +0 -9
- package/dist/react-native/share.d.ts.map +0 -1
- package/dist/react-native/share.js +0 -23
- package/dist/react-native/share.js.map +0 -1
- package/dist/react-native/update.d.ts +0 -3
- package/dist/react-native/update.d.ts.map +0 -1
- package/dist/react-native/update.js +0 -40
- package/dist/react-native/update.js.map +0 -1
- package/dist/react-native/useAppState.d.ts +0 -2
- package/dist/react-native/useAppState.d.ts.map +0 -1
- package/dist/react-native/useAppState.js +0 -18
- package/dist/react-native/useAppState.js.map +0 -1
- package/dist/tailwind/fullpage.d.ts +0 -3
- package/dist/tailwind/fullpage.d.ts.map +0 -1
- package/dist/tailwind/fullpage.js +0 -14
- package/dist/tailwind/fullpage.js.map +0 -1
- package/dist/tailwind/index.js +0 -7
- package/dist/tailwind/index.js.map +0 -1
- package/dist/tailwind/responsiveHelper.d.ts +0 -3
- package/dist/tailwind/responsiveHelper.d.ts.map +0 -1
- package/dist/tailwind/responsiveHelper.js +0 -16
- package/dist/tailwind/responsiveHelper.js.map +0 -1
- package/src/bootstrap/adaptiveContainer.tsx +0 -12
- package/src/bootstrap/controls.stories.tsx +0 -62
- package/src/bootstrap/controls.tsx +0 -119
- package/src/bootstrap/error.stories.tsx +0 -34
- package/src/bootstrap/error.tsx +0 -37
- package/src/bootstrap/field.stories.tsx +0 -42
- package/src/bootstrap/field.tsx +0 -37
- package/src/bootstrap/footer.tsx +0 -61
- package/src/bootstrap/globalLoading.stories.tsx +0 -25
- package/src/bootstrap/globalLoading.tsx +0 -19
- package/src/bootstrap/loading.stories.tsx +0 -35
- package/src/bootstrap/loading.tsx +0 -24
- package/src/bootstrap/main.scss +0 -86
- package/src/bootstrap/responsiveHelper.tsx +0 -55
- package/src/bootstrap/screen.stories.tsx +0 -160
- package/src/bootstrap/screen.tsx +0 -146
- package/src/bootstrap/toaster.stories.tsx +0 -32
- package/src/bootstrap/toaster.tsx +0 -40
- package/src/bootstrap/useModal.stories.tsx +0 -51
- package/src/bootstrap/useModal.tsx +0 -93
- package/src/bootstrap/useWrappedForm.ts +0 -42
- package/src/core/README.md +0 -91
- package/src/core/cache.test.ts +0 -121
- package/src/core/cache.ts +0 -246
- package/src/core/errors.ts +0 -17
- package/src/core/files.ts +0 -29
- package/src/core/ls.ts +0 -15
- package/src/core/measure.ts +0 -109
- package/src/core/mutex.ts +0 -22
- package/src/core/worker.test.ts +0 -197
- package/src/core/worker.ts +0 -347
- package/src/core/workerUtils.ts +0 -32
- package/src/core/wrpc.fixture.ts +0 -106
- package/src/core/wrpc.test.ts +0 -225
- package/src/core/wrpc.ts +0 -377
- package/src/electron/README.md +0 -13
- package/src/electron/createWindow.ts +0 -234
- package/src/electron/updater.ts +0 -54
- package/src/electron-builder/builder.ts +0 -150
- package/src/electron-builder/images.ts +0 -33
- package/src/mui/README.md +0 -3
- package/src/mui/formControlFieldset.stories.tsx +0 -71
- package/src/mui/formControlFieldset.tsx +0 -26
- package/src/mui/formLabelLegend.tsx +0 -11
- package/src/mui/genericControl.tsx +0 -20
- package/src/mui/readOnly.tsx +0 -6
- package/src/next/appLink.tsx +0 -40
- package/src/next/measure.ts +0 -24
- package/src/next/noSSR.tsx +0 -36
- package/src/next/redirect.tsx +0 -13
- package/src/next/useIsInner.ts +0 -13
- package/src/react/apiCall.ts +0 -25
- package/src/react/form/client.tsx +0 -73
- package/src/react/form/form.tsx +0 -178
- package/src/react/form/index.ts +0 -2
- package/src/react/keyboard.tsx +0 -54
- package/src/react/useFetch.ts +0 -29
- package/src/react/useFetcher.ts +0 -54
- package/src/react-native/share.ts +0 -31
- package/src/react-native/update.tsx +0 -40
- package/src/react-native/useAppState.ts +0 -18
- package/src/tailwind/README.md +0 -8
- package/src/tailwind/fullpage.tsx +0 -11
- package/src/tailwind/responsiveHelper.tsx +0 -16
- package/src-todo/auth0.tsx +0 -177
- package/vite.exports.ts +0 -121
- /package/dist/{bootstrap/index.js.map → index.js.map} +0 -0
package/dist/tailwind/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"responsiveHelper.d.ts","sourceRoot":"","sources":["../../src/tailwind/responsiveHelper.tsx"],"names":[],"mappings":"AAEA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAElC,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,GAAG,CAWtC,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
3
|
-
const ResponsiveHelperTW = function ResponsiveHelperTW2() {
|
|
4
|
-
return /* @__PURE__ */ jsxs("span", { className: "fixed bottom-0 right-2 z-30 leading-none text-xs", children: [
|
|
5
|
-
/* @__PURE__ */ jsx("small", { className: "hidden xs:max-sm:block", children: "XS" }),
|
|
6
|
-
/* @__PURE__ */ jsx("small", { className: "hidden sm:max-md:block", children: "SM" }),
|
|
7
|
-
/* @__PURE__ */ jsx("small", { className: "hidden md:max-lg:block", children: "MD" }),
|
|
8
|
-
/* @__PURE__ */ jsx("small", { className: "hidden lg:max-xl:block", children: "LG" }),
|
|
9
|
-
/* @__PURE__ */ jsx("small", { className: "hidden xl:max-2xl:block", children: "XL" }),
|
|
10
|
-
/* @__PURE__ */ jsx("small", { className: "hidden 2xl:block", children: "XXL" })
|
|
11
|
-
] });
|
|
12
|
-
};
|
|
13
|
-
export {
|
|
14
|
-
ResponsiveHelperTW
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=responsiveHelper.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"responsiveHelper.js","sources":["../../src/tailwind/responsiveHelper.tsx"],"sourcesContent":["'use client';\n\nimport React, { FC } from 'react';\n\nexport const ResponsiveHelperTW: FC<any> = function ResponsiveHelperTW() {\n return (\n <span className=\"fixed bottom-0 right-2 z-30 leading-none text-xs\">\n <small className=\"hidden xs:max-sm:block\">XS</small>\n <small className=\"hidden sm:max-md:block\">SM</small>\n <small className=\"hidden md:max-lg:block\">MD</small>\n <small className=\"hidden lg:max-xl:block\">LG</small>\n <small className=\"hidden xl:max-2xl:block\">XL</small>\n <small className=\"hidden 2xl:block\">XXL</small>\n </span>\n );\n};\n"],"names":["ResponsiveHelperTW"],"mappings":";;AAIa,MAAA,qBAA8B,SAASA,sBAAqB;AAEjE,SAAA,qBAAC,QAAK,EAAA,WAAU,oDACZ,UAAA;AAAA,IAAC,oBAAA,SAAA,EAAM,WAAU,0BAAyB,UAAE,MAAA;AAAA,IAC3C,oBAAA,SAAA,EAAM,WAAU,0BAAyB,UAAE,MAAA;AAAA,IAC3C,oBAAA,SAAA,EAAM,WAAU,0BAAyB,UAAE,MAAA;AAAA,IAC3C,oBAAA,SAAA,EAAM,WAAU,0BAAyB,UAAE,MAAA;AAAA,IAC3C,oBAAA,SAAA,EAAM,WAAU,2BAA0B,UAAE,MAAA;AAAA,IAC5C,oBAAA,SAAA,EAAM,WAAU,oBAAmB,UAAG,MAAA,CAAA;AAAA,EAAA,GAC3C;AAER;"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React, { FC } from 'react';
|
|
2
|
-
import { Container, ContainerProps } from 'react-bootstrap';
|
|
3
|
-
import { useBreakpoint } from './responsiveHelper';
|
|
4
|
-
|
|
5
|
-
export const AdaptiveContainer: FC<ContainerProps> = function AdaptiveContainer({ children, ...props }) {
|
|
6
|
-
const { isMobile } = useBreakpoint();
|
|
7
|
-
return (
|
|
8
|
-
<Container fluid={isMobile} {...props}>
|
|
9
|
-
{children}
|
|
10
|
-
</Container>
|
|
11
|
-
);
|
|
12
|
-
};
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import React, { cloneElement, useCallback, useState } from 'react';
|
|
2
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
|
-
import { fn } from '@storybook/test';
|
|
4
|
-
|
|
5
|
-
import { Select, Control, Range, Checkbox } from './controls';
|
|
6
|
-
|
|
7
|
-
const defaultOptions = { num: 1, bool: false, select: 'bar' };
|
|
8
|
-
|
|
9
|
-
// More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export
|
|
10
|
-
const meta: Meta<typeof Control> = {
|
|
11
|
-
title: 'Bootstrap / Controls',
|
|
12
|
-
parameters: {
|
|
13
|
-
layout: 'centered',
|
|
14
|
-
},
|
|
15
|
-
tags: ['autodocs'],
|
|
16
|
-
argTypes: {},
|
|
17
|
-
args: { options: { ...defaultOptions }, setOptions: fn(), defaultOptions: { ...defaultOptions }, name: 'unused' },
|
|
18
|
-
render: function Demo(args) {
|
|
19
|
-
const [options, setOptionsRaw] = useState(args.options);
|
|
20
|
-
|
|
21
|
-
const setOptions = useCallback(
|
|
22
|
-
(options: any) =>
|
|
23
|
-
setOptionsRaw((currentOptions) => {
|
|
24
|
-
return { ...currentOptions, ...options };
|
|
25
|
-
}),
|
|
26
|
-
[],
|
|
27
|
-
);
|
|
28
|
-
|
|
29
|
-
const controlProps = { options, setOptions, defaultOptions };
|
|
30
|
-
|
|
31
|
-
const { children, name, ...safeArgs } = args;
|
|
32
|
-
|
|
33
|
-
return <div style={{ width: '300px' }}>{cloneElement(children as any, { ...safeArgs, ...controlProps })}</div>;
|
|
34
|
-
},
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
export default meta;
|
|
38
|
-
|
|
39
|
-
type Story = StoryObj<typeof meta>;
|
|
40
|
-
|
|
41
|
-
export const RangeControl: Story = {
|
|
42
|
-
args: {
|
|
43
|
-
children: <Range name="Num" min={0} max={1} />,
|
|
44
|
-
},
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
export const CheckboxControl: Story = {
|
|
48
|
-
args: {
|
|
49
|
-
children: <Checkbox name="Bool" />,
|
|
50
|
-
},
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
export const SelectControl: Story = {
|
|
54
|
-
args: {
|
|
55
|
-
children: (
|
|
56
|
-
<Select name="Select">
|
|
57
|
-
<option value="foo">Foo</option>
|
|
58
|
-
<option value="bar">Bar</option>
|
|
59
|
-
</Select>
|
|
60
|
-
),
|
|
61
|
-
},
|
|
62
|
-
};
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import React, { HTMLInputTypeAttribute, memo, FC } from 'react';
|
|
2
|
-
|
|
3
|
-
const lcFirst = (str: string) => str[0].toLowerCase() + str.substring(1, str.length);
|
|
4
|
-
|
|
5
|
-
const toProperty = (str: string) => lcFirst(str).split(' ').join('');
|
|
6
|
-
|
|
7
|
-
export interface ControlProps {
|
|
8
|
-
value?: any;
|
|
9
|
-
setValue?: (v: any) => void;
|
|
10
|
-
defaultValue?: any;
|
|
11
|
-
options?: { [key: string]: any };
|
|
12
|
-
setOptions?: (v: { [key: string]: any }) => void;
|
|
13
|
-
defaultOptions?: { [key: string]: any };
|
|
14
|
-
name: string;
|
|
15
|
-
children?: React.ReactNode;
|
|
16
|
-
inputProps?: {
|
|
17
|
-
type: HTMLInputTypeAttribute;
|
|
18
|
-
property?: string;
|
|
19
|
-
valueExtractor?: (e: any) => any;
|
|
20
|
-
className?: string;
|
|
21
|
-
} & any;
|
|
22
|
-
hideValue?: boolean;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export type LabelProps = Pick<ControlProps, 'name' | 'value' | 'defaultValue'> & { reset: () => void };
|
|
26
|
-
|
|
27
|
-
export const Label: FC<LabelProps> = memo(function Label({ name, reset, value, defaultValue }) {
|
|
28
|
-
return (
|
|
29
|
-
<label className="flex-grow-1 mb-0 d-flex align-items-center justify-content-start gap-2">
|
|
30
|
-
{name}
|
|
31
|
-
{value !== defaultValue && (
|
|
32
|
-
<>
|
|
33
|
-
<a href="javascript: void(0)" onClick={reset}>
|
|
34
|
-
<small>reset</small>
|
|
35
|
-
</a>
|
|
36
|
-
</>
|
|
37
|
-
)}
|
|
38
|
-
</label>
|
|
39
|
-
);
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
export const Control: FC<ControlProps> = memo(function Control({
|
|
43
|
-
value = null,
|
|
44
|
-
setValue,
|
|
45
|
-
defaultValue = null,
|
|
46
|
-
options = {},
|
|
47
|
-
setOptions,
|
|
48
|
-
defaultOptions = {},
|
|
49
|
-
name,
|
|
50
|
-
inputProps: { Tag = 'input', property = 'value', valueExtractor = (e: any) => e.target.value, ...inputProps } = {},
|
|
51
|
-
hideValue = false,
|
|
52
|
-
children,
|
|
53
|
-
}) {
|
|
54
|
-
const prop = toProperty(name);
|
|
55
|
-
|
|
56
|
-
defaultValue = defaultValue || defaultOptions[prop];
|
|
57
|
-
value = value || options?.[prop];
|
|
58
|
-
setValue = setValue || ((v) => setOptions?.({ [prop]: v }));
|
|
59
|
-
|
|
60
|
-
const reset = () => setValue(defaultValue);
|
|
61
|
-
|
|
62
|
-
return (
|
|
63
|
-
<div className="d-flex align-items-center gap-2">
|
|
64
|
-
<Label name={name} reset={reset} value={value} defaultValue={defaultValue} />
|
|
65
|
-
<Tag
|
|
66
|
-
{...inputProps}
|
|
67
|
-
{...{ [property]: value || '' }} // null is needed to make it always controlled
|
|
68
|
-
className={`${value === defaultValue ? 'opacity-75' : ''} ${inputProps.className}`}
|
|
69
|
-
onChange={(e: Event) => setValue(valueExtractor(e))}
|
|
70
|
-
>
|
|
71
|
-
{children}
|
|
72
|
-
</Tag>
|
|
73
|
-
{!hideValue && (
|
|
74
|
-
<span onDoubleClick={reset} className="text-start" style={{ width: '20px' }}>
|
|
75
|
-
{value}
|
|
76
|
-
</span>
|
|
77
|
-
)}
|
|
78
|
-
</div>
|
|
79
|
-
);
|
|
80
|
-
});
|
|
81
|
-
|
|
82
|
-
export interface RangeProps extends ControlProps {
|
|
83
|
-
min: number;
|
|
84
|
-
max: number;
|
|
85
|
-
step?: number;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
export const Range: FC<RangeProps> = memo(function Range({ min, max, step = 0.1, ...props }) {
|
|
89
|
-
return (
|
|
90
|
-
<Control
|
|
91
|
-
inputProps={{
|
|
92
|
-
type: 'range',
|
|
93
|
-
min,
|
|
94
|
-
max,
|
|
95
|
-
step,
|
|
96
|
-
className: 'form-control-range',
|
|
97
|
-
valueExtractor: (e: any) => parseFloat(e.target.value),
|
|
98
|
-
}}
|
|
99
|
-
{...props}
|
|
100
|
-
/>
|
|
101
|
-
);
|
|
102
|
-
});
|
|
103
|
-
|
|
104
|
-
export const Checkbox: FC<ControlProps> = memo(function Checkbox(props) {
|
|
105
|
-
return (
|
|
106
|
-
<Control
|
|
107
|
-
inputProps={{ type: 'checkbox', property: 'checked', valueExtractor: (e: any) => e.target.checked }}
|
|
108
|
-
{...props}
|
|
109
|
-
/>
|
|
110
|
-
);
|
|
111
|
-
});
|
|
112
|
-
|
|
113
|
-
export const Select: FC<ControlProps> = memo(function Select({ children, ...props }) {
|
|
114
|
-
return (
|
|
115
|
-
<Control inputProps={{ Tag: 'select', className: 'form-select' }} {...props} hideValue={true}>
|
|
116
|
-
{children}
|
|
117
|
-
</Control>
|
|
118
|
-
);
|
|
119
|
-
});
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { fn } from '@storybook/test';
|
|
3
|
-
|
|
4
|
-
import { ErrorAlert } from './error';
|
|
5
|
-
|
|
6
|
-
// More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export
|
|
7
|
-
const meta: Meta<typeof ErrorAlert> = {
|
|
8
|
-
title: 'Bootstrap / ErrorAlert',
|
|
9
|
-
component: ErrorAlert,
|
|
10
|
-
parameters: {
|
|
11
|
-
layout: 'centered',
|
|
12
|
-
},
|
|
13
|
-
tags: ['autodocs'],
|
|
14
|
-
argTypes: {
|
|
15
|
-
// backgroundColor: { control: 'color' },
|
|
16
|
-
children: { control: 'text' },
|
|
17
|
-
},
|
|
18
|
-
args: { onRetry: fn() },
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export default meta;
|
|
22
|
-
type Story = StoryObj<typeof meta>;
|
|
23
|
-
|
|
24
|
-
export const String: Story = {
|
|
25
|
-
args: {
|
|
26
|
-
children: 'An error occurred',
|
|
27
|
-
},
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
export const ErrorObject: Story = {
|
|
31
|
-
args: {
|
|
32
|
-
children: new Error('An error occurred') as any,
|
|
33
|
-
},
|
|
34
|
-
};
|
package/src/bootstrap/error.tsx
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import React, { FC } from 'react';
|
|
4
|
-
import { Alert, AlertProps, Button, ButtonProps } from 'react-bootstrap';
|
|
5
|
-
|
|
6
|
-
export type ErrorAlertProps = {
|
|
7
|
-
children?: Error | string | any;
|
|
8
|
-
onRetry?: () => any;
|
|
9
|
-
buttonProps?: ButtonProps;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
//TODO Create MUI-specific?
|
|
13
|
-
export const ErrorAlert: FC<ErrorAlertProps> = function ErrorAlert({ onRetry, children, buttonProps, ...props }) {
|
|
14
|
-
if (!children) return null;
|
|
15
|
-
|
|
16
|
-
return (
|
|
17
|
-
<Alert variant="danger" {...props}>
|
|
18
|
-
<div>{children.message || children.toString()}</div>
|
|
19
|
-
{onRetry && (
|
|
20
|
-
<div>
|
|
21
|
-
<Button
|
|
22
|
-
variant="link"
|
|
23
|
-
className="alert-link"
|
|
24
|
-
{...buttonProps}
|
|
25
|
-
onClick={(e) => {
|
|
26
|
-
e.preventDefault();
|
|
27
|
-
e.stopPropagation();
|
|
28
|
-
onRetry();
|
|
29
|
-
}}
|
|
30
|
-
>
|
|
31
|
-
Retry
|
|
32
|
-
</Button>
|
|
33
|
-
</div>
|
|
34
|
-
)}
|
|
35
|
-
</Alert>
|
|
36
|
-
);
|
|
37
|
-
};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
|
-
import { fn } from '@storybook/test';
|
|
4
|
-
|
|
5
|
-
import { FieldGroup } from './field';
|
|
6
|
-
import { FormControl } from 'react-bootstrap';
|
|
7
|
-
|
|
8
|
-
// More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export
|
|
9
|
-
const meta: Meta<typeof FieldGroup> = {
|
|
10
|
-
title: 'Bootstrap / FieldGroup',
|
|
11
|
-
component: FieldGroup,
|
|
12
|
-
parameters: {
|
|
13
|
-
layout: 'centered',
|
|
14
|
-
},
|
|
15
|
-
tags: ['autodocs'],
|
|
16
|
-
argTypes: {
|
|
17
|
-
text: { control: 'text' },
|
|
18
|
-
label: { control: 'text' },
|
|
19
|
-
horizontal: { control: 'check' },
|
|
20
|
-
},
|
|
21
|
-
args: { onClick: fn() },
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export default meta;
|
|
25
|
-
|
|
26
|
-
type Story = StoryObj<typeof meta>;
|
|
27
|
-
|
|
28
|
-
export const Vertical: Story = {
|
|
29
|
-
args: {
|
|
30
|
-
label: 'Label',
|
|
31
|
-
children: <FormControl placeholder="Input" />,
|
|
32
|
-
text: 'Text',
|
|
33
|
-
},
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
export const Horizontal: Story = {
|
|
37
|
-
args: {
|
|
38
|
-
label: 'Label',
|
|
39
|
-
children: <FormControl placeholder="Input" />,
|
|
40
|
-
horizontal: true,
|
|
41
|
-
},
|
|
42
|
-
};
|
package/src/bootstrap/field.tsx
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import React, { FC } from 'react';
|
|
2
|
-
import { Form, FormGroupProps, FormLabelProps, FormTextProps } from 'react-bootstrap';
|
|
3
|
-
|
|
4
|
-
export type FieldGroupProps = FormGroupProps & {
|
|
5
|
-
label?: any;
|
|
6
|
-
labelProps?: FormLabelProps;
|
|
7
|
-
text?: any;
|
|
8
|
-
textProps?: FormTextProps;
|
|
9
|
-
horizontal?: boolean;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export const FieldGroup: FC<FieldGroupProps> = function FieldGroup({
|
|
13
|
-
label,
|
|
14
|
-
labelProps = {},
|
|
15
|
-
text,
|
|
16
|
-
textProps = {},
|
|
17
|
-
horizontal,
|
|
18
|
-
children,
|
|
19
|
-
...props
|
|
20
|
-
}) {
|
|
21
|
-
if (horizontal) {
|
|
22
|
-
props.className = 'hstack gap-3 ' + (props.className || '');
|
|
23
|
-
labelProps.className = 'm-0 ' + (labelProps.className || '');
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
if (text && horizontal) {
|
|
27
|
-
throw new Error('Cannot use text and horizontal together');
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
return (
|
|
31
|
-
<Form.Group {...props}>
|
|
32
|
-
{label && <Form.Label {...labelProps}>{label}</Form.Label>}
|
|
33
|
-
{children}
|
|
34
|
-
{text && !horizontal && <Form.Text {...textProps}>{text}</Form.Text>}{' '}
|
|
35
|
-
</Form.Group>
|
|
36
|
-
);
|
|
37
|
-
};
|
package/src/bootstrap/footer.tsx
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import React, { FC } from 'react';
|
|
2
|
-
import { Nav, Navbar } from 'react-bootstrap';
|
|
3
|
-
import { useBreakpoint } from './responsiveHelper';
|
|
4
|
-
import { AdaptiveContainer } from './adaptiveContainer';
|
|
5
|
-
|
|
6
|
-
export type FooterNavItemProps = {
|
|
7
|
-
href: any;
|
|
8
|
-
icon: any;
|
|
9
|
-
active?: boolean | undefined;
|
|
10
|
-
children?: string | undefined;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export const FooterNavItem: FC<FooterNavItemProps> = function FooterNavItem({
|
|
14
|
-
href,
|
|
15
|
-
icon,
|
|
16
|
-
active = false,
|
|
17
|
-
children = '',
|
|
18
|
-
}) {
|
|
19
|
-
// const pathname = usePathname();
|
|
20
|
-
|
|
21
|
-
const isFilepath = icon.includes('.');
|
|
22
|
-
let iconElement;
|
|
23
|
-
|
|
24
|
-
if (isFilepath) {
|
|
25
|
-
iconElement = <img src={icon} alt="icon" className="me-lg-2" />;
|
|
26
|
-
} else {
|
|
27
|
-
iconElement = <span className={`lead me-lg-2 ${icon}`} />;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
// const active = isActivePath(href, pathname);
|
|
31
|
-
|
|
32
|
-
const link = (
|
|
33
|
-
<Nav.Link
|
|
34
|
-
// as={Link}
|
|
35
|
-
href={href}
|
|
36
|
-
// active={active} // has no effect when not pills or tabs
|
|
37
|
-
className={`px-0 px-lg-3 d-flex align-items-center flex-column flex-lg-row ${active ? 'text-primary' : ''}`}
|
|
38
|
-
>
|
|
39
|
-
{iconElement}
|
|
40
|
-
{children}
|
|
41
|
-
</Nav.Link>
|
|
42
|
-
);
|
|
43
|
-
|
|
44
|
-
return <Nav.Item style={{ flex: 1 }}>{link}</Nav.Item>;
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
export const Footer: FC<any> = function Footer({ children }) {
|
|
48
|
-
const { isDesktop } = useBreakpoint();
|
|
49
|
-
|
|
50
|
-
return (
|
|
51
|
-
// border-bottom
|
|
52
|
-
<div className={isDesktop ? '' : 'border-top'}>
|
|
53
|
-
<Navbar className={isDesktop ? '' : 'py-0'}>
|
|
54
|
-
<AdaptiveContainer>
|
|
55
|
-
{isDesktop && <Navbar.Brand href="/">Le Brand</Navbar.Brand>}
|
|
56
|
-
<Nav className={isDesktop ? 'me-auto' : 'justify-content-center flex-nowrap w-100'}>{children}</Nav>
|
|
57
|
-
</AdaptiveContainer>
|
|
58
|
-
</Navbar>
|
|
59
|
-
</div>
|
|
60
|
-
);
|
|
61
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
|
|
3
|
-
import { GlobalLoading } from './globalLoading';
|
|
4
|
-
|
|
5
|
-
const meta: Meta<typeof GlobalLoading> = {
|
|
6
|
-
title: 'Bootstrap / GlobalLoading',
|
|
7
|
-
component: GlobalLoading,
|
|
8
|
-
parameters: {
|
|
9
|
-
layout: 'centered',
|
|
10
|
-
},
|
|
11
|
-
tags: ['autodocs'],
|
|
12
|
-
argTypes: {
|
|
13
|
-
loading: { control: 'check' },
|
|
14
|
-
},
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export default meta;
|
|
18
|
-
|
|
19
|
-
type Story = StoryObj<typeof meta>;
|
|
20
|
-
|
|
21
|
-
export const Default: Story = {
|
|
22
|
-
args: {
|
|
23
|
-
loading: true,
|
|
24
|
-
},
|
|
25
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React, { FC } from 'react';
|
|
2
|
-
// import { useLoading, useLoadingTimeout } from '../redux/loadingSlice';
|
|
3
|
-
import { Loading } from './loading';
|
|
4
|
-
|
|
5
|
-
export type GlobalLoadingProps = { loading: boolean };
|
|
6
|
-
|
|
7
|
-
export const GlobalLoading: FC<GlobalLoadingProps> = function GlobalLoading({ loading }) {
|
|
8
|
-
// const { loading } = useLoading();
|
|
9
|
-
|
|
10
|
-
// useLoadingTimeout(15000); // escape latch if something is stuck
|
|
11
|
-
|
|
12
|
-
if (!loading) return null;
|
|
13
|
-
|
|
14
|
-
return (
|
|
15
|
-
<div className="bg-white position-absolute top-0 start-0 w-100 h-100 z-3 d-flex align-items-center justify-content-center">
|
|
16
|
-
<Loading />
|
|
17
|
-
</div>
|
|
18
|
-
);
|
|
19
|
-
};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
|
|
3
|
-
import { Loading } from './loading';
|
|
4
|
-
|
|
5
|
-
const meta: Meta<typeof Loading> = {
|
|
6
|
-
title: 'Bootstrap / Loading',
|
|
7
|
-
component: Loading,
|
|
8
|
-
parameters: {
|
|
9
|
-
layout: 'centered',
|
|
10
|
-
},
|
|
11
|
-
tags: ['autodocs'],
|
|
12
|
-
argTypes: {
|
|
13
|
-
children: { control: 'text' },
|
|
14
|
-
show: { control: 'check' },
|
|
15
|
-
size: { control: 'select', options: ['sm', 'md'] },
|
|
16
|
-
},
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export default meta;
|
|
20
|
-
|
|
21
|
-
type Story = StoryObj<typeof meta>;
|
|
22
|
-
|
|
23
|
-
export const Default: Story = {};
|
|
24
|
-
|
|
25
|
-
export const Children: Story = {
|
|
26
|
-
args: {
|
|
27
|
-
children: 'Custom Loading...',
|
|
28
|
-
},
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export const Size: Story = {
|
|
32
|
-
args: {
|
|
33
|
-
size: 'sm',
|
|
34
|
-
},
|
|
35
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { Spinner, SpinnerProps, Stack } from 'react-bootstrap';
|
|
2
|
-
import React, { FC, memo } from 'react';
|
|
3
|
-
|
|
4
|
-
export type LoadingProps = {
|
|
5
|
-
children?: any;
|
|
6
|
-
show?: boolean;
|
|
7
|
-
className?: string;
|
|
8
|
-
size?: SpinnerProps['size'];
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export const Loading: FC<LoadingProps> = memo(function Loading({
|
|
12
|
-
children = 'Loading...' as any,
|
|
13
|
-
show = true,
|
|
14
|
-
className = '',
|
|
15
|
-
size,
|
|
16
|
-
}) {
|
|
17
|
-
if (!show) return null;
|
|
18
|
-
return (
|
|
19
|
-
<Stack direction="horizontal" gap={3} className={`align-self-auto ${className}`}>
|
|
20
|
-
<Spinner animation="border" role="status" size={size as any} />
|
|
21
|
-
<span>{children}</span>
|
|
22
|
-
</Stack>
|
|
23
|
-
);
|
|
24
|
-
});
|
package/src/bootstrap/main.scss
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
$primary: darken(#fd7e14, 6%) !default; // in order to accomodate MCR=3
|
|
2
|
-
$secondary: #0d6efd !default;
|
|
3
|
-
$danger: #dc3545 !default;
|
|
4
|
-
$warning: #fd7e14 !default;
|
|
5
|
-
$success: #198754 !default;
|
|
6
|
-
|
|
7
|
-
$theme-colors: (
|
|
8
|
-
'primary': $primary,
|
|
9
|
-
'secondary': $secondary,
|
|
10
|
-
'success': $success,
|
|
11
|
-
// "info": $info,
|
|
12
|
-
'warning': $warning,
|
|
13
|
-
'danger': $danger,
|
|
14
|
-
// non-bootstrap colors
|
|
15
|
-
'light': #dddddd,
|
|
16
|
-
'dark': #2c2414,
|
|
17
|
-
);
|
|
18
|
-
|
|
19
|
-
$min-contrast-ratio: 3 !default; // 4.5 produces black on orange @see https://stackoverflow.com/a/68303393/5125659
|
|
20
|
-
|
|
21
|
-
@import 'bootstrap/scss/functions.scss';
|
|
22
|
-
@import 'bootstrap/scss/variables.scss';
|
|
23
|
-
@import 'bootstrap/scss/mixins.scss';
|
|
24
|
-
@import 'bootstrap/scss/bootstrap.scss';
|
|
25
|
-
|
|
26
|
-
// Nav
|
|
27
|
-
|
|
28
|
-
.btn-nav {
|
|
29
|
-
@extend .btn-outline-primary; // just vars to control styling
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.main-nav .btn-nav {
|
|
33
|
-
border-width: 0;
|
|
34
|
-
|
|
35
|
-
@include media-breakpoint-down(md) {
|
|
36
|
-
--bs-btn-active-color: var(--bs-primary);
|
|
37
|
-
--bs-btn-hover-color: var(--bs-primary);
|
|
38
|
-
background: none !important;
|
|
39
|
-
padding: 0;
|
|
40
|
-
text-decoration: none;
|
|
41
|
-
font-weight: 500;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
&.disabled {
|
|
45
|
-
color: var(--bs-gray-600);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
// Dropdowns
|
|
50
|
-
|
|
51
|
-
.dropdown-toggle-no-arrow::after,
|
|
52
|
-
.dropdown-toggle-no-arrow > .dropdown-toggle::after {
|
|
53
|
-
display: none !important;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.dropdown > button {
|
|
57
|
-
display: block; // fixes small padding on dropdowns
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
// Tables
|
|
61
|
-
|
|
62
|
-
.table {
|
|
63
|
-
//fixes table borders & margins
|
|
64
|
-
margin-bottom: 0;
|
|
65
|
-
|
|
66
|
-
& > :not(caption) > * > * {
|
|
67
|
-
background: none;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
& > :not(caption) > tr:last-of-type > * {
|
|
71
|
-
border-bottom: none;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
// Badges
|
|
76
|
-
|
|
77
|
-
.badge {
|
|
78
|
-
--bs-badge-font-weight: normal;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
// Icons
|
|
82
|
-
|
|
83
|
-
.icon-thick {
|
|
84
|
-
webkit-text-stroke: 1px;
|
|
85
|
-
text-stroke: 1px;
|
|
86
|
-
}
|