@bi-digital/react 0.2.10 → 0.2.11
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 +1 -54
- package/dist/chunk-2C3XKBNM.js +1 -0
- package/dist/chunk-2PYB72CX.js +1 -0
- package/dist/{chunk-3OKTD2AD.js → chunk-3XRBNC3R.js} +2 -2
- package/dist/chunk-3XRBNC3R.js.map +1 -0
- package/dist/chunk-4WOE4T43.js +1 -0
- package/dist/chunk-BBMVGCDE.js +1 -0
- package/dist/{chunk-45MAIFC5.js → chunk-DT6EO53O.js} +3 -3
- package/dist/chunk-DT6EO53O.js.map +1 -0
- package/dist/chunk-DZDPC6SE.js +1 -0
- package/dist/chunk-IT2O6DB2.js +53 -0
- package/dist/chunk-IT2O6DB2.js.map +1 -0
- package/dist/chunk-LLNHMZB2.js +1 -0
- package/dist/{chunk-6UM2LO6A.js → chunk-MXDZGWL4.js} +3 -3
- package/dist/chunk-MXDZGWL4.js.map +1 -0
- package/dist/{chunk-4SI37MJP.js → chunk-NLZRLXFN.js} +2 -2
- package/dist/chunk-NLZRLXFN.js.map +1 -0
- package/dist/chunk-PD4PXDK2.js +1 -0
- package/dist/chunk-RAZCAHWX.js +1 -0
- package/dist/chunk-RELDFXH4.js +1 -0
- package/dist/{chunk-V5WV7RSY.js → chunk-RONRQXS6.js} +2 -2
- package/dist/chunk-RONRQXS6.js.map +1 -0
- package/dist/chunk-RVKE5NZR.js +1 -0
- package/dist/{chunk-PZHZKBNQ.js → chunk-SGVCN25U.js} +2 -2
- package/dist/chunk-SGVCN25U.js.map +1 -0
- package/dist/chunk-SHVA4JJZ.js +1 -0
- package/dist/{chunk-2O4QJORU.js → chunk-SX22Q2HZ.js} +4 -4
- package/dist/chunk-SX22Q2HZ.js.map +1 -0
- package/dist/chunk-TUJK53CY.js +1 -0
- package/dist/chunk-VPE7VEBG.js +8 -0
- package/dist/chunk-VPE7VEBG.js.map +1 -0
- package/dist/{button → components/button}/button.d.ts +16 -20
- package/dist/components/button/button.js +9 -0
- package/dist/{button → components/button}/index.d.ts +1 -0
- package/dist/components/button/index.js +10 -0
- package/dist/components/form/error-message/error-message.js +7 -0
- package/dist/components/form/error-message/index.js +8 -0
- package/dist/components/form/index.js +24 -0
- package/dist/components/form/input/index.js +14 -0
- package/dist/components/form/input/input.js +13 -0
- package/dist/components/form/input-group/index.js +12 -0
- package/dist/components/form/input-group/input-group.js +11 -0
- package/dist/components/form/label/index.js +8 -0
- package/dist/components/form/label/label.js +7 -0
- package/dist/components/index.d.ts +11 -0
- package/dist/components/index.js +45 -0
- package/dist/{logo → components/logo}/index.d.ts +1 -0
- package/dist/components/logo/index.js +8 -0
- package/dist/{logo → components/logo}/logo.d.ts +4 -3
- package/dist/components/logo/logo.js +7 -0
- package/dist/{navbar → components/navbar}/index.d.ts +1 -0
- package/dist/components/navbar/index.js +10 -0
- package/dist/components/navbar/index.js.map +1 -0
- package/dist/{navbar → components/navbar}/navbar.d.ts +4 -3
- package/dist/components/navbar/navbar.js +9 -0
- package/dist/components/navbar/navbar.js.map +1 -0
- package/dist/{spinner → components/spinner}/index.d.ts +1 -0
- package/dist/components/spinner/index.js +8 -0
- package/dist/components/spinner/index.js.map +1 -0
- package/dist/{spinner → components/spinner}/spinner.d.ts +4 -3
- package/dist/components/spinner/spinner.js +7 -0
- package/dist/components/spinner/spinner.js.map +1 -0
- package/dist/main.d.ts +10 -8
- package/dist/main.js +29 -22
- package/dist/utilities/hooks/index.d.ts +2 -0
- package/dist/utilities/hooks/index.js +8 -0
- package/dist/utilities/hooks/index.js.map +1 -0
- package/dist/utilities/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.d.ts +5 -0
- package/dist/utilities/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js +7 -0
- package/dist/utilities/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js.map +1 -0
- package/dist/utilities/index.d.ts +3 -0
- package/dist/utilities/index.js +9 -0
- package/dist/utilities/index.js.map +1 -0
- package/dist/utilities/types.d.ts +7 -0
- package/dist/utilities/types.js +1 -0
- package/dist/utilities/types.js.map +1 -0
- package/package.json +15 -4
- package/dist/button/button.js +0 -9
- package/dist/button/index.js +0 -10
- package/dist/chunk-2O4QJORU.js.map +0 -1
- package/dist/chunk-3OKTD2AD.js.map +0 -1
- package/dist/chunk-45MAIFC5.js.map +0 -1
- package/dist/chunk-4SI37MJP.js.map +0 -1
- package/dist/chunk-6UM2LO6A.js.map +0 -1
- package/dist/chunk-7IV4F742.js +0 -72
- package/dist/chunk-7IV4F742.js.map +0 -1
- package/dist/chunk-HFJQRD6C.js +0 -1
- package/dist/chunk-JEOMA4Z3.js +0 -1
- package/dist/chunk-KTNWYSLR.js +0 -1
- package/dist/chunk-NTOVYJTA.js +0 -1
- package/dist/chunk-OXOTNHAS.js +0 -1
- package/dist/chunk-PZHZKBNQ.js.map +0 -1
- package/dist/chunk-QQRONISI.js +0 -1
- package/dist/chunk-RJYRALJA.js +0 -1
- package/dist/chunk-V5WV7RSY.js.map +0 -1
- package/dist/chunk-VELDZOU2.js +0 -1
- package/dist/chunk-ZGRDMFHX.js +0 -1
- package/dist/form/error-message/error-message.js +0 -7
- package/dist/form/error-message/index.js +0 -8
- package/dist/form/index.js +0 -24
- package/dist/form/input/index.js +0 -14
- package/dist/form/input/input.js +0 -13
- package/dist/form/input-group/index.js +0 -12
- package/dist/form/input-group/input-group.js +0 -11
- package/dist/form/label/index.js +0 -8
- package/dist/form/label/label.js +0 -7
- package/dist/logo/index.js +0 -8
- package/dist/logo/logo.js +0 -7
- package/dist/navbar/index.js +0 -10
- package/dist/navbar/navbar.js +0 -9
- package/dist/spinner/index.js +0 -8
- package/dist/spinner/spinner.js +0 -7
- /package/dist/{button/button.js.map → chunk-2C3XKBNM.js.map} +0 -0
- /package/dist/{button/index.js.map → chunk-2PYB72CX.js.map} +0 -0
- /package/dist/{chunk-HFJQRD6C.js.map → chunk-4WOE4T43.js.map} +0 -0
- /package/dist/{chunk-JEOMA4Z3.js.map → chunk-BBMVGCDE.js.map} +0 -0
- /package/dist/{chunk-KTNWYSLR.js.map → chunk-DZDPC6SE.js.map} +0 -0
- /package/dist/{chunk-NTOVYJTA.js.map → chunk-LLNHMZB2.js.map} +0 -0
- /package/dist/{chunk-OXOTNHAS.js.map → chunk-PD4PXDK2.js.map} +0 -0
- /package/dist/{chunk-QQRONISI.js.map → chunk-RAZCAHWX.js.map} +0 -0
- /package/dist/{chunk-RJYRALJA.js.map → chunk-RELDFXH4.js.map} +0 -0
- /package/dist/{chunk-VELDZOU2.js.map → chunk-RVKE5NZR.js.map} +0 -0
- /package/dist/{chunk-ZGRDMFHX.js.map → chunk-SHVA4JJZ.js.map} +0 -0
- /package/dist/{form/error-message/error-message.js.map → chunk-TUJK53CY.js.map} +0 -0
- /package/dist/{form/error-message/index.js.map → components/button/button.js.map} +0 -0
- /package/dist/{form → components/button}/index.js.map +0 -0
- /package/dist/{form → components/form}/error-message/error-message.d.ts +0 -0
- /package/dist/{form/input-group/index.js.map → components/form/error-message/error-message.js.map} +0 -0
- /package/dist/{form → components/form}/error-message/index.d.ts +0 -0
- /package/dist/{form/input → components/form/error-message}/index.js.map +0 -0
- /package/dist/{form → components/form}/index.d.ts +0 -0
- /package/dist/{form/label → components/form}/index.js.map +0 -0
- /package/dist/{form → components/form}/input/index.d.ts +0 -0
- /package/dist/{navbar → components/form/input}/index.js.map +0 -0
- /package/dist/{form → components/form}/input/input.d.ts +0 -0
- /package/dist/{form → components/form}/input/input.js.map +0 -0
- /package/dist/{form → components/form}/input-group/index.d.ts +0 -0
- /package/dist/{logo → components/form/input-group}/index.js.map +0 -0
- /package/dist/{form → components/form}/input-group/input-group.d.ts +0 -0
- /package/dist/{form → components/form}/input-group/input-group.js.map +0 -0
- /package/dist/{form → components/form}/label/index.d.ts +0 -0
- /package/dist/{spinner → components/form/label}/index.js.map +0 -0
- /package/dist/{form → components/form}/label/label.d.ts +0 -0
- /package/dist/{form → components/form}/label/label.js.map +0 -0
- /package/dist/{logo/logo.js.map → components/index.js.map} +0 -0
- /package/dist/{navbar/navbar.js.map → components/logo/index.js.map} +0 -0
- /package/dist/{spinner/spinner.js.map → components/logo/logo.js.map} +0 -0
package/README.md
CHANGED
|
@@ -1,54 +1 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
|
|
4
|
-
|
|
5
|
-
Currently, two official plugins are available:
|
|
6
|
-
|
|
7
|
-
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
|
|
8
|
-
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
|
|
9
|
-
|
|
10
|
-
## Expanding the ESLint configuration
|
|
11
|
-
|
|
12
|
-
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
|
|
13
|
-
|
|
14
|
-
```js
|
|
15
|
-
export default tseslint.config({
|
|
16
|
-
extends: [
|
|
17
|
-
// Remove ...tseslint.configs.recommended and replace with this
|
|
18
|
-
...tseslint.configs.recommendedTypeChecked,
|
|
19
|
-
// Alternatively, use this for stricter rules
|
|
20
|
-
...tseslint.configs.strictTypeChecked,
|
|
21
|
-
// Optionally, add this for stylistic rules
|
|
22
|
-
...tseslint.configs.stylisticTypeChecked,
|
|
23
|
-
],
|
|
24
|
-
languageOptions: {
|
|
25
|
-
// other options...
|
|
26
|
-
parserOptions: {
|
|
27
|
-
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
|
28
|
-
tsconfigRootDir: import.meta.dirname,
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
});
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
|
|
35
|
-
|
|
36
|
-
```js
|
|
37
|
-
// eslint.config.js
|
|
38
|
-
import reactX from 'eslint-plugin-react-x';
|
|
39
|
-
import reactDom from 'eslint-plugin-react-dom';
|
|
40
|
-
|
|
41
|
-
export default tseslint.config({
|
|
42
|
-
plugins: {
|
|
43
|
-
// Add the react-x and react-dom plugins
|
|
44
|
-
'react-x': reactX,
|
|
45
|
-
'react-dom': reactDom,
|
|
46
|
-
},
|
|
47
|
-
rules: {
|
|
48
|
-
// other rules...
|
|
49
|
-
// Enable its recommended typescript rules
|
|
50
|
-
...reactX.configs['recommended-typescript'].rules,
|
|
51
|
-
...reactDom.configs.recommended.rules,
|
|
52
|
-
},
|
|
53
|
-
});
|
|
54
|
-
```
|
|
1
|
+
# @bi-digital/react
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=chunk-2C3XKBNM.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=chunk-2PYB72CX.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// src/form/label/label.tsx
|
|
1
|
+
// src/components/form/label/label.tsx
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
var Label = ({
|
|
@@ -29,4 +29,4 @@ var Label = ({
|
|
|
29
29
|
export {
|
|
30
30
|
Label
|
|
31
31
|
};
|
|
32
|
-
//# sourceMappingURL=chunk-
|
|
32
|
+
//# sourceMappingURL=chunk-3XRBNC3R.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/form/label/label.tsx"],"sourcesContent":["import clsx from 'clsx';\nimport { ComponentProps } from 'react';\n\nexport type LabelProps = ComponentProps<'label'> & {\n /** The font style of the label. */\n labelFontStyle?: 'regular' | 'bold';\n htmlFor?: string;\n required?: boolean;\n disabled?: boolean;\n /** Is the component displayed on a dark background. */\n dark?: boolean;\n /**\n * The type of label. `label` is used for labeling specific elements. `legend` is a broad label used for a group of objects.\n * @default 'label'\n */\n type?: 'label' | 'legend';\n};\n\n/**\n * Accessible label component that can be used to display a label and help text for form fields.\n */\nexport const Label = ({\n children,\n labelFontStyle,\n htmlFor,\n required,\n disabled,\n dark,\n className,\n ...props\n}: LabelProps) => {\n return (\n <label\n {...props}\n className={clsx('bi-label', className)}\n data-dark={dark}\n data-required={required}\n data-font-style={labelFontStyle}\n aria-disabled={disabled}\n htmlFor={htmlFor}\n >\n {children}\n </label>\n );\n};\n"],"mappings":";AAAA,OAAO,UAAU;AAgCb;AAXG,IAAM,QAAQ,CAAC;AAAA,EACpB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAkB;AAChB,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,WAAW,KAAK,YAAY,SAAS;AAAA,MACrC,aAAW;AAAA,MACX,iBAAe;AAAA,MACf,mBAAiB;AAAA,MACjB,iBAAe;AAAA,MACf;AAAA,MAEC;AAAA;AAAA,EACH;AAEJ;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=chunk-4WOE4T43.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=chunk-BBMVGCDE.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
InputGroup
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SX22Q2HZ.js";
|
|
4
4
|
|
|
5
|
-
// src/form/input/input.tsx
|
|
5
|
+
// src/components/form/input/input.tsx
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
var Input = ({
|
|
8
8
|
dark = false,
|
|
@@ -43,4 +43,4 @@ var Input = ({
|
|
|
43
43
|
export {
|
|
44
44
|
Input
|
|
45
45
|
};
|
|
46
|
-
//# sourceMappingURL=chunk-
|
|
46
|
+
//# sourceMappingURL=chunk-DT6EO53O.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/form/input/input.tsx"],"sourcesContent":["import type { InputHTMLAttributes, Ref } from 'react';\nimport { InputGroup } from '../input-group';\nimport type { InputGroupProps } from '../input-group';\n\nexport type InputProps = Omit<InputGroupProps & InputHTMLAttributes<HTMLInputElement>, 'children'> & {\n ref?: Ref<HTMLInputElement>;\n};\n\nexport const Input = ({\n dark = false,\n className,\n errorMessage,\n labelProps,\n label,\n id,\n style,\n stretch,\n disabled,\n readOnly,\n startAdornment,\n endAdornment,\n ref,\n ...props\n}: InputProps) => {\n return (\n <InputGroup\n className={className}\n disabled={disabled}\n dark={dark}\n stretch={stretch}\n errorMessage={errorMessage}\n id={id}\n label={label}\n labelProps={labelProps}\n readOnly={readOnly}\n style={style}\n startAdornment={startAdornment}\n endAdornment={endAdornment}\n >\n <input {...props} className='bi-input' disabled={disabled} readOnly={readOnly} ref={ref} />\n </InputGroup>\n );\n};\n"],"mappings":";;;;;AAuCM;AA/BC,IAAM,QAAQ,CAAC;AAAA,EACpB,OAAO;AAAA,EACP;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAkB;AAChB,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MAEA,8BAAC,WAAO,GAAG,OAAO,WAAU,YAAW,UAAoB,UAAoB,KAAU;AAAA;AAAA,EAC3F;AAEJ;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=chunk-DZDPC6SE.js.map
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Spinner
|
|
3
|
+
} from "./chunk-RONRQXS6.js";
|
|
4
|
+
|
|
5
|
+
// src/components/button/button.tsx
|
|
6
|
+
import clsx from "clsx/lite";
|
|
7
|
+
import { Slot, Slottable } from "@radix-ui/react-slot";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
var Button = ({
|
|
10
|
+
asChild,
|
|
11
|
+
variant = "filled",
|
|
12
|
+
size = "medium",
|
|
13
|
+
stretch,
|
|
14
|
+
dark,
|
|
15
|
+
submitting,
|
|
16
|
+
icon,
|
|
17
|
+
children,
|
|
18
|
+
className,
|
|
19
|
+
startIcon,
|
|
20
|
+
endIcon,
|
|
21
|
+
active,
|
|
22
|
+
ref,
|
|
23
|
+
...props
|
|
24
|
+
}) => {
|
|
25
|
+
const Component = asChild ? Slot : "button";
|
|
26
|
+
return /* @__PURE__ */ jsxs(
|
|
27
|
+
Component,
|
|
28
|
+
{
|
|
29
|
+
"aria-busy": Boolean(submitting) || void 0,
|
|
30
|
+
"aria-disabled": Boolean(submitting) || void 0,
|
|
31
|
+
className: clsx("bi-button", className),
|
|
32
|
+
"data-variant": variant,
|
|
33
|
+
"data-size": size,
|
|
34
|
+
"data-stretch": stretch || void 0,
|
|
35
|
+
"data-dark": dark || void 0,
|
|
36
|
+
"data-icon": icon || void 0,
|
|
37
|
+
"data-active": active || void 0,
|
|
38
|
+
ref,
|
|
39
|
+
type: asChild ? void 0 : "button",
|
|
40
|
+
...props,
|
|
41
|
+
children: [
|
|
42
|
+
!icon && (submitting ? /* @__PURE__ */ jsx(Spinner, { "aria-hidden": "true", className: "bi-button--start-icon" }) : startIcon && /* @__PURE__ */ jsx("span", { className: "bi-button--start-icon", children: startIcon })),
|
|
43
|
+
/* @__PURE__ */ jsx(Slottable, { children: icon && submitting ? /* @__PURE__ */ jsx(Spinner, { "aria-hidden": "true" }) : children }),
|
|
44
|
+
!icon && endIcon && /* @__PURE__ */ jsx("span", { className: "bi-button--end-icon", children: endIcon })
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export {
|
|
51
|
+
Button
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=chunk-IT2O6DB2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/button/button.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport type { ButtonHTMLAttributes, ReactNode, Ref } from 'react';\nimport { Slot, Slottable } from '@radix-ui/react-slot';\nimport { Spinner } from '../spinner';\nimport { MergeRight } from '../../utilities';\n\nexport type ButtonProps = MergeRight<\n ButtonHTMLAttributes<HTMLButtonElement>,\n {\n /**\n * The button size.\n * @default 'medium'\n */\n size?: 'small' | 'medium' | 'large';\n /**\n * The button variant.\n * @default 'filled'\n */\n variant?: 'filled' | 'outlined' | 'text' | 'flat';\n /**\n * Stretch the button to the full width.\n * @default false\n */\n stretch?: boolean;\n /**\n * Is the component displayed on a dark background.\n * @default false\n */\n dark?: boolean;\n /**\n * Display a loading animation with the Spinner-component.\n * Replaces the `startIcon` if used\n * @default false\n */\n submitting?: boolean;\n /**\n * Display as icon-button, only use when showing an icon as the label.\n * Not compatible with the icon-slots or `stretch`.\n * Always provide a descriptive aria-label for accessibility when set to true.\n * @default false\n */\n icon?: boolean;\n /** Set an icon before the button label, no effect if `icon=true` */\n startIcon?: ReactNode;\n /** Set an icon after the button label, no effect if `icon=true` */\n endIcon?: ReactNode;\n /** Make the button active by showing an active state. */\n active?: boolean;\n ref?: Ref<HTMLButtonElement>;\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * @default false\n */\n asChild?: boolean;\n /**\n * Specify the type of button. Unset when `asChild` is true\n * @default 'button'\n */\n type?: ButtonHTMLAttributes<HTMLButtonElement>['type'];\n }\n>;\n\nexport const Button = ({\n asChild,\n variant = 'filled',\n size = 'medium',\n stretch,\n dark,\n submitting,\n icon,\n children,\n className,\n startIcon,\n endIcon,\n active,\n ref,\n ...props\n}: ButtonProps) => {\n const Component = asChild ? Slot : 'button';\n\n return (\n <Component\n aria-busy={Boolean(submitting) || undefined}\n aria-disabled={Boolean(submitting) || undefined}\n className={clsx('bi-button', className)}\n data-variant={variant}\n data-size={size}\n data-stretch={stretch || undefined}\n data-dark={dark || undefined}\n data-icon={icon || undefined}\n data-active={active || undefined}\n ref={ref}\n /* don't set type when we use `asChild` */\n type={asChild ? undefined : 'button'}\n /* if consumers set type, our default does not set anything, as `rest` contains this */\n {...props}\n >\n {!icon &&\n (submitting ? (\n <Spinner aria-hidden='true' className='bi-button--start-icon' />\n ) : (\n startIcon && <span className='bi-button--start-icon'>{startIcon}</span>\n ))}\n <Slottable>{icon && submitting ? <Spinner aria-hidden='true' /> : children}</Slottable>\n {!icon && endIcon && <span className='bi-button--end-icon'>{endIcon}</span>}\n </Component>\n );\n};\n"],"mappings":";;;;;AAAA,OAAO,UAAU;AAEjB,SAAS,MAAM,iBAAiB;AA+E5B,SAkBM,KAlBN;AAnBG,IAAM,SAAS,CAAC;AAAA,EACrB;AAAA,EACA,UAAU;AAAA,EACV,OAAO;AAAA,EACP;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAmB;AACjB,QAAM,YAAY,UAAU,OAAO;AAEnC,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAW,QAAQ,UAAU,KAAK;AAAA,MAClC,iBAAe,QAAQ,UAAU,KAAK;AAAA,MACtC,WAAW,KAAK,aAAa,SAAS;AAAA,MACtC,gBAAc;AAAA,MACd,aAAW;AAAA,MACX,gBAAc,WAAW;AAAA,MACzB,aAAW,QAAQ;AAAA,MACnB,aAAW,QAAQ;AAAA,MACnB,eAAa,UAAU;AAAA,MACvB;AAAA,MAEA,MAAM,UAAU,SAAY;AAAA,MAE3B,GAAG;AAAA,MAEH;AAAA,SAAC,SACC,aACC,oBAAC,WAAQ,eAAY,QAAO,WAAU,yBAAwB,IAE9D,aAAa,oBAAC,UAAK,WAAU,yBAAyB,qBAAU;AAAA,QAEpE,oBAAC,aAAW,kBAAQ,aAAa,oBAAC,WAAQ,eAAY,QAAO,IAAK,UAAS;AAAA,QAC1E,CAAC,QAAQ,WAAW,oBAAC,UAAK,WAAU,uBAAuB,mBAAQ;AAAA;AAAA;AAAA,EACtE;AAEJ;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=chunk-LLNHMZB2.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Logo
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NLZRLXFN.js";
|
|
4
4
|
|
|
5
|
-
// src/navbar/navbar.tsx
|
|
5
|
+
// src/components/navbar/navbar.tsx
|
|
6
6
|
import clsx from "clsx";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
var Navbar = ({
|
|
@@ -30,4 +30,4 @@ var Navbar = ({
|
|
|
30
30
|
export {
|
|
31
31
|
Navbar
|
|
32
32
|
};
|
|
33
|
-
//# sourceMappingURL=chunk-
|
|
33
|
+
//# sourceMappingURL=chunk-MXDZGWL4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/navbar/navbar.tsx"],"sourcesContent":["import clsx from 'clsx';\nimport type { HTMLAttributes, ReactNode, Ref } from 'react';\nimport { Logo } from '../logo';\nimport { MergeRight } from '../../utilities';\n\nexport type NavbarProps = MergeRight<\n HTMLAttributes<HTMLDivElement>,\n {\n /**\n * Determines if the navbar should be dark or light.\n * @default false\n */\n dark?: boolean;\n /**\n * Skip link.\n */\n skipLink?: { label: string; href: string };\n /**\n * Text for menu area label.\n */\n menuAreaLabel: string;\n /**\n * Determines if the navbar should be fixed.\n * @default false\n */\n fixed?: boolean;\n /**\n * Aria label for the home link.\n */\n homeAriaLabel: string;\n /**\n * Href for the home link.\n */\n homeHref: string;\n /**\n * Override the default logo\n */\n logo?: ReactNode;\n ref?: Ref<HTMLElement>;\n }\n>;\n\nexport const Navbar = ({\n dark = false,\n fixed = false,\n menuAreaLabel,\n homeAriaLabel,\n skipLink,\n homeHref,\n logo,\n children,\n className,\n ref,\n ...props\n}: NavbarProps) => {\n return (\n <nav {...props} className={clsx('bi-navbar', className)} data-fixed={fixed} data-dark={dark} ref={ref}>\n {skipLink && (\n <a className='bi-navbar__skip-link' href={skipLink.href}>\n {skipLink.label}\n </a>\n )}\n <header className='bi-navbar__header' aria-label={menuAreaLabel}>\n <a aria-label={homeAriaLabel} href={homeHref}>\n {logo || <Logo dark={dark} />}\n </a>\n {children}\n </header>\n </nav>\n );\n};\n"],"mappings":";;;;;AAAA,OAAO,UAAU;AA0DT,cAIF,YAJE;AAhBD,IAAM,SAAS,CAAC;AAAA,EACrB,OAAO;AAAA,EACP,QAAQ;AAAA,EACR;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAmB;AACjB,SACE,qBAAC,SAAK,GAAG,OAAO,WAAW,KAAK,aAAa,SAAS,GAAG,cAAY,OAAO,aAAW,MAAM,KAC1F;AAAA,gBACC,oBAAC,OAAE,WAAU,wBAAuB,MAAM,SAAS,MAChD,mBAAS,OACZ;AAAA,IAEF,qBAAC,YAAO,WAAU,qBAAoB,cAAY,eAChD;AAAA,0BAAC,OAAE,cAAY,eAAe,MAAM,UACjC,kBAAQ,oBAAC,QAAK,MAAY,GAC7B;AAAA,MACC;AAAA,OACH;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// src/logo/logo.tsx
|
|
1
|
+
// src/components/logo/logo.tsx
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
var Logo = ({
|
|
@@ -27,4 +27,4 @@ var Logo = ({
|
|
|
27
27
|
export {
|
|
28
28
|
Logo
|
|
29
29
|
};
|
|
30
|
-
//# sourceMappingURL=chunk-
|
|
30
|
+
//# sourceMappingURL=chunk-NLZRLXFN.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/logo/logo.tsx"],"sourcesContent":["import clsx from 'clsx';\nimport type { HTMLAttributes, Ref } from 'react';\nimport { MergeRight } from '../../utilities';\n\nexport type LogoProps = MergeRight<\n Omit<HTMLAttributes<HTMLSpanElement>, 'children'>,\n {\n /**\n * Determines if the logo should be displayed in the negative version,\n * useful when displaying the logo on a dark background.\n * @default false\n */\n dark?: boolean;\n /**\n * Determines if the international logo should be used.\n * @default false\n */\n international?: boolean;\n /**\n * Determines if the logo text should be displayed vertically.\n * Only applies when `international` is `true`.\n * @default false\n */\n vertical?: boolean;\n /**\n * Determines the height of the logo.\n * @default 'medium'\n */\n size?: 'xs' | 'small' | 'medium' | 'large' | 'xl' | 'xxl';\n ref?: Ref<HTMLSpanElement>;\n }\n>;\n\nexport const Logo = ({\n dark = false,\n international = false,\n vertical = false,\n size = 'medium',\n className,\n ref,\n ...props\n}: LogoProps) => {\n return (\n <span\n {...props}\n className={clsx('bi-logo', className)}\n data-dark={dark}\n data-international={international}\n data-vertical={vertical}\n data-size={size}\n ref={ref}\n />\n );\n};\n"],"mappings":";AAAA,OAAO,UAAU;AA2Cb;AAVG,IAAM,OAAO,CAAC;AAAA,EACnB,OAAO;AAAA,EACP,gBAAgB;AAAA,EAChB,WAAW;AAAA,EACX,OAAO;AAAA,EACP;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAiB;AACf,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,WAAW,KAAK,WAAW,SAAS;AAAA,MACpC,aAAW;AAAA,MACX,sBAAoB;AAAA,MACpB,iBAAe;AAAA,MACf,aAAW;AAAA,MACX;AAAA;AAAA,EACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=chunk-PD4PXDK2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=chunk-RAZCAHWX.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=chunk-RELDFXH4.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// src/spinner/spinner.tsx
|
|
1
|
+
// src/components/spinner/spinner.tsx
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
var Spinner = ({ color = "inherit", size, className, ...props }) => {
|
|
@@ -8,4 +8,4 @@ var Spinner = ({ color = "inherit", size, className, ...props }) => {
|
|
|
8
8
|
export {
|
|
9
9
|
Spinner
|
|
10
10
|
};
|
|
11
|
-
//# sourceMappingURL=chunk-
|
|
11
|
+
//# sourceMappingURL=chunk-RONRQXS6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/spinner/spinner.tsx"],"sourcesContent":["import clsx from 'clsx';\nimport type { HTMLAttributes } from 'react';\nimport { MergeRight } from '../../utilities';\n\nexport type SpinnerProps = MergeRight<\n HTMLAttributes<HTMLSpanElement>,\n {\n /**\n * The color of the spinner.\n * @default 'inherit'\n */\n color?: 'inherit' | 'black';\n /**\n * The size of the spinner.\n * It sets the font-size as the width and height is `1em`. If not set, the spinner will inherit the font size of its parent.\n */\n size?: 'small' | 'medium' | 'large' | 'xl' | '2xl';\n }\n>;\n\nexport const Spinner = ({ color = 'inherit', size, className, ...props }: SpinnerProps) => {\n return <span className={clsx('bi-spinner', className)} data-size={size} data-color={color} {...props} />;\n};\n"],"mappings":";AAAA,OAAO,UAAU;AAqBR;AADF,IAAM,UAAU,CAAC,EAAE,QAAQ,WAAW,MAAM,WAAW,GAAG,MAAM,MAAoB;AACzF,SAAO,oBAAC,UAAK,WAAW,KAAK,cAAc,SAAS,GAAG,aAAW,MAAM,cAAY,OAAQ,GAAG,OAAO;AACxG;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=chunk-RVKE5NZR.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// src/form/error-message/error-message.tsx
|
|
1
|
+
// src/components/form/error-message/error-message.tsx
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
var ErrorMessage = ({ children, id, className, ref, ...props }) => {
|
|
@@ -8,4 +8,4 @@ var ErrorMessage = ({ children, id, className, ref, ...props }) => {
|
|
|
8
8
|
export {
|
|
9
9
|
ErrorMessage
|
|
10
10
|
};
|
|
11
|
-
//# sourceMappingURL=chunk-
|
|
11
|
+
//# sourceMappingURL=chunk-SGVCN25U.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/form/error-message/error-message.tsx"],"sourcesContent":["import clsx from 'clsx';\nimport type { ComponentProps, Ref } from 'react';\n\nexport type ErrorMessageProps = Omit<ComponentProps<'div'>, 'id'> & {\n id: string;\n ref?: Ref<HTMLElement>;\n};\n\nexport const ErrorMessage = ({ children, id, className, ref, ...props }: ErrorMessageProps) => {\n return (\n <div aria-live='polite' className={clsx('bi-error-message', className as undefined)} id={id} ref={ref} {...props}>\n {children}\n </div>\n );\n};\n"],"mappings":";AAAA,OAAO,UAAU;AAUb;AAFG,IAAM,eAAe,CAAC,EAAE,UAAU,IAAI,WAAW,KAAK,GAAG,MAAM,MAAyB;AAC7F,SACE,oBAAC,SAAI,aAAU,UAAS,WAAW,KAAK,oBAAoB,SAAsB,GAAG,IAAQ,KAAW,GAAG,OACxG,UACH;AAEJ;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=chunk-SHVA4JJZ.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Label
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3XRBNC3R.js";
|
|
4
4
|
import {
|
|
5
5
|
ErrorMessage
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-SGVCN25U.js";
|
|
7
7
|
|
|
8
|
-
// src/form/input-group/input-group.tsx
|
|
8
|
+
// src/components/form/input-group/input-group.tsx
|
|
9
9
|
import { useId, Children, isValidElement, cloneElement } from "react";
|
|
10
10
|
import clsx from "clsx";
|
|
11
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -81,4 +81,4 @@ var InputGroup = ({
|
|
|
81
81
|
export {
|
|
82
82
|
InputGroup
|
|
83
83
|
};
|
|
84
|
-
//# sourceMappingURL=chunk-
|
|
84
|
+
//# sourceMappingURL=chunk-SX22Q2HZ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/form/input-group/input-group.tsx"],"sourcesContent":["import { useId, Children, isValidElement, cloneElement } from 'react';\nimport type { ComponentProps, LabelHTMLAttributes, ReactNode, Ref } from 'react';\nimport clsx from 'clsx';\nimport { ErrorMessage, type ErrorMessageProps } from '../error-message';\nimport { Label } from '../label';\n\ninterface InputProps {\n 'aria-describedby'?: string;\n 'aria-invalid'?: boolean;\n id?: string;\n className?: string;\n}\n\nexport type InputGroupProps = ComponentProps<'div'> & {\n dark?: boolean;\n stretch?: boolean;\n errorMessage?: ReactNode;\n errorMessageProps?: Partial<ErrorMessageProps>;\n labelProps?: LabelHTMLAttributes<HTMLLabelElement>;\n label: ReactNode;\n disabled?: boolean;\n readOnly?: boolean;\n required?: boolean;\n /**\n * `children` must be a single input element.\n */\n children: Exclude<ReactNode, Iterable<ReactNode>>;\n /** Add an adornment to the start of the input. */\n startAdornment?: ReactNode;\n /** Add an adornment to the end of the input. */\n endAdornment?: ReactNode;\n ref?: Ref<HTMLDivElement>;\n};\n\nexport const InputGroup = ({\n id,\n className,\n style,\n dark = false,\n stretch = false,\n errorMessage,\n errorMessageProps,\n labelProps: { className: labelClassName, ...labelProps } = {},\n label,\n disabled,\n readOnly,\n required,\n children,\n startAdornment,\n endAdornment,\n ref,\n ...props\n}: InputGroupProps) => {\n const errorMessageId = useId();\n const inputId = useId();\n\n const renderInput = () => {\n const inputProps: InputProps = {\n 'aria-describedby': errorMessage ? errorMessageId : undefined,\n 'aria-invalid': errorMessage ? true : undefined,\n id: id ?? inputId,\n className: 'bi-input',\n };\n\n const input: ReactNode = Children.toArray(children)[0];\n\n if (!isValidElement<InputProps>(input)) {\n return;\n }\n\n return cloneElement<InputProps>(input, {\n ...inputProps,\n ...input.props,\n className: `${inputProps.className} ${input.props.className ?? ''}`,\n });\n };\n\n return (\n <div\n className={clsx('bi-input-group', className)}\n data-dark={dark}\n data-stretch={stretch}\n ref={ref}\n style={style}\n {...props}\n >\n <Label className={labelClassName} required={required} {...labelProps} htmlFor={id ?? inputId}>\n {label}\n </Label>\n <div\n className={clsx('bi-input-group__input-wrapper')}\n data-disabled={disabled}\n data-readonly={readOnly}\n data-error={errorMessage ? true : undefined}\n >\n {startAdornment && <span data-start-adornment='true'>{startAdornment}</span>}\n {renderInput()}\n {endAdornment && <span data-end-adornment='true'>{endAdornment}</span>}\n </div>\n <ErrorMessage id={errorMessageId} {...errorMessageProps}>\n {errorMessage}\n </ErrorMessage>\n </div>\n );\n};\n"],"mappings":";;;;;;;;AAAA,SAAS,OAAO,UAAU,gBAAgB,oBAAoB;AAE9D,OAAO,UAAU;AAoFX,cAGA,YAHA;AApDC,IAAM,aAAa,CAAC;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP,UAAU;AAAA,EACV;AAAA,EACA;AAAA,EACA,YAAY,EAAE,WAAW,gBAAgB,GAAG,WAAW,IAAI,CAAC;AAAA,EAC5D;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAuB;AACrB,QAAM,iBAAiB,MAAM;AAC7B,QAAM,UAAU,MAAM;AAEtB,QAAM,cAAc,MAAM;AACxB,UAAM,aAAyB;AAAA,MAC7B,oBAAoB,eAAe,iBAAiB;AAAA,MACpD,gBAAgB,eAAe,OAAO;AAAA,MACtC,IAAI,MAAM;AAAA,MACV,WAAW;AAAA,IACb;AAEA,UAAM,QAAmB,SAAS,QAAQ,QAAQ,EAAE,CAAC;AAErD,QAAI,CAAC,eAA2B,KAAK,GAAG;AACtC;AAAA,IACF;AAEA,WAAO,aAAyB,OAAO;AAAA,MACrC,GAAG;AAAA,MACH,GAAG,MAAM;AAAA,MACT,WAAW,GAAG,WAAW,SAAS,IAAI,MAAM,MAAM,aAAa,EAAE;AAAA,IACnE,CAAC;AAAA,EACH;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW,KAAK,kBAAkB,SAAS;AAAA,MAC3C,aAAW;AAAA,MACX,gBAAc;AAAA,MACd;AAAA,MACA;AAAA,MACC,GAAG;AAAA,MAEJ;AAAA,4BAAC,SAAM,WAAW,gBAAgB,UAAqB,GAAG,YAAY,SAAS,MAAM,SAClF,iBACH;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,WAAW,KAAK,+BAA+B;AAAA,YAC/C,iBAAe;AAAA,YACf,iBAAe;AAAA,YACf,cAAY,eAAe,OAAO;AAAA,YAEjC;AAAA,gCAAkB,oBAAC,UAAK,wBAAqB,QAAQ,0BAAe;AAAA,cACpE,YAAY;AAAA,cACZ,gBAAgB,oBAAC,UAAK,sBAAmB,QAAQ,wBAAa;AAAA;AAAA;AAAA,QACjE;AAAA,QACA,oBAAC,gBAAa,IAAI,gBAAiB,GAAG,mBACnC,wBACH;AAAA;AAAA;AAAA,EACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=chunk-TUJK53CY.js.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// src/utilities/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.ts
|
|
2
|
+
import { useEffect, useLayoutEffect } from "react";
|
|
3
|
+
var useIsomorphicLayoutEffect = typeof window !== "undefined" ? useLayoutEffect : useEffect;
|
|
4
|
+
|
|
5
|
+
export {
|
|
6
|
+
useIsomorphicLayoutEffect
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=chunk-VPE7VEBG.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/utilities/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.ts"],"sourcesContent":["// https://usehooks-ts.com/react-hook/use-isomorphic-layout-effect\n\nimport { useEffect, useLayoutEffect } from 'react';\n\nexport const useIsomorphicLayoutEffect = typeof window !== 'undefined' ? useLayoutEffect : useEffect;\n"],"mappings":";AAEA,SAAS,WAAW,uBAAuB;AAEpC,IAAM,4BAA4B,OAAO,WAAW,cAAc,kBAAkB;","names":[]}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
2
|
+
import { ButtonHTMLAttributes, ReactNode, Ref } from 'react';
|
|
3
|
+
import { MergeRight } from '../../utilities/types.js';
|
|
3
4
|
|
|
4
|
-
type ButtonProps =
|
|
5
|
+
type ButtonProps = MergeRight<ButtonHTMLAttributes<HTMLButtonElement>, {
|
|
5
6
|
/**
|
|
6
7
|
* The button size.
|
|
7
8
|
* @default 'medium'
|
|
@@ -22,11 +23,6 @@ type ButtonProps = ComponentProps<'button' | 'a'> & {
|
|
|
22
23
|
* @default false
|
|
23
24
|
*/
|
|
24
25
|
dark?: boolean;
|
|
25
|
-
/**
|
|
26
|
-
* Decides if the button is disabled.
|
|
27
|
-
* @default false
|
|
28
|
-
*/
|
|
29
|
-
disabled?: boolean;
|
|
30
26
|
/**
|
|
31
27
|
* Display a loading animation with the Spinner-component.
|
|
32
28
|
* Replaces the `startIcon` if used
|
|
@@ -40,24 +36,24 @@ type ButtonProps = ComponentProps<'button' | 'a'> & {
|
|
|
40
36
|
* @default false
|
|
41
37
|
*/
|
|
42
38
|
icon?: boolean;
|
|
43
|
-
/**
|
|
44
|
-
* Contains a URL or a URL fragment that the hyperlink points to.
|
|
45
|
-
* If this property is set, a link styled as a button will be rendered.
|
|
46
|
-
*/
|
|
47
|
-
href?: string;
|
|
48
|
-
/**
|
|
49
|
-
* Specifies where to display the linked URL.
|
|
50
|
-
* Only applies when an `href` is provided.
|
|
51
|
-
*/
|
|
52
|
-
target?: '_blank' | '_self' | '_parent' | '_top';
|
|
53
39
|
/** Set an icon before the button label, no effect if `icon=true` */
|
|
54
40
|
startIcon?: ReactNode;
|
|
55
41
|
/** Set an icon after the button label, no effect if `icon=true` */
|
|
56
42
|
endIcon?: ReactNode;
|
|
57
43
|
/** Make the button active by showing an active state. */
|
|
58
44
|
active?: boolean;
|
|
59
|
-
ref?: Ref<
|
|
60
|
-
|
|
61
|
-
|
|
45
|
+
ref?: Ref<HTMLButtonElement>;
|
|
46
|
+
/**
|
|
47
|
+
* Change the default rendered element for the one passed as a child, merging their props and behavior.
|
|
48
|
+
* @default false
|
|
49
|
+
*/
|
|
50
|
+
asChild?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Specify the type of button. Unset when `asChild` is true
|
|
53
|
+
* @default 'button'
|
|
54
|
+
*/
|
|
55
|
+
type?: ButtonHTMLAttributes<HTMLButtonElement>['type'];
|
|
56
|
+
}>;
|
|
57
|
+
declare const Button: ({ asChild, variant, size, stretch, dark, submitting, icon, children, className, startIcon, endIcon, active, ref, ...props }: ButtonProps) => react_jsx_runtime.JSX.Element;
|
|
62
58
|
|
|
63
59
|
export { Button, type ButtonProps };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import "../../chunk-PD4PXDK2.js";
|
|
2
|
+
import "../../chunk-LLNHMZB2.js";
|
|
3
|
+
import {
|
|
4
|
+
Input
|
|
5
|
+
} from "../../chunk-DT6EO53O.js";
|
|
6
|
+
import "../../chunk-RAZCAHWX.js";
|
|
7
|
+
import {
|
|
8
|
+
InputGroup
|
|
9
|
+
} from "../../chunk-SX22Q2HZ.js";
|
|
10
|
+
import "../../chunk-RVKE5NZR.js";
|
|
11
|
+
import "../../chunk-RELDFXH4.js";
|
|
12
|
+
import {
|
|
13
|
+
Label
|
|
14
|
+
} from "../../chunk-3XRBNC3R.js";
|
|
15
|
+
import {
|
|
16
|
+
ErrorMessage
|
|
17
|
+
} from "../../chunk-SGVCN25U.js";
|
|
18
|
+
export {
|
|
19
|
+
ErrorMessage,
|
|
20
|
+
Input,
|
|
21
|
+
InputGroup,
|
|
22
|
+
Label
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import "../../../chunk-LLNHMZB2.js";
|
|
2
|
+
import {
|
|
3
|
+
Input
|
|
4
|
+
} from "../../../chunk-DT6EO53O.js";
|
|
5
|
+
import "../../../chunk-RAZCAHWX.js";
|
|
6
|
+
import "../../../chunk-SX22Q2HZ.js";
|
|
7
|
+
import "../../../chunk-RVKE5NZR.js";
|
|
8
|
+
import "../../../chunk-RELDFXH4.js";
|
|
9
|
+
import "../../../chunk-3XRBNC3R.js";
|
|
10
|
+
import "../../../chunk-SGVCN25U.js";
|
|
11
|
+
export {
|
|
12
|
+
Input
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Input
|
|
3
|
+
} from "../../../chunk-DT6EO53O.js";
|
|
4
|
+
import "../../../chunk-RAZCAHWX.js";
|
|
5
|
+
import "../../../chunk-SX22Q2HZ.js";
|
|
6
|
+
import "../../../chunk-RVKE5NZR.js";
|
|
7
|
+
import "../../../chunk-RELDFXH4.js";
|
|
8
|
+
import "../../../chunk-3XRBNC3R.js";
|
|
9
|
+
import "../../../chunk-SGVCN25U.js";
|
|
10
|
+
export {
|
|
11
|
+
Input
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=input.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import "../../../chunk-RAZCAHWX.js";
|
|
2
|
+
import {
|
|
3
|
+
InputGroup
|
|
4
|
+
} from "../../../chunk-SX22Q2HZ.js";
|
|
5
|
+
import "../../../chunk-RVKE5NZR.js";
|
|
6
|
+
import "../../../chunk-RELDFXH4.js";
|
|
7
|
+
import "../../../chunk-3XRBNC3R.js";
|
|
8
|
+
import "../../../chunk-SGVCN25U.js";
|
|
9
|
+
export {
|
|
10
|
+
InputGroup
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import {
|
|
2
|
+
InputGroup
|
|
3
|
+
} from "../../../chunk-SX22Q2HZ.js";
|
|
4
|
+
import "../../../chunk-RVKE5NZR.js";
|
|
5
|
+
import "../../../chunk-RELDFXH4.js";
|
|
6
|
+
import "../../../chunk-3XRBNC3R.js";
|
|
7
|
+
import "../../../chunk-SGVCN25U.js";
|
|
8
|
+
export {
|
|
9
|
+
InputGroup
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=input-group.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { Button, ButtonProps } from './button/button.js';
|
|
2
|
+
export { ErrorMessage, ErrorMessageProps } from './form/error-message/error-message.js';
|
|
3
|
+
export { Input, InputProps } from './form/input/input.js';
|
|
4
|
+
export { InputGroup, InputGroupProps } from './form/input-group/input-group.js';
|
|
5
|
+
export { Label, LabelProps } from './form/label/label.js';
|
|
6
|
+
export { Logo, LogoProps } from './logo/logo.js';
|
|
7
|
+
export { Navbar, NavbarProps } from './navbar/navbar.js';
|
|
8
|
+
export { Spinner, SpinnerProps } from './spinner/spinner.js';
|
|
9
|
+
import 'react/jsx-runtime';
|
|
10
|
+
import 'react';
|
|
11
|
+
import '../utilities/types.js';
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import "../chunk-2PYB72CX.js";
|
|
2
|
+
import "../chunk-4WOE4T43.js";
|
|
3
|
+
import {
|
|
4
|
+
Navbar
|
|
5
|
+
} from "../chunk-MXDZGWL4.js";
|
|
6
|
+
import "../chunk-SHVA4JJZ.js";
|
|
7
|
+
import {
|
|
8
|
+
Logo
|
|
9
|
+
} from "../chunk-NLZRLXFN.js";
|
|
10
|
+
import "../chunk-BBMVGCDE.js";
|
|
11
|
+
import {
|
|
12
|
+
Button
|
|
13
|
+
} from "../chunk-IT2O6DB2.js";
|
|
14
|
+
import "../chunk-2C3XKBNM.js";
|
|
15
|
+
import {
|
|
16
|
+
Spinner
|
|
17
|
+
} from "../chunk-RONRQXS6.js";
|
|
18
|
+
import "../chunk-PD4PXDK2.js";
|
|
19
|
+
import "../chunk-LLNHMZB2.js";
|
|
20
|
+
import {
|
|
21
|
+
Input
|
|
22
|
+
} from "../chunk-DT6EO53O.js";
|
|
23
|
+
import "../chunk-RAZCAHWX.js";
|
|
24
|
+
import {
|
|
25
|
+
InputGroup
|
|
26
|
+
} from "../chunk-SX22Q2HZ.js";
|
|
27
|
+
import "../chunk-RVKE5NZR.js";
|
|
28
|
+
import "../chunk-RELDFXH4.js";
|
|
29
|
+
import {
|
|
30
|
+
Label
|
|
31
|
+
} from "../chunk-3XRBNC3R.js";
|
|
32
|
+
import {
|
|
33
|
+
ErrorMessage
|
|
34
|
+
} from "../chunk-SGVCN25U.js";
|
|
35
|
+
export {
|
|
36
|
+
Button,
|
|
37
|
+
ErrorMessage,
|
|
38
|
+
Input,
|
|
39
|
+
InputGroup,
|
|
40
|
+
Label,
|
|
41
|
+
Logo,
|
|
42
|
+
Navbar,
|
|
43
|
+
Spinner
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=index.js.map
|