@divayth/brick-ui 0.0.0-stage → 0.0.1

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.
Files changed (48) hide show
  1. package/README.md +43 -2
  2. package/dist/index.d.ts +4 -0
  3. package/dist/index.d.ts.map +1 -0
  4. package/dist/index.js +21 -0
  5. package/dist/lib/index.d.ts +2 -0
  6. package/dist/lib/index.d.ts.map +1 -0
  7. package/dist/lib/sizes.d.ts +2 -0
  8. package/dist/lib/sizes.d.ts.map +1 -0
  9. package/dist/styles.css +1 -0
  10. package/dist/ui/Button/Button.d.ts +21 -0
  11. package/dist/ui/Button/Button.d.ts.map +1 -0
  12. package/dist/ui/Button/Button.js +64 -0
  13. package/dist/ui/Button/Button.module.css.js +33 -0
  14. package/dist/ui/Card/Card.d.ts +4 -0
  15. package/dist/ui/Card/Card.d.ts.map +1 -0
  16. package/dist/ui/Card/Card.js +20 -0
  17. package/dist/ui/Card/Card.module.css.js +9 -0
  18. package/dist/ui/Chip/Chip.d.ts +14 -0
  19. package/dist/ui/Chip/Chip.d.ts.map +1 -0
  20. package/dist/ui/Chip/Chip.js +45 -0
  21. package/dist/ui/Chip/Chip.module.css.js +23 -0
  22. package/dist/ui/CircularLoading/CircularLoading.d.ts +8 -0
  23. package/dist/ui/CircularLoading/CircularLoading.d.ts.map +1 -0
  24. package/dist/ui/CircularLoading/CircularLoading.js +30 -0
  25. package/dist/ui/CircularLoading/CircularLoading.module.css.js +9 -0
  26. package/dist/ui/Flex/Flex.d.ts +10 -0
  27. package/dist/ui/Flex/Flex.d.ts.map +1 -0
  28. package/dist/ui/Flex/Flex.js +29 -0
  29. package/dist/ui/Flex/constants.d.ts +30 -0
  30. package/dist/ui/Flex/constants.d.ts.map +1 -0
  31. package/dist/ui/Flex/constants.js +27 -0
  32. package/dist/ui/IconButton/IconButton.d.ts +19 -0
  33. package/dist/ui/IconButton/IconButton.d.ts.map +1 -0
  34. package/dist/ui/IconButton/IconButton.js +56 -0
  35. package/dist/ui/IconButton/IconButton.module.css.js +29 -0
  36. package/dist/ui/ProgressBar/ProgressBar.d.ts +12 -0
  37. package/dist/ui/ProgressBar/ProgressBar.d.ts.map +1 -0
  38. package/dist/ui/ProgressBar/ProgressBar.js +34 -0
  39. package/dist/ui/Skeleton/Skeleton.d.ts +8 -0
  40. package/dist/ui/Skeleton/Skeleton.d.ts.map +1 -0
  41. package/dist/ui/Skeleton/Skeleton.js +14 -0
  42. package/dist/ui/Skeleton/Skeleton.module.css.js +7 -0
  43. package/dist/ui/Text/Text.d.ts +30 -0
  44. package/dist/ui/Text/Text.d.ts.map +1 -0
  45. package/dist/ui/Text/Text.js +39 -0
  46. package/dist/ui/index.d.ts +10 -0
  47. package/dist/ui/index.d.ts.map +1 -0
  48. package/package.json +53 -4
