@teelur/budget-board-ui 0.1.0 → 0.2.0-canary.24.fb04e43

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 CHANGED
@@ -21,6 +21,14 @@ when the pull request closes.
21
21
  Add new component examples and API reference rows in `docs/App.tsx`, keeping the examples tied to
22
22
  the public exports from `src/index.ts`.
23
23
 
24
+ Import the package stylesheet once in the consuming app:
25
+
26
+ ```ts
27
+ import "@teelur/budget-board-ui/styles.css";
28
+ ```
29
+
24
30
  Publishing runs automatically after changes are merged into `main` and publishes canary packages
25
- to GitHub Packages under the `canary` tag. Publishing a GitHub release publishes the matching
26
- stable version to GitHub Packages.
31
+ to GitHub Packages and npm under the `canary` tag. Publishing a GitHub release publishes the
32
+ matching stable version to both registries. npm publishing uses GitHub Actions OIDC trusted
33
+ publishing; configure `canary.yml` and `release.yml` as trusted publishers in the npm package
34
+ settings.
@@ -0,0 +1,17 @@
1
+ import { type ButtonHTMLAttributes, type ReactNode } from "react";
2
+ import type { UnstyledButtonProps } from "@mantine/core";
3
+ import { type ButtonColor, type ButtonVariant } from "../shared/buttonStyles";
4
+ export declare const actionIconSizes: readonly ["compact-xs", "compact-sm", "compact-md", "compact-lg", "compact-xl", "xs", "sm", "md", "lg", "xl"];
5
+ export type ActionIconSize = (typeof actionIconSizes)[number] | number | (string & {});
6
+ export interface ActionIconProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children" | "color" | "disabled" | "style">, Omit<UnstyledButtonProps, "children" | "color" | "disabled" | "size" | "style" | "unstyled" | "variant"> {
7
+ selected?: boolean;
8
+ children?: ReactNode;
9
+ disabled?: boolean;
10
+ loading?: boolean;
11
+ size?: ActionIconSize;
12
+ color?: ButtonColor;
13
+ variant?: ButtonVariant;
14
+ style?: UnstyledButtonProps["style"];
15
+ }
16
+ export declare function ActionIcon({ selected, children, className, color, disabled, loading, size, style, type, variant, ...buttonProps }: ActionIconProps): import("react").JSX.Element;
17
+ //# sourceMappingURL=ActionIcon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ActionIcon.d.ts","sourceRoot":"","sources":["../../src/ActionIcon/ActionIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,oBAAoB,EAEzB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,aAAa,EACnB,MAAM,wBAAwB,CAAC;AAIhC,eAAO,MAAM,eAAe,YAC1B,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,CACI,CAAC;AACX,MAAM,MAAM,cAAc,GACtB,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,GAChC,MAAM,GACN,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAElB,MAAM,WAAW,eACf,SACE,IAAI,CACF,oBAAoB,CAAC,iBAAiB,CAAC,EACvC,UAAU,GAAG,OAAO,GAAG,UAAU,GAAG,OAAO,CAC5C,EACD,IAAI,CACF,mBAAmB,EACjB,UAAU,GACV,OAAO,GACP,UAAU,GACV,MAAM,GACN,OAAO,GACP,UAAU,GACV,SAAS,CACZ;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,KAAK,CAAC,EAAE,mBAAmB,CAAC,OAAO,CAAC,CAAC;CACtC;AAED,wBAAgB,UAAU,CAAC,EACzB,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,KAAiB,EACjB,QAAQ,EACR,OAAe,EACf,IAAW,EACX,KAAK,EACL,IAAe,EACf,OAAkB,EAClB,GAAG,WAAW,EACf,EAAE,eAAe,+BA8DjB"}
@@ -1,11 +1,12 @@
1
- import type { ButtonHTMLAttributes, ReactNode } from "react";
2
- export declare const buttonColors: readonly ["primary", "secondary", "accent", "neutral", "info", "success", "warning", "error"];
3
- export type ButtonColor = (typeof buttonColors)[number];
4
- export declare const buttonVariants: readonly ["filled", "outline", "ghost"];
5
- export type ButtonVariant = (typeof buttonVariants)[number];
1
+ import { type ButtonHTMLAttributes, type ReactNode } from "react";
2
+ import type { UnstyledButtonProps } from "@mantine/core";
3
+ import { buttonColors, buttonVariants } from "../shared/buttonStyles";
4
+ import type { ButtonColor, ButtonVariant } from "../shared/buttonStyles";
5
+ export { buttonColors, buttonVariants };
6
+ export type { ButtonColor, ButtonVariant };
6
7
  export declare const buttonSizes: readonly ["compact-xs", "compact-sm", "compact-md", "compact-lg", "compact-xl", "xs", "sm", "md", "lg", "xl"];
7
8
  export type ButtonSize = (typeof buttonSizes)[number];
8
- export interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children" | "color" | "disabled"> {
9
+ export interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children" | "color" | "disabled" | "style">, Omit<UnstyledButtonProps, "children" | "color" | "disabled" | "size" | "style" | "unstyled" | "variant"> {
9
10
  selected?: boolean;
10
11
  children?: ReactNode;
11
12
  disabled?: boolean;
@@ -16,6 +17,7 @@ export interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement
16
17
  size?: ButtonSize;
17
18
  color?: ButtonColor;
18
19
  variant?: ButtonVariant;
20
+ style?: UnstyledButtonProps["style"];
19
21
  }
20
22
  export declare function Button({ selected, children, className, color, disabled, fullWidth, leftSection, loading, rightSection, size, style, type, variant, ...buttonProps }: ButtonProps): import("react").JSX.Element;
21
23
  //# sourceMappingURL=Button.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,oBAAoB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAQ5E,eAAO,MAAM,YAAY,YACvB,SAAS,EACT,WAAW,EACX,QAAQ,EACR,SAAS,EACT,MAAM,EACN,SAAS,EACT,SAAS,EACT,OAAO,CACC,CAAC;AACX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AAExD,eAAO,MAAM,cAAc,YAAI,QAAQ,EAAE,SAAS,EAAE,OAAO,CAAU,CAAC;AACtE,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5D,eAAO,MAAM,WAAW,YACtB,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,CACI,CAAC;AACX,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AAEtD,MAAM,WAAW,WAAY,SAAQ,IAAI,CACvC,oBAAoB,CAAC,iBAAiB,CAAC,EACvC,UAAU,GAAG,OAAO,GAAG,UAAU,CAClC;IACC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,OAAO,CAAC,EAAE,aAAa,CAAC;CACzB;AA4DD,wBAAgB,MAAM,CAAC,EACrB,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,KAAiB,EACjB,QAAQ,EACR,SAAiB,EACjB,WAAW,EACX,OAAe,EACf,YAAY,EACZ,IAAW,EACX,KAAK,EACL,IAAe,EACf,OAAkB,EAClB,GAAG,WAAW,EACf,EAAE,WAAW,+BAsCb"}
