jaci-ui 0.2.0 → 0.3.0

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 (68) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +47 -0
  3. package/dist/components/button-group/button-group.cjs +22 -0
  4. package/dist/components/button-group/button-group.cjs.map +1 -0
  5. package/dist/components/button-group/button-group.d.cts +12 -0
  6. package/dist/components/button-group/button-group.d.ts +12 -0
  7. package/dist/components/button-group/button-group.js +21 -0
  8. package/dist/components/button-group/button-group.js.map +1 -0
  9. package/dist/components/button-group/index.d.cts +2 -0
  10. package/dist/components/button-group/index.d.ts +2 -0
  11. package/dist/components/empty-state/empty-state.cjs +62 -0
  12. package/dist/components/empty-state/empty-state.cjs.map +1 -0
  13. package/dist/components/empty-state/empty-state.d.cts +18 -0
  14. package/dist/components/empty-state/empty-state.d.ts +18 -0
  15. package/dist/components/empty-state/empty-state.js +57 -0
  16. package/dist/components/empty-state/empty-state.js.map +1 -0
  17. package/dist/components/empty-state/index.d.cts +2 -0
  18. package/dist/components/empty-state/index.d.ts +2 -0
  19. package/dist/components/icon-button/icon-button.cjs +40 -0
  20. package/dist/components/icon-button/icon-button.cjs.map +1 -0
  21. package/dist/components/icon-button/icon-button.d.cts +12 -0
  22. package/dist/components/icon-button/icon-button.d.ts +12 -0
  23. package/dist/components/icon-button/icon-button.js +40 -0
  24. package/dist/components/icon-button/icon-button.js.map +1 -0
  25. package/dist/components/icon-button/index.d.cts +2 -0
  26. package/dist/components/icon-button/index.d.ts +2 -0
  27. package/dist/components/input-group/index.d.cts +2 -0
  28. package/dist/components/input-group/index.d.ts +2 -0
  29. package/dist/components/input-group/input-group.cjs +32 -0
  30. package/dist/components/input-group/input-group.cjs.map +1 -0
  31. package/dist/components/input-group/input-group.d.cts +15 -0
  32. package/dist/components/input-group/input-group.d.ts +15 -0
  33. package/dist/components/input-group/input-group.js +30 -0
  34. package/dist/components/input-group/input-group.js.map +1 -0
  35. package/dist/index.cjs +19 -0
  36. package/dist/index.d.cts +11 -1
  37. package/dist/index.d.ts +11 -1
  38. package/dist/index.js +6 -1
  39. package/dist/styled-system/recipes/button-group.cjs +30 -0
  40. package/dist/styled-system/recipes/button-group.cjs.map +1 -0
  41. package/dist/styled-system/recipes/button-group.js +30 -0
  42. package/dist/styled-system/recipes/button-group.js.map +1 -0
  43. package/dist/styled-system/recipes/empty-state.cjs +36 -0
  44. package/dist/styled-system/recipes/empty-state.cjs.map +1 -0
  45. package/dist/styled-system/recipes/empty-state.js +36 -0
  46. package/dist/styled-system/recipes/empty-state.js.map +1 -0
  47. package/dist/styled-system/recipes/icon-button.cjs +40 -0
  48. package/dist/styled-system/recipes/icon-button.cjs.map +1 -0
  49. package/dist/styled-system/recipes/icon-button.js +40 -0
  50. package/dist/styled-system/recipes/icon-button.js.map +1 -0
  51. package/dist/styled-system/recipes/input-group.cjs +30 -0
  52. package/dist/styled-system/recipes/input-group.cjs.map +1 -0
  53. package/dist/styled-system/recipes/input-group.js +30 -0
  54. package/dist/styled-system/recipes/input-group.js.map +1 -0
  55. package/dist/styles/theme.cjs +15 -0
  56. package/dist/styles/theme.cjs.map +1 -1
  57. package/dist/styles/theme.js +15 -0
  58. package/dist/styles/theme.js.map +1 -1
  59. package/dist/styles.css +192 -1
  60. package/dist/theme/index.d.cts +2 -0
  61. package/dist/theme/index.d.ts +2 -0
  62. package/dist/theme/theme-provider.cjs +86 -0
  63. package/dist/theme/theme-provider.cjs.map +1 -0
  64. package/dist/theme/theme-provider.d.cts +66 -0
  65. package/dist/theme/theme-provider.d.ts +66 -0
  66. package/dist/theme/theme-provider.js +85 -0
  67. package/dist/theme/theme-provider.js.map +1 -0
  68. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 60fe9f1: Add the optional ThemeProvider and reusable IconButton, ButtonGroup, InputGroup, and EmptyState components.
8
+
3
9
  ## 0.2.0
4
10
 
5
11
  ### Minor Changes
package/README.md CHANGED
@@ -87,6 +87,20 @@ DatePicker supports day, month and date-time values while keeping the public val
87
87
  Use `granularity="month"` to select a month normalized to its first day. Date-time popups stay
88
88
  open until `DatePicker.Close` is activated; day and month modes close after selection by default.
89
89
 
90
+ Small composition helpers keep common layouts consistent:
91
+
92
+ ```tsx
93
+ import { Button, ButtonGroup, EmptyState, IconButton, Input, InputGroup } from "jaci-ui";
94
+
95
+ <IconButton aria-label="Close">×</IconButton>;
96
+ <ButtonGroup><Button>Save</Button><Button>Cancel</Button></ButtonGroup>;
97
+ <InputGroup><InputGroup.Addon>https://</InputGroup.Addon><Input aria-label="URL" /></InputGroup>;
98
+ <EmptyState.Root><EmptyState.Title>No results</EmptyState.Title></EmptyState.Root>;
99
+ ```
100
+
101
+ `IconButton` requires an accessible label for icon-only content. `ButtonGroup` and `InputGroup`
102
+ also expose `.Root` aliases for compound composition.
103
+
90
104
  ## Server rendering and frameworks
91
105
 
92
106
  Static components are server-safe and interactive modules preserve their `"use client"` boundary.
@@ -128,6 +142,39 @@ the public CSS variables without a provider:
128
142
  }
