period-ui 0.1.54 → 0.1.56
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 +114 -1
- package/dist/components/atoms/billo-icon/billo-icon.d.ts +11 -0
- package/dist/components/atoms/billo-icon/billo-icon.d.ts.map +1 -1
- package/dist/components/atoms/billo-icon/index.d.ts +3 -0
- package/dist/components/atoms/button/button-types.d.ts +6 -0
- package/dist/components/atoms/button/button.d.ts +2 -2
- package/dist/components/atoms/button/button.d.ts.map +1 -1
- package/dist/components/atoms/button/button.js +3 -1
- package/dist/components/atoms/button/button.js.map +1 -1
- package/dist/components/atoms/button/index.d.ts +3 -0
- package/dist/components/atoms/check-box/check-box-types.d.ts +10 -0
- package/dist/components/atoms/check-box/check-box-types.d.ts.map +1 -1
- package/dist/components/atoms/check-box/check-box.d.ts +4 -3
- package/dist/components/atoms/check-box/check-box.d.ts.map +1 -1
- package/dist/components/atoms/check-box/check-box.js +4 -4
- package/dist/components/atoms/check-box/check-box.js.map +1 -1
- package/dist/components/atoms/chip/chip/chip.d.ts +9 -0
- package/dist/components/atoms/chip/chip/chip.d.ts.map +1 -1
- package/dist/components/atoms/chip/chip/components/clear-button.d.ts +11 -0
- package/dist/components/atoms/chip/chip/components/clear-button.d.ts.map +1 -1
- package/dist/components/atoms/chip/chip/index.d.ts +2 -0
- package/dist/components/atoms/chip/chips-list/chips-list.d.ts +15 -0
- package/dist/components/atoms/chip/chips-list/index.d.ts +2 -0
- package/dist/components/atoms/drop-down-menu/components/index.d.ts +3 -0
- package/dist/components/atoms/drop-down-menu/components/menu-item-types.d.ts +7 -0
- package/dist/components/atoms/drop-down-menu/components/menu-item.d.ts +16 -0
- package/dist/components/atoms/drop-down-menu/drop-down-menu-types.d.ts +1 -1
- package/dist/components/atoms/drop-down-menu/drop-down-menu.d.ts +13 -0
- package/dist/components/atoms/icon-button/icon-button-types.d.ts +7 -0
- package/dist/components/atoms/icon-button/index.d.ts +3 -0
- package/dist/components/atoms/search-bar/components/clear-button.d.ts +10 -0
- package/dist/components/atoms/search-bar/index.d.ts +2 -0
- package/dist/components/atoms/search-bar/search-bar.d.ts +12 -0
- package/dist/components/atoms/text/index.d.ts +3 -0
- package/dist/components/atoms/text/text-types.d.ts +36 -0
- package/dist/components/atoms/text/text.d.ts +14 -0
- package/dist/components/atoms/text-button/index.d.ts +3 -0
- package/dist/components/atoms/text-button/text-button-types.d.ts +8 -0
- package/dist/components/molecules/form/form-select/form-select.d.ts +7 -0
- package/dist/components/molecules/form/form-select/index.d.ts +2 -0
- package/dist/components/molecules/form/form-story-stubs.d.ts +11 -0
- package/dist/components/molecules/form/form-test-stubs.d.ts +6 -0
- package/dist/components/molecules/form/form-text-field/form-text-field.d.ts +7 -0
- package/dist/components/molecules/form/form-text-field/index.d.ts +2 -0
- package/dist/components/molecules/form/form-types.d.ts +24 -0
- package/dist/components/molecules/form/form.d.ts +12 -0
- package/dist/components/molecules/form/index.d.ts +3 -0
- package/dist/components/molecules/modal/components/content.d.ts +3 -3
- package/dist/components/molecules/modal/components/content.d.ts.map +1 -1
- package/dist/components/molecules/modal/components/content.js.map +1 -1
- package/dist/components/molecules/modal/components/footer.d.ts +3 -3
- package/dist/components/molecules/modal/components/footer.d.ts.map +1 -1
- package/dist/components/molecules/modal/components/footer.js.map +1 -1
- package/dist/components/molecules/modal/components/overlay.d.ts.map +1 -1
- package/dist/components/molecules/modal/components/overlay.js +4 -4
- package/dist/components/molecules/modal/components/overlay.js.map +1 -1
- package/dist/components/molecules/modal/filter-modal/filter-modal.d.ts +3 -2
- package/dist/components/molecules/modal/filter-modal/filter-modal.d.ts.map +1 -1
- package/dist/components/molecules/modal/filter-modal/filter-modal.js +2 -2
- package/dist/components/molecules/modal/filter-modal/filter-modal.js.map +1 -1
- package/dist/components/molecules/modal/filter-modal/use-filter-modal.d.ts +1 -2
- package/dist/components/molecules/modal/filter-modal/use-filter-modal.d.ts.map +1 -1
- package/dist/components/molecules/modal/filter-modal/use-filter-modal.js +3 -1
- package/dist/components/molecules/modal/filter-modal/use-filter-modal.js.map +1 -1
- package/dist/components/molecules/modal/modal-variants.d.ts +1 -1
- package/dist/components/molecules/modal/modal-variants.js +9 -9
- package/dist/components/molecules/modal/modal-variants.js.map +1 -1
- package/dist/components/molecules/modal/modal.d.ts +1 -1
- package/dist/components/molecules/modal/modal.d.ts.map +1 -1
- package/dist/components/molecules/select/components/select-input.d.ts +9 -0
- package/dist/components/molecules/select/index.d.ts +3 -0
- package/dist/components/molecules/select/select.d.ts +4 -2
- package/dist/components/molecules/select/use-select.d.ts.map +1 -1
- package/dist/components/molecules/select/use-select.js.map +1 -1
- package/dist/components/molecules/text-field/index.d.ts +2 -0
- package/dist/components/molecules/text-field/text-field.d.ts +18 -0
- package/dist/containers/form-control/components/form-error.d.ts +7 -0
- package/dist/containers/form-control/components/form-helper.d.ts +9 -0
- package/dist/containers/form-control/components/form-label.d.ts +10 -0
- package/dist/containers/form-control/form-control-types.d.ts +11 -0
- package/dist/containers/form-control/form-control.d.ts +3 -2
- package/dist/containers/form-control/form-control.d.ts.map +1 -1
- package/dist/containers/form-control/form-control.js +3 -3
- package/dist/containers/form-control/form-control.js.map +1 -1
- package/dist/containers/form-control/index.d.ts +3 -0
- package/dist/containers/index.d.ts +2 -0
- package/dist/fonts/Geist-Black.otf +0 -0
- package/dist/fonts/Geist-Bold.otf +0 -0
- package/dist/fonts/Geist-ExtraBold.otf +0 -0
- package/dist/fonts/Geist-ExtraLight.otf +0 -0
- package/dist/fonts/Geist-Light.otf +0 -0
- package/dist/fonts/Geist-Medium.otf +0 -0
- package/dist/fonts/Geist-Regular.otf +0 -0
- package/dist/fonts/Geist-SemiBold.otf +0 -0
- package/dist/fonts/Geist-Thin.otf +0 -0
- package/dist/fonts/billo-icons.eot +0 -0
- package/dist/fonts/billo-icons.svg +606 -0
- package/dist/fonts/billo-icons.ttf +0 -0
- package/dist/fonts/billo-icons.woff +0 -0
- package/dist/index.css +470 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/utils/string-utils/string-utils.d.ts +6 -0
- package/dist/utils/tailwind-utils.d.ts +3 -0
- package/dist/utils/window-dimensions-utils.d.ts +9 -0
- package/dist/vitest.setup.d.ts +2 -0
- package/package.json +22 -4
- package/dist/components/atoms/tool-tip/tool-tip-positions.d.ts +0 -11
- package/dist/components/atoms/tool-tip/tool-tip-positions.d.ts.map +0 -1
- package/dist/components/atoms/tool-tip/tool-tip-positions.js +0 -15
- package/dist/components/atoms/tool-tip/tool-tip-positions.js.map +0 -1
package/README.md
CHANGED
|
@@ -1 +1,114 @@
|
|
|
1
|
-
|
|
1
|
+
# Period UI
|
|
2
|
+
|
|
3
|
+
Librería de componentes de UI para React basada en el Design System de [Period UI](https://www.figma.com/design/ZK3xvBxkM2rtGMkbyQycfl/Period-Design-System), creado por Billo.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## 💡 ¿Qué es?
|
|
7
|
+
|
|
8
|
+
Period UI es una librería de componentes reutilizables, accesibles y alineados 100% al design system de Billo. Pensada para uso interno en productos y prototipos.
|
|
9
|
+
|
|
10
|
+
* Componentes escritos en React + TypeScript.
|
|
11
|
+
* Totalmente tipados, con sugerencias de props en IDE.
|
|
12
|
+
* Estilos con Tailwind + Sass.
|
|
13
|
+
* Incluye sistema de iconos propio vía fuente (`BilloIcon`).
|
|
14
|
+
* Soporte a dark mode, responsive y test unitarios.
|
|
15
|
+
|
|
16
|
+
Figma Design System: [Solicítalo a Fernanda López](mailto:flopez@ld.co.cr) para acceso.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## 📦 Uso básico
|
|
21
|
+
|
|
22
|
+
```tsx
|
|
23
|
+
import { Button } from 'period-ui';
|
|
24
|
+
import 'period-ui/dist/index.css';
|
|
25
|
+
|
|
26
|
+
<Button variant="primary">Hola Billo</Button>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## 🚀 Instalación
|
|
32
|
+
|
|
33
|
+
### 1. Instala el paquete:
|
|
34
|
+
|
|
35
|
+
```sh
|
|
36
|
+
yarn add period-ui
|
|
37
|
+
# o
|
|
38
|
+
npm install period-ui
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### 2. Importa los estilos globales (necesario para los iconos y fuentes):
|
|
42
|
+
|
|
43
|
+
Importante: Para que los íconos y fuentes personalizadas funcionen correctamente, debes importar el archivo de estilos global (index.css) de la librería.
|
|
44
|
+
|
|
45
|
+
#### Next.js (Recomendado para Next 13+ o 14+):
|
|
46
|
+
En tu archivo global de estilos (por ejemplo `src/app/globals.css` o `src/styles/globals.css`), agrega al inicio:
|
|
47
|
+
|
|
48
|
+
```css
|
|
49
|
+
@import '../../node_modules/period-ui/dist/index.css';
|
|
50
|
+
```
|
|
51
|
+
> Nota: Asegúrate de ajustar la ruta relativa según dónde esté tu archivo de estilos.
|
|
52
|
+
Por ejemplo, si tu CSS está en `src/app/globals.css` y tu node_modules está en la raíz, la ruta anterior funcionará.
|
|
53
|
+
|
|
54
|
+
No es necesario importar el CSS en tu archivo TypeScript/JSX (`import 'period-ui/dist/index.css'`), ya que Next.js 13/14 en modo app router puede tener problemas resolviendo archivos CSS fuera de `/src` o `/public` vía JS.
|
|
55
|
+
|
|
56
|
+
#### Vite o CRA (Create React App):
|
|
57
|
+
En el entry point de tu app (por ejemplo, `src/main.tsx` o `src/index.tsx`):
|
|
58
|
+
|
|
59
|
+
```js
|
|
60
|
+
import 'period-ui/dist/index.css';
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
o bien puedes usar `@import` en tu propio archivo CSS, igual que arriba.
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## 📚 Storybook (Probar localmente)
|
|
68
|
+
|
|
69
|
+
Para ver todos los componentes y ejemplos:
|
|
70
|
+
|
|
71
|
+
```sh
|
|
72
|
+
yarn storybook
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## 🛠️ Desarrollo
|
|
78
|
+
|
|
79
|
+
Si vas a contribuir o agregar un nuevo componente:
|
|
80
|
+
|
|
81
|
+
* **Componentes puros y bien escritos:**
|
|
82
|
+
|
|
83
|
+
* Solo lógica relacionada al UI, sin side effects, ni dependencias externas innecesarias.
|
|
84
|
+
* **Basados 100% en el Design System de Billo:**
|
|
85
|
+
|
|
86
|
+
* Debes consultar y seguir los lineamientos de Figma (pide acceso a flopez).
|
|
87
|
+
* **Unit tests obligatorios:**
|
|
88
|
+
|
|
89
|
+
* Usa Vitest y Testing Library. Todo nuevo componente debe tener coverage.
|
|
90
|
+
* **Stories en Storybook obligatorias:**
|
|
91
|
+
|
|
92
|
+
* Cada estado/variante debe estar documentado.
|
|
93
|
+
* **Exportar correctamente el tipo de los props** para mejor DX.
|
|
94
|
+
|
|
95
|
+
### Build y publicación
|
|
96
|
+
|
|
97
|
+
* Build: `yarn build`
|
|
98
|
+
* Subir versión: `npm version patch` (o `minor`, `major` según el cambio)
|
|
99
|
+
* Publicar (solo mfernandez o haraya): `npm publish`
|
|
100
|
+
|
|
101
|
+
> **NOTA:** Para publicar, debes solicitarlo a [Mario Fernández](mailto:mfernandez@ld.co.cr) o [Hans Araya](mailto:haraya@ld.co.cr).
|
|
102
|
+
>
|
|
103
|
+
> El design system de Figma solo puede ser editado por Fernanda López.
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## 📝 Notas adicionales
|
|
108
|
+
|
|
109
|
+
* Si tu app no renderiza iconos, verifica que los fonts estén correctamente servidos desde `/public/fonts` y que `index.css` esté importado en el entrypoint.
|
|
110
|
+
* Si tienes dudas o mejoras, abre un PR o contacta a los responsables.
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
**Built with ❤ by Billo**
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IconColor, IconSize, IconSymbol } from './billo-icon-types';
|
|
2
|
+
type Props = {
|
|
3
|
+
icon: IconSymbol;
|
|
4
|
+
size?: IconSize;
|
|
5
|
+
color?: IconColor;
|
|
6
|
+
touchTarget?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare function BilloIcon({ icon, size, color, touchTarget, className, }: Props): JSX.Element;
|
|
10
|
+
export type { Props as BilloIconProps };
|
|
11
|
+
//# sourceMappingURL=billo-icon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"billo-icon.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/billo-icon/billo-icon.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErE,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,UAAU,CAAC;IACjB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,wBAAgB,SAAS,CAAC,EACxB,IAAI,EACJ,IAAkB,EAClB,KAAyB,EACzB,WAAW,EACX,SAAS,GACV,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAMrB"}
|
|
1
|
+
{"version":3,"file":"billo-icon.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/billo-icon/billo-icon.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErE,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,UAAU,CAAC;IACjB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,wBAAgB,SAAS,CAAC,EACxB,IAAI,EACJ,IAAkB,EAClB,KAAyB,EACzB,WAAW,EACX,SAAS,GACV,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAMrB;AAED,YAAY,EAAE,KAAK,IAAI,cAAc,EAAE,CAAC"}
|
|
@@ -4,6 +4,6 @@ declare const buttonStyles: (props?: ({
|
|
|
4
4
|
variant?: "primary" | "secondary" | "destructive" | null | undefined;
|
|
5
5
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
6
6
|
type Props = ComponentProps<'button'> & VariantProps<typeof buttonStyles>;
|
|
7
|
-
export declare const Button:
|
|
8
|
-
export {};
|
|
7
|
+
export declare const Button: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLButtonElement>>;
|
|
8
|
+
export type { Props as ButtonProps };
|
|
9
9
|
//# sourceMappingURL=button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/button/button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAc,MAAM,OAAO,CAAC;AACnD,OAAO,EAAO,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAI7D,QAAA,MAAM,YAAY;;mFAsBjB,CAAC;AAEF,KAAK,KAAK,GAAG,cAAc,CAAC,QAAQ,CAAC,GAAG,YAAY,CAAC,OAAO,YAAY,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/button/button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAc,MAAM,OAAO,CAAC;AACnD,OAAO,EAAO,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAI7D,QAAA,MAAM,YAAY;;mFAsBjB,CAAC;AAEF,KAAK,KAAK,GAAG,cAAc,CAAC,QAAQ,CAAC,GAAG,YAAY,CAAC,OAAO,YAAY,CAAC,CAAC;AAa1E,eAAO,MAAM,MAAM,EAAgB,KAAK,CAAC,yBAAyB,CAChE,KAAK,GAAG,KAAK,CAAC,aAAa,CAAC,iBAAiB,CAAC,CAC/C,CAAC;AAEF,YAAY,EAAE,KAAK,IAAI,WAAW,EAAE,CAAC"}
|
|
@@ -23,7 +23,9 @@ const buttonStyles = (0, class_variance_authority_1.cva)([
|
|
|
23
23
|
},
|
|
24
24
|
defaultVariants: { variant: 'primary' },
|
|
25
25
|
});
|
|
26
|
-
|
|
26
|
+
const RawButton = (0, react_1.forwardRef)(({ variant = button_types_1.ButtonVariant.PRIMARY, className, ...props }, ref) => {
|
|
27
27
|
return ((0, jsx_runtime_1.jsx)("button", { ref: ref, className: (0, tailwind_utils_1.tailwind)(buttonStyles({ variant, className })), ...props }));
|
|
28
28
|
});
|
|
29
|
+
RawButton.displayName = 'Button';
|
|
30
|
+
exports.Button = RawButton;
|
|
29
31
|
//# sourceMappingURL=button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../../../src/components/atoms/button/button.tsx"],"names":[],"mappings":";;;;AAAA,iCAAmD;AACnD,uEAA6D;AAC7D,kEAAyD;AACzD,iDAA+C;AAE/C,MAAM,YAAY,GAAG,IAAA,8BAAG,EACtB;IACE,iBAAiB;IACjB,cAAc;IACd,YAAY;IACZ,mCAAmC;IACnC,mCAAmC;IACnC,6BAA6B;CAC9B,EACD;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EACL,mHAAmH;YACrH,SAAS,EACP,6JAA6J;YAC/J,WAAW,EACT,8GAA8G;SACjH;KACF;IACD,eAAe,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;CACxC,CACF,CAAC;
|
|
1
|
+
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../../../src/components/atoms/button/button.tsx"],"names":[],"mappings":";;;;AAAA,iCAAmD;AACnD,uEAA6D;AAC7D,kEAAyD;AACzD,iDAA+C;AAE/C,MAAM,YAAY,GAAG,IAAA,8BAAG,EACtB;IACE,iBAAiB;IACjB,cAAc;IACd,YAAY;IACZ,mCAAmC;IACnC,mCAAmC;IACnC,6BAA6B;CAC9B,EACD;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EACL,mHAAmH;YACrH,SAAS,EACP,6JAA6J;YAC/J,WAAW,EACT,8GAA8G;SACjH;KACF;IACD,eAAe,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;CACxC,CACF,CAAC;AAIF,MAAM,SAAS,GAAG,IAAA,kBAAU,EAC1B,CAAC,EAAE,OAAO,GAAG,4BAAa,CAAC,OAAO,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IAChE,OAAO,CACL,mCAAQ,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,IAAA,yBAAQ,EAAC,YAAY,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC,KAAM,KAAK,GAAI,CAC3F,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,SAAS,CAAC,WAAW,GAAG,QAAQ,CAAC;AAGpB,QAAA,MAAM,GAAG,SAErB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare enum CheckboxVariant {
|
|
2
|
+
DEFAULT = "DEFAULT",
|
|
3
|
+
INTERMEDIATE = "INTERMEDIATE",
|
|
4
|
+
DESTRUCTIVE = "DESTRUCTIVE"
|
|
5
|
+
}
|
|
6
|
+
export type ExcludedVariants = Exclude<CheckboxVariant, CheckboxVariant.INTERMEDIATE>;
|
|
7
|
+
export declare const checkBoxStyles: {
|
|
8
|
+
[type in ExcludedVariants]: string;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=check-box-types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-box-types.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/check-box/check-box-types.ts"],"names":[],"mappings":"AAAA,oBAAY,eAAe;IACzB,OAAO,YAAY;IACnB,YAAY,iBAAiB;IAC7B,WAAW,gBAAgB;CAC5B;AAED,
|
|
1
|
+
{"version":3,"file":"check-box-types.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/check-box/check-box-types.ts"],"names":[],"mappings":"AAAA,oBAAY,eAAe;IACzB,OAAO,YAAY;IACnB,YAAY,iBAAiB;IAC7B,WAAW,gBAAgB;CAC5B;AAED,MAAM,MAAM,gBAAgB,GAAG,OAAO,CAAC,eAAe,EAAE,eAAe,CAAC,YAAY,CAAC,CAAC;AAEtF,eAAO,MAAM,cAAc,EAAE;KAC1B,IAAI,IAAI,gBAAgB,GAAG,MAAM;CAMnC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CheckboxVariant } from '
|
|
2
|
-
|
|
1
|
+
import { CheckboxVariant } from '../../../components';
|
|
2
|
+
type Props = {
|
|
3
3
|
value?: boolean;
|
|
4
4
|
isDisabled?: boolean;
|
|
5
5
|
label?: string;
|
|
@@ -9,5 +9,6 @@ export type CheckboxProps = {
|
|
|
9
9
|
variant?: CheckboxVariant;
|
|
10
10
|
onCheckToggle?: (value: boolean) => void;
|
|
11
11
|
};
|
|
12
|
-
export declare function Checkbox({ value, isDisabled, label, className, labelClassName, containerClassName, variant, onCheckToggle, }:
|
|
12
|
+
export declare function Checkbox({ value, isDisabled, label, className, labelClassName, containerClassName, variant, onCheckToggle, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export type { Props as CheckboxProps };
|
|
13
14
|
//# sourceMappingURL=check-box.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-box.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/check-box/check-box.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"check-box.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/check-box/check-box.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAkB,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtE,KAAK,KAAK,GAAG;IACX,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CAC1C,CAAC;AAEF,wBAAgB,QAAQ,CAAC,EACvB,KAAK,EACL,UAAkB,EAClB,KAAK,EACL,SAAS,EACT,cAAc,EACd,kBAAkB,EAClB,OAAiC,EACjC,aAAwB,GACzB,EAAE,KAAK,2CAmEP;AAED,YAAY,EAAE,KAAK,IAAI,aAAa,EAAE,CAAC"}
|
|
@@ -5,8 +5,8 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const components_1 = require("../../../components");
|
|
6
6
|
const tailwind_utils_1 = require("../../../utils/tailwind-utils");
|
|
7
7
|
const window_dimensions_utils_1 = require("../../../utils/window-dimensions-utils");
|
|
8
|
-
const
|
|
9
|
-
function Checkbox({ value, isDisabled = false, label, className, labelClassName, containerClassName, variant =
|
|
8
|
+
const components_2 = require("../../../components");
|
|
9
|
+
function Checkbox({ value, isDisabled = false, label, className, labelClassName, containerClassName, variant = components_2.CheckboxVariant.DEFAULT, onCheckToggle = () => { }, }) {
|
|
10
10
|
const { isMobile } = (0, window_dimensions_utils_1.useWindowDimensions)();
|
|
11
11
|
const handleClick = () => {
|
|
12
12
|
if (isDisabled) {
|
|
@@ -14,8 +14,8 @@ function Checkbox({ value, isDisabled = false, label, className, labelClassName,
|
|
|
14
14
|
}
|
|
15
15
|
onCheckToggle?.(!value);
|
|
16
16
|
};
|
|
17
|
-
const isIntermediate = variant ===
|
|
18
|
-
const checkBoxVariantStyle =
|
|
17
|
+
const isIntermediate = variant === components_2.CheckboxVariant.INTERMEDIATE;
|
|
18
|
+
const checkBoxVariantStyle = components_2.checkBoxStyles[isIntermediate ? components_2.CheckboxVariant.DEFAULT : variant];
|
|
19
19
|
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsxs)("div", { className: (0, tailwind_utils_1.tailwind)('flex flex-row w-fit items-center', isDisabled ? 'cursor-not-allowed' : 'cursor-pointer', containerClassName), onClick: handleClick, children: [(0, jsx_runtime_1.jsxs)("button", { role: "checkbox", type: "button", disabled: isDisabled, className: (0, tailwind_utils_1.tailwind)('flex justify-center items-center border-2 border-gray-04 rounded shrink-0', 'h-[18px] w-[18px] md:h-5 md:w-5', 'hover:border-gray-03 hover:bg-gray-05', 'disabled:bg-gray-06 disabled:border-gray-04 disabled:cursor-not-allowed', 'focus-visible:border-none focus-visible:outline-2 focus-visible:bg-gray-05 focus-visible:outline-offset-2 focus:outline-blue-01', value && `${checkBoxVariantStyle} border-none`, className), children: [value && !isIntermediate && ((0, jsx_runtime_1.jsx)(components_1.BilloIcon, { size: isMobile ? components_1.IconSize.XXS : components_1.IconSize.XS, icon: components_1.IconSymbol.CHECK, className: "no-selectable text-white" })), value && isIntermediate && ((0, jsx_runtime_1.jsx)(components_1.BilloIcon, { size: isMobile ? components_1.IconSize.XXS : components_1.IconSize.XS, icon: components_1.IconSymbol.MINUS, className: "text-white" }))] }), label && ((0, jsx_runtime_1.jsx)(components_1.Text, { variant: components_1.TextVariant.BODY, className: (0, tailwind_utils_1.tailwind)('flex ml-2 select-none whitespace-normal', labelClassName), color: isDisabled ? components_1.TextColors.BLACK_03 : components_1.TextColors.BLACK, children: label }))] }) }));
|
|
20
20
|
}
|
|
21
21
|
//# sourceMappingURL=check-box.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-box.js","sourceRoot":"","sources":["../../../../src/components/atoms/check-box/check-box.tsx"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"check-box.js","sourceRoot":"","sources":["../../../../src/components/atoms/check-box/check-box.tsx"],"names":[],"mappings":";;AAgBA,4BA4EC;;AA5FD,oDAAqG;AACrG,kEAAyD;AACzD,oFAA6E;AAC7E,oDAAsE;AAatE,SAAgB,QAAQ,CAAC,EACvB,KAAK,EACL,UAAU,GAAG,KAAK,EAClB,KAAK,EACL,SAAS,EACT,cAAc,EACd,kBAAkB,EAClB,OAAO,GAAG,4BAAe,CAAC,OAAO,EACjC,aAAa,GAAG,GAAG,EAAE,GAAE,CAAC,GAClB;IACN,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAA,6CAAmB,GAAE,CAAC;IAE3C,MAAM,WAAW,GAAG,GAAG,EAAE;QACvB,IAAI,UAAU,EAAE,CAAC;YACf,OAAO;QACT,CAAC;QAED,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC;IAC1B,CAAC,CAAC;IAEF,MAAM,cAAc,GAAG,OAAO,KAAK,4BAAe,CAAC,YAAY,CAAC;IAChE,MAAM,oBAAoB,GAAG,2BAAc,CAAC,cAAc,CAAC,CAAC,CAAC,4BAAe,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;IAEhG,OAAO,CACL,2DACE,iCACE,SAAS,EAAE,IAAA,yBAAQ,EACjB,kCAAkC,EAClC,UAAU,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,gBAAgB,EACpD,kBAAkB,CACnB,EACD,OAAO,EAAE,WAAW,aAEpB,oCACE,IAAI,EAAC,UAAU,EACf,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,UAAU,EACpB,SAAS,EAAE,IAAA,yBAAQ,EACjB,2EAA2E,EAC3E,iCAAiC,EACjC,uCAAuC,EACvC,yEAAyE,EACzE,iIAAiI,EACjI,KAAK,IAAI,GAAG,oBAAoB,cAAc,EAC9C,SAAS,CACV,aAEA,KAAK,IAAI,CAAC,cAAc,IAAI,CAC3B,uBAAC,sBAAS,IACR,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,qBAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,qBAAQ,CAAC,EAAE,EAC3C,IAAI,EAAE,uBAAU,CAAC,KAAK,EACtB,SAAS,EAAC,0BAA0B,GACpC,CACH,EAEA,KAAK,IAAI,cAAc,IAAI,CAC1B,uBAAC,sBAAS,IACR,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,qBAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,qBAAQ,CAAC,EAAE,EAC3C,IAAI,EAAE,uBAAU,CAAC,KAAK,EACtB,SAAS,EAAC,YAAY,GACtB,CACH,IACM,EAER,KAAK,IAAI,CACR,uBAAC,iBAAI,IACH,OAAO,EAAE,wBAAW,CAAC,IAAI,EACzB,SAAS,EAAE,IAAA,yBAAQ,EAAC,yCAAyC,EAAE,cAAc,CAAC,EAC9E,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,uBAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,uBAAU,CAAC,KAAK,YAEzD,KAAK,GACD,CACR,IACG,GACL,CACJ,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type Props = {
|
|
2
|
+
id: string;
|
|
3
|
+
label: string;
|
|
4
|
+
className?: string;
|
|
5
|
+
onClick?: () => void;
|
|
6
|
+
};
|
|
7
|
+
export declare function Chip({ id, label, className, onClick }: Props): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export type { Props as ChipProps };
|
|
9
|
+
//# sourceMappingURL=chip.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chip.d.ts","sourceRoot":"","sources":["../../../../../src/components/atoms/chip/chip/chip.tsx"],"names":[],"mappings":"AAKA,KAAK,KAAK,GAAG;IACX,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AAEF,wBAAgB,IAAI,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,KAAK,2CAwB5D"}
|
|
1
|
+
{"version":3,"file":"chip.d.ts","sourceRoot":"","sources":["../../../../../src/components/atoms/chip/chip/chip.tsx"],"names":[],"mappings":"AAKA,KAAK,KAAK,GAAG;IACX,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AAEF,wBAAgB,IAAI,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,KAAK,2CAwB5D;AAED,YAAY,EAAE,KAAK,IAAI,SAAS,EAAE,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IconColor, IconSize } from '../../../../../components';
|
|
2
|
+
type Props = {
|
|
3
|
+
isDisabled?: boolean;
|
|
4
|
+
size?: IconSize;
|
|
5
|
+
color?: IconColor;
|
|
6
|
+
onClick: () => void;
|
|
7
|
+
className?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare function ClearButton({ isDisabled, size, onClick, className, }: Props): JSX.Element;
|
|
10
|
+
export type { Props as ClearButtonProps };
|
|
11
|
+
//# sourceMappingURL=clear-button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clear-button.d.ts","sourceRoot":"","sources":["../../../../../../src/components/atoms/chip/chip/components/clear-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,SAAS,EAAE,QAAQ,EAAc,MAAM,2BAA2B,CAAC;AAGvF,KAAK,KAAK,GAAG;IACX,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,wBAAgB,WAAW,CAAC,EAC1B,UAAkB,EAClB,IAAkB,EAClB,OAAO,EACP,SAAS,GACV,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAiCrB"}
|
|
1
|
+
{"version":3,"file":"clear-button.d.ts","sourceRoot":"","sources":["../../../../../../src/components/atoms/chip/chip/components/clear-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,SAAS,EAAE,QAAQ,EAAc,MAAM,2BAA2B,CAAC;AAGvF,KAAK,KAAK,GAAG;IACX,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,wBAAgB,WAAW,CAAC,EAC1B,UAAkB,EAClB,IAAkB,EAClB,OAAO,EACP,SAAS,GACV,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAiCrB;AAED,YAAY,EAAE,KAAK,IAAI,gBAAgB,EAAE,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
export type ChipOptionsProps = {
|
|
3
|
+
label: string;
|
|
4
|
+
value: string;
|
|
5
|
+
onClear: () => void;
|
|
6
|
+
};
|
|
7
|
+
type Props = {
|
|
8
|
+
data: ChipOptionsProps[];
|
|
9
|
+
firstComponent?: ReactElement;
|
|
10
|
+
lasItemComponent?: ReactElement;
|
|
11
|
+
className?: string;
|
|
12
|
+
};
|
|
13
|
+
export declare function ChipList({ data, className, firstComponent, lasItemComponent }: Props): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=chips-list.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IconSymbol } from '../../../../components';
|
|
2
|
+
import { MenuItemVariant } from './menu-item-types';
|
|
3
|
+
type Props = {
|
|
4
|
+
isDisabled?: boolean;
|
|
5
|
+
isSelected?: boolean;
|
|
6
|
+
id: string;
|
|
7
|
+
label: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
helperLabel?: string;
|
|
10
|
+
variant?: MenuItemVariant;
|
|
11
|
+
icon?: IconSymbol;
|
|
12
|
+
onClick?: () => void;
|
|
13
|
+
};
|
|
14
|
+
export declare function MenuItem({ isDisabled, isSelected, id, label, className, helperLabel, variant, icon, onClick, }: Props): JSX.Element;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=menu-item.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { DropDownMenuOptionProps } from '../../../components';
|
|
3
|
+
import { MenuItemVariant } from './components';
|
|
4
|
+
type Props = {
|
|
5
|
+
className?: string;
|
|
6
|
+
selectedIDs: string[];
|
|
7
|
+
variant?: MenuItemVariant;
|
|
8
|
+
emptyElement?: ReactElement;
|
|
9
|
+
options: DropDownMenuOptionProps[];
|
|
10
|
+
};
|
|
11
|
+
export declare function DropDownMenu({ options, className, emptyElement, selectedIDs, variant, }: Props): JSX.Element;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=drop-down-menu.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IconSize } from '../../../../components';
|
|
2
|
+
type Props = {
|
|
3
|
+
isDisabled: boolean;
|
|
4
|
+
size?: IconSize;
|
|
5
|
+
onClick: () => void;
|
|
6
|
+
className?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare function ClearButton({ isDisabled, size, onClick, className, }: Props): JSX.Element;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=clear-button.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ChangeEvent } from 'react';
|
|
2
|
+
type Props = {
|
|
3
|
+
isDisabled?: boolean;
|
|
4
|
+
value: string;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
onChange: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
7
|
+
onClear: () => void;
|
|
8
|
+
className?: string;
|
|
9
|
+
};
|
|
10
|
+
export declare function SearchBar({ isDisabled, value, placeholder, onChange, onClear, className, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=search-bar.d.ts.map
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare enum TextVariant {
|
|
3
|
+
HEADLINE = "headline",
|
|
4
|
+
SUBTITLE = "subtitle",
|
|
5
|
+
ACCENT = "accent",
|
|
6
|
+
BODY = "body",
|
|
7
|
+
BODY_SEMIBOLD = "bodySemibold",
|
|
8
|
+
BODY_BOLD = "bodyBold",
|
|
9
|
+
LINK = "link",
|
|
10
|
+
HELPER = "helper"
|
|
11
|
+
}
|
|
12
|
+
export declare const TextStyle: Record<TextVariant, string>;
|
|
13
|
+
export declare enum TextColors {
|
|
14
|
+
WHITE = "text-white",
|
|
15
|
+
BLACK = "text-gray-01",
|
|
16
|
+
BLACK_02 = "text-gray-02",
|
|
17
|
+
BLACK_03 = "text-gray-03",
|
|
18
|
+
BLUE = "text-blue-01",
|
|
19
|
+
BLUE_03 = "text-blue-03",
|
|
20
|
+
RED = "text-red-01",
|
|
21
|
+
RED_03 = "text-red-03",
|
|
22
|
+
PURPLE = "text-purple-01"
|
|
23
|
+
}
|
|
24
|
+
export type PropsOf<C extends keyof JSX.IntrinsicElements | React.JSXElementConstructor<unknown>> = JSX.LibraryManagedAttributes<C, React.ComponentPropsWithoutRef<C>>;
|
|
25
|
+
type AsProp<C extends React.ElementType> = {
|
|
26
|
+
as?: C;
|
|
27
|
+
};
|
|
28
|
+
export type ExtendableProps<ExtendedProps = {}, OverrideProps = {}> = OverrideProps & Omit<ExtendedProps, keyof OverrideProps>;
|
|
29
|
+
export type InheritableElementProps<C extends React.ElementType, Props = {}> = ExtendableProps<PropsOf<C>, Props>;
|
|
30
|
+
export type PolymorphicComponentProps<C extends React.ElementType, Props = {}> = InheritableElementProps<C, Props & AsProp<C>>;
|
|
31
|
+
export type PolymorphicRef<C extends React.ElementType> = React.ComponentPropsWithRef<C>['ref'];
|
|
32
|
+
export type PolymorphicComponentPropsWithRef<C extends React.ElementType, Props = {}> = PolymorphicComponentProps<C, Props> & {
|
|
33
|
+
ref?: PolymorphicRef<C>;
|
|
34
|
+
};
|
|
35
|
+
export {};
|
|
36
|
+
//# sourceMappingURL=text-types.d.ts.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { PolymorphicComponentPropsWithRef, TextColors, TextVariant } from './text-types';
|
|
3
|
+
declare const textStyles: (props?: ({
|
|
4
|
+
variant?: TextVariant | null | undefined;
|
|
5
|
+
color?: TextColors | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
7
|
+
type TextProps<C extends React.ElementType> = PolymorphicComponentPropsWithRef<C, Omit<VariantProps<typeof textStyles>, 'variant' | 'color'> & {
|
|
8
|
+
variant?: TextVariant;
|
|
9
|
+
color?: TextColors;
|
|
10
|
+
}>;
|
|
11
|
+
type TextComponent = <C extends React.ElementType = 'span'>(props: TextProps<C>) => React.ReactElement | null;
|
|
12
|
+
export declare const Text: TextComponent;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=text.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SelectProps } from '../../../../components';
|
|
2
|
+
import { FormControlProps } from '../../../../containers';
|
|
3
|
+
export type FormSelectProps = FormControlProps & SelectProps & {
|
|
4
|
+
formControlClassName?: string;
|
|
5
|
+
};
|
|
6
|
+
export declare function FormSelect({ formControlClassName, ...props }: FormSelectProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=form-select.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FormikValues } from 'formik';
|
|
2
|
+
import { FormHelpers, FormRenderProps } from './form-types';
|
|
3
|
+
export type TestFormValues = {
|
|
4
|
+
test: string;
|
|
5
|
+
};
|
|
6
|
+
export type FormConfig<FormValuesType> = {
|
|
7
|
+
initialValues: FormValuesType;
|
|
8
|
+
onSubmit: (values: FormValuesType, helpers?: FormHelpers<FormValuesType>) => void;
|
|
9
|
+
};
|
|
10
|
+
export declare function createMockFormikProps<T extends FormikValues>(config: FormConfig<T>): FormRenderProps<T>;
|
|
11
|
+
//# sourceMappingURL=form-story-stubs.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FormControlProps } from '../../../../containers';
|
|
2
|
+
import { TextFieldProps } from '../../../../components';
|
|
3
|
+
export type FormTextFieldProps = FormControlProps & TextFieldProps & {
|
|
4
|
+
formControlClassName?: string;
|
|
5
|
+
};
|
|
6
|
+
export declare function FormTextField({ formControlClassName, ...props }: FormTextFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=form-text-field.d.ts.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import BaseSchema from 'yup/lib/schema';
|
|
2
|
+
import { FormikHelpers, FormikProps } from 'formik';
|
|
3
|
+
export type FormNames<FormValuesType> = {
|
|
4
|
+
[key in keyof FormValuesType]: string;
|
|
5
|
+
};
|
|
6
|
+
export type FormErrors<FormValuesType> = {
|
|
7
|
+
[key in keyof FormValuesType]: string;
|
|
8
|
+
};
|
|
9
|
+
export type FormSchema<FormValuesType> = {
|
|
10
|
+
[key in keyof FormValuesType]: BaseSchema;
|
|
11
|
+
};
|
|
12
|
+
export type FormHelpers<FormValuesType> = FormikHelpers<FormValuesType>;
|
|
13
|
+
export type FormRenderProps<FormValuesType> = FormikProps<FormValuesType> & {
|
|
14
|
+
submitButtonDisabled: boolean;
|
|
15
|
+
};
|
|
16
|
+
export type FormConfig<FormValuesType> = {
|
|
17
|
+
enableReinitialize?: boolean;
|
|
18
|
+
names: FormNames<FormValuesType>;
|
|
19
|
+
initialValues: FormValuesType;
|
|
20
|
+
validationSchema?: FormSchema<FormValuesType>;
|
|
21
|
+
innerRef?: React.Ref<FormikProps<FormValuesType>>;
|
|
22
|
+
onSubmit: (values: FormValuesType, helpers?: FormHelpers<FormValuesType>) => void;
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=form-types.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FormikValues } from 'formik';
|
|
3
|
+
import { FormConfig, FormNames, FormRenderProps } from './form-types';
|
|
4
|
+
type FormProps<FormValuesType> = {
|
|
5
|
+
id?: string;
|
|
6
|
+
config: FormConfig<FormValuesType>;
|
|
7
|
+
className?: string;
|
|
8
|
+
children: (props: FormRenderProps<FormValuesType>, names: FormNames<FormValuesType>) => React.ReactElement;
|
|
9
|
+
};
|
|
10
|
+
export declare function Form<FormValuesType extends FormikValues>({ id, config, className, children, }: FormProps<FormValuesType>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=form.d.ts.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
|
-
type
|
|
2
|
+
type Props = {
|
|
3
3
|
className?: string;
|
|
4
4
|
footerFixed?: boolean;
|
|
5
5
|
children?: ReactElement | ReactElement[];
|
|
6
6
|
};
|
|
7
|
-
export declare function ExtendableContentView({ children, className }:
|
|
8
|
-
export {};
|
|
7
|
+
export declare function ExtendableContentView({ children, className }: Props): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export type { Props as ExtendableContentProps };
|
|
9
9
|
//# sourceMappingURL=content.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/modal/components/content.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAA+B,MAAM,OAAO,CAAC;AAGlE,KAAK,
|
|
1
|
+
{"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/modal/components/content.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAA+B,MAAM,OAAO,CAAC;AAGlE,KAAK,KAAK,GAAG;IACX,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,YAAY,GAAG,YAAY,EAAE,CAAC;CAC1C,CAAC;AAEF,wBAAgB,qBAAqB,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,KAAK,2CA6BnE;AAED,YAAY,EAAE,KAAK,IAAI,sBAAsB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.js","sourceRoot":"","sources":["../../../../../src/components/molecules/modal/components/content.tsx"],"names":[],"mappings":";;AASA,sDA6BC;;AAtCD,iCAAkE;AAClE,qEAA4D;AAQ5D,SAAgB,qBAAqB,CAAC,EAAE,QAAQ,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"content.js","sourceRoot":"","sources":["../../../../../src/components/molecules/modal/components/content.tsx"],"names":[],"mappings":";;AASA,sDA6BC;;AAtCD,iCAAkE;AAClE,qEAA4D;AAQ5D,SAAgB,qBAAqB,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAS;IAClE,MAAM,GAAG,GAAG,IAAA,cAAM,EAAiB,IAAI,CAAC,CAAC;IACzC,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAElD,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,MAAM,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC;QAC5B,IAAI,CAAC,OAAO;YAAE,OAAO;QAErB,MAAM,KAAK,GAAG,GAAG,EAAE,CAAC,YAAY,CAAC,OAAO,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;QAE9E,KAAK,EAAE,CAAC;QACR,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;QACzC,OAAO,GAAG,EAAE,CAAC,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;IAC3D,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACL,gCACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAA,yBAAQ,EACjB,oCAAoC,EACpC,uBAAuB,EACvB,kBAAkB,EAClB,SAAS,IAAI,kBAAkB,EAC/B,SAAS,CACV,YAEA,QAAQ,GACL,CACP,CAAC;AACJ,CAAC"}
|