package/README.md CHANGED
@@ -1,3 +1,44 @@
1
- # Temporary Holding Version
1
+ # Brick UI
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ React components for React 19 and Next.js: Text, Flex, Button, Card, Chip, Skeleton,
4
+ IconButton, CircularLoading and ProgressBar.
5
+
6
+ ## Development
7
+
8
+ ```sh
9
+ npm install
10
+ npm run typecheck
11
+ npm run build
12
+ npm run storybook
13
+ ```
14
+
15
+ ## Usage
16
+
17
+ ```tsx
18
+ import { Button, Flex, Text } from '@divayth/brick-ui';
19
+ import '@divayth/brick-ui/styles.css';
20
+
21
+ <Flex alignItems="center">
22
+ <Text weight="medium">Brick UI</Text>
23
+ <Button>Continue</Button>
24
+ </Flex>
25
+ ```
26
+
27
+ The package ships compiled CSS; consumers do not need Tailwind.
28
+ No global CSS reset is included. Colors can be overridden via CSS variables.
29
+ Interactive Button preserves its 'use client' directive; Text and Flex remain server-compatible.
30
+ The package has not been published to npm yet.
31
+
32
+ ## Structure
33
+
34
+ - `src/ui` — components, CSS Modules and Storybook stories.
35
+ - `src/lib` — shared size scale, types and tokens.
36
+
37
+ `Size`: `xs | sm | md | lg | xl`.
38
+ Button supports all five sizes (heights 24 / 32 / 40 / 48 / 56 px).
39
+ Flex gap supports the same scale (4 / 8 / 16 / 24 / 32 px).
40
+ Text uses the same names and defaults to `md`.
41
+ Text also supports `inherit`, `2xl`, `3xl` and `4xl`.
42
+
43
+ Control heights and horizontal padding can be overridden with
44
+ `--height-*` and `--padding-*` CSS variables.
@@ -0,0 +1,4 @@
1
+ import './styles.css';
2
+ export * from './ui/index.js';
3
+ export * from './lib/index.js';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,21 @@
1
+ /* empty css */
2
+ import { Button as e } from "./ui/Button/Button.js";
3
+ import { Card as x } from "./ui/Card/Card.js";
4
+ import { Chip as f } from "./ui/Chip/Chip.js";
5
+ import { CircularLoading as a } from "./ui/CircularLoading/CircularLoading.js";
6
+ import { Flex as l } from "./ui/Flex/Flex.js";
7
+ import { IconButton as B } from "./ui/IconButton/IconButton.js";
8
+ import { ProgressBar as c } from "./ui/ProgressBar/ProgressBar.js";
9
+ import { Skeleton as g } from "./ui/Skeleton/Skeleton.js";
10
+ import { Text as h } from "./ui/Text/Text.js";
11
+ export {
12
+ e as Button,
13
+ x as Card,
14
+ f as Chip,
15
+ a as CircularLoading,
16
+ l as Flex,
17
+ B as IconButton,
18
+ c as ProgressBar,
19
+ g as Skeleton,
20
+ h as Text
21
+ };
@@ -0,0 +1,2 @@
1
+ export type { Size } from "./sizes.js";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,2 @@
1
+ export type Size = "xs" | "sm" | "md" | "lg" | "xl";
2
+ //# sourceMappingURL=sizes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sizes.d.ts","sourceRoot":"","sources":["../../src/lib/sizes.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC"}
@@ -0,0 +1 @@
1
+ @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-font-weight:initial}}}@layer theme{:root,:host{--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5 / 2.25);--font-weight-thin:100;--font-weight-extralight:200;--font-weight-light:300;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-extrabold:800;--font-weight-black:900;--radius-xs:.125rem;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--color-primary-1:#3d63dd;--color-primary-2:#3d63dd66;--color-primary-3:#edf2fe;--color-primary-hover:#3657c3;--color-primary-text-inverted:#fdfffc;--color-error-1:#d22829;--color-error-2:#d2282947;--color-error-3:#ffebe9;--color-info-1:#4e79eb;--color-info-2:#4e79eb66;--color-info-3:#eef3fd;--color-success-1:#1bc455;--color-success-2:#1bc45566;--color-success-3:#e8faf0;--color-warning-1:#e39500;--color-warning-2:#e3950066;--color-warning-3:#fff5e6;--color-gray-1:#707070;--color-gray-2:#e0e0e0;--color-gray-3:#f5f5f5;--color-background-primary:#fff}}@layer base,components;@layer utilities{.block{display:block}.flex{display:flex}.table{display:table}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-3{height:calc(var(--spacing) * 3)}.h-5{height:calc(var(--spacing) * 5)}.h-8{height:calc(var(--spacing) * 8)}.h-10{height:calc(var(--spacing) * 10)}.w-1\/2{width:50%}.w-2{width:calc(var(--spacing) * 2)}.w-3{width:calc(var(--spacing) * 3)}.w-5{width:calc(var(--spacing) * 5)}.w-8{width:calc(var(--spacing) * 8)}.w-10{width:calc(var(--spacing) * 10)}.w-full{width:100%}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-0{gap:0}.gap-1{gap:var(--spacing)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-8{gap:calc(var(--spacing) * 8)}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-xs{border-radius:var(--radius-xs)}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-3{border-style:var(--tw-border-style);border-width:3px}.bg-background-primary{background-color:var(--color-background-primary)}.bg-error-1{background-color:var(--color-error-1)}.bg-gray-2{background-color:var(--color-gray-2)}.bg-primary-1{background-color:var(--color-primary-1)}.p-4{padding:calc(var(--spacing) * 4)}.px-4{padding-inline:calc(var(--spacing) * 4)}.py-2{padding-block:calc(var(--spacing) * 2)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-black{--tw-font-weight:var(--font-weight-black);font-weight:var(--font-weight-black)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-extrabold{--tw-font-weight:var(--font-weight-extrabold);font-weight:var(--font-weight-extrabold)}.font-extralight{--tw-font-weight:var(--font-weight-extralight);font-weight:var(--font-weight-extralight)}.font-light{--tw-font-weight:var(--font-weight-light);font-weight:var(--font-weight-light)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.font-thin{--tw-font-weight:var(--font-weight-thin);font-weight:var(--font-weight-thin)}.text-gray-1{color:var(--color-gray-1)}.text-primary-text-inverted{color:var(--color-primary-text-inverted)}}:root{--height-xs:1.5rem;--height-sm:2rem;--height-md:2.5rem;--height-lg:3rem;--height-xl:3.5rem;--padding-xs:.5rem;--padding-sm:.75rem;--padding-md:1rem;--padding-lg:1.25rem;--padding-xl:1.5rem}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}._root_19xvf_1{position:relative;box-sizing:border-box;font:inherit;display:flex;align-items:center;justify-content:center;border-radius:.5rem;cursor:pointer;transition:.3s;border:none}._xs_19xvf_14{height:var(--height-xs);padding:0 var(--padding-xs)}._sm_19xvf_19{height:var(--height-sm);padding:0 var(--padding-sm)}._md_19xvf_24{height:var(--height-md);padding:0 var(--padding-md)}._lg_19xvf_29{height:var(--height-lg);padding:0 var(--padding-lg)}._xl_19xvf_34{height:var(--height-xl);padding:0 var(--padding-xl)}._filled_19xvf_39{background:var(--color-primary-1);color:var(--color-primary-text-inverted)}._filled_19xvf_39:hover{text-decoration:none;background:var(--color-primary-hover);color:var(--color-primary-text-inverted)}._outlined_19xvf_50{background:transparent;color:var(--color-primary-1);border:1px solid var(--color-primary-1)}._outlined_19xvf_50:hover{text-decoration:none;background:var(--color-primary-3)}._transparent_19xvf_61{color:var(--color-primary-1);background:transparent}._transparent_19xvf_61:hover{background:var(--color-primary-3);text-decoration:none}._filled_19xvf_39._error_19xvf_71{background:var(--color-error-1)}._filled_19xvf_39._error_19xvf_71:hover{background:color-mix(in srgb,var(--color-error-1) 85%,black)}._outlined_19xvf_50._error_19xvf_71{color:var(--color-error-1);border-color:var(--color-error-1)}._outlined_19xvf_50._error_19xvf_71:hover{background:color-mix(in srgb,var(--color-error-1) 10%,transparent)}._transparent_19xvf_61._error_19xvf_71{color:var(--color-error-1)}._transparent_19xvf_61._error_19xvf_71:hover{background:color-mix(in srgb,var(--color-error-1) 10%,transparent)}._disabled_19xvf_96{pointer-events:none;color:var(--color-gray-1);background:var(--color-gray-2);border-color:var(--color-gray-2)}._disabled_19xvf_96:hover{cursor:auto;background:var(--color-gray-2)}._error_19xvf_71._disabled_19xvf_96,._error_19xvf_71._disabled_19xvf_96:hover{color:var(--color-gray-1);background:var(--color-gray-2);border-color:var(--color-gray-2)}._loading_19xvf_115{position:absolute}._spinner_19xvf_116{width:1.25rem;height:1.25rem;box-sizing:border-box;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:_spin_19xvf_116 .8s linear infinite}._root_19xvf_1:focus-visible{outline:2px solid var(--color-primary-1);outline-offset:3px}@keyframes _spin_19xvf_116{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){._spinner_19xvf_116{animation:none}._root_19xvf_1{transition:none}}@layer components{._root_1cq4m_2{box-sizing:border-box;overflow:hidden;display:flex;flex-direction:column;gap:.5rem;border:1px solid var(--color-gray-2);transition:all .2s ease-in-out}._hover_1cq4m_12:hover{background:var(--color-gray-3);cursor:pointer}._root_1cq4m_2:focus-visible{outline:2px solid var(--color-primary-1);outline-offset:2px}@media(prefers-reduced-motion:reduce){._root_1cq4m_2{transition:none}}}._root_11js1_1{padding:.15rem 1rem;font-weight:500}._filled_11js1_6._primary_11js1_6{color:var(--color-primary-1);background:var(--color-primary-3);border:1px solid var(--color-primary-3)}._filled_11js1_6._info_11js1_12{color:var(--color-info-1);background:var(--color-info-3);border:1px solid var(--color-info-3)}._filled_11js1_6._error_11js1_18{color:var(--color-error-1);background:var(--color-error-3);border:1px solid var(--color-error-3)}._filled_11js1_6._success_11js1_24{color:var(--color-success-1);background:var(--color-success-3);border:1px solid var(--color-success-3)}._filled_11js1_6._warning_11js1_30{color:var(--color-warning-1);background:var(--color-warning-3);border:1px solid var(--color-warning-3)}._filled_11js1_6._secondary_11js1_36{color:var(--color-gray-1);background:var(--color-gray-3);border:1px solid var(--color-gray-3)}._outlined_11js1_42._primary_11js1_6{color:var(--color-primary-1);border:1px solid var(--color-primary-2)}._outlined_11js1_42._info_11js1_12{color:var(--color-info-1);border:1px solid var(--color-info-2)}._outlined_11js1_42._error_11js1_18{color:var(--color-error-1);border:1px solid var(--color-error-2)}._outlined_11js1_42._success_11js1_24{color:var(--color-success-1);border:1px solid var(--color-success-2)}._outlined_11js1_42._warning_11js1_30{color:var(--color-warning-1);border:1px solid var(--color-warning-2)}._outlined_11js1_42._secondary_11js1_36{color:var(--color-gray-1);border:1px solid var(--color-gray-2)}@layer components{._root_qpt33_2{box-sizing:border-box;flex-shrink:0;border-style:solid;border-color:var(--color-gray-3);border-top-color:var(--color-primary-1);border-radius:50%;animation:_spin_qpt33_1 1s linear infinite}._container_qpt33_11{display:flex;align-items:center;justify-content:center;flex:1;width:100%;height:100%}@keyframes _spin_qpt33_1{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){._root_qpt33_2{animation:none}}}@layer components{._root_1pw4c_2{position:relative;padding:.25rem;font:inherit;font-size:calc(var(--size) * .6);line-height:1;box-sizing:border-box;flex-shrink:0;transition:.3s;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;border-radius:50%;border:none;background:transparent;vertical-align:middle}._xs_1pw4c_21{--size: var(--height-xs);--stroke-width: 1.5}._sm_1pw4c_26{--size: var(--height-sm);--stroke-width: 1.75}._md_1pw4c_31{--size: var(--height-md);--stroke-width: 2}._lg_1pw4c_36{--size: var(--height-lg);--stroke-width: 2.25}._xl_1pw4c_41{--size: var(--height-xl);--stroke-width: 2.5}._primary_1pw4c_46{color:var(--color-primary-1)}._primary_1pw4c_46:hover{background:var(--color-primary-3)}._secondary_1pw4c_54{color:var(--color-gray-1)}._secondary_1pw4c_54:hover{color:var(--color-gray-1);background:var(--color-gray-3)}._danger_1pw4c_63{color:var(--color-error-1)}._danger_1pw4c_63:hover{color:var(--color-error-1);background:var(--color-error-3)}._disabled_1pw4c_72{color:var(--color-gray-1);pointer-events:none}._content_1pw4c_77{width:1em;height:1em;display:inline-flex;align-items:center;justify-content:center}._loading_1pw4c_85{position:absolute}._content_1pw4c_77 svg{width:1em;height:1em;flex-shrink:0;stroke-width:var(--stroke-width)}._content_1pw4c_77 svg *{vector-effect:non-scaling-stroke}._root_1pw4c_2:focus-visible{outline:2px solid var(--color-primary-1);outline-offset:2px}@media(prefers-reduced-motion:reduce){._root_1pw4c_2{transition:none}}}._root_1rkuv_1{flex-shrink:0;background:var(--color-gray-3);border-radius:4px;animation:_pulse_1rkuv_1 1.5s ease-in-out infinite}@keyframes _pulse_1rkuv_1{0%{opacity:.6}50%{opacity:1}to{opacity:.6}}@media(prefers-reduced-motion:reduce){._root_1rkuv_1{animation:none}}
@@ -0,0 +1,21 @@
1
+ import type { AriaAttributes, ComponentPropsWithRef, ElementType, ReactNode } from 'react';
2
+ import type { Size } from '../../lib/sizes.js';
3
+ type ButtonOwnProps<T extends ElementType> = {
4
+ isLoading?: boolean;
5
+ disabled?: boolean;
6
+ 'aria-disabled'?: AriaAttributes['aria-disabled'];
7
+ 'aria-busy'?: AriaAttributes['aria-busy'];
8
+ type?: 'button' | 'submit' | 'reset';
9
+ variant?: 'filled' | 'outlined' | 'transparent';
10
+ size?: Size;
11
+ color?: 'primary' | 'error';
12
+ className?: string;
13
+ component?: T;
14
+ children?: ReactNode;
15
+ startIcon?: ReactNode;
16
+ endIcon?: ReactNode;
17
+ };
18
+ export type ButtonProps<T extends ElementType = 'button'> = ButtonOwnProps<T> & Omit<ComponentPropsWithRef<T>, keyof ButtonOwnProps<T>>;
19
+ export declare const Button: <T extends ElementType = "button">({ isLoading, variant, size, color, type, component, children, startIcon, endIcon, className, disabled, onClick, onKeyDown, tabIndex, "aria-disabled": ariaDisabled, "aria-busy": ariaBusy, ...props }: ButtonProps<T>) => import("react").JSX.Element;
20
+ export {};
21
+ //# sourceMappingURL=Button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/ui/Button/Button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,qBAAqB,EAAE,WAAW,EAA6B,SAAS,EAAE,MAAM,OAAO,CAAC;AAItH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAM/C,KAAK,cAAc,CAAC,CAAC,SAAS,WAAW,IAAI;IAC3C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe,CAAC,EAAE,cAAc,CAAC,eAAe,CAAC,CAAC;IAClD,WAAW,CAAC,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC;IAC1C,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;IACrC,OAAO,CAAC,EAAE,QAAQ,GAAG,UAAU,GAAG,aAAa,CAAC;IAChD,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,KAAK,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,CAAC,CAAC;IACd,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,WAAW,GAAG,QAAQ,IACtD,cAAc,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,EAAE,MAAM,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;AAE9E,eAAO,MAAM,MAAM,GAAI,CAAC,SAAS,WAAW,GAAG,QAAQ,EAAE,uMAkBtD,WAAW,CAAC,CAAC,CAAC,gCA4ChB,CAAC"}
@@ -0,0 +1,64 @@
1
+ "use client";
2
+ import { jsxs as l, jsx as n } from "react/jsx-runtime";
3
+ import B from "clsx";
4
+ import { Flex as m } from "../Flex/Flex.js";
5
+ import { Text as P } from "../Text/Text.js";
6
+ import o from "./Button.module.css.js";
7
+ const q = ({
8
+ isLoading: e = !1,
9
+ variant: p = "filled",
10
+ size: c = "md",
11
+ color: d = "primary",
12
+ type: u = "button",
13
+ component: f,
14
+ children: b,
15
+ startIcon: y,
16
+ endIcon: x,
17
+ className: C,
18
+ disabled: h = !1,
19
+ onClick: D,
20
+ onKeyDown: g,
21
+ tabIndex: j,
22
+ "aria-disabled": k,
23
+ "aria-busy": I,
24
+ ...N
25
+ }) => {
26
+ const s = f || "button", r = h || e, a = s === "button", i = typeof s != "string";
27
+ return /* @__PURE__ */ l(
28
+ s,
29
+ {
30
+ ...N,
31
+ type: a || i ? u : void 0,
32
+ disabled: a || i ? r : void 0,
33
+ "aria-disabled": r || k,
34
+ "aria-busy": e || I,
35
+ tabIndex: !a && r ? -1 : j,
36
+ className: B(o.root, o[p], o[c], o[d], { [o.disabled]: r }, C),
37
+ onClick: (t) => {
38
+ if (r) {
39
+ t.preventDefault(), t.stopPropagation();
40
+ return;
41
+ }
42
+ D?.(t);
43
+ },
44
+ onKeyDown: (t) => {
45
+ if (r && (t.key === "Enter" || t.key === " ")) {
46
+ t.preventDefault(), t.stopPropagation();
47
+ return;
48
+ }
49
+ g?.(t);
50
+ },
51
+ children: [
52
+ /* @__PURE__ */ l(m, { alignItems: "center", style: { opacity: e ? 0 : 1 }, children: [
53
+ y,
54
+ /* @__PURE__ */ n(P, { children: b }),
55
+ x
56
+ ] }),
57
+ e && /* @__PURE__ */ n(m, { alignItems: "center", justifyContent: "center", className: o.loading, "aria-hidden": "true", children: /* @__PURE__ */ n("span", { className: o.spinner }) })
58
+ ]
59
+ }
60
+ );
61
+ };
62
+ export {
63
+ q as Button
64
+ };
@@ -0,0 +1,33 @@
1
+ const _ = "_root_19xvf_1", n = "_xs_19xvf_14", s = "_sm_19xvf_19", o = "_md_19xvf_24", t = "_lg_19xvf_29", l = "_xl_19xvf_34", r = "_filled_19xvf_39", x = "_outlined_19xvf_50", e = "_transparent_19xvf_61", d = "_error_19xvf_71", f = "_disabled_19xvf_96", i = "_loading_19xvf_115", c = "_spinner_19xvf_116", a = "_spin_19xvf_116", v = {
2
+ root: _,
3
+ xs: n,
4
+ sm: s,
5
+ md: o,
6
+ lg: t,
7
+ xl: l,
8
+ filled: r,
9
+ outlined: x,
10
+ transparent: e,
11
+ error: d,
12
+ disabled: f,
13
+ loading: i,
14
+ spinner: c,
15
+ spin: a
16
+ };
17
+ export {
18
+ v as default,
19
+ f as disabled,
20
+ d as error,
21
+ r as filled,
22
+ t as lg,
23
+ i as loading,
24
+ o as md,
25
+ x as outlined,
26
+ _ as root,
27
+ s as sm,
28
+ a as spin,
29
+ c as spinner,
30
+ e as transparent,
31
+ l as xl,
32
+ n as xs
33
+ };
@@ -0,0 +1,4 @@
1
+ import type { ComponentProps } from 'react';
2
+ export type CardProps = ComponentProps<'div'>;
3
+ export declare const Card: ({ children, className, onClick, onKeyDown, tabIndex, ...props }: CardProps) => import("react").JSX.Element;
4
+ //# sourceMappingURL=Card.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../src/ui/Card/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAM5C,MAAM,MAAM,SAAS,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAE9C,eAAO,MAAM,IAAI,GAAI,iEAAiE,SAAS,gCAgC9F,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { jsx as i } from "react/jsx-runtime";
2
+ import { twMerge as f } from "tailwind-merge";
3
+ import o from "./Card.module.css.js";
4
+ const p = ({ children: t, className: a, onClick: e, onKeyDown: d, tabIndex: u, ...g }) => e ? /* @__PURE__ */ i(
5
+ "div",
6
+ {
7
+ onClick: e,
8
+ onKeyDown: (r) => {
9
+ d?.(r), !(r.defaultPrevented || r.target !== r.currentTarget) && (r.key === "Enter" || r.key === " ") && (r.preventDefault(), r.repeat || r.currentTarget.click());
10
+ },
11
+ role: "button",
12
+ tabIndex: u ?? 0,
13
+ className: f(o.root, o.hover, "p-4", "rounded-lg", "bg-background-primary", a),
14
+ ...g,
15
+ children: t
16
+ }
17
+ ) : /* @__PURE__ */ i("div", { className: f(o.root, "p-4", "rounded-lg", "bg-background-primary", a), onKeyDown: d, tabIndex: u, ...g, children: t });
18
+ export {
19
+ p as Card
20
+ };
@@ -0,0 +1,9 @@
1
+ const o = "_root_1cq4m_2", t = "_hover_1cq4m_12", r = {
2
+ root: o,
3
+ hover: t
4
+ };
5
+ export {
6
+ r as default,
7
+ t as hover,
8
+ o as root
9
+ };
@@ -0,0 +1,14 @@
1
+ import type { ComponentProps, ReactNode } from "react";
2
+ import type { Size } from "../../lib/sizes.js";
3
+ export type ChipVariant = "filled" | "outlined";
4
+ export type ChipColor = "primary" | "info" | "error" | "success" | "warning" | "secondary";
5
+ export interface ChipProps extends ComponentProps<"div"> {
6
+ variant?: ChipVariant;
7
+ color?: ChipColor;
8
+ label: string;
9
+ startIcon?: ReactNode;
10
+ endIcon?: ReactNode;
11
+ rounded?: Size;
12
+ }
13
+ export declare const Chip: ({ variant, color, className, label, startIcon, endIcon, rounded, onClick, ...props }: ChipProps) => import("react").JSX.Element;
14
+ //# sourceMappingURL=Chip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Chip.d.ts","sourceRoot":"","sources":["../../../src/ui/Chip/Chip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAM/C,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,UAAU,CAAC;AAEhD,MAAM,MAAM,SAAS,GACjB,SAAS,GACT,MAAM,GACN,OAAO,GACP,SAAS,GACT,SAAS,GACT,WAAW,CAAC;AAUhB,MAAM,WAAW,SAAU,SAAQ,cAAc,CAAC,KAAK,CAAC;IACtD,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,OAAO,CAAC,EAAE,IAAI,CAAC;CAChB;AAED,eAAO,MAAM,IAAI,GAAI,sFAUlB,SAAS,gCAqBX,CAAC"}
@@ -0,0 +1,45 @@
1
+ import { jsxs as i } from "react/jsx-runtime";
2
+ import u from "clsx";
3
+ import { Flex as x } from "../Flex/Flex.js";
4
+ import r from "./Chip.module.css.js";
5
+ const p = {
6
+ xs: "rounded-xs",
7
+ sm: "rounded-sm",
8
+ md: "rounded-md",
9
+ lg: "rounded-lg",
10
+ xl: "rounded-xl"
11
+ }, j = ({
12
+ variant: e = "filled",
13
+ color: s = "secondary",
14
+ className: t,
15
+ label: d,
16
+ startIcon: m,
17
+ endIcon: n,
18
+ rounded: l = "sm",
19
+ onClick: o,
20
+ ...c
21
+ }) => /* @__PURE__ */ i(
22
+ x,
23
+ {
24
+ justifyContent: "center",
25
+ alignItems: "center",
26
+ className: u(
27
+ r.root,
28
+ r[e],
29
+ r[s],
30
+ p[l],
31
+ { "cursor-pointer": o },
32
+ t
33
+ ),
34
+ onClick: o,
35
+ ...c,
36
+ children: [
37
+ m,
38
+ d,
39
+ n
40
+ ]
41
+ }
42
+ );
43
+ export {
44
+ j as Chip
45
+ };
@@ -0,0 +1,23 @@
1
+ const s = "_root_11js1_1", o = "_filled_11js1_6", _ = "_primary_11js1_6", n = "_info_11js1_12", r = "_error_11js1_18", c = "_success_11js1_24", t = "_warning_11js1_30", e = "_secondary_11js1_36", i = "_outlined_11js1_42", a = {
2
+ root: s,
3
+ filled: o,
4
+ primary: _,
5
+ info: n,
6
+ error: r,
7
+ success: c,
8
+ warning: t,
9
+ secondary: e,
10
+ outlined: i
11
+ };
12
+ export {
13
+ a as default,
14
+ r as error,
15
+ o as filled,
16
+ n as info,
17
+ i as outlined,
18
+ _ as primary,
19
+ s as root,
20
+ e as secondary,
21
+ c as success,
22
+ t as warning
23
+ };
@@ -0,0 +1,8 @@
1
+ import type { ComponentProps } from 'react';
2
+ import type { Size } from '../../lib/sizes.js';
3
+ export interface CircularLoadingProps extends ComponentProps<'div'> {
4
+ size?: Size;
5
+ fullScreen?: boolean;
6
+ }
7
+ export declare const CircularLoading: ({ size, fullScreen, className, ...props }: CircularLoadingProps) => import("react").JSX.Element;
8
+ //# sourceMappingURL=CircularLoading.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CircularLoading.d.ts","sourceRoot":"","sources":["../../../src/ui/CircularLoading/CircularLoading.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAG5C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAG/C,MAAM,WAAW,oBAAqB,SAAQ,cAAc,CAAC,KAAK,CAAC;IACjE,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAUD,eAAO,MAAM,eAAe,GAAI,2CAE7B,oBAAoB,gCAUtB,CAAC"}
@@ -0,0 +1,30 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import a from "clsx";
3
+ import { twMerge as i } from "tailwind-merge";
4
+ import s from "./CircularLoading.module.css.js";
5
+ const n = {
6
+ xs: ["w-2", "h-2", "border-2"],
7
+ sm: ["w-3", "h-3", "border-2"],
8
+ md: ["w-5", "h-5", "border-2"],
9
+ lg: ["w-8", "h-8", "border-3"],
10
+ xl: ["w-10", "h-10", "border-3"]
11
+ }, p = ({
12
+ size: d = "md",
13
+ fullScreen: r,
14
+ className: o,
15
+ ...m
16
+ }) => {
17
+ const t = /* @__PURE__ */ e(
18
+ "div",
19
+ {
20
+ role: "status",
21
+ "aria-label": "Loading",
22
+ ...m,
23
+ className: i(a(s.root, n[d], !r && o))
24
+ }
25
+ );
26
+ return r ? /* @__PURE__ */ e("div", { className: i(s.container, o), children: t }) : t;
27
+ };
28
+ export {
29
+ p as CircularLoading
30
+ };
@@ -0,0 +1,9 @@
1
+ const o = "_root_qpt33_2", t = "_container_qpt33_11", n = {
2
+ root: o,
3
+ container: t
4
+ };
5
+ export {
6
+ t as container,
7
+ n as default,
8
+ o as root
9
+ };
@@ -0,0 +1,10 @@
1
+ import type { ComponentProps } from "react";
2
+ import { type DirectionType, type AlignItemsType, type GapType, type JustifayContentType } from "./constants.js";
3
+ export interface FlexProps extends ComponentProps<"div"> {
4
+ direction?: DirectionType;
5
+ alignItems?: AlignItemsType;
6
+ justifyContent?: JustifayContentType;
7
+ gap?: GapType;
8
+ }
9
+ export declare const Flex: ({ children, direction, gap, justifyContent, alignItems, className, ...props }: FlexProps) => import("react").JSX.Element;
10
+ //# sourceMappingURL=Flex.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Flex.d.ts","sourceRoot":"","sources":["../../../src/ui/Flex/Flex.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAI5C,OAAO,EAKL,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,OAAO,EACZ,KAAK,mBAAmB,EACzB,MAAM,gBAAgB,CAAC;AAExB,MAAM,WAAW,SAAU,SAAQ,cAAc,CAAC,KAAK,CAAC;IACtD,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,UAAU,CAAC,EAAE,cAAc,CAAC;IAC5B,cAAc,CAAC,EAAE,mBAAmB,CAAC;IACrC,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED,eAAO,MAAM,IAAI,GAAI,+EAQlB,SAAS,gCAgBX,CAAC"}
@@ -0,0 +1,29 @@
1
+ import { jsx as _ } from "react/jsx-runtime";
2
+ import { twMerge as I } from "tailwind-merge";
3
+ import { GAP_SX as N, DIRECTION_SX as T, ALIGN_ITEMS_SX as f, JUSTIFY_CONTENT_SX as i } from "./constants.js";
4
+ const a = ({
5
+ children: r,
6
+ direction: t = "row",
7
+ gap: o = "sm",
8
+ justifyContent: e = "start",
9
+ alignItems: m = "stretch",
10
+ className: s,
11
+ ...S
12
+ }) => /* @__PURE__ */ _(
13
+ "div",
14
+ {
15
+ className: I(
16
+ "flex",
17
+ N[o],
18
+ T[t],
19
+ f[m],
20
+ i[e],
21
+ s
22
+ ),
23
+ ...S,
24
+ children: r
25
+ }
26
+ );
27
+ export {
28
+ a as Flex
29
+ };
@@ -0,0 +1,30 @@
1
+ import { type Size } from "../../lib/sizes.js";
2
+ export declare const ALIGN_ITEMS_SX: {
3
+ readonly stretch: "items-stretch";
4
+ readonly center: "items-center";
5
+ readonly start: "items-start";
6
+ readonly end: "items-end";
7
+ };
8
+ export declare const JUSTIFY_CONTENT_SX: {
9
+ readonly start: "justify-start";
10
+ readonly center: "justify-center";
11
+ readonly end: "justify-end";
12
+ readonly between: "justify-between";
13
+ };
14
+ export declare const DIRECTION_SX: {
15
+ readonly row: "flex-row";
16
+ readonly col: "flex-col";
17
+ };
18
+ export declare const GAP_SX: {
19
+ readonly none: "gap-0";
20
+ readonly xs: "gap-1";
21
+ readonly sm: "gap-2";
22
+ readonly md: "gap-4";
23
+ readonly lg: "gap-6";
24
+ readonly xl: "gap-8";
25
+ };
26
+ export type AlignItemsType = keyof typeof ALIGN_ITEMS_SX;
27
+ export type JustifayContentType = keyof typeof JUSTIFY_CONTENT_SX;
28
+ export type DirectionType = keyof typeof DIRECTION_SX;
29
+ export type GapType = Size;
30
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/ui/Flex/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE/C,eAAO,MAAM,cAAc;;;;;CAKjB,CAAC;AAEX,eAAO,MAAM,kBAAkB;;;;;CAKrB,CAAC;AAEX,eAAO,MAAM,YAAY;;;CAGf,CAAC;AAEX,eAAO,MAAM,MAAM;;;;;;;CAOT,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG,MAAM,OAAO,cAAc,CAAC;AAEzD,MAAM,MAAM,mBAAmB,GAAG,MAAM,OAAO,kBAAkB,CAAC;AAElE,MAAM,MAAM,aAAa,GAAG,MAAM,OAAO,YAAY,CAAC;AAEtD,MAAM,MAAM,OAAO,GAAG,IAAI,CAAC"}
@@ -0,0 +1,27 @@
1
+ const t = {
2
+ stretch: "items-stretch",
3
+ center: "items-center",
4
+ start: "items-start",
5
+ end: "items-end"
6
+ }, e = {
7
+ start: "justify-start",
8
+ center: "justify-center",
9
+ end: "justify-end",
10
+ between: "justify-between"
11
+ }, s = {
12
+ row: "flex-row",
13
+ col: "flex-col"
14
+ }, n = {
15
+ none: "gap-0",
16
+ xs: "gap-1",
17
+ sm: "gap-2",
18
+ md: "gap-4",
19
+ lg: "gap-6",
20
+ xl: "gap-8"
21
+ };
22
+ export {
23
+ t as ALIGN_ITEMS_SX,
24
+ s as DIRECTION_SX,
25
+ n as GAP_SX,
26
+ e as JUSTIFY_CONTENT_SX
27
+ };
@@ -0,0 +1,19 @@
1
+ import type { AriaAttributes, ComponentPropsWithRef, ElementType, ReactNode } from 'react';
2
+ import type { Size } from '../../lib/sizes.js';
3
+ export type IconButtonColor = 'primary' | 'secondary' | 'danger';
4
+ type IconButtonOwnProps<T extends ElementType> = {
5
+ color?: IconButtonColor;
6
+ size?: Size;
7
+ isLoading?: boolean;
8
+ disabled?: boolean;
9
+ type?: 'button' | 'submit' | 'reset';
10
+ component?: T;
11
+ children?: ReactNode;
12
+ className?: string;
13
+ 'aria-disabled'?: AriaAttributes['aria-disabled'];
14
+ 'aria-busy'?: AriaAttributes['aria-busy'];
15
+ };
16
+ export type IconButtonProps<T extends ElementType = 'button'> = IconButtonOwnProps<T> & Omit<ComponentPropsWithRef<T>, keyof IconButtonOwnProps<T>>;
17
+ export declare const IconButton: <T extends ElementType = "button">({ color, size, disabled, isLoading, component, children, className, type, onClick, onKeyDown, tabIndex, "aria-disabled": ariaDisabled, "aria-busy": ariaBusy, ...props }: IconButtonProps<T>) => import("react").JSX.Element;
18
+ export {};
19
+ //# sourceMappingURL=IconButton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../src/ui/IconButton/IconButton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,qBAAqB,EAAE,WAAW,EAA6B,SAAS,EAAE,MAAM,OAAO,CAAC;AAEtH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAI/C,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,CAAC;AAEjE,KAAK,kBAAkB,CAAC,CAAC,SAAS,WAAW,IAAI;IAC/C,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;IACrC,SAAS,CAAC,EAAE,CAAC,CAAC;IACd,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,cAAc,CAAC,eAAe,CAAC,CAAC;IAClD,WAAW,CAAC,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC;CAC3C,CAAC;AACF,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,WAAW,GAAG,QAAQ,IAC1D,kBAAkB,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,EAAE,MAAM,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC;AAEtF,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,WAAW,GAAG,QAAQ,EAAE,0KAI1D,eAAe,CAAC,CAAC,CAAC,gCA8BpB,CAAC"}
@@ -0,0 +1,56 @@
1
+ "use client";
2
+ import { jsxs as g, jsx as l } from "react/jsx-runtime";
3
+ import k from "clsx";
4
+ import { CircularLoading as N } from "../CircularLoading/CircularLoading.js";
5
+ import a from "./IconButton.module.css.js";
6
+ const P = ({
7
+ color: m = "primary",
8
+ size: n = "md",
9
+ disabled: p = !1,
10
+ isLoading: r = !1,
11
+ component: c,
12
+ children: d,
13
+ className: u,
14
+ type: b = "button",
15
+ onClick: f,
16
+ onKeyDown: y,
17
+ tabIndex: h,
18
+ "aria-disabled": x,
19
+ "aria-busy": C,
20
+ ...D
21
+ }) => {
22
+ const s = c || "button", o = p || r, i = s === "button", e = typeof s != "string";
23
+ return /* @__PURE__ */ g(
24
+ s,
25
+ {
26
+ ...D,
27
+ type: i || e ? b : void 0,
28
+ disabled: i || e ? o : void 0,
29
+ "aria-disabled": o || x,
30
+ "aria-busy": r || C,
31
+ tabIndex: !i && o ? -1 : h,
32
+ className: k(a.root, a[m], a[n], { [a.disabled]: o }, u),
33
+ onClick: (t) => {
34
+ if (o) {
35
+ t.preventDefault(), t.stopPropagation();
36
+ return;
37
+ }
38
+ f?.(t);
39
+ },
40
+ onKeyDown: (t) => {
41
+ if (o && (t.key === "Enter" || t.key === " ")) {
42
+ t.preventDefault(), t.stopPropagation();
43
+ return;
44
+ }
45
+ y?.(t);
46
+ },
47
+ children: [
48
+ /* @__PURE__ */ l("span", { className: a.content, style: { opacity: r ? 0 : 1 }, children: d }),
49
+ r && /* @__PURE__ */ l(N, { size: n, style: { width: "1em", height: "1em" }, className: a.loading, "aria-hidden": "true" })
50
+ ]
51
+ }
52
+ );
53
+ };
54
+ export {
55
+ P as IconButton
56
+ };
@@ -0,0 +1,29 @@
1
+ const _ = "_root_1pw4c_2", c = "_xs_1pw4c_21", o = "_sm_1pw4c_26", n = "_md_1pw4c_31", s = "_lg_1pw4c_36", t = "_xl_1pw4c_41", d = "_primary_1pw4c_46", a = "_secondary_1pw4c_54", p = "_danger_1pw4c_63", r = "_disabled_1pw4c_72", e = "_content_1pw4c_77", l = "_loading_1pw4c_85", w = {
2
+ root: _,
3
+ xs: c,
4
+ sm: o,
5
+ md: n,
6
+ lg: s,
7
+ xl: t,
8
+ primary: d,
9
+ secondary: a,
10
+ danger: p,
11
+ disabled: r,
12
+ content: e,
13
+ loading: l
14
+ };
15
+ export {
16
+ e as content,
17
+ p as danger,
18
+ w as default,
19
+ r as disabled,
20
+ s as lg,
21
+ l as loading,
22
+ n as md,
23
+ d as primary,
24
+ _ as root,
25
+ a as secondary,
26
+ o as sm,
27
+ t as xl,
28
+ c as xs
29
+ };
@@ -0,0 +1,12 @@
1
+ export interface ProgressBarProps {
2
+ current: {
3
+ value: number;
4
+ label?: string;
5
+ };
6
+ max: {
7
+ value: number;
8
+ label?: string;
9
+ };
10
+ }
11
+ export declare const ProgressBar: ({ current, max }: ProgressBarProps) => import("react").JSX.Element;
12
+ //# sourceMappingURL=ProgressBar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProgressBar.d.ts","sourceRoot":"","sources":["../../../src/ui/ProgressBar/ProgressBar.tsx"],"names":[],"mappings":"AAKA,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3C,GAAG,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CACxC;AAED,eAAO,MAAM,WAAW,GAAI,kBAAkB,gBAAgB,gCA+B7D,CAAC"}
@@ -0,0 +1,34 @@
1
+ import { jsxs as s, jsx as a } from "react/jsx-runtime";
2
+ import t from "clsx";
3
+ import { Flex as r } from "../Flex/Flex.js";
4
+ import { Text as o } from "../Text/Text.js";
5
+ const b = ({ current: e, max: l }) => {
6
+ const i = Number.isFinite(e.value) && Number.isFinite(l.value) && l.value > 0 ? Math.min(100, Math.max(0, e.value * 100 / l.value)) : 0;
7
+ return /* @__PURE__ */ s(r, { direction: "col", className: "w-full", gap: "xs", children: [
8
+ /* @__PURE__ */ s(r, { justifyContent: "between", children: [
9
+ e.label && /* @__PURE__ */ a(o, { size: "sm", className: "text-gray-1", children: e.label }),
10
+ l.label && /* @__PURE__ */ a(o, { size: "sm", className: "text-gray-1", children: l.label })
11
+ ] }),
12
+ /* @__PURE__ */ a(
13
+ r,
14
+ {
15
+ className: "gap-0 bg-gray-2 rounded-full overflow-hidden",
16
+ role: "progressbar",
17
+ "aria-label": e.label,
18
+ "aria-valuemin": 0,
19
+ "aria-valuemax": 100,
20
+ "aria-valuenow": Math.round(i),
21
+ children: /* @__PURE__ */ a(
22
+ r,
23
+ {
24
+ className: t("gap-0 h-1.5 rounded-full", e.value > l.value ? "bg-error-1" : "bg-primary-1"),
25
+ style: { width: `${i}%` }
26
+ }
27
+ )
28
+ }
29
+ )
30
+ ] });
31
+ };
32
+ export {
33
+ b as ProgressBar
34
+ };
@@ -0,0 +1,8 @@
1
+ export interface SkeletonProps {
2
+ width?: string | number;
3
+ height?: string | number;
4
+ borderRadius?: string | number;
5
+ className?: string;
6
+ }
7
+ export declare const Skeleton: ({ width, height, borderRadius, className }: SkeletonProps) => import("react").JSX.Element;
8
+ //# sourceMappingURL=Skeleton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Skeleton.d.ts","sourceRoot":"","sources":["../../../src/ui/Skeleton/Skeleton.tsx"],"names":[],"mappings":"AAMA,MAAM,WAAW,aAAa;IAC5B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,QAAQ,GAAI,4CAAqD,aAAa,gCAQ1F,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { jsx as m } from "react/jsx-runtime";
2
+ import i from "clsx";
3
+ import c from "./Skeleton.module.css.js";
4
+ const p = ({ width: o, height: r = 16, borderRadius: t = 4, className: e }) => {
5
+ const s = {
6
+ width: o,
7
+ height: r,
8
+ borderRadius: t
9
+ };
10
+ return /* @__PURE__ */ m("div", { "aria-hidden": "true", className: i(c.root, e), style: s });
11
+ };
12
+ export {
13
+ p as Skeleton
14
+ };
@@ -0,0 +1,7 @@
1
+ const o = "_root_1rkuv_1", t = {
2
+ root: o
3
+ };
4
+ export {
5
+ t as default,
6
+ o as root
7
+ };
@@ -0,0 +1,30 @@
1
+ import type { ComponentProps } from "react";
2
+ declare const WEIGHTS_MAP: {
3
+ readonly thin: "font-thin";
4
+ readonly extralight: "font-extralight";
5
+ readonly light: "font-light";
6
+ readonly normal: "font-normal";
7
+ readonly medium: "font-medium";
8
+ readonly semibold: "font-semibold";
9
+ readonly bold: "font-bold";
10
+ readonly extrabold: "font-extrabold";
11
+ readonly black: "font-black";
12
+ };
13
+ declare const FONT_SIZES: {
14
+ readonly xs: "text-xs";
15
+ readonly sm: "text-sm";
16
+ readonly md: "text-base";
17
+ readonly lg: "text-lg";
18
+ readonly xl: "text-xl";
19
+ readonly "2xl": "text-2xl";
20
+ readonly "3xl": "text-3xl";
21
+ readonly "4xl": "text-4xl";
22
+ readonly inherit: "";
23
+ };
24
+ export interface TextProps extends ComponentProps<"span"> {
25
+ size?: keyof typeof FONT_SIZES;
26
+ weight?: keyof typeof WEIGHTS_MAP;
27
+ }
28
+ export declare const Text: ({ children, weight, size, className, ...props }: TextProps) => import("react").JSX.Element;
29
+ export {};
30
+ //# sourceMappingURL=Text.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../src/ui/Text/Text.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAI5C,QAAA,MAAM,WAAW;;;;;;;;;;CAUP,CAAC;AAEX,QAAA,MAAM,UAAU;;;;;;;;;;CAUN,CAAC;AAEX,MAAM,WAAW,SAAU,SAAQ,cAAc,CAAC,MAAM,CAAC;IACvD,IAAI,CAAC,EAAE,MAAM,OAAO,UAAU,CAAC;IAC/B,MAAM,CAAC,EAAE,MAAM,OAAO,WAAW,CAAC;CACnC;AAED,eAAO,MAAM,IAAI,GAAI,iDAMlB,SAAS,gCASX,CAAC"}
@@ -0,0 +1,39 @@
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { twMerge as m } from "tailwind-merge";
3
+ const r = {
4
+ thin: "font-thin",
5
+ extralight: "font-extralight",
6
+ light: "font-light",
7
+ normal: "font-normal",
8
+ medium: "font-medium",
9
+ semibold: "font-semibold",
10
+ bold: "font-bold",
11
+ extrabold: "font-extrabold",
12
+ black: "font-black"
13
+ }, i = {
14
+ xs: "text-xs",
15
+ sm: "text-sm",
16
+ md: "text-base",
17
+ lg: "text-lg",
18
+ xl: "text-xl",
19
+ "2xl": "text-2xl",
20
+ "3xl": "text-3xl",
21
+ "4xl": "text-4xl",
22
+ inherit: ""
23
+ }, f = ({
24
+ children: t,
25
+ weight: l = "normal",
26
+ size: o = "md",
27
+ className: x,
28
+ ...e
29
+ }) => /* @__PURE__ */ n(
30
+ "span",
31
+ {
32
+ className: m(i[o], r[l], x),
33
+ ...e,
34
+ children: t
35
+ }
36
+ );
37
+ export {
38
+ f as Text
39
+ };
@@ -0,0 +1,10 @@
1
+ export { Text, type TextProps } from "./Text/Text.js";
2
+ export { Flex, type FlexProps } from "./Flex/Flex.js";
3
+ export { Button, type ButtonProps } from "./Button/Button.js";
4
+ export { Card, type CardProps } from "./Card/Card.js";
5
+ export { Chip, type ChipProps, type ChipColor, type ChipVariant, } from "./Chip/Chip.js";
6
+ export { Skeleton, type SkeletonProps } from "./Skeleton/Skeleton.js";
7
+ export { IconButton, type IconButtonProps, type IconButtonColor } from "./IconButton/IconButton.js";
8
+ export { CircularLoading, type CircularLoadingProps } from "./CircularLoading/CircularLoading.js";
9
+ export { ProgressBar, type ProgressBarProps } from "./ProgressBar/ProgressBar.js";
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EACL,IAAI,EACJ,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,WAAW,GACjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,KAAK,eAAe,EAAE,MAAM,4BAA4B,CAAC;AACpG,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAClG,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,8BAA8B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,55 @@
1
1
  {
2
2
  "name": "@divayth/brick-ui",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.0.1",
4
+ "description": "React components for Brick UI",
5
+ "type": "module",
6
+ "files": [
7
+ "dist"
8
+ ],
9
+ "sideEffects": [
10
+ "**/*.css"
11
+ ],
12
+ "exports": {
13
+ ".": {
14
+ "types": "./dist/index.d.ts",
15
+ "import": "./dist/index.js"
16
+ },
17
+ "./styles.css": "./dist/styles.css"
18
+ },
19
+ "scripts": {
20
+ "build": "vite build && tsc -p tsconfig.build.json",
21
+ "typecheck": "tsc --noEmit",
22
+ "storybook": "storybook dev -p 6006",
23
+ "build-storybook": "storybook build",
24
+ "prepack": "npm run build"
25
+ },
26
+ "peerDependencies": {
27
+ "react": "^19.0.0",
28
+ "react-dom": "^19.0.0"
29
+ },
30
+ "dependencies": {
31
+ "clsx": "^2.1.1",
32
+ "tailwind-merge": "^3.7.0"
33
+ },
34
+ "devDependencies": {
35
+ "@fontsource-variable/inter": "^5.3.0",
36
+ "@storybook/addon-docs": "^10.3.6",
37
+ "@storybook/react-vite": "^10.3.6",
38
+ "@tailwindcss/vite": "^4.0.0",
39
+ "@types/node": "^22.0.0",
40
+ "@types/react": "^19.0.0",
41
+ "@types/react-dom": "^19.0.0",
42
+ "@vitejs/plugin-react": "^5.0.0",
43
+ "lucide-react": "^1.56.0",
44
+ "react": "^19.0.0",
45
+ "react-dom": "^19.0.0",
46
+ "rollup-plugin-preserve-directives": "^0.4.0",
47
+ "storybook": "^10.3.6",
48
+ "tailwindcss": "^4.0.0",
49
+ "typescript": "^5.0.0",
50
+ "vite": "^7.0.0"
51
+ },
52
+ "publishConfig": {
53
+ "access": "public"
54
+ }
55
+ }