129
143
  ```
130
144
 
145
+ For applications that prefer a React API, `ThemeProvider` is optional. It can control the mode
146
+ and apply token overrides to only its subtree:
147
+
148
+ ```tsx
149
+ import { ThemeProvider, useTheme } from "jaci-ui";
150
+
151
+ function ThemeToggle() {
152
+ const { resolvedTheme, setTheme } = useTheme();
153
+ return <button onClick={() => setTheme(resolvedTheme === "dark" ? "light" : "dark")}>Toggle</button>;
154
+ }
155
+
156
+ export function App() {
157
+ return (
158
+ <ThemeProvider
159
+ defaultTheme="system"
160
+ ssrTheme="light"
161
+ tokens={{
162
+ colors: {
163
+ accent: { default: "#7c3aed", hover: "#6d28d9" },
164
+ fg: { onAccent: "#ffffff" },
165
+ },
166
+ }}
167
+ >
168
+ <ThemeToggle />
169
+ </ThemeProvider>
170
+ );
171
+ }
172
+ ```
173
+
174
+ `system` uses `ssrTheme` during server rendering and reads `prefers-color-scheme` only after
175
+ mounting. The provider is a client module, so Next.js App Router applications should place it
176
+ inside a client boundary. Direct `data-jaci-theme` and `--jaci-*` variables remain supported.
177
+
131
178
  The package exposes semantic surface, foreground, border, status, spacing, radius, shadow and
132
179
  transition tokens. See the Theming guide in Storybook for the complete token vocabulary.
133
180
 
@@ -0,0 +1,22 @@
1
+ const require_cx = require("../../styled-system/css/cx.cjs");
2
+ const require_button_group = require("../../styled-system/recipes/button-group.cjs");
3
+ let react = require("react");
4
+ let react_jsx_runtime = require("react/jsx-runtime");
5
+ //#region src/components/button-group/button-group.tsx
6
+ const ButtonGroupRoot = (0, react.forwardRef)(function ButtonGroup({ className, orientation = "horizontal", ...props }, ref) {
7
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
8
+ ...props,
9
+ ref,
10
+ className: require_cx.cx(require_button_group.buttonGroup({ orientation }).root, className),
11
+ "data-jaci-component": "button-group",
12
+ "data-orientation": orientation,
13
+ "data-slot": "button-group",
14
+ role: props.role ?? "group"
15
+ });
16
+ });
17
+ const ButtonGroup = Object.assign(ButtonGroupRoot, { Root: ButtonGroupRoot });
18
+ //#endregion
19
+ exports.ButtonGroup = ButtonGroup;
20
+ exports.ButtonGroupRoot = ButtonGroupRoot;
21
+
22
+ //# sourceMappingURL=button-group.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button-group.cjs","names":["cx","buttonGroup"],"sources":["../../../src/components/button-group/button-group.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport type { ComponentPropsWithoutRef } from \"react\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { buttonGroup } from \"../../styled-system/recipes\";\n\nexport interface ButtonGroupProps extends ComponentPropsWithoutRef<\"div\"> {\n orientation?: \"horizontal\" | \"vertical\";\n}\n\nexport const ButtonGroupRoot = forwardRef<HTMLDivElement, ButtonGroupProps>(function ButtonGroup(\n { className, orientation = \"horizontal\", ...props },\n ref,\n) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(buttonGroup({ orientation }).root, className)}\n data-jaci-component=\"button-group\"\n data-orientation={orientation}\n data-slot=\"button-group\"\n role={props.role ?? \"group\"}\n />\n );\n});\n\nexport const ButtonGroup = Object.assign(ButtonGroupRoot, { Root: ButtonGroupRoot });\n"],"mappings":";;;;;AAUA,MAAa,mBAAA,GAAA,MAAA,WAAA,CAA+D,SAAS,YACnF,EAAE,WAAW,cAAc,cAAc,GAAG,SAC5C,KACA;CACA,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EACE,GAAI;EACC;EACL,WAAWA,WAAAA,GAAGC,qBAAAA,YAAY,EAAE,YAAY,CAAC,CAAC,CAAC,MAAM,SAAS;EAC1D,uBAAoB;EACpB,oBAAkB;EAClB,aAAU;EACV,MAAM,MAAM,QAAQ;CACrB,CAAA;AAEL,CAAC;AAED,MAAa,cAAc,OAAO,OAAO,iBAAiB,EAAE,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { ComponentPropsWithoutRef } from "react";
2
+ //#region src/components/button-group/button-group.d.ts
3
+ interface ButtonGroupProps extends ComponentPropsWithoutRef<"div"> {
4
+ orientation?: "horizontal" | "vertical";
5
+ }
6
+ declare const ButtonGroupRoot: import("react").ForwardRefExoticComponent<ButtonGroupProps & import("react").RefAttributes<HTMLDivElement>>;
7
+ declare const ButtonGroup: import("react").ForwardRefExoticComponent<ButtonGroupProps & import("react").RefAttributes<HTMLDivElement>> & {
8
+ Root: import("react").ForwardRefExoticComponent<ButtonGroupProps & import("react").RefAttributes<HTMLDivElement>>;
9
+ };
10
+ //#endregion
11
+ export { ButtonGroup, ButtonGroupProps, ButtonGroupRoot };
12
+ //# sourceMappingURL=button-group.d.cts.map
@@ -0,0 +1,12 @@
1
+ import { ComponentPropsWithoutRef } from "react";
2
+ //#region src/components/button-group/button-group.d.ts
3
+ interface ButtonGroupProps extends ComponentPropsWithoutRef<"div"> {
4
+ orientation?: "horizontal" | "vertical";
5
+ }
6
+ declare const ButtonGroupRoot: import("react").ForwardRefExoticComponent<ButtonGroupProps & import("react").RefAttributes<HTMLDivElement>>;
7
+ declare const ButtonGroup: import("react").ForwardRefExoticComponent<ButtonGroupProps & import("react").RefAttributes<HTMLDivElement>> & {
8
+ Root: import("react").ForwardRefExoticComponent<ButtonGroupProps & import("react").RefAttributes<HTMLDivElement>>;
9
+ };
10
+ //#endregion
11
+ export { ButtonGroup, ButtonGroupProps, ButtonGroupRoot };
12
+ //# sourceMappingURL=button-group.d.ts.map
@@ -0,0 +1,21 @@
1
+ import { cx } from "../../styled-system/css/cx.js";
2
+ import { buttonGroup } from "../../styled-system/recipes/button-group.js";
3
+ import { forwardRef } from "react";
4
+ import { jsx } from "react/jsx-runtime";
5
+ //#region src/components/button-group/button-group.tsx
6
+ const ButtonGroupRoot = forwardRef(function ButtonGroup({ className, orientation = "horizontal", ...props }, ref) {
7
+ return /* @__PURE__ */ jsx("div", {
8
+ ...props,
9
+ ref,
10
+ className: cx(buttonGroup({ orientation }).root, className),
11
+ "data-jaci-component": "button-group",
12
+ "data-orientation": orientation,
13
+ "data-slot": "button-group",
14
+ role: props.role ?? "group"
15
+ });
16
+ });
17
+ const ButtonGroup = Object.assign(ButtonGroupRoot, { Root: ButtonGroupRoot });
18
+ //#endregion
19
+ export { ButtonGroup, ButtonGroupRoot };
20
+
21
+ //# sourceMappingURL=button-group.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button-group.js","names":[],"sources":["../../../src/components/button-group/button-group.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport type { ComponentPropsWithoutRef } from \"react\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { buttonGroup } from \"../../styled-system/recipes\";\n\nexport interface ButtonGroupProps extends ComponentPropsWithoutRef<\"div\"> {\n orientation?: \"horizontal\" | \"vertical\";\n}\n\nexport const ButtonGroupRoot = forwardRef<HTMLDivElement, ButtonGroupProps>(function ButtonGroup(\n { className, orientation = \"horizontal\", ...props },\n ref,\n) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(buttonGroup({ orientation }).root, className)}\n data-jaci-component=\"button-group\"\n data-orientation={orientation}\n data-slot=\"button-group\"\n role={props.role ?? \"group\"}\n />\n );\n});\n\nexport const ButtonGroup = Object.assign(ButtonGroupRoot, { Root: ButtonGroupRoot });\n"],"mappings":";;;;;AAUA,MAAa,kBAAkB,WAA6C,SAAS,YACnF,EAAE,WAAW,cAAc,cAAc,GAAG,SAC5C,KACA;CACA,OACE,oBAAC,OAAD;EACE,GAAI;EACC;EACL,WAAW,GAAG,YAAY,EAAE,YAAY,CAAC,CAAC,CAAC,MAAM,SAAS;EAC1D,uBAAoB;EACpB,oBAAkB;EAClB,aAAU;EACV,MAAM,MAAM,QAAQ;CACrB,CAAA;AAEL,CAAC;AAED,MAAa,cAAc,OAAO,OAAO,iBAAiB,EAAE,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { ButtonGroup, ButtonGroupProps, ButtonGroupRoot } from "./button-group.cjs";
2
+ export { ButtonGroup, type ButtonGroupProps, ButtonGroupRoot };
@@ -0,0 +1,2 @@
1
+ import { ButtonGroup, ButtonGroupProps, ButtonGroupRoot } from "./button-group.js";
2
+ export { ButtonGroup, type ButtonGroupProps, ButtonGroupRoot };
@@ -0,0 +1,62 @@
1
+ const require_cx = require("../../styled-system/css/cx.cjs");
2
+ const require_empty_state = require("../../styled-system/recipes/empty-state.cjs");
3
+ let react = require("react");
4
+ let react_jsx_runtime = require("react/jsx-runtime");
5
+ //#region src/components/empty-state/empty-state.tsx
6
+ const EmptyStateRoot = (0, react.forwardRef)(function EmptyStateRoot({ className, ...props }, ref) {
7
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("section", {
8
+ ...props,
9
+ ref,
10
+ className: require_cx.cx(require_empty_state.emptyState().root, className),
11
+ "data-jaci-component": "empty-state",
12
+ "data-slot": "empty-state"
13
+ });
14
+ });
15
+ const EmptyStateIcon = (0, react.forwardRef)(function EmptyStateIcon({ className, ...props }, ref) {
16
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
17
+ ...props,
18
+ ref,
19
+ className: require_cx.cx(require_empty_state.emptyState().icon, className),
20
+ "data-slot": "empty-state-icon"
21
+ });
22
+ });
23
+ const EmptyStateTitle = (0, react.forwardRef)(function EmptyStateTitle({ className, ...props }, ref) {
24
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", {
25
+ ...props,
26
+ ref,
27
+ className: require_cx.cx(require_empty_state.emptyState().title, className),
28
+ "data-slot": "empty-state-title"
29
+ });
30
+ });
31
+ const EmptyStateDescription = (0, react.forwardRef)(function EmptyStateDescription({ className, ...props }, ref) {
32
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
33
+ ...props,
34
+ ref,
35
+ className: require_cx.cx(require_empty_state.emptyState().description, className),
36
+ "data-slot": "empty-state-description"
37
+ });
38
+ });
39
+ const EmptyStateAction = (0, react.forwardRef)(function EmptyStateAction({ className, ...props }, ref) {
40
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
41
+ ...props,
42
+ ref,
43
+ className: require_cx.cx(require_empty_state.emptyState().action, className),
44
+ "data-slot": "empty-state-action"
45
+ });
46
+ });
47
+ const EmptyState = Object.assign(EmptyStateRoot, {
48
+ Root: EmptyStateRoot,
49
+ Icon: EmptyStateIcon,
50
+ Title: EmptyStateTitle,
51
+ Description: EmptyStateDescription,
52
+ Action: EmptyStateAction
53
+ });
54
+ //#endregion
55
+ exports.EmptyState = EmptyState;
56
+ exports.EmptyStateAction = EmptyStateAction;
57
+ exports.EmptyStateDescription = EmptyStateDescription;
58
+ exports.EmptyStateIcon = EmptyStateIcon;
59
+ exports.EmptyStateRoot = EmptyStateRoot;
60
+ exports.EmptyStateTitle = EmptyStateTitle;
61
+
62
+ //# sourceMappingURL=empty-state.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"empty-state.cjs","names":["cx","emptyState"],"sources":["../../../src/components/empty-state/empty-state.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport type { ComponentPropsWithoutRef } from \"react\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { emptyState } from \"../../styled-system/recipes\";\n\nexport type EmptyStateRootProps = ComponentPropsWithoutRef<\"section\">;\n\nexport const EmptyStateRoot = forwardRef<HTMLElement, EmptyStateRootProps>(function EmptyStateRoot(\n { className, ...props },\n ref,\n) {\n return (\n <section\n {...props}\n ref={ref}\n className={cx(emptyState().root, className)}\n data-jaci-component=\"empty-state\"\n data-slot=\"empty-state\"\n />\n );\n});\n\nexport const EmptyStateIcon = forwardRef<HTMLDivElement, ComponentPropsWithoutRef<\"div\">>(\n function EmptyStateIcon({ className, ...props }, ref) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(emptyState().icon, className)}\n data-slot=\"empty-state-icon\"\n />\n );\n },\n);\n\nexport const EmptyStateTitle = forwardRef<HTMLHeadingElement, ComponentPropsWithoutRef<\"h3\">>(\n function EmptyStateTitle({ className, ...props }, ref) {\n return (\n <h3\n {...props}\n ref={ref}\n className={cx(emptyState().title, className)}\n data-slot=\"empty-state-title\"\n />\n );\n },\n);\n\nexport const EmptyStateDescription = forwardRef<\n HTMLParagraphElement,\n ComponentPropsWithoutRef<\"p\">\n>(function EmptyStateDescription({ className, ...props }, ref) {\n return (\n <p\n {...props}\n ref={ref}\n className={cx(emptyState().description, className)}\n data-slot=\"empty-state-description\"\n />\n );\n});\n\nexport const EmptyStateAction = forwardRef<HTMLDivElement, ComponentPropsWithoutRef<\"div\">>(\n function EmptyStateAction({ className, ...props }, ref) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(emptyState().action, className)}\n data-slot=\"empty-state-action\"\n />\n );\n },\n);\n\nexport const EmptyState = Object.assign(EmptyStateRoot, {\n Root: EmptyStateRoot,\n Icon: EmptyStateIcon,\n Title: EmptyStateTitle,\n Description: EmptyStateDescription,\n Action: EmptyStateAction,\n});\n"],"mappings":";;;;;AAQA,MAAa,kBAAA,GAAA,MAAA,WAAA,CAA8D,SAAS,eAClF,EAAE,WAAW,GAAG,SAChB,KACA;CACA,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,WAAD;EACE,GAAI;EACC;EACL,WAAWA,WAAAA,GAAGC,oBAAAA,WAAW,CAAC,CAAC,MAAM,SAAS;EAC1C,uBAAoB;EACpB,aAAU;CACX,CAAA;AAEL,CAAC;AAED,MAAa,kBAAA,GAAA,MAAA,WAAA,CACX,SAAS,eAAe,EAAE,WAAW,GAAG,SAAS,KAAK;CACpD,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EACE,GAAI;EACC;EACL,WAAWD,WAAAA,GAAGC,oBAAAA,WAAW,CAAC,CAAC,MAAM,SAAS;EAC1C,aAAU;CACX,CAAA;AAEL,CACF;AAEA,MAAa,mBAAA,GAAA,MAAA,WAAA,CACX,SAAS,gBAAgB,EAAE,WAAW,GAAG,SAAS,KAAK;CACrD,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,MAAD;EACE,GAAI;EACC;EACL,WAAWD,WAAAA,GAAGC,oBAAAA,WAAW,CAAC,CAAC,OAAO,SAAS;EAC3C,aAAU;CACX,CAAA;AAEL,CACF;AAEA,MAAa,yBAAA,GAAA,MAAA,WAAA,CAGX,SAAS,sBAAsB,EAAE,WAAW,GAAG,SAAS,KAAK;CAC7D,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,KAAD;EACE,GAAI;EACC;EACL,WAAWD,WAAAA,GAAGC,oBAAAA,WAAW,CAAC,CAAC,aAAa,SAAS;EACjD,aAAU;CACX,CAAA;AAEL,CAAC;AAED,MAAa,oBAAA,GAAA,MAAA,WAAA,CACX,SAAS,iBAAiB,EAAE,WAAW,GAAG,SAAS,KAAK;CACtD,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EACE,GAAI;EACC;EACL,WAAWD,WAAAA,GAAGC,oBAAAA,WAAW,CAAC,CAAC,QAAQ,SAAS;EAC5C,aAAU;CACX,CAAA;AAEL,CACF;AAEA,MAAa,aAAa,OAAO,OAAO,gBAAgB;CACtD,MAAM;CACN,MAAM;CACN,OAAO;CACP,aAAa;CACb,QAAQ;AACV,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { ComponentPropsWithoutRef } from "react";
2
+ //#region src/components/empty-state/empty-state.d.ts
3
+ type EmptyStateRootProps = ComponentPropsWithoutRef<"section">;
4
+ declare const EmptyStateRoot: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & import("react").RefAttributes<HTMLElement>>;
5
+ declare const EmptyStateIcon: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
6
+ declare const EmptyStateTitle: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>;
7
+ declare const EmptyStateDescription: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & import("react").RefAttributes<HTMLParagraphElement>>;
8
+ declare const EmptyStateAction: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
9
+ declare const EmptyState: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & import("react").RefAttributes<HTMLElement>> & {
10
+ Root: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & import("react").RefAttributes<HTMLElement>>;
11
+ Icon: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
12
+ Title: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>;
13
+ Description: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & import("react").RefAttributes<HTMLParagraphElement>>;
14
+ Action: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
15
+ };
16
+ //#endregion
17
+ export { EmptyState, EmptyStateAction, EmptyStateDescription, EmptyStateIcon, EmptyStateRoot, EmptyStateRootProps, EmptyStateTitle };
18
+ //# sourceMappingURL=empty-state.d.cts.map
@@ -0,0 +1,18 @@
1
+ import { ComponentPropsWithoutRef } from "react";
2
+ //#region src/components/empty-state/empty-state.d.ts
3
+ type EmptyStateRootProps = ComponentPropsWithoutRef<"section">;
4
+ declare const EmptyStateRoot: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & import("react").RefAttributes<HTMLElement>>;
5
+ declare const EmptyStateIcon: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
6
+ declare const EmptyStateTitle: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>;
7
+ declare const EmptyStateDescription: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & import("react").RefAttributes<HTMLParagraphElement>>;
8
+ declare const EmptyStateAction: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
9
+ declare const EmptyState: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & import("react").RefAttributes<HTMLElement>> & {
10
+ Root: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & import("react").RefAttributes<HTMLElement>>;
11
+ Icon: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
12
+ Title: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>;
13
+ Description: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & import("react").RefAttributes<HTMLParagraphElement>>;
14
+ Action: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
15
+ };
16
+ //#endregion
17
+ export { EmptyState, EmptyStateAction, EmptyStateDescription, EmptyStateIcon, EmptyStateRoot, EmptyStateRootProps, EmptyStateTitle };
18
+ //# sourceMappingURL=empty-state.d.ts.map
@@ -0,0 +1,57 @@
1
+ import { cx } from "../../styled-system/css/cx.js";
2
+ import { emptyState } from "../../styled-system/recipes/empty-state.js";
3
+ import { forwardRef } from "react";
4
+ import { jsx } from "react/jsx-runtime";
5
+ //#region src/components/empty-state/empty-state.tsx
6
+ const EmptyStateRoot = forwardRef(function EmptyStateRoot({ className, ...props }, ref) {
7
+ return /* @__PURE__ */ jsx("section", {
8
+ ...props,
9
+ ref,
10
+ className: cx(emptyState().root, className),
11
+ "data-jaci-component": "empty-state",
12
+ "data-slot": "empty-state"
13
+ });
14
+ });
15
+ const EmptyStateIcon = forwardRef(function EmptyStateIcon({ className, ...props }, ref) {
16
+ return /* @__PURE__ */ jsx("div", {
17
+ ...props,
18
+ ref,
19
+ className: cx(emptyState().icon, className),
20
+ "data-slot": "empty-state-icon"
21
+ });
22
+ });
23
+ const EmptyStateTitle = forwardRef(function EmptyStateTitle({ className, ...props }, ref) {
24
+ return /* @__PURE__ */ jsx("h3", {
25
+ ...props,
26
+ ref,
27
+ className: cx(emptyState().title, className),
28
+ "data-slot": "empty-state-title"
29
+ });
30
+ });
31
+ const EmptyStateDescription = forwardRef(function EmptyStateDescription({ className, ...props }, ref) {
32
+ return /* @__PURE__ */ jsx("p", {
33
+ ...props,
34
+ ref,
35
+ className: cx(emptyState().description, className),
36
+ "data-slot": "empty-state-description"
37
+ });
38
+ });
39
+ const EmptyStateAction = forwardRef(function EmptyStateAction({ className, ...props }, ref) {
40
+ return /* @__PURE__ */ jsx("div", {
41
+ ...props,
42
+ ref,
43
+ className: cx(emptyState().action, className),
44
+ "data-slot": "empty-state-action"
45
+ });
46
+ });
47
+ const EmptyState = Object.assign(EmptyStateRoot, {
48
+ Root: EmptyStateRoot,
49
+ Icon: EmptyStateIcon,
50
+ Title: EmptyStateTitle,
51
+ Description: EmptyStateDescription,
52
+ Action: EmptyStateAction
53
+ });
54
+ //#endregion
55
+ export { EmptyState, EmptyStateAction, EmptyStateDescription, EmptyStateIcon, EmptyStateRoot, EmptyStateTitle };
56
+
57
+ //# sourceMappingURL=empty-state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"empty-state.js","names":[],"sources":["../../../src/components/empty-state/empty-state.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport type { ComponentPropsWithoutRef } from \"react\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { emptyState } from \"../../styled-system/recipes\";\n\nexport type EmptyStateRootProps = ComponentPropsWithoutRef<\"section\">;\n\nexport const EmptyStateRoot = forwardRef<HTMLElement, EmptyStateRootProps>(function EmptyStateRoot(\n { className, ...props },\n ref,\n) {\n return (\n <section\n {...props}\n ref={ref}\n className={cx(emptyState().root, className)}\n data-jaci-component=\"empty-state\"\n data-slot=\"empty-state\"\n />\n );\n});\n\nexport const EmptyStateIcon = forwardRef<HTMLDivElement, ComponentPropsWithoutRef<\"div\">>(\n function EmptyStateIcon({ className, ...props }, ref) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(emptyState().icon, className)}\n data-slot=\"empty-state-icon\"\n />\n );\n },\n);\n\nexport const EmptyStateTitle = forwardRef<HTMLHeadingElement, ComponentPropsWithoutRef<\"h3\">>(\n function EmptyStateTitle({ className, ...props }, ref) {\n return (\n <h3\n {...props}\n ref={ref}\n className={cx(emptyState().title, className)}\n data-slot=\"empty-state-title\"\n />\n );\n },\n);\n\nexport const EmptyStateDescription = forwardRef<\n HTMLParagraphElement,\n ComponentPropsWithoutRef<\"p\">\n>(function EmptyStateDescription({ className, ...props }, ref) {\n return (\n <p\n {...props}\n ref={ref}\n className={cx(emptyState().description, className)}\n data-slot=\"empty-state-description\"\n />\n );\n});\n\nexport const EmptyStateAction = forwardRef<HTMLDivElement, ComponentPropsWithoutRef<\"div\">>(\n function EmptyStateAction({ className, ...props }, ref) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(emptyState().action, className)}\n data-slot=\"empty-state-action\"\n />\n );\n },\n);\n\nexport const EmptyState = Object.assign(EmptyStateRoot, {\n Root: EmptyStateRoot,\n Icon: EmptyStateIcon,\n Title: EmptyStateTitle,\n Description: EmptyStateDescription,\n Action: EmptyStateAction,\n});\n"],"mappings":";;;;;AAQA,MAAa,iBAAiB,WAA6C,SAAS,eAClF,EAAE,WAAW,GAAG,SAChB,KACA;CACA,OACE,oBAAC,WAAD;EACE,GAAI;EACC;EACL,WAAW,GAAG,WAAW,CAAC,CAAC,MAAM,SAAS;EAC1C,uBAAoB;EACpB,aAAU;CACX,CAAA;AAEL,CAAC;AAED,MAAa,iBAAiB,WAC5B,SAAS,eAAe,EAAE,WAAW,GAAG,SAAS,KAAK;CACpD,OACE,oBAAC,OAAD;EACE,GAAI;EACC;EACL,WAAW,GAAG,WAAW,CAAC,CAAC,MAAM,SAAS;EAC1C,aAAU;CACX,CAAA;AAEL,CACF;AAEA,MAAa,kBAAkB,WAC7B,SAAS,gBAAgB,EAAE,WAAW,GAAG,SAAS,KAAK;CACrD,OACE,oBAAC,MAAD;EACE,GAAI;EACC;EACL,WAAW,GAAG,WAAW,CAAC,CAAC,OAAO,SAAS;EAC3C,aAAU;CACX,CAAA;AAEL,CACF;AAEA,MAAa,wBAAwB,WAGnC,SAAS,sBAAsB,EAAE,WAAW,GAAG,SAAS,KAAK;CAC7D,OACE,oBAAC,KAAD;EACE,GAAI;EACC;EACL,WAAW,GAAG,WAAW,CAAC,CAAC,aAAa,SAAS;EACjD,aAAU;CACX,CAAA;AAEL,CAAC;AAED,MAAa,mBAAmB,WAC9B,SAAS,iBAAiB,EAAE,WAAW,GAAG,SAAS,KAAK;CACtD,OACE,oBAAC,OAAD;EACE,GAAI;EACC;EACL,WAAW,GAAG,WAAW,CAAC,CAAC,QAAQ,SAAS;EAC5C,aAAU;CACX,CAAA;AAEL,CACF;AAEA,MAAa,aAAa,OAAO,OAAO,gBAAgB;CACtD,MAAM;CACN,MAAM;CACN,OAAO;CACP,aAAa;CACb,QAAQ;AACV,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { EmptyState, EmptyStateAction, EmptyStateDescription, EmptyStateIcon, EmptyStateRoot, EmptyStateRootProps, EmptyStateTitle } from "./empty-state.cjs";
2
+ export { EmptyState, EmptyStateAction, EmptyStateDescription, EmptyStateIcon, EmptyStateRoot, type EmptyStateRootProps, EmptyStateTitle };
@@ -0,0 +1,2 @@
1
+ import { EmptyState, EmptyStateAction, EmptyStateDescription, EmptyStateIcon, EmptyStateRoot, EmptyStateRootProps, EmptyStateTitle } from "./empty-state.js";
2
+ export { EmptyState, EmptyStateAction, EmptyStateDescription, EmptyStateIcon, EmptyStateRoot, type EmptyStateRootProps, EmptyStateTitle };
@@ -0,0 +1,40 @@
1
+ "use client";
2
+ const require_cx = require("../../styled-system/css/cx.cjs");
3
+ const require_icon_button = require("../../styled-system/recipes/icon-button.cjs");
4
+ const require_index = require("../layout/index.cjs");
5
+ let react = require("react");
6
+ let react_jsx_runtime = require("react/jsx-runtime");
7
+ //#region src/components/icon-button/icon-button.tsx
8
+ function hasTextualContent(children) {
9
+ if (typeof children === "string" || typeof children === "number") return String(children).trim().length > 0;
10
+ return react.Children.toArray(children).some((child) => {
11
+ if (!(0, react.isValidElement)(child)) return false;
12
+ return hasTextualContent(child.props.children);
13
+ });
14
+ }
15
+ const IconButton = (0, react.forwardRef)(function IconButton({ children, className, disabled, loading = false, size = "md", variant = "outline", ...props }, ref) {
16
+ if (!hasTextualContent(children) && !props["aria-label"] && !props["aria-labelledby"]) throw new Error("IconButton requires an aria-label when it has no textual content.");
17
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
18
+ ...props,
19
+ ref,
20
+ "aria-busy": loading || void 0,
21
+ className: require_cx.cx(require_icon_button.iconButton({
22
+ size,
23
+ variant
24
+ }), className),
25
+ "data-jaci-component": "icon-button",
26
+ "data-loading": loading || void 0,
27
+ "data-slot": "icon-button",
28
+ disabled: disabled || loading,
29
+ type: props.type ?? "button",
30
+ children: loading ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_index.Spinner, {
31
+ "aria-hidden": "true",
32
+ label: "",
33
+ size: "sm"
34
+ }) : children
35
+ });
36
+ });
37
+ //#endregion
38
+ exports.IconButton = IconButton;
39
+
40
+ //# sourceMappingURL=icon-button.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon-button.cjs","names":["Children","cx","iconButton","Spinner"],"sources":["../../../src/components/icon-button/icon-button.tsx"],"sourcesContent":["\"use client\";\n\nimport { Children, forwardRef, isValidElement } from \"react\";\nimport type { ComponentPropsWithoutRef, ReactNode } from \"react\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { iconButton } from \"../../styled-system/recipes\";\nimport { Spinner } from \"../layout\";\n\nexport interface IconButtonProps\n extends Omit<ComponentPropsWithoutRef<\"button\">, \"children\" | \"color\"> {\n children?: ReactNode;\n variant?: \"solid\" | \"outline\" | \"ghost\" | \"danger\";\n size?: \"sm\" | \"md\" | \"lg\";\n loading?: boolean;\n}\n\nfunction hasTextualContent(children: ReactNode): boolean {\n if (typeof children === \"string\" || typeof children === \"number\") {\n return String(children).trim().length > 0;\n }\n\n return Children.toArray(children).some((child) => {\n if (!isValidElement(child)) return false;\n return hasTextualContent((child.props as { children?: ReactNode }).children);\n });\n}\n\nexport const IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(function IconButton(\n { children, className, disabled, loading = false, size = \"md\", variant = \"outline\", ...props },\n ref,\n) {\n if (!hasTextualContent(children) && !props[\"aria-label\"] && !props[\"aria-labelledby\"]) {\n throw new Error(\"IconButton requires an aria-label when it has no textual content.\");\n }\n\n return (\n <button\n {...props}\n ref={ref}\n aria-busy={loading || undefined}\n className={cx(iconButton({ size, variant }), className)}\n data-jaci-component=\"icon-button\"\n data-loading={loading || undefined}\n data-slot=\"icon-button\"\n disabled={disabled || loading}\n type={props.type ?? \"button\"}\n >\n {loading ? <Spinner aria-hidden=\"true\" label=\"\" size=\"sm\" /> : children}\n </button>\n );\n});\n"],"mappings":";;;;;;;AAiBA,SAAS,kBAAkB,UAA8B;CACvD,IAAI,OAAO,aAAa,YAAY,OAAO,aAAa,UACtD,OAAO,OAAO,QAAQ,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS;CAG1C,OAAOA,MAAAA,SAAS,QAAQ,QAAQ,CAAC,CAAC,MAAM,UAAU;EAChD,IAAI,EAAA,GAAA,MAAA,eAAA,CAAgB,KAAK,GAAG,OAAO;EACnC,OAAO,kBAAmB,MAAM,MAAmC,QAAQ;CAC7E,CAAC;AACH;AAEA,MAAa,cAAA,GAAA,MAAA,WAAA,CAA4D,SAAS,WAChF,EAAE,UAAU,WAAW,UAAU,UAAU,OAAO,OAAO,MAAM,UAAU,WAAW,GAAG,SACvF,KACA;CACA,IAAI,CAAC,kBAAkB,QAAQ,KAAK,CAAC,MAAM,iBAAiB,CAAC,MAAM,oBACjE,MAAM,IAAI,MAAM,mEAAmE;CAGrF,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,UAAD;EACE,GAAI;EACC;EACL,aAAW,WAAW,KAAA;EACtB,WAAWC,WAAAA,GAAGC,oBAAAA,WAAW;GAAE;GAAM;EAAQ,CAAC,GAAG,SAAS;EACtD,uBAAoB;EACpB,gBAAc,WAAW,KAAA;EACzB,aAAU;EACV,UAAU,YAAY;EACtB,MAAM,MAAM,QAAQ;YAEnB,UAAU,iBAAA,GAAA,kBAAA,IAAA,CAACC,cAAAA,SAAD;GAAS,eAAY;GAAO,OAAM;GAAG,MAAK;EAAM,CAAA,IAAI;CACzD,CAAA;AAEZ,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { ComponentPropsWithoutRef, ReactNode } from "react";
2
+ //#region src/components/icon-button/icon-button.d.ts
3
+ interface IconButtonProps extends Omit<ComponentPropsWithoutRef<"button">, "children" | "color"> {
4
+ children?: ReactNode;
5
+ variant?: "solid" | "outline" | "ghost" | "danger";
6
+ size?: "sm" | "md" | "lg";
7
+ loading?: boolean;
8
+ }
9
+ declare const IconButton: import("react").ForwardRefExoticComponent<IconButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
10
+ //#endregion
11
+ export { IconButton, IconButtonProps };
12
+ //# sourceMappingURL=icon-button.d.cts.map
@@ -0,0 +1,12 @@
1
+ import { ComponentPropsWithoutRef, ReactNode } from "react";
2
+ //#region src/components/icon-button/icon-button.d.ts
3
+ interface IconButtonProps extends Omit<ComponentPropsWithoutRef<"button">, "children" | "color"> {
4
+ children?: ReactNode;
5
+ variant?: "solid" | "outline" | "ghost" | "danger";
6
+ size?: "sm" | "md" | "lg";
7
+ loading?: boolean;
8
+ }
9
+ declare const IconButton: import("react").ForwardRefExoticComponent<IconButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
10
+ //#endregion
11
+ export { IconButton, IconButtonProps };
12
+ //# sourceMappingURL=icon-button.d.ts.map
@@ -0,0 +1,40 @@
1
+ "use client";
2
+ import { cx } from "../../styled-system/css/cx.js";
3
+ import { iconButton } from "../../styled-system/recipes/icon-button.js";
4
+ import { Spinner } from "../layout/index.js";
5
+ import { Children, forwardRef, isValidElement } from "react";
6
+ import { jsx } from "react/jsx-runtime";
7
+ //#region src/components/icon-button/icon-button.tsx
8
+ function hasTextualContent(children) {
9
+ if (typeof children === "string" || typeof children === "number") return String(children).trim().length > 0;
10
+ return Children.toArray(children).some((child) => {
11
+ if (!isValidElement(child)) return false;
12
+ return hasTextualContent(child.props.children);
13
+ });
14
+ }
15
+ const IconButton = forwardRef(function IconButton({ children, className, disabled, loading = false, size = "md", variant = "outline", ...props }, ref) {
16
+ if (!hasTextualContent(children) && !props["aria-label"] && !props["aria-labelledby"]) throw new Error("IconButton requires an aria-label when it has no textual content.");
17
+ return /* @__PURE__ */ jsx("button", {
18
+ ...props,
19
+ ref,
20
+ "aria-busy": loading || void 0,
21
+ className: cx(iconButton({
22
+ size,
23
+ variant
24
+ }), className),
25
+ "data-jaci-component": "icon-button",
26
+ "data-loading": loading || void 0,
27
+ "data-slot": "icon-button",
28
+ disabled: disabled || loading,
29
+ type: props.type ?? "button",
30
+ children: loading ? /* @__PURE__ */ jsx(Spinner, {
31
+ "aria-hidden": "true",
32
+ label: "",
33
+ size: "sm"
34
+ }) : children
35
+ });
36
+ });
37
+ //#endregion
38
+ export { IconButton };
39
+
40
+ //# sourceMappingURL=icon-button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon-button.js","names":[],"sources":["../../../src/components/icon-button/icon-button.tsx"],"sourcesContent":["\"use client\";\n\nimport { Children, forwardRef, isValidElement } from \"react\";\nimport type { ComponentPropsWithoutRef, ReactNode } from \"react\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { iconButton } from \"../../styled-system/recipes\";\nimport { Spinner } from \"../layout\";\n\nexport interface IconButtonProps\n extends Omit<ComponentPropsWithoutRef<\"button\">, \"children\" | \"color\"> {\n children?: ReactNode;\n variant?: \"solid\" | \"outline\" | \"ghost\" | \"danger\";\n size?: \"sm\" | \"md\" | \"lg\";\n loading?: boolean;\n}\n\nfunction hasTextualContent(children: ReactNode): boolean {\n if (typeof children === \"string\" || typeof children === \"number\") {\n return String(children).trim().length > 0;\n }\n\n return Children.toArray(children).some((child) => {\n if (!isValidElement(child)) return false;\n return hasTextualContent((child.props as { children?: ReactNode }).children);\n });\n}\n\nexport const IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(function IconButton(\n { children, className, disabled, loading = false, size = \"md\", variant = \"outline\", ...props },\n ref,\n) {\n if (!hasTextualContent(children) && !props[\"aria-label\"] && !props[\"aria-labelledby\"]) {\n throw new Error(\"IconButton requires an aria-label when it has no textual content.\");\n }\n\n return (\n <button\n {...props}\n ref={ref}\n aria-busy={loading || undefined}\n className={cx(iconButton({ size, variant }), className)}\n data-jaci-component=\"icon-button\"\n data-loading={loading || undefined}\n data-slot=\"icon-button\"\n disabled={disabled || loading}\n type={props.type ?? \"button\"}\n >\n {loading ? <Spinner aria-hidden=\"true\" label=\"\" size=\"sm\" /> : children}\n </button>\n );\n});\n"],"mappings":";;;;;;;AAiBA,SAAS,kBAAkB,UAA8B;CACvD,IAAI,OAAO,aAAa,YAAY,OAAO,aAAa,UACtD,OAAO,OAAO,QAAQ,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS;CAG1C,OAAO,SAAS,QAAQ,QAAQ,CAAC,CAAC,MAAM,UAAU;EAChD,IAAI,CAAC,eAAe,KAAK,GAAG,OAAO;EACnC,OAAO,kBAAmB,MAAM,MAAmC,QAAQ;CAC7E,CAAC;AACH;AAEA,MAAa,aAAa,WAA+C,SAAS,WAChF,EAAE,UAAU,WAAW,UAAU,UAAU,OAAO,OAAO,MAAM,UAAU,WAAW,GAAG,SACvF,KACA;CACA,IAAI,CAAC,kBAAkB,QAAQ,KAAK,CAAC,MAAM,iBAAiB,CAAC,MAAM,oBACjE,MAAM,IAAI,MAAM,mEAAmE;CAGrF,OACE,oBAAC,UAAD;EACE,GAAI;EACC;EACL,aAAW,WAAW,KAAA;EACtB,WAAW,GAAG,WAAW;GAAE;GAAM;EAAQ,CAAC,GAAG,SAAS;EACtD,uBAAoB;EACpB,gBAAc,WAAW,KAAA;EACzB,aAAU;EACV,UAAU,YAAY;EACtB,MAAM,MAAM,QAAQ;YAEnB,UAAU,oBAAC,SAAD;GAAS,eAAY;GAAO,OAAM;GAAG,MAAK;EAAM,CAAA,IAAI;CACzD,CAAA;AAEZ,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { IconButton, IconButtonProps } from "./icon-button.cjs";
2
+ export { IconButton, type IconButtonProps };
@@ -0,0 +1,2 @@
1
+ import { IconButton, IconButtonProps } from "./icon-button.js";
2
+ export { IconButton, type IconButtonProps };
@@ -0,0 +1,2 @@
1
+ import { InputGroup, InputGroupAddon, InputGroupAddonProps, InputGroupRoot, InputGroupRootProps } from "./input-group.cjs";
2
+ export { InputGroup, InputGroupAddon, type InputGroupAddonProps, InputGroupRoot, type InputGroupRootProps };
@@ -0,0 +1,2 @@
1
+ import { InputGroup, InputGroupAddon, InputGroupAddonProps, InputGroupRoot, InputGroupRootProps } from "./input-group.js";
2
+ export { InputGroup, InputGroupAddon, type InputGroupAddonProps, InputGroupRoot, type InputGroupRootProps };
@@ -0,0 +1,32 @@
1
+ const require_cx = require("../../styled-system/css/cx.cjs");
2
+ const require_input_group = require("../../styled-system/recipes/input-group.cjs");
3
+ let react = require("react");
4
+ let react_jsx_runtime = require("react/jsx-runtime");
5
+ //#region src/components/input-group/input-group.tsx
6
+ const InputGroupRoot = (0, react.forwardRef)(function InputGroupRoot({ className, ...props }, ref) {
7
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
8
+ ...props,
9
+ ref,
10
+ className: require_cx.cx(require_input_group.inputGroup().root, className),
11
+ "data-jaci-component": "input-group",
12
+ "data-slot": "input-group"
13
+ });
14
+ });
15
+ const InputGroupAddon = (0, react.forwardRef)(function InputGroupAddon({ className, ...props }, ref) {
16
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
17
+ ...props,
18
+ ref,
19
+ className: require_cx.cx(require_input_group.inputGroup().addon, className),
20
+ "data-slot": "input-group-addon"
21
+ });
22
+ });
23
+ const InputGroup = Object.assign(InputGroupRoot, {
24
+ Root: InputGroupRoot,
25
+ Addon: InputGroupAddon
26
+ });
27
+ //#endregion
28
+ exports.InputGroup = InputGroup;
29
+ exports.InputGroupAddon = InputGroupAddon;
30
+ exports.InputGroupRoot = InputGroupRoot;
31
+
32
+ //# sourceMappingURL=input-group.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input-group.cjs","names":["cx","inputGroup"],"sources":["../../../src/components/input-group/input-group.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport type { ComponentPropsWithoutRef, ReactNode } from \"react\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { inputGroup } from \"../../styled-system/recipes\";\n\nexport interface InputGroupRootProps extends ComponentPropsWithoutRef<\"div\"> {\n children?: ReactNode;\n}\n\nexport const InputGroupRoot = forwardRef<HTMLDivElement, InputGroupRootProps>(\n function InputGroupRoot({ className, ...props }, ref) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(inputGroup().root, className)}\n data-jaci-component=\"input-group\"\n data-slot=\"input-group\"\n />\n );\n },\n);\n\nexport type InputGroupAddonProps = ComponentPropsWithoutRef<\"span\">;\nexport const InputGroupAddon = forwardRef<HTMLSpanElement, InputGroupAddonProps>(\n function InputGroupAddon({ className, ...props }, ref) {\n return (\n <span\n {...props}\n ref={ref}\n className={cx(inputGroup().addon, className)}\n data-slot=\"input-group-addon\"\n />\n );\n },\n);\n\nexport const InputGroup = Object.assign(InputGroupRoot, {\n Root: InputGroupRoot,\n Addon: InputGroupAddon,\n});\n"],"mappings":";;;;;AAUA,MAAa,kBAAA,GAAA,MAAA,WAAA,CACX,SAAS,eAAe,EAAE,WAAW,GAAG,SAAS,KAAK;CACpD,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EACE,GAAI;EACC;EACL,WAAWA,WAAAA,GAAGC,oBAAAA,WAAW,CAAC,CAAC,MAAM,SAAS;EAC1C,uBAAoB;EACpB,aAAU;CACX,CAAA;AAEL,CACF;AAGA,MAAa,mBAAA,GAAA,MAAA,WAAA,CACX,SAAS,gBAAgB,EAAE,WAAW,GAAG,SAAS,KAAK;CACrD,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;EACE,GAAI;EACC;EACL,WAAWD,WAAAA,GAAGC,oBAAAA,WAAW,CAAC,CAAC,OAAO,SAAS;EAC3C,aAAU;CACX,CAAA;AAEL,CACF;AAEA,MAAa,aAAa,OAAO,OAAO,gBAAgB;CACtD,MAAM;CACN,OAAO;AACT,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { ComponentPropsWithoutRef, ReactNode } from "react";
2
+ //#region src/components/input-group/input-group.d.ts
3
+ interface InputGroupRootProps extends ComponentPropsWithoutRef<"div"> {
4
+ children?: ReactNode;
5
+ }
6
+ declare const InputGroupRoot: import("react").ForwardRefExoticComponent<InputGroupRootProps & import("react").RefAttributes<HTMLDivElement>>;
7
+ type InputGroupAddonProps = ComponentPropsWithoutRef<"span">;
8
+ declare const InputGroupAddon: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
9
+ declare const InputGroup: import("react").ForwardRefExoticComponent<InputGroupRootProps & import("react").RefAttributes<HTMLDivElement>> & {
10
+ Root: import("react").ForwardRefExoticComponent<InputGroupRootProps & import("react").RefAttributes<HTMLDivElement>>;
11
+ Addon: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
12
+ };
13
+ //#endregion
14
+ export { InputGroup, InputGroupAddon, InputGroupAddonProps, InputGroupRoot, InputGroupRootProps };
15
+ //# sourceMappingURL=input-group.d.cts.map
@@ -0,0 +1,15 @@
1
+ import { ComponentPropsWithoutRef, ReactNode } from "react";
2
+ //#region src/components/input-group/input-group.d.ts
3
+ interface InputGroupRootProps extends ComponentPropsWithoutRef<"div"> {
4
+ children?: ReactNode;
5
+ }
6
+ declare const InputGroupRoot: import("react").ForwardRefExoticComponent<InputGroupRootProps & import("react").RefAttributes<HTMLDivElement>>;
7
+ type InputGroupAddonProps = ComponentPropsWithoutRef<"span">;
8
+ declare const InputGroupAddon: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
9
+ declare const InputGroup: import("react").ForwardRefExoticComponent<InputGroupRootProps & import("react").RefAttributes<HTMLDivElement>> & {
10
+ Root: import("react").ForwardRefExoticComponent<InputGroupRootProps & import("react").RefAttributes<HTMLDivElement>>;
11
+ Addon: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
12
+ };
13
+ //#endregion
14
+ export { InputGroup, InputGroupAddon, InputGroupAddonProps, InputGroupRoot, InputGroupRootProps };
15
+ //# sourceMappingURL=input-group.d.ts.map
@@ -0,0 +1,30 @@
1
+ import { cx } from "../../styled-system/css/cx.js";
2
+ import { inputGroup } from "../../styled-system/recipes/input-group.js";
3
+ import { forwardRef } from "react";
4
+ import { jsx } from "react/jsx-runtime";
5
+ //#region src/components/input-group/input-group.tsx
6
+ const InputGroupRoot = forwardRef(function InputGroupRoot({ className, ...props }, ref) {
7
+ return /* @__PURE__ */ jsx("div", {
8
+ ...props,
9
+ ref,
10
+ className: cx(inputGroup().root, className),
11
+ "data-jaci-component": "input-group",
12
+ "data-slot": "input-group"
13
+ });
14
+ });
15
+ const InputGroupAddon = forwardRef(function InputGroupAddon({ className, ...props }, ref) {
16
+ return /* @__PURE__ */ jsx("span", {
17
+ ...props,
18
+ ref,
19
+ className: cx(inputGroup().addon, className),
20
+ "data-slot": "input-group-addon"
21
+ });
22
+ });
23
+ const InputGroup = Object.assign(InputGroupRoot, {
24
+ Root: InputGroupRoot,
25
+ Addon: InputGroupAddon
26
+ });
27
+ //#endregion
28
+ export { InputGroup, InputGroupAddon, InputGroupRoot };
29
+
30
+ //# sourceMappingURL=input-group.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input-group.js","names":[],"sources":["../../../src/components/input-group/input-group.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport type { ComponentPropsWithoutRef, ReactNode } from \"react\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { inputGroup } from \"../../styled-system/recipes\";\n\nexport interface InputGroupRootProps extends ComponentPropsWithoutRef<\"div\"> {\n children?: ReactNode;\n}\n\nexport const InputGroupRoot = forwardRef<HTMLDivElement, InputGroupRootProps>(\n function InputGroupRoot({ className, ...props }, ref) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(inputGroup().root, className)}\n data-jaci-component=\"input-group\"\n data-slot=\"input-group\"\n />\n );\n },\n);\n\nexport type InputGroupAddonProps = ComponentPropsWithoutRef<\"span\">;\nexport const InputGroupAddon = forwardRef<HTMLSpanElement, InputGroupAddonProps>(\n function InputGroupAddon({ className, ...props }, ref) {\n return (\n <span\n {...props}\n ref={ref}\n className={cx(inputGroup().addon, className)}\n data-slot=\"input-group-addon\"\n />\n );\n },\n);\n\nexport const InputGroup = Object.assign(InputGroupRoot, {\n Root: InputGroupRoot,\n Addon: InputGroupAddon,\n});\n"],"mappings":";;;;;AAUA,MAAa,iBAAiB,WAC5B,SAAS,eAAe,EAAE,WAAW,GAAG,SAAS,KAAK;CACpD,OACE,oBAAC,OAAD;EACE,GAAI;EACC;EACL,WAAW,GAAG,WAAW,CAAC,CAAC,MAAM,SAAS;EAC1C,uBAAoB;EACpB,aAAU;CACX,CAAA;AAEL,CACF;AAGA,MAAa,kBAAkB,WAC7B,SAAS,gBAAgB,EAAE,WAAW,GAAG,SAAS,KAAK;CACrD,OACE,oBAAC,QAAD;EACE,GAAI;EACC;EACL,WAAW,GAAG,WAAW,CAAC,CAAC,OAAO,SAAS;EAC3C,aAAU;CACX,CAAA;AAEL,CACF;AAEA,MAAa,aAAa,OAAO,OAAO,gBAAgB;CACtD,MAAM;CACN,OAAO;AACT,CAAC"}