1
+ {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,oBAAoB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAG9E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EACL,YAAY,EACZ,cAAc,EAEf,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAIzE,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,CAAC;AACxC,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,CAAC;AAE3C,eAAO,MAAM,WAAW,YACtB,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,CACI,CAAC;AACX,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AAEtD,MAAM,WAAW,WACf,SACE,IAAI,CACF,oBAAoB,CAAC,iBAAiB,CAAC,EACvC,UAAU,GAAG,OAAO,GAAG,UAAU,GAAG,OAAO,CAC5C,EACD,IAAI,CACF,mBAAmB,EACjB,UAAU,GACV,OAAO,GACP,UAAU,GACV,MAAM,GACN,OAAO,GACP,UAAU,GACV,SAAS,CACZ;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,KAAK,CAAC,EAAE,mBAAmB,CAAC,OAAO,CAAC,CAAC;CACtC;AAED,wBAAgB,MAAM,CAAC,EACrB,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,KAAiB,EACjB,QAAQ,EACR,SAAiB,EACjB,WAAW,EACX,OAAe,EACf,YAAY,EACZ,IAAW,EACX,KAAK,EACL,IAAe,EACf,OAAkB,EAClB,GAAG,WAAW,EACf,EAAE,WAAW,+BAiDb"}
@@ -0,0 +1,35 @@
1
+ import { type CSSProperties, type HTMLAttributes, type ReactNode } from "react";
2
+ import { buttonColors, buttonVariants } from "../shared/buttonStyles";
3
+ import type { ButtonColor, ButtonVariant } from "../shared/buttonStyles";
4
+ import { buttonSizes } from "../Button/Button";
5
+ import type { ButtonSize } from "../Button/Button";
6
+ export { buttonColors as segmentedControlColors };
7
+ export { buttonVariants as segmentedControlVariants };
8
+ export { buttonSizes as segmentedControlSizes };
9
+ export interface SegmentedControlItem {
10
+ value: string;
11
+ label: ReactNode;
12
+ disabled?: boolean;
13
+ leftSection?: ReactNode;
14
+ }
15
+ export type SegmentedControlProps = Omit<HTMLAttributes<HTMLDivElement>, "aria-label" | "aria-labelledby" | "color" | "onChange" | "style"> & {
16
+ data: SegmentedControlItem[];
17
+ value?: string;
18
+ defaultValue?: string;
19
+ onChange?: (value: string) => void;
20
+ name?: string;
21
+ color?: ButtonColor;
22
+ variant?: ButtonVariant;
23
+ size?: ButtonSize;
24
+ fullWidth?: boolean;
25
+ disabled?: boolean;
26
+ style?: CSSProperties;
27
+ } & ({
28
+ "aria-label": string;
29
+ "aria-labelledby"?: string;
30
+ } | {
31
+ "aria-label"?: never;
32
+ "aria-labelledby": string;
33
+ });
34
+ export declare function SegmentedControl({ className, color, data, defaultValue, disabled, fullWidth, name, onChange, size, style, value, variant, ...groupProps }: SegmentedControlProps): import("react").JSX.Element;
35
+ //# sourceMappingURL=SegmentedControl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SegmentedControl.d.ts","sourceRoot":"","sources":["../../src/SegmentedControl/SegmentedControl.tsx"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAGf,OAAO,EACL,YAAY,EACZ,cAAc,EAEf,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAInD,OAAO,EAAE,YAAY,IAAI,sBAAsB,EAAE,CAAC;AAClD,OAAO,EAAE,cAAc,IAAI,wBAAwB,EAAE,CAAC;AACtD,OAAO,EAAE,WAAW,IAAI,qBAAqB,EAAE,CAAC;AAEhD,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,SAAS,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,SAAS,CAAC;CACzB;AAED,MAAM,MAAM,qBAAqB,GAAG,IAAI,CACtC,cAAc,CAAC,cAAc,CAAC,EAC9B,YAAY,GAAG,iBAAiB,GAAG,OAAO,GAAG,UAAU,GAAG,OAAO,CAClE,GAAG;IACF,IAAI,EAAE,oBAAoB,EAAE,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB,GAAG,CACE;IAAE,YAAY,EAAE,MAAM,CAAC;IAAC,iBAAiB,CAAC,EAAE,MAAM,CAAA;CAAE,GACpD;IAAE,YAAY,CAAC,EAAE,KAAK,CAAC;IAAC,iBAAiB,EAAE,MAAM,CAAA;CAAE,CACtD,CAAC;AAEJ,wBAAgB,gBAAgB,CAAC,EAC/B,SAAS,EACT,KAAiB,EACjB,IAAI,EACJ,YAAY,EACZ,QAAQ,EACR,SAAiB,EACjB,IAAI,EACJ,QAAQ,EACR,IAAW,EACX,KAAK,EACL,KAAK,EACL,OAAkB,EAClB,GAAG,UAAU,EACd,EAAE,qBAAqB,+BAoJvB"}
package/dist/colors.d.ts CHANGED
@@ -12,17 +12,22 @@ declare const lightColors: {
12
12
  readonly textMuted: "#969087";
13
13
  readonly textDisabled: "#b7b1a7";
14
14
  readonly textInverse: "#fffaf2";
15
+ readonly contrast: "#242321";
16
+ readonly contrastContent: "#fffaf2";
15
17
  readonly primary: "#4c6ef5";
16
18
  readonly primaryContent: "#fffaf2";
17
19
  readonly secondary: "#12b886";
18
20
  readonly secondaryContent: "#063b2f";
19
21
  readonly accent: "#f76707";
20
22
  readonly accentContent: "#4a2103";
23
+ readonly muted: "#6e7378";
24
+ readonly mutedContent: "#fffaf2";
21
25
  readonly neutral: "#e7e3da";
22
26
  readonly neutralContent: "#3a3834";
23
27
  readonly border: "color-mix(in srgb, #3a3834 18%, transparent)";
24
28
  readonly borderSubtle: "#d8d5ce";
25
29
  readonly borderStrong: "#aaa69e";
30
+ readonly buttonHoverBorder: "#5f3dc4";
26
31
  readonly focusRing: "#4c6ef5";
27
32
  readonly selection: "#dbe4ff";
28
33
  readonly info: "#1971c2";
@@ -51,17 +56,22 @@ export declare const budgetBoardColors: {
51
56
  readonly textMuted: "#969087";
52
57
  readonly textDisabled: "#b7b1a7";
53
58
  readonly textInverse: "#fffaf2";
59
+ readonly contrast: "#242321";
60
+ readonly contrastContent: "#fffaf2";
54
61
  readonly primary: "#4c6ef5";
55
62
  readonly primaryContent: "#fffaf2";
56
63
  readonly secondary: "#12b886";
57
64
  readonly secondaryContent: "#063b2f";
58
65
  readonly accent: "#f76707";
59
66
  readonly accentContent: "#4a2103";
67
+ readonly muted: "#6e7378";
68
+ readonly mutedContent: "#fffaf2";
60
69
  readonly neutral: "#e7e3da";
61
70
  readonly neutralContent: "#3a3834";
62
71
  readonly border: "color-mix(in srgb, #3a3834 18%, transparent)";
63
72
  readonly borderSubtle: "#d8d5ce";
64
73
  readonly borderStrong: "#aaa69e";
74
+ readonly buttonHoverBorder: "#5f3dc4";
65
75
  readonly focusRing: "#4c6ef5";
66
76
  readonly selection: "#dbe4ff";
67
77
  readonly info: "#1971c2";
@@ -87,17 +97,22 @@ export declare const budgetBoardColors: {
87
97
  readonly textMuted: "#716f6b";
88
98
  readonly textDisabled: "#55585d";
89
99
  readonly textInverse: "#242321";
100
+ readonly contrast: "#f2f0eb";
101
+ readonly contrastContent: "#242321";
90
102
  readonly primary: "#91a7ff";
91
103
  readonly primaryContent: "#1e2450";
92
104
  readonly secondary: "#63e6be";
93
105
  readonly secondaryContent: "#063b2f";
94
106
  readonly accent: "#ffa94d";
95
107
  readonly accentContent: "#4a2103";
108
+ readonly muted: "#969aa2";
109
+ readonly mutedContent: "#242321";
96
110
  readonly neutral: "#34373a";
97
111
  readonly neutralContent: "#f2f0eb";
98
112
  readonly border: "color-mix(in srgb, #d8d5ce 18%, transparent)";
99
113
  readonly borderSubtle: "#3a3d42";
100
114
  readonly borderStrong: "#686b70";
115
+ readonly buttonHoverBorder: "#63e6be";
101
116
  readonly focusRing: "#91a7ff";
102
117
  readonly selection: "#1e2450";
103
118
  readonly info: "#74c0fc";
@@ -1 +1 @@
1
- {"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../src/colors.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,WAAW;aACf,IAAI,EAAE,SAAS;aACf,OAAO,EAAE,SAAS;aAClB,eAAe,EAAE,SAAS;aAC1B,UAAU,EAAE,SAAS;aACrB,aAAa,EAAE,SAAS;aACxB,cAAc,EAAE,SAAS;aACzB,WAAW,EAAE,SAAS;aACtB,WAAW,EAAE,SAAS;aACtB,aAAa,EAAE,SAAS;aACxB,YAAY,EAAE,SAAS;aACvB,SAAS,EAAE,SAAS;aACpB,YAAY,EAAE,SAAS;aACvB,WAAW,EAAE,SAAS;aACtB,OAAO,EAAE,SAAS;aAClB,cAAc,EAAE,SAAS;aACzB,SAAS,EAAE,SAAS;aACpB,gBAAgB,EAAE,SAAS;aAC3B,MAAM,EAAE,SAAS;aACjB,aAAa,EAAE,SAAS;aACxB,OAAO,EAAE,SAAS;aAClB,cAAc,EAAE,SAAS;aACzB,MAAM,EAAE,8CAA8C;aACtD,YAAY,EAAE,SAAS;aACvB,YAAY,EAAE,SAAS;aACvB,SAAS,EAAE,SAAS;aACpB,SAAS,EAAE,SAAS;aACpB,IAAI,EAAE,SAAS;aACf,WAAW,EAAE,SAAS;aACtB,OAAO,EAAE,SAAS;aAClB,cAAc,EAAE,SAAS;aACzB,OAAO,EAAE,SAAS;aAClB,cAAc,EAAE,SAAS;aACzB,KAAK,EAAE,SAAS;aAChB,YAAY,EAAE,SAAS;CACf,CAAC;AAEX,MAAM,MAAM,mBAAmB,GAAG,MAAM,OAAO,WAAW,CAAC;AAC3D,MAAM,MAAM,0BAA0B,GAAG,OAAO,CAC9C,mBAAmB,EACnB,GAAG,MAAM,SAAS,CACnB,CAAC;AAuCF,eAAO,MAAM,iBAAiB;;uBA/EtB,SAAS;0BACN,SAAS;kCACD,SAAS;6BACd,SAAS;gCACN,SAAS;iCACR,SAAS;8BACZ,SAAS;8BACT,SAAS;gCACP,SAAS;+BACV,SAAS;4BACZ,SAAS;+BACN,SAAS;8BACV,SAAS;0BACb,SAAS;iCACF,SAAS;4BACd,SAAS;mCACF,SAAS;yBACnB,SAAS;gCACF,SAAS;0BACf,SAAS;iCACF,SAAS;yBACjB,8CAA8C;+BACxC,SAAS;+BACT,SAAS;4BACZ,SAAS;4BACT,SAAS;uBACd,SAAS;8BACF,SAAS;0BACb,SAAS;iCACF,SAAS;0BAChB,SAAS;iCACF,SAAS;wBAClB,SAAS;+BACF,SAAS;;;uBAUjB,SAAS;0BACN,SAAS;kCACD,SAAS;6BACd,SAAS;gCACN,SAAS;iCACR,SAAS;8BACZ,SAAS;8BACT,SAAS;gCACP,SAAS;+BACV,SAAS;4BACZ,SAAS;+BACN,SAAS;8BACV,SAAS;0BACb,SAAS;iCACF,SAAS;4BACd,SAAS;mCACF,SAAS;yBACnB,SAAS;gCACF,SAAS;0BACf,SAAS;iCACF,SAAS;yBACjB,8CAA8C;+BACxC,SAAS;+BACT,SAAS;4BACZ,SAAS;4BACT,SAAS;uBACd,SAAS;8BACF,SAAS;0BACb,SAAS;iCACF,SAAS;0BAChB,SAAS;iCACF,SAAS;wBAClB,SAAS;+BACF,SAAS;;CAM0C,CAAC;AAEpE,MAAM,MAAM,iBAAiB,GAAG,OAAO,iBAAiB,CAAC;AACzD,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC,mBAAmB,EAAE,MAAM,CAAC,CAAC"}
1
+ {"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../src/colors.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,WAAW;aACf,IAAI,EAAE,SAAS;aACf,OAAO,EAAE,SAAS;aAClB,eAAe,EAAE,SAAS;aAC1B,UAAU,EAAE,SAAS;aACrB,aAAa,EAAE,SAAS;aACxB,cAAc,EAAE,SAAS;aACzB,WAAW,EAAE,SAAS;aACtB,WAAW,EAAE,SAAS;aACtB,aAAa,EAAE,SAAS;aACxB,YAAY,EAAE,SAAS;aACvB,SAAS,EAAE,SAAS;aACpB,YAAY,EAAE,SAAS;aACvB,WAAW,EAAE,SAAS;aACtB,QAAQ,EAAE,SAAS;aACnB,eAAe,EAAE,SAAS;aAC1B,OAAO,EAAE,SAAS;aAClB,cAAc,EAAE,SAAS;aACzB,SAAS,EAAE,SAAS;aACpB,gBAAgB,EAAE,SAAS;aAC3B,MAAM,EAAE,SAAS;aACjB,aAAa,EAAE,SAAS;aACxB,KAAK,EAAE,SAAS;aAChB,YAAY,EAAE,SAAS;aACvB,OAAO,EAAE,SAAS;aAClB,cAAc,EAAE,SAAS;aACzB,MAAM,EAAE,8CAA8C;aACtD,YAAY,EAAE,SAAS;aACvB,YAAY,EAAE,SAAS;aACvB,iBAAiB,EAAE,SAAS;aAC5B,SAAS,EAAE,SAAS;aACpB,SAAS,EAAE,SAAS;aACpB,IAAI,EAAE,SAAS;aACf,WAAW,EAAE,SAAS;aACtB,OAAO,EAAE,SAAS;aAClB,cAAc,EAAE,SAAS;aACzB,OAAO,EAAE,SAAS;aAClB,cAAc,EAAE,SAAS;aACzB,KAAK,EAAE,SAAS;aAChB,YAAY,EAAE,SAAS;CACf,CAAC;AAEX,MAAM,MAAM,mBAAmB,GAAG,MAAM,OAAO,WAAW,CAAC;AAC3D,MAAM,MAAM,0BAA0B,GAAG,OAAO,CAC9C,mBAAmB,EACnB,GAAG,MAAM,SAAS,CACnB,CAAC;AA4CF,eAAO,MAAM,iBAAiB;;uBAzFtB,SAAS;0BACN,SAAS;kCACD,SAAS;6BACd,SAAS;gCACN,SAAS;iCACR,SAAS;8BACZ,SAAS;8BACT,SAAS;gCACP,SAAS;+BACV,SAAS;4BACZ,SAAS;+BACN,SAAS;8BACV,SAAS;2BACZ,SAAS;kCACF,SAAS;0BACjB,SAAS;iCACF,SAAS;4BACd,SAAS;mCACF,SAAS;yBACnB,SAAS;gCACF,SAAS;wBACjB,SAAS;+BACF,SAAS;0BACd,SAAS;iCACF,SAAS;yBACjB,8CAA8C;+BACxC,SAAS;+BACT,SAAS;oCACJ,SAAS;4BACjB,SAAS;4BACT,SAAS;uBACd,SAAS;8BACF,SAAS;0BACb,SAAS;iCACF,SAAS;0BAChB,SAAS;iCACF,SAAS;wBAClB,SAAS;+BACF,SAAS;;;uBAUjB,SAAS;0BACN,SAAS;kCACD,SAAS;6BACd,SAAS;gCACN,SAAS;iCACR,SAAS;8BACZ,SAAS;8BACT,SAAS;gCACP,SAAS;+BACV,SAAS;4BACZ,SAAS;+BACN,SAAS;8BACV,SAAS;2BACZ,SAAS;kCACF,SAAS;0BACjB,SAAS;iCACF,SAAS;4BACd,SAAS;mCACF,SAAS;yBACnB,SAAS;gCACF,SAAS;wBACjB,SAAS;+BACF,SAAS;0BACd,SAAS;iCACF,SAAS;yBACjB,8CAA8C;+BACxC,SAAS;+BACT,SAAS;oCACJ,SAAS;4BACjB,SAAS;4BACT,SAAS;uBACd,SAAS;8BACF,SAAS;0BACb,SAAS;iCACF,SAAS;0BAChB,SAAS;iCACF,SAAS;wBAClB,SAAS;+BACF,SAAS;;CAM0C,CAAC;AAEpE,MAAM,MAAM,iBAAiB,GAAG,OAAO,iBAAiB,CAAC;AACzD,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC,mBAAmB,EAAE,MAAM,CAAC,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,4 +1,6 @@
1
+ export { ActionIcon, actionIconSizes, type ActionIconProps, type ActionIconSize, } from "./ActionIcon/ActionIcon";
1
2
  export { Button, buttonColors, buttonSizes, buttonVariants, type ButtonColor, type ButtonProps, type ButtonSize, type ButtonVariant, } from "./Button/Button";
3
+ export { SegmentedControl, segmentedControlColors, segmentedControlSizes, segmentedControlVariants, type SegmentedControlItem, type SegmentedControlProps, } from "./SegmentedControl/SegmentedControl";
2
4
  export { budgetBoardColors, budgetBoardDarkTheme, budgetBoardTheme, budgetBoardTypography, } from "./theme";
3
5
  export type { BudgetBoardColorKey, BudgetBoardColorMode, BudgetBoardColors, BudgetBoardContentColorKey, BudgetBoardFontKey, BudgetBoardTypography, } from "./theme";
4
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,YAAY,EACZ,WAAW,EACX,cAAc,EACd,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,aAAa,GACnB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,gBAAgB,EAChB,qBAAqB,GACtB,MAAM,SAAS,CAAC;AAEjB,YAAY,EACV,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,EACjB,0BAA0B,EAC1B,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,eAAe,EACf,KAAK,eAAe,EACpB,KAAK,cAAc,GACpB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EACL,MAAM,EACN,YAAY,EACZ,WAAW,EACX,cAAc,EACd,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,aAAa,GACnB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,qBAAqB,EACrB,wBAAwB,EACxB,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,GAC3B,MAAM,qCAAqC,CAAC;AAE7C,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,gBAAgB,EAChB,qBAAqB,GACtB,MAAM,SAAS,CAAC;AAEjB,YAAY,EACV,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,EACjB,0BAA0B,EAC1B,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,SAAS,CAAC"}
package/dist/index.js CHANGED
@@ -1,9 +1,53 @@
1
- import { createTheme as e } from "@mantine/core";
2
- //#region \0rolldown/runtime.js
3
- var t = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), n = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (e, t) => (typeof require < "u" ? require : e)[t] }) : e)(function(e) {
4
- if (typeof require < "u") return require.apply(this, arguments);
5
- throw Error("Calling `require` for \"" + e + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
6
- }), r = {
1
+ import { useCallback as e, useContext as t, useId as n, useLayoutEffect as r, useRef as i, useState as a } from "react";
2
+ import { MantineContext as o, MantineProvider as s, UnstyledButton as c, createTheme as l } from "@mantine/core";
3
+ import { useColorScheme as u } from "@mantine/hooks";
4
+ import { jsx as d, jsxs as f } from "react/jsx-runtime";
5
+ //#region src/shared/buttonStyles.ts
6
+ var p = [
7
+ "primary",
8
+ "secondary",
9
+ "accent",
10
+ "muted",
11
+ "neutral",
12
+ "contrast",
13
+ "info",
14
+ "success",
15
+ "warning",
16
+ "error"
17
+ ], m = [
18
+ "filled",
19
+ "outline",
20
+ "ghost"
21
+ ];
22
+ function h(e, t, n) {
23
+ let r = `var(--bb-color-${t}, ${e[t]})`, i = `var(--bb-color-${t}-content, ${e[`${t}Content`]})`, a = `var(--bb-color-button-hover-border, ${e.buttonHoverBorder})`, o = `var(--bb-color-focus-ring, ${e.focusRing})`, s = `var(--budget-board-button-${t}`, c = `color-mix(in srgb, ${r} 88%, ${i})`;
24
+ return n === "outline" ? {
25
+ "--bbui-button-bg": "transparent",
26
+ "--bbui-button-color": `${s}-outline-color, ${r})`,
27
+ "--bbui-button-hover": `${s}-outline-hover, color-mix(in srgb, ${r} 12%, transparent))`,
28
+ "--bbui-button-active": `${s}-outline-active, color-mix(in srgb, ${r} 20%, transparent))`,
29
+ "--bbui-button-border": `${s}-outline-border, ${r})`,
30
+ "--bbui-button-hover-border": a,
31
+ "--bbui-button-focus": `var(--budget-board-button-focus-ring, ${o})`
32
+ } : n === "ghost" ? {
33
+ "--bbui-button-bg": "transparent",
34
+ "--bbui-button-color": `${s}-ghost-color, ${r})`,
35
+ "--bbui-button-hover": `${s}-ghost-hover, color-mix(in srgb, ${r} 12%, transparent))`,
36
+ "--bbui-button-active": `${s}-ghost-active, color-mix(in srgb, ${r} 20%, transparent))`,
37
+ "--bbui-button-border": "transparent",
38
+ "--bbui-button-hover-border": a,
39
+ "--bbui-button-focus": `var(--budget-board-button-focus-ring, ${o})`
40
+ } : {
41
+ "--bbui-button-bg": `${s}-background, ${r})`,
42
+ "--bbui-button-color": `${s}-color, ${i})`,
43
+ "--bbui-button-hover": `${s}-hover, ${c})`,
44
+ "--bbui-button-active": `${s}-active, color-mix(in srgb, ${r} 80%, ${i}))`,
45
+ "--bbui-button-border": "transparent",
46
+ "--bbui-button-hover-border": a,
47
+ "--bbui-button-focus": `var(--budget-board-button-focus-ring, ${o})`
48
+ };
49
+ }
50
+ var g = {
7
51
  light: {
8
52
  page: "#f7f6f2",
9
53
  surface: "#ffffff",
@@ -18,17 +62,22 @@ var t = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t
18
62
  textMuted: "#969087",
19
63
  textDisabled: "#b7b1a7",
20
64
  textInverse: "#fffaf2",
65
+ contrast: "#242321",
66
+ contrastContent: "#fffaf2",
21
67
  primary: "#4c6ef5",
22
68
  primaryContent: "#fffaf2",
23
69
  secondary: "#12b886",
24
70
  secondaryContent: "#063b2f",
25
71
  accent: "#f76707",
26
72
  accentContent: "#4a2103",
73
+ muted: "#6e7378",
74
+ mutedContent: "#fffaf2",
27
75
  neutral: "#e7e3da",
28
76
  neutralContent: "#3a3834",
29
77
  border: "color-mix(in srgb, #3a3834 18%, transparent)",
30
78
  borderSubtle: "#d8d5ce",
31
79
  borderStrong: "#aaa69e",
80
+ buttonHoverBorder: "#5f3dc4",
32
81
  focusRing: "#4c6ef5",
33
82
  selection: "#dbe4ff",
34
83
  info: "#1971c2",
@@ -54,17 +103,22 @@ var t = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t
54
103
  textMuted: "#716f6b",
55
104
  textDisabled: "#55585d",
56
105
  textInverse: "#242321",
106
+ contrast: "#f2f0eb",
107
+ contrastContent: "#242321",
57
108
  primary: "#91a7ff",
58
109
  primaryContent: "#1e2450",
59
110
  secondary: "#63e6be",
60
111
  secondaryContent: "#063b2f",
61
112
  accent: "#ffa94d",
62
113
  accentContent: "#4a2103",
114
+ muted: "#969aa2",
115
+ mutedContent: "#242321",
63
116
  neutral: "#34373a",
64
117
  neutralContent: "#f2f0eb",
65
118
  border: "color-mix(in srgb, #d8d5ce 18%, transparent)",
66
119
  borderSubtle: "#3a3d42",
67
120
  borderStrong: "#686b70",
121
+ buttonHoverBorder: "#63e6be",
68
122
  focusRing: "#91a7ff",
69
123
  selection: "#1e2450",
70
124
  info: "#74c0fc",
@@ -76,230 +130,24 @@ var t = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t
76
130
  error: "#ff6b6b",
77
131
  errorContent: "#4a0c0c"
78
132
  }
79
- }, i = {
80
- root: "_root_xr7w1_1",
81
- selected: "_selected_xr7w1_23",
82
- "compact-xs": "_compact-xs_xr7w1_58",
83
- "compact-sm": "_compact-sm_xr7w1_65",
84
- "compact-md": "_compact-md_xr7w1_72",
85
- "compact-lg": "_compact-lg_xr7w1_79",
86
- "compact-xl": "_compact-xl_xr7w1_86",
87
- xs: "_xs_xr7w1_93",
88
- sm: "_sm_xr7w1_100",
89
- md: "_md_xr7w1_107",
90
- lg: "_lg_xr7w1_114",
91
- xl: "_xl_xr7w1_121",
92
- fullWidth: "_fullWidth_xr7w1_128",
93
- section: "_section_xr7w1_132",
94
- content: "_content_xr7w1_137",
95
- loading: "_loading_xr7w1_142",
96
- loader: "_loader_xr7w1_150",
97
- "button-loader-spin": "_button-loader-spin_xr7w1_1"
98
- }, a = /* @__PURE__ */ t(((e) => {
99
- var t = Symbol.for("react.transitional.element"), n = Symbol.for("react.fragment");
100
- function r(e, n, r) {
101
- var i = null;
102
- if (r !== void 0 && (i = "" + r), n.key !== void 0 && (i = "" + n.key), "key" in n) for (var a in r = {}, n) a !== "key" && (r[a] = n[a]);
103
- else r = n;
104
- return n = r.ref, {
105
- $$typeof: t,
106
- type: e,
107
- key: i,
108
- ref: n === void 0 ? null : n,
109
- props: r
110
- };
111
- }
112
- e.Fragment = n, e.jsx = r, e.jsxs = r;
113
- })), o = /* @__PURE__ */ t(((e) => {
114
- process.env.NODE_ENV !== "production" && (function() {
115
- function t(e) {
116
- if (e == null) return null;
117
- if (typeof e == "function") return e.$$typeof === A ? null : e.displayName || e.name || null;
118
- if (typeof e == "string") return e;
119
- switch (e) {
120
- case v: return "Fragment";
121
- case b: return "Profiler";
122
- case y: return "StrictMode";
123
- case w: return "Suspense";
124
- case T: return "SuspenseList";
125
- case O: return "Activity";
126
- case k: return "ViewTransition";
127
- }
128
- if (typeof e == "object") switch (typeof e.tag == "number" && console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), e.$$typeof) {
129
- case _: return "Portal";
130
- case S: return e.displayName || "Context";
131
- case x: return (e._context.displayName || "Context") + ".Consumer";
132
- case C:
133
- var n = e.render;
134
- return e = e.displayName, e ||= (e = n.displayName || n.name || "", e === "" ? "ForwardRef" : "ForwardRef(" + e + ")"), e;
135
- case E: return n = e.displayName || null, n === null ? t(e.type) || "Memo" : n;
136
- case D:
137
- n = e._payload, e = e._init;
138
- try {
139
- return t(e(n));
140
- } catch {}
141
- }
142
- return null;
143
- }
144
- function r(e) {
145
- return "" + e;
146
- }
147
- function i(e) {
148
- try {
149
- r(e);
150
- var t = !1;
151
- } catch {
152
- t = !0;
153
- }
154
- if (t) {
155
- t = console;
156
- var n = t.error, i = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
157
- return n.call(t, "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", i), r(e);
158
- }
159
- }
160
- function a(e) {
161
- if (e === v) return "<>";
162
- if (typeof e == "object" && e && e.$$typeof === D) return "<...>";
163
- try {
164
- var n = t(e);
165
- return n ? "<" + n + ">" : "<...>";
166
- } catch {
167
- return "<...>";
168
- }
169
- }
170
- function o() {
171
- var e = j.A;
172
- return e === null ? null : e.getOwner();
173
- }
174
- function s() {
175
- return Error("react-stack-top-frame");
176
- }
177
- function c(e) {
178
- if (M.call(e, "key")) {
179
- var t = Object.getOwnPropertyDescriptor(e, "key").get;
180
- if (t && t.isReactWarning) return !1;
181
- }
182
- return e.key !== void 0;
183
- }
184
- function l(e, t) {
185
- function n() {
186
- F || (F = !0, console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)", t));
187
- }
188
- n.isReactWarning = !0, Object.defineProperty(e, "key", {
189
- get: n,
190
- configurable: !0
191
- });
192
- }
193
- function u() {
194
- var e = t(this.type);
195
- return I[e] || (I[e] = !0, console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")), e = this.props.ref, e === void 0 ? null : e;
196
- }
197
- function d(e, t, n, r, i, a) {
198
- var o = n.ref;
199
- return e = {
200
- $$typeof: g,
201
- type: e,
202
- key: t,
203
- props: n,
204
- _owner: r
205
- }, (o === void 0 ? null : o) === null ? Object.defineProperty(e, "ref", {
206
- enumerable: !1,
207
- value: null
208
- }) : Object.defineProperty(e, "ref", {
209
- enumerable: !1,
210
- get: u
211
- }), e._store = {}, Object.defineProperty(e._store, "validated", {
212
- configurable: !1,
213
- enumerable: !1,
214
- writable: !0,
215
- value: 0
216
- }), Object.defineProperty(e, "_debugInfo", {
217
- configurable: !1,
218
- enumerable: !1,
219
- writable: !0,
220
- value: null
221
- }), Object.defineProperty(e, "_debugStack", {
222
- configurable: !1,
223
- enumerable: !1,
224
- writable: !0,
225
- value: i
226
- }), Object.defineProperty(e, "_debugTask", {
227
- configurable: !1,
228
- enumerable: !1,
229
- writable: !0,
230
- value: a
231
- }), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
232
- }
233
- function f(e, n, r, a, s, u) {
234
- var f = n.children;
235
- if (f !== void 0) {
236
- if (a) {
237
- if (N(f)) {
238
- for (a = 0; a < f.length; a++) p(f[a]);
239
- Object.freeze && Object.freeze(f);
240
- } else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
241
- } else p(f);
242
- }
243
- if (M.call(n, "key")) {
244
- f = t(e);
245
- var m = Object.keys(n).filter(function(e) {
246
- return e !== "key";
247
- });
248
- a = 0 < m.length ? "{key: someKey, " + m.join(": ..., ") + ": ...}" : "{key: someKey}", z[f + a] || (m = 0 < m.length ? "{" + m.join(": ..., ") + ": ...}" : "{}", console.error("A props object containing a \"key\" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />", a, f, m, f), z[f + a] = !0);
249
- }
250
- if (f = null, r !== void 0 && (i(r), f = "" + r), c(n) && (i(n.key), f = "" + n.key), "key" in n) for (var h in r = {}, n) h !== "key" && (r[h] = n[h]);
251
- else r = n;
252
- return f && l(r, typeof e == "function" ? e.displayName || e.name || "Unknown" : e), d(e, f, r, o(), s, u);
253
- }
254
- function p(e) {
255
- m(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e && e.$$typeof === D && (e._payload.status === "fulfilled" ? m(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
256
- }
257
- function m(e) {
258
- return typeof e == "object" && !!e && e.$$typeof === g;
259
- }
260
- var h = n("react"), g = Symbol.for("react.transitional.element"), _ = Symbol.for("react.portal"), v = Symbol.for("react.fragment"), y = Symbol.for("react.strict_mode"), b = Symbol.for("react.profiler"), x = Symbol.for("react.consumer"), S = Symbol.for("react.context"), C = Symbol.for("react.forward_ref"), w = Symbol.for("react.suspense"), T = Symbol.for("react.suspense_list"), E = Symbol.for("react.memo"), D = Symbol.for("react.lazy"), O = Symbol.for("react.activity"), k = Symbol.for("react.view_transition"), A = Symbol.for("react.client.reference"), j = h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, M = Object.prototype.hasOwnProperty, N = Array.isArray, P = console.createTask ? console.createTask : function() {
261
- return null;
262
- };
263
- h = { react_stack_bottom_frame: function(e) {
264
- return e();
265
- } };
266
- var F, I = {}, L = h.react_stack_bottom_frame.bind(h, s)(), R = P(a(s)), z = {};
267
- e.Fragment = v, e.jsx = function(e, t, n) {
268
- var r = 1e4 > j.recentlyCreatedOwnerStacks++;
269
- if (r) {
270
- var i = Error.stackTraceLimit;
271
- Error.stackTraceLimit = 10;
272
- var o = Error("react-stack-top-frame");
273
- Error.stackTraceLimit = i;
274
- } else o = L;
275
- return f(e, t, n, !1, o, r ? P(a(e)) : R);
276
- }, e.jsxs = function(e, t, n) {
277
- var r = 1e4 > j.recentlyCreatedOwnerStacks++;
278
- if (r) {
279
- var i = Error.stackTraceLimit;
280
- Error.stackTraceLimit = 10;
281
- var o = Error("react-stack-top-frame");
282
- Error.stackTraceLimit = i;
283
- } else o = L;
284
- return f(e, t, n, !0, o, r ? P(a(e)) : R);
285
- };
286
- })();
287
- })), s = (/* @__PURE__ */ t(((e, t) => {
288
- t.exports = process.env.NODE_ENV === "production" ? a() : o();
289
- })))(), c = [
290
- "primary",
291
- "secondary",
292
- "accent",
293
- "neutral",
294
- "info",
295
- "success",
296
- "warning",
297
- "error"
298
- ], l = [
299
- "filled",
300
- "outline",
301
- "ghost"
302
- ], u = [
133
+ }, _ = {
134
+ root: "_root_yy9gn_1",
135
+ selected: "_selected_yy9gn_34",
136
+ "compact-xs": "_compact-xs_yy9gn_77",
137
+ "compact-sm": "_compact-sm_yy9gn_81",
138
+ "compact-md": "_compact-md_yy9gn_85",
139
+ "compact-lg": "_compact-lg_yy9gn_89",
140
+ "compact-xl": "_compact-xl_yy9gn_93",
141
+ xs: "_xs_yy9gn_97",
142
+ sm: "_sm_yy9gn_101",
143
+ md: "_md_yy9gn_105",
144
+ lg: "_lg_yy9gn_109",
145
+ xl: "_xl_yy9gn_113",
146
+ loading: "_loading_yy9gn_117",
147
+ icon: "_icon_yy9gn_125",
148
+ loader: "_loader_yy9gn_136",
149
+ "action-icon-loader-spin": "_action-icon-loader-spin_yy9gn_1"
150
+ }, v = [
303
151
  "compact-xs",
304
152
  "compact-sm",
305
153
  "compact-md",
@@ -311,94 +159,229 @@ var t = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t
311
159
  "lg",
312
160
  "xl"
313
161
  ];
314
- function d(e, t, n) {
315
- let r = `var(--bb-color-${t}, ${e[t]})`, i = `var(--bb-color-${t}-content, ${e[`${t}Content`]})`, a = `var(--bb-color-focus-ring, ${e.focusRing})`, o = `var(--budget-board-button-${t}`, s = `color-mix(in srgb, ${r} 88%, ${i})`;
316
- return n === "outline" ? {
317
- "--button-bg": "transparent",
318
- "--button-color": `${o}-outline-color, ${r})`,
319
- "--button-hover": `${o}-outline-hover, color-mix(in srgb, ${r} 12%, transparent))`,
320
- "--button-active": `${o}-outline-active, color-mix(in srgb, ${r} 20%, transparent))`,
321
- "--button-border": `${o}-outline-border, ${r})`,
322
- "--button-hover-border": `${o}-outline-border, ${r})`,
323
- "--button-focus": `var(--budget-board-button-focus-ring, ${a})`
324
- } : n === "ghost" ? {
325
- "--button-bg": "transparent",
326
- "--button-color": `${o}-ghost-color, ${r})`,
327
- "--button-hover": `${o}-ghost-hover, color-mix(in srgb, ${r} 12%, transparent))`,
328
- "--button-active": `${o}-ghost-active, color-mix(in srgb, ${r} 20%, transparent))`,
329
- "--button-border": "transparent",
330
- "--button-hover-border": `${o}-ghost-hover-border, ${r})`,
331
- "--button-focus": `var(--budget-board-button-focus-ring, ${a})`
332
- } : {
333
- "--button-bg": `${o}-background, ${r})`,
334
- "--button-color": `${o}-color, ${i})`,
335
- "--button-hover": `${o}-hover, ${s})`,
336
- "--button-active": `${o}-active, color-mix(in srgb, ${r} 80%, ${i}))`,
337
- "--button-border": "transparent",
338
- "--button-hover-border": "transparent",
339
- "--button-focus": `var(--budget-board-button-focus-ring, ${a})`
340
- };
162
+ function y({ selected: e, children: n, className: r, color: i = "primary", disabled: a, loading: l = !1, size: p = "md", style: m, type: y = "button", variant: b = "filled", ...x }) {
163
+ let S = x.role === "tab", C = t(o), w = u("light"), T = C?.colorScheme === "auto" ? w : C?.colorScheme === "dark" ? "dark" : "light", E = typeof p == "string" && v.includes(p) ? _[p] : void 0, D = typeof p == "number" || !E ? { "--bbui-action-icon-size": typeof p == "number" ? `${p}px` : p } : void 0, O = /* @__PURE__ */ f(c, {
164
+ ...x,
165
+ ...e === void 0 || S ? {} : { "aria-pressed": e },
166
+ "aria-busy": l || void 0,
167
+ className: [
168
+ _.root,
169
+ E,
170
+ e && _.selected,
171
+ l && _.loading,
172
+ r
173
+ ].filter(Boolean).join(" "),
174
+ "data-budget-board-action-icon-size": p,
175
+ "data-budget-board-color": i,
176
+ "data-budget-board-selected": e === void 0 ? void 0 : e ? "true" : "false",
177
+ "data-budget-board-variant": b,
178
+ disabled: a || l,
179
+ style: [
180
+ D,
181
+ h(g[T], i, b),
182
+ m
183
+ ],
184
+ type: y,
185
+ unstyled: !0,
186
+ children: [l && /* @__PURE__ */ d("span", {
187
+ "aria-hidden": "true",
188
+ className: _.loader
189
+ }), /* @__PURE__ */ d("span", {
190
+ className: _.icon,
191
+ children: n
192
+ })]
193
+ });
194
+ return C ? O : /* @__PURE__ */ d(s, { children: O });
341
195
  }
342
- function f({ selected: e, children: t, className: n, color: a = "primary", disabled: o, fullWidth: c = !1, leftSection: l, loading: u = !1, rightSection: f, size: p = "md", style: m, type: h = "button", variant: g = "filled", ..._ }) {
343
- let v = _.role === "tab";
344
- return /* @__PURE__ */ (0, s.jsxs)("button", {
345
- ..._,
346
- ...e === void 0 || v ? {} : { "aria-pressed": e },
347
- "aria-busy": u || void 0,
196
+ var b = {
197
+ root: "_root_6ksl8_1",
198
+ selected: "_selected_6ksl8_30",
199
+ "compact-xs": "_compact-xs_6ksl8_73",
200
+ "compact-sm": "_compact-sm_6ksl8_80",
201
+ "compact-md": "_compact-md_6ksl8_87",
202
+ "compact-lg": "_compact-lg_6ksl8_94",
203
+ "compact-xl": "_compact-xl_6ksl8_101",
204
+ xs: "_xs_6ksl8_108",
205
+ sm: "_sm_6ksl8_115",
206
+ md: "_md_6ksl8_122",
207
+ lg: "_lg_6ksl8_129",
208
+ xl: "_xl_6ksl8_136",
209
+ fullWidth: "_fullWidth_6ksl8_143",
210
+ section: "_section_6ksl8_147",
211
+ content: "_content_6ksl8_152",
212
+ loading: "_loading_6ksl8_158",
213
+ loader: "_loader_6ksl8_166",
214
+ "button-loader-spin": "_button-loader-spin_6ksl8_1"
215
+ }, x = [
216
+ "compact-xs",
217
+ "compact-sm",
218
+ "compact-md",
219
+ "compact-lg",
220
+ "compact-xl",
221
+ "xs",
222
+ "sm",
223
+ "md",
224
+ "lg",
225
+ "xl"
226
+ ];
227
+ function S({ selected: e, children: n, className: r, color: i = "primary", disabled: a, fullWidth: l = !1, leftSection: p, loading: m = !1, rightSection: _, size: v = "md", style: y, type: x = "button", variant: S = "filled", ...C }) {
228
+ let w = C.role === "tab", T = t(o), E = u("light"), D = T?.colorScheme === "auto" ? E : T?.colorScheme === "dark" ? "dark" : "light", O = /* @__PURE__ */ f(c, {
229
+ ...C,
230
+ ...e === void 0 || w ? {} : { "aria-pressed": e },
231
+ "aria-busy": m || void 0,
348
232
  className: [
349
- i.root,
350
- i[p],
351
- e && i.selected,
352
- c && i.fullWidth,
353
- u && i.loading,
354
- n
233
+ b.root,
234
+ b[v],
235
+ e && b.selected,
236
+ l && b.fullWidth,
237
+ m && b.loading,
238
+ r
355
239
  ].filter(Boolean).join(" "),
356
- "data-budget-board-full-width": c ? "true" : void 0,
240
+ "data-budget-board-full-width": l ? "true" : void 0,
357
241
  "data-budget-board-selected": e === void 0 ? void 0 : e ? "true" : "false",
358
- "data-budget-board-color": a,
359
- "data-budget-board-size": p,
360
- "data-budget-board-variant": g,
361
- disabled: o ?? u,
362
- style: {
363
- ...d(r.light, a, g),
364
- ...m
365
- },
366
- type: h,
242
+ "data-budget-board-color": i,
243
+ "data-budget-board-size": v,
244
+ "data-budget-board-variant": S,
245
+ disabled: a ?? m,
246
+ style: [h(g[D], i, S), y],
247
+ type: x,
248
+ unstyled: !0,
367
249
  children: [
368
- u && /* @__PURE__ */ (0, s.jsx)("span", {
250
+ m && /* @__PURE__ */ d("span", {
369
251
  "aria-hidden": "true",
370
- className: i.loader
252
+ className: b.loader
371
253
  }),
372
- l && /* @__PURE__ */ (0, s.jsx)("span", {
373
- className: i.section,
374
- children: l
254
+ p && /* @__PURE__ */ d("span", {
255
+ className: b.section,
256
+ children: p
375
257
  }),
376
- /* @__PURE__ */ (0, s.jsx)("span", {
377
- className: i.content,
378
- children: t
258
+ /* @__PURE__ */ d("span", {
259
+ className: b.content,
260
+ children: n
379
261
  }),
380
- f && /* @__PURE__ */ (0, s.jsx)("span", {
381
- className: i.section,
382
- children: f
262
+ _ && /* @__PURE__ */ d("span", {
263
+ className: b.section,
264
+ children: _
383
265
  })
384
266
  ]
385
267
  });
268
+ return T ? O : /* @__PURE__ */ d(s, { children: O });
269
+ }
270
+ var C = {
271
+ root: "_root_g0cx3_1",
272
+ fullWidth: "_fullWidth_g0cx3_13",
273
+ item: "_item_g0cx3_18",
274
+ indicator: "_indicator_g0cx3_22",
275
+ input: "_input_g0cx3_56",
276
+ section: "_section_g0cx3_67",
277
+ content: "_content_g0cx3_72",
278
+ "compact-xs": "_compact-xs_g0cx3_91",
279
+ "compact-sm": "_compact-sm_g0cx3_101",
280
+ "compact-md": "_compact-md_g0cx3_110",
281
+ "compact-lg": "_compact-lg_g0cx3_119",
282
+ "compact-xl": "_compact-xl_g0cx3_128",
283
+ xs: "_xs_g0cx3_137",
284
+ sm: "_sm_g0cx3_146",
285
+ md: "_md_g0cx3_155",
286
+ lg: "_lg_g0cx3_164",
287
+ xl: "_xl_g0cx3_173"
288
+ };
289
+ //#endregion
290
+ //#region src/SegmentedControl/SegmentedControl.tsx
291
+ function w({ className: c, color: l = "primary", data: p, defaultValue: m, disabled: _, fullWidth: v = !1, name: y, onChange: b, size: x = "md", style: S, value: w, variant: T = "filled", ...E }) {
292
+ let D = t(o), O = u("light"), k = D?.colorScheme === "auto" ? O : D?.colorScheme === "dark" ? "dark" : "light", A = n(), j = y ?? A, M = w !== void 0, [N, P] = a(m ?? p[0]?.value), F = M ? w : N, I = i(null), L = i(/* @__PURE__ */ new Map()), [R, z] = a(null), B = e(() => {
293
+ let e = I.current, t = F === void 0 ? void 0 : L.current.get(F);
294
+ if (!e || !t) {
295
+ z(null);
296
+ return;
297
+ }
298
+ z({
299
+ x: t.offsetLeft,
300
+ width: t.offsetWidth
301
+ });
302
+ }, [F]);
303
+ r(() => {
304
+ B();
305
+ }, [B, p]), r(() => {
306
+ let e = I.current;
307
+ if (!e || typeof ResizeObserver > "u") return;
308
+ let t = new ResizeObserver(() => B());
309
+ return t.observe(e), () => t.disconnect();
310
+ }, [B]);
311
+ function V(e) {
312
+ M || P(e), b?.(e);
313
+ }
314
+ let H = /* @__PURE__ */ f("div", {
315
+ ...E,
316
+ className: [
317
+ C.root,
318
+ C[x],
319
+ v && C.fullWidth,
320
+ c
321
+ ].filter(Boolean).join(" "),
322
+ "data-budget-board-color": l,
323
+ "data-budget-board-size": x,
324
+ "data-budget-board-variant": T,
325
+ ref: I,
326
+ role: "radiogroup",
327
+ style: {
328
+ ...h(g[k], l, T),
329
+ "--bbui-segmented-border": `var(--bb-color-border-subtle, ${g[k].borderSubtle})`,
330
+ "--bbui-segmented-neutral-content": `var(--bb-color-neutral-content, ${g[k].neutralContent})`,
331
+ "--bbui-segmented-track-bg": `var(--bb-color-surface, ${g[k].surface})`,
332
+ ...S
333
+ },
334
+ children: [/* @__PURE__ */ d("span", {
335
+ "aria-hidden": "true",
336
+ className: C.indicator,
337
+ style: {
338
+ opacity: +!!R,
339
+ transform: `translateX(${R?.x ?? 0}px)`,
340
+ width: R ? `${R.width}px` : 0
341
+ }
342
+ }), p.map((e) => {
343
+ let t = _ || e.disabled;
344
+ return /* @__PURE__ */ f("label", {
345
+ className: C.item,
346
+ "data-disabled": t ? "true" : void 0,
347
+ ref: (t) => {
348
+ t ? L.current.set(e.value, t) : L.current.delete(e.value);
349
+ },
350
+ children: [/* @__PURE__ */ d("input", {
351
+ checked: F === e.value,
352
+ className: C.input,
353
+ disabled: t,
354
+ name: j,
355
+ onChange: () => V(e.value),
356
+ type: "radio",
357
+ value: e.value
358
+ }), /* @__PURE__ */ f("span", {
359
+ className: C.content,
360
+ children: [e.leftSection && /* @__PURE__ */ d("span", {
361
+ className: C.section,
362
+ children: e.leftSection
363
+ }), e.label]
364
+ })]
365
+ }, e.value);
366
+ })]
367
+ });
368
+ return D ? H : /* @__PURE__ */ d(s, { children: H });
386
369
  }
387
370
  //#endregion
388
371
  //#region src/theme.ts
389
- var p = {
372
+ var T = {
390
373
  body: "\"IBM Plex Sans\", sans-serif",
391
374
  data: "\"IBM Plex Sans\", sans-serif",
392
375
  display: "\"Plus Jakarta Sans\", sans-serif"
393
376
  };
394
- function m(t) {
395
- return e({
396
- fontFamily: p.body,
397
- headings: { fontFamily: p.display },
377
+ function E(e) {
378
+ return l({
379
+ fontFamily: T.body,
380
+ headings: { fontFamily: T.display },
398
381
  defaultRadius: "sm",
399
- other: { colors: t }
382
+ other: { colors: e }
400
383
  });
401
384
  }
402
- var h = m(r.light), g = m(r.dark);
385
+ var D = E(g.light), O = E(g.dark);
403
386
  //#endregion
404
- export { f as Button, r as budgetBoardColors, g as budgetBoardDarkTheme, h as budgetBoardTheme, p as budgetBoardTypography, c as buttonColors, u as buttonSizes, l as buttonVariants };
387
+ export { y as ActionIcon, S as Button, w as SegmentedControl, v as actionIconSizes, g as budgetBoardColors, O as budgetBoardDarkTheme, D as budgetBoardTheme, T as budgetBoardTypography, p as buttonColors, p as segmentedControlColors, x as buttonSizes, x as segmentedControlSizes, m as buttonVariants, m as segmentedControlVariants };
@@ -0,0 +1,9 @@
1
+ import type { CSSProperties } from "react";
2
+ import type { BudgetBoardColorMode } from "../colors";
3
+ export declare const buttonColors: readonly ["primary", "secondary", "accent", "muted", "neutral", "contrast", "info", "success", "warning", "error"];
4
+ export type ButtonColor = (typeof buttonColors)[number];
5
+ export declare const buttonVariants: readonly ["filled", "outline", "ghost"];
6
+ export type ButtonVariant = (typeof buttonVariants)[number];
7
+ export type ButtonStyle = CSSProperties & Record<"--bbui-button-bg" | "--bbui-button-color" | "--bbui-button-hover" | "--bbui-button-active" | "--bbui-button-border" | "--bbui-button-hover-border" | "--bbui-button-focus", string>;
8
+ export declare function getButtonVariantStyles(colors: BudgetBoardColorMode, color: ButtonColor, variant: ButtonVariant): ButtonStyle;
9
+ //# sourceMappingURL=buttonStyles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"buttonStyles.d.ts","sourceRoot":"","sources":["../../src/shared/buttonStyles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EACV,oBAAoB,EAErB,MAAM,WAAW,CAAC;AAEnB,eAAO,MAAM,YAAY,YACvB,SAAS,EACT,WAAW,EACX,QAAQ,EACR,OAAO,EACP,SAAS,EACT,UAAU,EACV,MAAM,EACN,SAAS,EACT,SAAS,EACT,OAAO,CACC,CAAC;AACX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AAExD,eAAO,MAAM,cAAc,YAAI,QAAQ,EAAE,SAAS,EAAE,OAAO,CAAU,CAAC;AACtE,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5D,MAAM,MAAM,WAAW,GAAG,aAAa,GACrC,MAAM,CACF,kBAAkB,GAClB,qBAAqB,GACrB,qBAAqB,GACrB,sBAAsB,GACtB,sBAAsB,GACtB,4BAA4B,GAC5B,qBAAqB,EACvB,MAAM,CACP,CAAC;AAEJ,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,oBAAoB,EAC5B,KAAK,EAAE,WAAW,EAClB,OAAO,EAAE,aAAa,GACrB,WAAW,CAyCb"}
@@ -0,0 +1,2 @@
1
+ ._root_yy9gn_1{all:unset;appearance:none;background:var(--bbui-button-bg);border:1px solid var(--bbui-button-border);box-sizing:border-box;color:var(--bbui-button-color);cursor:pointer;font:inherit;height:var(--bbui-action-icon-size);min-height:var(--bbui-action-icon-size);min-width:var(--bbui-action-icon-size);text-align:center;width:var(--bbui-action-icon-size);border-radius:.25rem;justify-content:center;align-items:center;margin:0;padding:0;font-weight:600;line-height:1;text-decoration:none;transition:background-color .12s,border-color .25s,box-shadow .12s,color .12s,opacity .12s,transform .12s;display:inline-flex;position:relative}._root_yy9gn_1._selected_yy9gn_34:not(:disabled):not([data-budget-board-variant=filled]){background:var(--bbui-button-active)}._root_yy9gn_1[data-budget-board-selected=false][data-budget-board-variant=filled]:not(:disabled){background:color-mix(in srgb, var(--bbui-button-bg) 10%, transparent);border-color:var(--bbui-button-bg);color:var(--bbui-button-bg)}._root_yy9gn_1:hover:not(:disabled){background:var(--bbui-button-hover);border-color:var(--bbui-button-hover-border)}._root_yy9gn_1[data-budget-board-selected=false][data-budget-board-variant=filled]:hover:not(:disabled){background:color-mix(in srgb, var(--bbui-button-bg) 18%, transparent);border-color:var(--bbui-button-hover-border)}._root_yy9gn_1:active:not(:disabled){background:var(--bbui-button-active);transform:translateY(1px)}._root_yy9gn_1:focus{outline:none}._root_yy9gn_1:focus-visible{outline:2px solid var(--bbui-button-focus);outline-offset:2px}._root_yy9gn_1:disabled{cursor:not-allowed;opacity:.55}._compact-xs_yy9gn_77{--bbui-action-icon-size:calc(1.5rem * var(--mantine-scale))}._compact-sm_yy9gn_81{--bbui-action-icon-size:calc(1.75rem * var(--mantine-scale))}._compact-md_yy9gn_85{--bbui-action-icon-size:calc(2rem * var(--mantine-scale))}._compact-lg_yy9gn_89{--bbui-action-icon-size:calc(2.5rem * var(--mantine-scale))}._compact-xl_yy9gn_93{--bbui-action-icon-size:calc(3rem * var(--mantine-scale))}._xs_yy9gn_97{--bbui-action-icon-size:calc(1.75rem * var(--mantine-scale))}._sm_yy9gn_101{--bbui-action-icon-size:calc(2rem * var(--mantine-scale))}._md_yy9gn_105{--bbui-action-icon-size:calc(2.5rem * var(--mantine-scale))}._lg_yy9gn_109{--bbui-action-icon-size:calc(3rem * var(--mantine-scale))}._xl_yy9gn_113{--bbui-action-icon-size:calc(3.5rem * var(--mantine-scale))}._loading_yy9gn_117,._root_yy9gn_1._loading_yy9gn_117:disabled{cursor:progress}._icon_yy9gn_125{justify-content:center;align-items:center;transition:opacity .12s;display:inline-flex}._loading_yy9gn_117 ._icon_yy9gn_125{opacity:0}._loader_yy9gn_136{border:2px solid;border-right-color:#0000;border-radius:50%;width:55%;height:55%;animation:.7s linear infinite _action-icon-loader-spin_yy9gn_1;position:absolute}@keyframes _action-icon-loader-spin_yy9gn_1{to{transform:rotate(360deg)}}._root_6ksl8_1{all:unset;appearance:none;background:var(--bbui-button-bg);border:1px solid var(--bbui-button-border);box-sizing:border-box;color:var(--bbui-button-color);cursor:pointer;font:inherit;align-items:center;gap:var(--bbui-button-gap);height:var(--bbui-button-height);text-align:center;border-radius:.25rem;justify-content:center;margin:0;font-weight:600;line-height:1.2;text-decoration:none;transition:background-color .12s,border-color .25s,box-shadow .12s,color .12s,opacity .12s,transform .12s;display:inline-flex}._root_6ksl8_1._selected_6ksl8_30:not(:disabled):not([data-budget-board-variant=filled]){background:var(--bbui-button-active)}._root_6ksl8_1[data-budget-board-selected=false][data-budget-board-variant=filled]:not(:disabled){background:color-mix(in srgb, var(--bbui-button-bg) 10%, transparent);border-color:var(--bbui-button-bg);color:var(--bbui-button-bg)}._root_6ksl8_1:hover:not(:disabled){background:var(--bbui-button-hover);border-color:var(--bbui-button-hover-border)}._root_6ksl8_1[data-budget-board-selected=false][data-budget-board-variant=filled]:hover:not(:disabled){background:color-mix(in srgb, var(--bbui-button-bg) 18%, transparent);border-color:var(--bbui-button-hover-border)}._root_6ksl8_1:active:not(:disabled){background:var(--bbui-button-active);transform:translateY(1px)}._root_6ksl8_1:focus{outline:none}._root_6ksl8_1:focus-visible{outline:2px solid var(--bbui-button-focus);outline-offset:2px}._root_6ksl8_1:disabled{cursor:not-allowed;opacity:.55}._compact-xs_6ksl8_73{--bbui-button-gap:.25rem;--bbui-button-height:1.5rem;padding:.25rem .5rem;font-size:.75rem}._compact-sm_6ksl8_80{--bbui-button-gap:.375rem;--bbui-button-height:1.75rem;padding:.25rem .5rem;font-size:.875rem}._compact-md_6ksl8_87{--bbui-button-gap:.5rem;--bbui-button-height:2rem;padding:.25rem .5rem;font-size:1rem}._compact-lg_6ksl8_94{--bbui-button-gap:.5rem;--bbui-button-height:2.5rem;padding:.25rem .5rem;font-size:1.125rem}._compact-xl_6ksl8_101{--bbui-button-gap:.625rem;--bbui-button-height:3rem;padding:.25rem .5rem;font-size:1.25rem}._xs_6ksl8_108{--bbui-button-gap:.375rem;--bbui-button-height:1.75rem;padding:.5rem 1rem;font-size:.75rem}._sm_6ksl8_115{--bbui-button-gap:.5rem;--bbui-button-height:2rem;padding:.5rem 1rem;font-size:.875rem}._md_6ksl8_122{--bbui-button-gap:.5rem;--bbui-button-height:2.5rem;padding:.5rem 1rem;font-size:1rem}._lg_6ksl8_129{--bbui-button-gap:.625rem;--bbui-button-height:3rem;padding:.5rem 1rem;font-size:1.125rem}._xl_6ksl8_136{--bbui-button-gap:.75rem;--bbui-button-height:3.5rem;padding:.5rem 1rem;font-size:1.25rem}._fullWidth_6ksl8_143{width:100%}._section_6ksl8_147{align-items:center;display:inline-flex}._content_6ksl8_152{white-space:nowrap;align-items:center;display:inline-flex}._loading_6ksl8_158,._root_6ksl8_1._loading_6ksl8_158:disabled{cursor:progress}._loader_6ksl8_166{border:2px solid;border-right-color:#0000;border-radius:50%;width:.875rem;height:.875rem;animation:.7s linear infinite _button-loader-spin_6ksl8_1}._xs_6ksl8_108 ._loader_6ksl8_166{width:.75rem;height:.75rem}._md_6ksl8_122 ._loader_6ksl8_166{width:1rem;height:1rem}._lg_6ksl8_129 ._loader_6ksl8_166{width:1.125rem;height:1.125rem}._xl_6ksl8_136 ._loader_6ksl8_166{width:1.25rem;height:1.25rem}@keyframes _button-loader-spin_6ksl8_1{to{transform:rotate(360deg)}}._root_g0cx3_1{background:var(--bbui-segmented-track-bg);border:1px solid var(--bbui-segmented-border);box-sizing:border-box;border-radius:.375rem;align-items:stretch;gap:.125rem;padding:.1875rem;display:inline-flex;position:relative}._fullWidth_g0cx3_13{width:100%;display:flex}._fullWidth_g0cx3_13 ._item_g0cx3_18{flex:1}._indicator_g0cx3_22{background:var(--bbui-button-bg);border:1px solid var(--bbui-button-border);box-sizing:border-box;color:var(--bbui-button-color);border-radius:.25rem;transition:transform .2s,width .2s,opacity .12s;position:absolute;top:.1875rem;bottom:.1875rem;left:0;box-shadow:0 1px 2px #0000001f,0 1px 1px #0000000f}._item_g0cx3_18{cursor:pointer;z-index:1;border-radius:.25rem;justify-content:center;align-items:center;display:flex;position:relative}._item_g0cx3_18[data-disabled=true]{cursor:not-allowed;opacity:.55}._input_g0cx3_56{clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;width:1px;height:1px;margin:-1px;position:absolute;overflow:hidden}._section_g0cx3_67{align-items:center;display:inline-flex}._content_g0cx3_72{color:var(--bbui-segmented-neutral-content);white-space:nowrap;align-items:center;gap:.375rem;font-weight:600;transition:color .12s;display:inline-flex}._input_g0cx3_56:checked+._content_g0cx3_72{color:var(--bbui-button-color)}._input_g0cx3_56:focus-visible+._content_g0cx3_72{outline:2px solid var(--bbui-button-focus);outline-offset:2px}._compact-xs_g0cx3_91{--bbui-button-gap:.25rem;font-size:.75rem}._compact-xs_g0cx3_91 ._item_g0cx3_18{height:1.5rem;padding:.25rem .5rem}._compact-sm_g0cx3_101{font-size:.875rem}._compact-sm_g0cx3_101 ._item_g0cx3_18{height:1.75rem;padding:.25rem .5rem}._compact-md_g0cx3_110{font-size:1rem}._compact-md_g0cx3_110 ._item_g0cx3_18{height:2rem;padding:.25rem .5rem}._compact-lg_g0cx3_119{font-size:1.125rem}._compact-lg_g0cx3_119 ._item_g0cx3_18{height:2.5rem;padding:.25rem .5rem}._compact-xl_g0cx3_128{font-size:1.25rem}._compact-xl_g0cx3_128 ._item_g0cx3_18{height:3rem;padding:.25rem .5rem}._xs_g0cx3_137{font-size:.75rem}._xs_g0cx3_137 ._item_g0cx3_18{height:1.75rem;padding:.5rem 1rem}._sm_g0cx3_146{font-size:.875rem}._sm_g0cx3_146 ._item_g0cx3_18{height:2rem;padding:.5rem 1rem}._md_g0cx3_155{font-size:1rem}._md_g0cx3_155 ._item_g0cx3_18{height:2.5rem;padding:.5rem 1rem}._lg_g0cx3_164{font-size:1.125rem}._lg_g0cx3_164 ._item_g0cx3_18{height:3rem;padding:.5rem 1rem}._xl_g0cx3_173{font-size:1.25rem}._xl_g0cx3_173 ._item_g0cx3_18{height:3.5rem;padding:.5rem 1rem}
2
+ /*$vite$:1*/
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teelur/budget-board-ui",
3
- "version": "0.1.0",
3
+ "version": "0.2.0-canary.24.fb04e43",
4
4
  "packageManager": "yarn@4.18.0",
5
5
  "description": "UI components for the Budget Board app built on Mantine headless primitives",
6
6
  "main": "./dist/index.js",
@@ -27,14 +27,15 @@
27
27
  ".": {
28
28
  "import": "./dist/index.js",
29
29
  "types": "./dist/index.d.ts"
30
+ },
31
+ "./styles.css": {
32
+ "default": "./dist/styles.css"
30
33
  }
31
34
  },
32
35
  "files": [
33
36
  "dist"
34
37
  ],
35
- "publishConfig": {
36
- "registry": "https://registry.npmjs.org"
37
- },
38
+ "publishConfig": {},
38
39
  "peerDependencies": {
39
40
  "@mantine/core": "^9.6.1",
40
41
  "@mantine/hooks": "^9.6.1",
@@ -48,6 +49,7 @@
48
49
  "@testing-library/jest-dom": "^7.0.1",
49
50
  "@testing-library/react": "^16.3.3",
50
51
  "@testing-library/user-event": "^14.6.7",
52
+ "@types/node": "^26.6.2",
51
53
  "@types/react": "^19.3.0",
52
54
  "@types/react-dom": "^19.3.0",
53
55
  "@vitejs/plugin-react": "^6.1.1",
package/dist/index.css DELETED
@@ -1,2 +0,0 @@
1
- ._root_xr7w1_1{background:var(--button-bg);border:1px solid var(--button-border);box-sizing:border-box;color:var(--button-color);cursor:pointer;font:inherit;align-items:center;gap:var(--button-gap);border-radius:.25rem;justify-content:center;font-weight:600;line-height:1.2;transition:background-color .12s,border-color .12s,color .12s,opacity .12s,transform .12s;display:inline-flex}._root_xr7w1_1._selected_xr7w1_23:not(:disabled){background:var(--button-active)}._root_xr7w1_1._selected_xr7w1_23[data-budget-board-variant=filled]:not(:disabled){background:var(--button-color);border-color:var(--button-color);color:var(--button-bg)}._root_xr7w1_1:hover:not(:disabled){background:var(--button-hover);border-color:var(--button-hover-border)}._root_xr7w1_1._selected_xr7w1_23[data-budget-board-variant=filled]:hover:not(:disabled){background:color-mix(in srgb, var(--button-color) 84%, var(--button-bg));border-color:var(--button-color)}._root_xr7w1_1:active:not(:disabled){background:var(--button-active);transform:translateY(1px)}._root_xr7w1_1:focus-visible{outline:2px solid var(--button-focus);outline-offset:2px}._root_xr7w1_1:disabled{cursor:not-allowed;opacity:.55}._compact-xs_xr7w1_58{--button-gap:.25rem;min-height:1.5rem;padding:.25rem .5rem;font-size:.75rem}._compact-sm_xr7w1_65{--button-gap:.375rem;min-height:1.75rem;padding:.25rem .5rem;font-size:.875rem}._compact-md_xr7w1_72{--button-gap:.5rem;min-height:2rem;padding:.25rem .5rem;font-size:1rem}._compact-lg_xr7w1_79{--button-gap:.5rem;min-height:2.5rem;padding:.25rem .5rem;font-size:1.125rem}._compact-xl_xr7w1_86{--button-gap:.625rem;min-height:3rem;padding:.25rem .5rem;font-size:1.25rem}._xs_xr7w1_93{--button-gap:.375rem;min-height:1.75rem;padding:.5rem 1rem;font-size:.75rem}._sm_xr7w1_100{--button-gap:.5rem;min-height:2rem;padding:.5rem 1rem;font-size:.875rem}._md_xr7w1_107{--button-gap:.5rem;min-height:2.5rem;padding:.5rem 1rem;font-size:1rem}._lg_xr7w1_114{--button-gap:.625rem;min-height:3rem;padding:.5rem 1rem;font-size:1.125rem}._xl_xr7w1_121{--button-gap:.75rem;min-height:3.5rem;padding:.5rem 1rem;font-size:1.25rem}._fullWidth_xr7w1_128{width:100%}._section_xr7w1_132,._content_xr7w1_137{align-items:center;display:inline-flex}._loading_xr7w1_142,._root_xr7w1_1._loading_xr7w1_142:disabled{cursor:progress}._loader_xr7w1_150{border:2px solid;border-right-color:#0000;border-radius:50%;width:.875rem;height:.875rem;animation:.7s linear infinite _button-loader-spin_xr7w1_1}._xs_xr7w1_93 ._loader_xr7w1_150{width:.75rem;height:.75rem}._md_xr7w1_107 ._loader_xr7w1_150{width:1rem;height:1rem}._lg_xr7w1_114 ._loader_xr7w1_150{width:1.125rem;height:1.125rem}._xl_xr7w1_121 ._loader_xr7w1_150{width:1.25rem;height:1.25rem}@keyframes _button-loader-spin_xr7w1_1{to{transform:rotate(360deg)}}
2
- /*$vite$:1*/