jaci-ui 0.6.3 → 0.7.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.
- package/CHANGELOG.md +6 -0
- package/README.md +31 -0
- package/dist/components/alert/alert.cjs +11 -1
- package/dist/components/alert/alert.cjs.map +1 -1
- package/dist/components/alert/alert.d.cts +4 -1
- package/dist/components/alert/alert.d.ts +4 -1
- package/dist/components/alert/alert.js +11 -2
- package/dist/components/alert/alert.js.map +1 -1
- package/dist/components/alert/index.d.cts +2 -2
- package/dist/components/alert/index.d.ts +2 -2
- package/dist/components/aspect-ratio/aspect-ratio.cjs +23 -0
- package/dist/components/aspect-ratio/aspect-ratio.cjs.map +1 -0
- package/dist/components/aspect-ratio/aspect-ratio.d.cts +9 -0
- package/dist/components/aspect-ratio/aspect-ratio.d.ts +9 -0
- package/dist/components/aspect-ratio/aspect-ratio.js +23 -0
- package/dist/components/aspect-ratio/aspect-ratio.js.map +1 -0
- package/dist/components/aspect-ratio/index.d.cts +2 -0
- package/dist/components/aspect-ratio/index.d.ts +2 -0
- package/dist/components/card/card.cjs +10 -1
- package/dist/components/card/card.cjs.map +1 -1
- package/dist/components/card/card.d.cts +15 -2
- package/dist/components/card/card.d.ts +15 -2
- package/dist/components/card/card.js +10 -2
- package/dist/components/card/card.js.map +1 -1
- package/dist/components/card/index.d.cts +2 -2
- package/dist/components/card/index.d.ts +2 -2
- package/dist/components/code/code.cjs +39 -0
- package/dist/components/code/code.cjs.map +1 -0
- package/dist/components/code/code.d.cts +14 -0
- package/dist/components/code/code.d.ts +14 -0
- package/dist/components/code/code.js +39 -0
- package/dist/components/code/code.js.map +1 -0
- package/dist/components/code/index.d.cts +2 -0
- package/dist/components/code/index.d.ts +2 -0
- package/dist/components/feedback/badge.cjs +6 -3
- package/dist/components/feedback/badge.cjs.map +1 -1
- package/dist/components/feedback/badge.d.cts +1 -0
- package/dist/components/feedback/badge.d.ts +1 -0
- package/dist/components/feedback/badge.js +6 -3
- package/dist/components/feedback/badge.js.map +1 -1
- package/dist/components/figure/figure.cjs +125 -0
- package/dist/components/figure/figure.cjs.map +1 -0
- package/dist/components/figure/figure.d.cts +24 -0
- package/dist/components/figure/figure.d.ts +24 -0
- package/dist/components/figure/figure.js +122 -0
- package/dist/components/figure/figure.js.map +1 -0
- package/dist/components/figure/index.d.cts +2 -0
- package/dist/components/figure/index.d.ts +2 -0
- package/dist/components/image/image.cjs +103 -0
- package/dist/components/image/image.cjs.map +1 -0
- package/dist/components/image/image.d.cts +21 -0
- package/dist/components/image/image.d.ts +21 -0
- package/dist/components/image/image.js +103 -0
- package/dist/components/image/image.js.map +1 -0
- package/dist/components/image/index.d.cts +2 -0
- package/dist/components/image/index.d.ts +2 -0
- package/dist/components/kbd/index.d.cts +2 -0
- package/dist/components/kbd/index.d.ts +2 -0
- package/dist/components/kbd/kbd.cjs +23 -0
- package/dist/components/kbd/kbd.cjs.map +1 -0
- package/dist/components/kbd/kbd.d.cts +12 -0
- package/dist/components/kbd/kbd.d.ts +12 -0
- package/dist/components/kbd/kbd.js +23 -0
- package/dist/components/kbd/kbd.js.map +1 -0
- package/dist/components/progress/progress.cjs +19 -7
- package/dist/components/progress/progress.cjs.map +1 -1
- package/dist/components/progress/progress.d.cts +4 -0
- package/dist/components/progress/progress.d.ts +4 -0
- package/dist/components/progress/progress.js +19 -7
- package/dist/components/progress/progress.js.map +1 -1
- package/dist/components/quote/index.d.cts +2 -0
- package/dist/components/quote/index.d.ts +2 -0
- package/dist/components/quote/quote.cjs +38 -0
- package/dist/components/quote/quote.cjs.map +1 -0
- package/dist/components/quote/quote.d.cts +19 -0
- package/dist/components/quote/quote.d.ts +19 -0
- package/dist/components/quote/quote.js +38 -0
- package/dist/components/quote/quote.js.map +1 -0
- package/dist/components/stat/index.d.cts +2 -0
- package/dist/components/stat/index.d.ts +2 -0
- package/dist/components/stat/stat.cjs +122 -0
- package/dist/components/stat/stat.cjs.map +1 -0
- package/dist/components/stat/stat.d.cts +51 -0
- package/dist/components/stat/stat.d.ts +51 -0
- package/dist/components/stat/stat.js +114 -0
- package/dist/components/stat/stat.js.map +1 -0
- package/dist/components/stat-group/index.d.cts +2 -0
- package/dist/components/stat-group/index.d.ts +2 -0
- package/dist/components/typography/heading.cjs +8 -2
- package/dist/components/typography/heading.cjs.map +1 -1
- package/dist/components/typography/heading.d.cts +8 -1
- package/dist/components/typography/heading.d.ts +8 -1
- package/dist/components/typography/heading.js +8 -2
- package/dist/components/typography/heading.js.map +1 -1
- package/dist/components/typography/index.d.cts +2 -2
- package/dist/components/typography/index.d.ts +2 -2
- package/dist/components/typography/paragraph.cjs +7 -2
- package/dist/components/typography/paragraph.cjs.map +1 -1
- package/dist/components/typography/paragraph.d.cts +8 -2
- package/dist/components/typography/paragraph.d.ts +8 -2
- package/dist/components/typography/paragraph.js +7 -2
- package/dist/components/typography/paragraph.js.map +1 -1
- package/dist/components/typography/text.cjs +6 -2
- package/dist/components/typography/text.cjs.map +1 -1
- package/dist/components/typography/text.d.cts +5 -0
- package/dist/components/typography/text.d.ts +5 -0
- package/dist/components/typography/text.js +6 -2
- package/dist/components/typography/text.js.map +1 -1
- package/dist/index.cjs +27 -0
- package/dist/index.d.cts +19 -4
- package/dist/index.d.ts +19 -4
- package/dist/index.js +10 -3
- package/dist/styled-system/recipes/alert.cjs +2 -1
- package/dist/styled-system/recipes/alert.cjs.map +1 -1
- package/dist/styled-system/recipes/alert.js +2 -1
- package/dist/styled-system/recipes/alert.js.map +1 -1
- package/dist/styled-system/recipes/aspect-ratio-box.cjs +25 -0
- package/dist/styled-system/recipes/aspect-ratio-box.cjs.map +1 -0
- package/dist/styled-system/recipes/aspect-ratio-box.js +25 -0
- package/dist/styled-system/recipes/aspect-ratio-box.js.map +1 -0
- package/dist/styled-system/recipes/badge.cjs +16 -6
- package/dist/styled-system/recipes/badge.cjs.map +1 -1
- package/dist/styled-system/recipes/badge.js +16 -6
- package/dist/styled-system/recipes/badge.js.map +1 -1
- package/dist/styled-system/recipes/code.cjs +33 -0
- package/dist/styled-system/recipes/code.cjs.map +1 -0
- package/dist/styled-system/recipes/code.js +33 -0
- package/dist/styled-system/recipes/code.js.map +1 -0
- package/dist/styled-system/recipes/figure.cjs +42 -0
- package/dist/styled-system/recipes/figure.cjs.map +1 -0
- package/dist/styled-system/recipes/figure.js +42 -0
- package/dist/styled-system/recipes/figure.js.map +1 -0
- package/dist/styled-system/recipes/heading.cjs +34 -9
- package/dist/styled-system/recipes/heading.cjs.map +1 -1
- package/dist/styled-system/recipes/heading.js +34 -9
- package/dist/styled-system/recipes/heading.js.map +1 -1
- package/dist/styled-system/recipes/image.cjs +56 -0
- package/dist/styled-system/recipes/image.cjs.map +1 -0
- package/dist/styled-system/recipes/image.js +56 -0
- package/dist/styled-system/recipes/image.js.map +1 -0
- package/dist/styled-system/recipes/kbd.cjs +39 -0
- package/dist/styled-system/recipes/kbd.cjs.map +1 -0
- package/dist/styled-system/recipes/kbd.js +39 -0
- package/dist/styled-system/recipes/kbd.js.map +1 -0
- package/dist/styled-system/recipes/paragraph.cjs +25 -2
- package/dist/styled-system/recipes/paragraph.cjs.map +1 -1
- package/dist/styled-system/recipes/paragraph.js +25 -2
- package/dist/styled-system/recipes/paragraph.js.map +1 -1
- package/dist/styled-system/recipes/progress.cjs +1 -0
- package/dist/styled-system/recipes/progress.cjs.map +1 -1
- package/dist/styled-system/recipes/progress.js +1 -0
- package/dist/styled-system/recipes/progress.js.map +1 -1
- package/dist/styled-system/recipes/quote.cjs +39 -0
- package/dist/styled-system/recipes/quote.cjs.map +1 -0
- package/dist/styled-system/recipes/quote.js +39 -0
- package/dist/styled-system/recipes/quote.js.map +1 -0
- package/dist/styled-system/recipes/stat-group.cjs +40 -0
- package/dist/styled-system/recipes/stat-group.cjs.map +1 -0
- package/dist/styled-system/recipes/stat-group.js +40 -0
- package/dist/styled-system/recipes/stat-group.js.map +1 -0
- package/dist/styled-system/recipes/stat.cjs +63 -0
- package/dist/styled-system/recipes/stat.cjs.map +1 -0
- package/dist/styled-system/recipes/stat.js +63 -0
- package/dist/styled-system/recipes/stat.js.map +1 -0
- package/dist/styled-system/recipes/text.cjs +23 -2
- package/dist/styled-system/recipes/text.cjs.map +1 -1
- package/dist/styled-system/recipes/text.js +23 -2
- package/dist/styled-system/recipes/text.js.map +1 -1
- package/dist/styles.css +1002 -75
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -54,6 +54,37 @@ export function Example() {
|
|
|
54
54
|
}
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
+
Content and visual utilities are framework-agnostic and server-safe where possible:
|
|
58
|
+
|
|
59
|
+
```tsx
|
|
60
|
+
import { AspectRatio, Code, Figure, Image, Kbd, Quote, Stat, StatGroup } from "jaci-ui";
|
|
61
|
+
|
|
62
|
+
<Code variant="block" language="tsx">const value = 42;</Code>;
|
|
63
|
+
<Kbd>⌘K</Kbd>;
|
|
64
|
+
<Quote author="Alan Kay" source="Alan Kay">The best way to predict the future is to invent it.</Quote>;
|
|
65
|
+
<AspectRatio ratio={16 / 9}><Image src="/cover.jpg" alt="Cover" fit="cover" /></AspectRatio>;
|
|
66
|
+
<Figure.Root lightbox>
|
|
67
|
+
<Figure.Image src="/cover.jpg" alt="Cover" />
|
|
68
|
+
<Figure.Caption>Project cover</Figure.Caption>
|
|
69
|
+
</Figure.Root>;
|
|
70
|
+
<StatGroup.Root columns={3}>
|
|
71
|
+
<Stat.Root tone="success">
|
|
72
|
+
<Stat.Label>Revenue</Stat.Label>
|
|
73
|
+
<Stat.Value>$12.4k</Stat.Value>
|
|
74
|
+
<Stat.Trend direction="up">+18%</Stat.Trend>
|
|
75
|
+
</Stat.Root>
|
|
76
|
+
</StatGroup.Root>;
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
`AspectRatio` fills the available inline size of its parent. In shrink-to-fit or flex
|
|
80
|
+
layouts, give the parent an explicit `width`/`max-width` so the ratio has a measurable
|
|
81
|
+
size.
|
|
82
|
+
|
|
83
|
+
`Code` is intentionally presentation-only; compose it with `Copyable` when users should be able
|
|
84
|
+
to copy a command. `Image` uses the native `<img>` element, accepts a React fallback and can opt
|
|
85
|
+
into a focusable blurred lightbox with `lightbox`. `Figure` adds a semantic caption that remains
|
|
86
|
+
visible in the expanded image preview, without requiring a framework-specific image optimizer.
|
|
87
|
+
|
|
57
88
|
Interactive components support controlled and uncontrolled state where appropriate. For example,
|
|
58
89
|
`value`/`onValueChange` can be paired with `defaultValue` when the application does not need to
|
|
59
90
|
own the state. `ColorPicker.Palette` supports pointer dragging, keyboard arrows and a visible
|
|
@@ -60,14 +60,24 @@ const AlertDescription = (0, react.forwardRef)(function AlertDescription({ class
|
|
|
60
60
|
"data-slot": "alert-description"
|
|
61
61
|
});
|
|
62
62
|
});
|
|
63
|
+
const AlertActions = (0, react.forwardRef)(function AlertActions({ className, ...props }, ref) {
|
|
64
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
65
|
+
...props,
|
|
66
|
+
ref,
|
|
67
|
+
className: require_cx.cx(useAlertStyles().actions, className),
|
|
68
|
+
"data-slot": "alert-actions"
|
|
69
|
+
});
|
|
70
|
+
});
|
|
63
71
|
const Alert = {
|
|
64
72
|
Root: AlertRoot,
|
|
65
73
|
Icon: AlertIcon,
|
|
66
74
|
Title: AlertTitle,
|
|
67
|
-
Description: AlertDescription
|
|
75
|
+
Description: AlertDescription,
|
|
76
|
+
Actions: AlertActions
|
|
68
77
|
};
|
|
69
78
|
//#endregion
|
|
70
79
|
exports.Alert = Alert;
|
|
80
|
+
exports.AlertActions = AlertActions;
|
|
71
81
|
exports.AlertDescription = AlertDescription;
|
|
72
82
|
exports.AlertIcon = AlertIcon;
|
|
73
83
|
exports.AlertRoot = AlertRoot;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert.cjs","names":["alert","cx"],"sources":["../../../src/components/alert/alert.tsx"],"sourcesContent":["import { createContext, forwardRef, useContext } from \"react\";\nimport type { ComponentPropsWithoutRef } from \"react\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { alert } from \"../../styled-system/recipes\";\n\nexport type AlertTone = \"info\" | \"success\" | \"warning\" | \"danger\";\n\nconst AlertToneContext = createContext<AlertTone>(\"info\");\n\nfunction useAlertStyles() {\n return alert({ tone: useContext(AlertToneContext) });\n}\n\nconst iconByTone: Record<AlertTone, string> = {\n danger: \"!\",\n info: \"i\",\n success: \"✓\",\n warning: \"!\",\n};\n\nexport interface AlertRootProps extends ComponentPropsWithoutRef<\"div\"> {\n tone?: AlertTone;\n}\n\n/**\n * An SSR-safe status message. Informational alerts use a polite live region;\n * warnings and errors default to the assertive `alert` role.\n */\nexport const AlertRoot = forwardRef<HTMLDivElement, AlertRootProps>(function AlertRoot(\n { className, role, tone = \"info\", ...props },\n ref,\n) {\n const styles = alert({ tone });\n const defaultRole = tone === \"danger\" || tone === \"warning\" ? \"alert\" : \"status\";\n\n return (\n <AlertToneContext.Provider value={tone}>\n <div\n {...props}\n ref={ref}\n className={cx(styles.root, className)}\n data-jaci-component=\"alert\"\n data-jaci-tone={tone}\n data-slot=\"alert\"\n role={role ?? defaultRole}\n />\n </AlertToneContext.Provider>\n );\n});\n\nexport type AlertIconProps = ComponentPropsWithoutRef<\"span\">;\n\nexport const AlertIcon = forwardRef<HTMLSpanElement, AlertIconProps>(function AlertIcon(\n { children, className, ...props },\n ref,\n) {\n const tone = useContext(AlertToneContext);\n\n return (\n <span\n {...props}\n aria-hidden=\"true\"\n ref={ref}\n className={cx(useAlertStyles().icon, className)}\n data-slot=\"alert-icon\"\n >\n {children ?? iconByTone[tone]}\n </span>\n );\n});\n\nexport type AlertTitleProps = ComponentPropsWithoutRef<\"div\">;\n\nexport const AlertTitle = forwardRef<HTMLDivElement, AlertTitleProps>(function AlertTitle(\n { className, ...props },\n ref,\n) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(useAlertStyles().title, className)}\n data-slot=\"alert-title\"\n />\n );\n});\n\nexport type AlertDescriptionProps = ComponentPropsWithoutRef<\"div\">;\n\nexport const AlertDescription = forwardRef<HTMLDivElement, AlertDescriptionProps>(\n function AlertDescription({ className, ...props }, ref) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(useAlertStyles().description, className)}\n data-slot=\"alert-description\"\n />\n );\n },\n);\n\nexport const Alert = {\n Root: AlertRoot,\n Icon: AlertIcon,\n Title: AlertTitle,\n Description: AlertDescription,\n};\n"],"mappings":";;;;;AAQA,MAAM,oBAAA,GAAA,MAAA,cAAA,CAA4C,MAAM;AAExD,SAAS,iBAAiB;CACxB,OAAOA,cAAAA,MAAM,EAAE,OAAA,GAAA,MAAA,WAAA,CAAiB,gBAAgB,EAAE,CAAC;AACrD;AAEA,MAAM,aAAwC;CAC5C,QAAQ;CACR,MAAM;CACN,SAAS;CACT,SAAS;AACX;;;;;AAUA,MAAa,aAAA,GAAA,MAAA,WAAA,CAAuD,SAAS,UAC3E,EAAE,WAAW,MAAM,OAAO,QAAQ,GAAG,SACrC,KACA;CACA,MAAM,SAASA,cAAAA,MAAM,EAAE,KAAK,CAAC;CAC7B,MAAM,cAAc,SAAS,YAAY,SAAS,YAAY,UAAU;CAExE,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,iBAAiB,UAAlB;EAA2B,OAAO;YAChC,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;GACE,GAAI;GACC;GACL,WAAWC,WAAAA,GAAG,OAAO,MAAM,SAAS;GACpC,uBAAoB;GACpB,kBAAgB;GAChB,aAAU;GACV,MAAM,QAAQ;EACf,CAAA;CACwB,CAAA;AAE/B,CAAC;AAID,MAAa,aAAA,GAAA,MAAA,WAAA,CAAwD,SAAS,UAC5E,EAAE,UAAU,WAAW,GAAG,SAC1B,KACA;CACA,MAAM,QAAA,GAAA,MAAA,WAAA,CAAkB,gBAAgB;CAExC,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;EACE,GAAI;EACJ,eAAY;EACP;EACL,WAAWA,WAAAA,GAAG,eAAe,CAAC,CAAC,MAAM,SAAS;EAC9C,aAAU;YAET,YAAY,WAAW;CACpB,CAAA;AAEV,CAAC;AAID,MAAa,cAAA,GAAA,MAAA,WAAA,CAAyD,SAAS,WAC7E,EAAE,WAAW,GAAG,SAChB,KACA;CACA,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EACE,GAAI;EACC;EACL,WAAWA,WAAAA,GAAG,eAAe,CAAC,CAAC,OAAO,SAAS;EAC/C,aAAU;CACX,CAAA;AAEL,CAAC;AAID,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,WAAWA,WAAAA,GAAG,eAAe,CAAC,CAAC,aAAa,SAAS;EACrD,aAAU;CACX,CAAA;AAEL,CACF;
|
|
1
|
+
{"version":3,"file":"alert.cjs","names":["alert","cx"],"sources":["../../../src/components/alert/alert.tsx"],"sourcesContent":["import { createContext, forwardRef, useContext } from \"react\";\nimport type { ComponentPropsWithoutRef } from \"react\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { alert } from \"../../styled-system/recipes\";\n\nexport type AlertTone = \"info\" | \"success\" | \"warning\" | \"danger\";\n\nconst AlertToneContext = createContext<AlertTone>(\"info\");\n\nfunction useAlertStyles() {\n return alert({ tone: useContext(AlertToneContext) });\n}\n\nconst iconByTone: Record<AlertTone, string> = {\n danger: \"!\",\n info: \"i\",\n success: \"✓\",\n warning: \"!\",\n};\n\nexport interface AlertRootProps extends ComponentPropsWithoutRef<\"div\"> {\n tone?: AlertTone;\n}\n\n/**\n * An SSR-safe status message. Informational alerts use a polite live region;\n * warnings and errors default to the assertive `alert` role.\n */\nexport const AlertRoot = forwardRef<HTMLDivElement, AlertRootProps>(function AlertRoot(\n { className, role, tone = \"info\", ...props },\n ref,\n) {\n const styles = alert({ tone });\n const defaultRole = tone === \"danger\" || tone === \"warning\" ? \"alert\" : \"status\";\n\n return (\n <AlertToneContext.Provider value={tone}>\n <div\n {...props}\n ref={ref}\n className={cx(styles.root, className)}\n data-jaci-component=\"alert\"\n data-jaci-tone={tone}\n data-slot=\"alert\"\n role={role ?? defaultRole}\n />\n </AlertToneContext.Provider>\n );\n});\n\nexport type AlertIconProps = ComponentPropsWithoutRef<\"span\">;\n\nexport const AlertIcon = forwardRef<HTMLSpanElement, AlertIconProps>(function AlertIcon(\n { children, className, ...props },\n ref,\n) {\n const tone = useContext(AlertToneContext);\n\n return (\n <span\n {...props}\n aria-hidden=\"true\"\n ref={ref}\n className={cx(useAlertStyles().icon, className)}\n data-slot=\"alert-icon\"\n >\n {children ?? iconByTone[tone]}\n </span>\n );\n});\n\nexport type AlertTitleProps = ComponentPropsWithoutRef<\"div\">;\n\nexport const AlertTitle = forwardRef<HTMLDivElement, AlertTitleProps>(function AlertTitle(\n { className, ...props },\n ref,\n) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(useAlertStyles().title, className)}\n data-slot=\"alert-title\"\n />\n );\n});\n\nexport type AlertDescriptionProps = ComponentPropsWithoutRef<\"div\">;\n\nexport const AlertDescription = forwardRef<HTMLDivElement, AlertDescriptionProps>(\n function AlertDescription({ className, ...props }, ref) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(useAlertStyles().description, className)}\n data-slot=\"alert-description\"\n />\n );\n },\n);\n\nexport type AlertActionsProps = ComponentPropsWithoutRef<\"div\">;\n\nexport const AlertActions = forwardRef<HTMLDivElement, AlertActionsProps>(function AlertActions(\n { className, ...props },\n ref,\n) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(useAlertStyles().actions, className)}\n data-slot=\"alert-actions\"\n />\n );\n});\n\nexport const Alert = {\n Root: AlertRoot,\n Icon: AlertIcon,\n Title: AlertTitle,\n Description: AlertDescription,\n Actions: AlertActions,\n};\n"],"mappings":";;;;;AAQA,MAAM,oBAAA,GAAA,MAAA,cAAA,CAA4C,MAAM;AAExD,SAAS,iBAAiB;CACxB,OAAOA,cAAAA,MAAM,EAAE,OAAA,GAAA,MAAA,WAAA,CAAiB,gBAAgB,EAAE,CAAC;AACrD;AAEA,MAAM,aAAwC;CAC5C,QAAQ;CACR,MAAM;CACN,SAAS;CACT,SAAS;AACX;;;;;AAUA,MAAa,aAAA,GAAA,MAAA,WAAA,CAAuD,SAAS,UAC3E,EAAE,WAAW,MAAM,OAAO,QAAQ,GAAG,SACrC,KACA;CACA,MAAM,SAASA,cAAAA,MAAM,EAAE,KAAK,CAAC;CAC7B,MAAM,cAAc,SAAS,YAAY,SAAS,YAAY,UAAU;CAExE,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,iBAAiB,UAAlB;EAA2B,OAAO;YAChC,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;GACE,GAAI;GACC;GACL,WAAWC,WAAAA,GAAG,OAAO,MAAM,SAAS;GACpC,uBAAoB;GACpB,kBAAgB;GAChB,aAAU;GACV,MAAM,QAAQ;EACf,CAAA;CACwB,CAAA;AAE/B,CAAC;AAID,MAAa,aAAA,GAAA,MAAA,WAAA,CAAwD,SAAS,UAC5E,EAAE,UAAU,WAAW,GAAG,SAC1B,KACA;CACA,MAAM,QAAA,GAAA,MAAA,WAAA,CAAkB,gBAAgB;CAExC,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;EACE,GAAI;EACJ,eAAY;EACP;EACL,WAAWA,WAAAA,GAAG,eAAe,CAAC,CAAC,MAAM,SAAS;EAC9C,aAAU;YAET,YAAY,WAAW;CACpB,CAAA;AAEV,CAAC;AAID,MAAa,cAAA,GAAA,MAAA,WAAA,CAAyD,SAAS,WAC7E,EAAE,WAAW,GAAG,SAChB,KACA;CACA,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EACE,GAAI;EACC;EACL,WAAWA,WAAAA,GAAG,eAAe,CAAC,CAAC,OAAO,SAAS;EAC/C,aAAU;CACX,CAAA;AAEL,CAAC;AAID,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,WAAWA,WAAAA,GAAG,eAAe,CAAC,CAAC,aAAa,SAAS;EACrD,aAAU;CACX,CAAA;AAEL,CACF;AAIA,MAAa,gBAAA,GAAA,MAAA,WAAA,CAA6D,SAAS,aACjF,EAAE,WAAW,GAAG,SAChB,KACA;CACA,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EACE,GAAI;EACC;EACL,WAAWA,WAAAA,GAAG,eAAe,CAAC,CAAC,SAAS,SAAS;EACjD,aAAU;CACX,CAAA;AAEL,CAAC;AAED,MAAa,QAAQ;CACnB,MAAM;CACN,MAAM;CACN,OAAO;CACP,aAAa;CACb,SAAS;AACX"}
|
|
@@ -15,12 +15,15 @@ type AlertTitleProps = ComponentPropsWithoutRef<"div">;
|
|
|
15
15
|
declare const AlertTitle: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
16
16
|
type AlertDescriptionProps = ComponentPropsWithoutRef<"div">;
|
|
17
17
|
declare const AlertDescription: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
18
|
+
type AlertActionsProps = ComponentPropsWithoutRef<"div">;
|
|
19
|
+
declare const AlertActions: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
18
20
|
declare const Alert: {
|
|
19
21
|
Root: import("react").ForwardRefExoticComponent<AlertRootProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
20
22
|
Icon: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
21
23
|
Title: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
22
24
|
Description: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
25
|
+
Actions: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
23
26
|
};
|
|
24
27
|
//#endregion
|
|
25
|
-
export { Alert, AlertDescription, AlertDescriptionProps, AlertIcon, AlertIconProps, AlertRoot, AlertRootProps, AlertTitle, AlertTitleProps, AlertTone };
|
|
28
|
+
export { Alert, AlertActions, AlertActionsProps, AlertDescription, AlertDescriptionProps, AlertIcon, AlertIconProps, AlertRoot, AlertRootProps, AlertTitle, AlertTitleProps, AlertTone };
|
|
26
29
|
//# sourceMappingURL=alert.d.cts.map
|
|
@@ -15,12 +15,15 @@ type AlertTitleProps = ComponentPropsWithoutRef<"div">;
|
|
|
15
15
|
declare const AlertTitle: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
16
16
|
type AlertDescriptionProps = ComponentPropsWithoutRef<"div">;
|
|
17
17
|
declare const AlertDescription: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
18
|
+
type AlertActionsProps = ComponentPropsWithoutRef<"div">;
|
|
19
|
+
declare const AlertActions: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
18
20
|
declare const Alert: {
|
|
19
21
|
Root: import("react").ForwardRefExoticComponent<AlertRootProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
20
22
|
Icon: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
21
23
|
Title: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
22
24
|
Description: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
25
|
+
Actions: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
23
26
|
};
|
|
24
27
|
//#endregion
|
|
25
|
-
export { Alert, AlertDescription, AlertDescriptionProps, AlertIcon, AlertIconProps, AlertRoot, AlertRootProps, AlertTitle, AlertTitleProps, AlertTone };
|
|
28
|
+
export { Alert, AlertActions, AlertActionsProps, AlertDescription, AlertDescriptionProps, AlertIcon, AlertIconProps, AlertRoot, AlertRootProps, AlertTitle, AlertTitleProps, AlertTone };
|
|
26
29
|
//# sourceMappingURL=alert.d.ts.map
|
|
@@ -60,13 +60,22 @@ const AlertDescription = forwardRef(function AlertDescription({ className, ...pr
|
|
|
60
60
|
"data-slot": "alert-description"
|
|
61
61
|
});
|
|
62
62
|
});
|
|
63
|
+
const AlertActions = forwardRef(function AlertActions({ className, ...props }, ref) {
|
|
64
|
+
return /* @__PURE__ */ jsx("div", {
|
|
65
|
+
...props,
|
|
66
|
+
ref,
|
|
67
|
+
className: cx(useAlertStyles().actions, className),
|
|
68
|
+
"data-slot": "alert-actions"
|
|
69
|
+
});
|
|
70
|
+
});
|
|
63
71
|
const Alert = {
|
|
64
72
|
Root: AlertRoot,
|
|
65
73
|
Icon: AlertIcon,
|
|
66
74
|
Title: AlertTitle,
|
|
67
|
-
Description: AlertDescription
|
|
75
|
+
Description: AlertDescription,
|
|
76
|
+
Actions: AlertActions
|
|
68
77
|
};
|
|
69
78
|
//#endregion
|
|
70
|
-
export { Alert, AlertDescription, AlertIcon, AlertRoot, AlertTitle };
|
|
79
|
+
export { Alert, AlertActions, AlertDescription, AlertIcon, AlertRoot, AlertTitle };
|
|
71
80
|
|
|
72
81
|
//# sourceMappingURL=alert.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert.js","names":[],"sources":["../../../src/components/alert/alert.tsx"],"sourcesContent":["import { createContext, forwardRef, useContext } from \"react\";\nimport type { ComponentPropsWithoutRef } from \"react\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { alert } from \"../../styled-system/recipes\";\n\nexport type AlertTone = \"info\" | \"success\" | \"warning\" | \"danger\";\n\nconst AlertToneContext = createContext<AlertTone>(\"info\");\n\nfunction useAlertStyles() {\n return alert({ tone: useContext(AlertToneContext) });\n}\n\nconst iconByTone: Record<AlertTone, string> = {\n danger: \"!\",\n info: \"i\",\n success: \"✓\",\n warning: \"!\",\n};\n\nexport interface AlertRootProps extends ComponentPropsWithoutRef<\"div\"> {\n tone?: AlertTone;\n}\n\n/**\n * An SSR-safe status message. Informational alerts use a polite live region;\n * warnings and errors default to the assertive `alert` role.\n */\nexport const AlertRoot = forwardRef<HTMLDivElement, AlertRootProps>(function AlertRoot(\n { className, role, tone = \"info\", ...props },\n ref,\n) {\n const styles = alert({ tone });\n const defaultRole = tone === \"danger\" || tone === \"warning\" ? \"alert\" : \"status\";\n\n return (\n <AlertToneContext.Provider value={tone}>\n <div\n {...props}\n ref={ref}\n className={cx(styles.root, className)}\n data-jaci-component=\"alert\"\n data-jaci-tone={tone}\n data-slot=\"alert\"\n role={role ?? defaultRole}\n />\n </AlertToneContext.Provider>\n );\n});\n\nexport type AlertIconProps = ComponentPropsWithoutRef<\"span\">;\n\nexport const AlertIcon = forwardRef<HTMLSpanElement, AlertIconProps>(function AlertIcon(\n { children, className, ...props },\n ref,\n) {\n const tone = useContext(AlertToneContext);\n\n return (\n <span\n {...props}\n aria-hidden=\"true\"\n ref={ref}\n className={cx(useAlertStyles().icon, className)}\n data-slot=\"alert-icon\"\n >\n {children ?? iconByTone[tone]}\n </span>\n );\n});\n\nexport type AlertTitleProps = ComponentPropsWithoutRef<\"div\">;\n\nexport const AlertTitle = forwardRef<HTMLDivElement, AlertTitleProps>(function AlertTitle(\n { className, ...props },\n ref,\n) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(useAlertStyles().title, className)}\n data-slot=\"alert-title\"\n />\n );\n});\n\nexport type AlertDescriptionProps = ComponentPropsWithoutRef<\"div\">;\n\nexport const AlertDescription = forwardRef<HTMLDivElement, AlertDescriptionProps>(\n function AlertDescription({ className, ...props }, ref) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(useAlertStyles().description, className)}\n data-slot=\"alert-description\"\n />\n );\n },\n);\n\nexport const Alert = {\n Root: AlertRoot,\n Icon: AlertIcon,\n Title: AlertTitle,\n Description: AlertDescription,\n};\n"],"mappings":";;;;;AAQA,MAAM,mBAAmB,cAAyB,MAAM;AAExD,SAAS,iBAAiB;CACxB,OAAO,MAAM,EAAE,MAAM,WAAW,gBAAgB,EAAE,CAAC;AACrD;AAEA,MAAM,aAAwC;CAC5C,QAAQ;CACR,MAAM;CACN,SAAS;CACT,SAAS;AACX;;;;;AAUA,MAAa,YAAY,WAA2C,SAAS,UAC3E,EAAE,WAAW,MAAM,OAAO,QAAQ,GAAG,SACrC,KACA;CACA,MAAM,SAAS,MAAM,EAAE,KAAK,CAAC;CAC7B,MAAM,cAAc,SAAS,YAAY,SAAS,YAAY,UAAU;CAExE,OACE,oBAAC,iBAAiB,UAAlB;EAA2B,OAAO;YAChC,oBAAC,OAAD;GACE,GAAI;GACC;GACL,WAAW,GAAG,OAAO,MAAM,SAAS;GACpC,uBAAoB;GACpB,kBAAgB;GAChB,aAAU;GACV,MAAM,QAAQ;EACf,CAAA;CACwB,CAAA;AAE/B,CAAC;AAID,MAAa,YAAY,WAA4C,SAAS,UAC5E,EAAE,UAAU,WAAW,GAAG,SAC1B,KACA;CACA,MAAM,OAAO,WAAW,gBAAgB;CAExC,OACE,oBAAC,QAAD;EACE,GAAI;EACJ,eAAY;EACP;EACL,WAAW,GAAG,eAAe,CAAC,CAAC,MAAM,SAAS;EAC9C,aAAU;YAET,YAAY,WAAW;CACpB,CAAA;AAEV,CAAC;AAID,MAAa,aAAa,WAA4C,SAAS,WAC7E,EAAE,WAAW,GAAG,SAChB,KACA;CACA,OACE,oBAAC,OAAD;EACE,GAAI;EACC;EACL,WAAW,GAAG,eAAe,CAAC,CAAC,OAAO,SAAS;EAC/C,aAAU;CACX,CAAA;AAEL,CAAC;AAID,MAAa,mBAAmB,WAC9B,SAAS,iBAAiB,EAAE,WAAW,GAAG,SAAS,KAAK;CACtD,OACE,oBAAC,OAAD;EACE,GAAI;EACC;EACL,WAAW,GAAG,eAAe,CAAC,CAAC,aAAa,SAAS;EACrD,aAAU;CACX,CAAA;AAEL,CACF;
|
|
1
|
+
{"version":3,"file":"alert.js","names":[],"sources":["../../../src/components/alert/alert.tsx"],"sourcesContent":["import { createContext, forwardRef, useContext } from \"react\";\nimport type { ComponentPropsWithoutRef } from \"react\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { alert } from \"../../styled-system/recipes\";\n\nexport type AlertTone = \"info\" | \"success\" | \"warning\" | \"danger\";\n\nconst AlertToneContext = createContext<AlertTone>(\"info\");\n\nfunction useAlertStyles() {\n return alert({ tone: useContext(AlertToneContext) });\n}\n\nconst iconByTone: Record<AlertTone, string> = {\n danger: \"!\",\n info: \"i\",\n success: \"✓\",\n warning: \"!\",\n};\n\nexport interface AlertRootProps extends ComponentPropsWithoutRef<\"div\"> {\n tone?: AlertTone;\n}\n\n/**\n * An SSR-safe status message. Informational alerts use a polite live region;\n * warnings and errors default to the assertive `alert` role.\n */\nexport const AlertRoot = forwardRef<HTMLDivElement, AlertRootProps>(function AlertRoot(\n { className, role, tone = \"info\", ...props },\n ref,\n) {\n const styles = alert({ tone });\n const defaultRole = tone === \"danger\" || tone === \"warning\" ? \"alert\" : \"status\";\n\n return (\n <AlertToneContext.Provider value={tone}>\n <div\n {...props}\n ref={ref}\n className={cx(styles.root, className)}\n data-jaci-component=\"alert\"\n data-jaci-tone={tone}\n data-slot=\"alert\"\n role={role ?? defaultRole}\n />\n </AlertToneContext.Provider>\n );\n});\n\nexport type AlertIconProps = ComponentPropsWithoutRef<\"span\">;\n\nexport const AlertIcon = forwardRef<HTMLSpanElement, AlertIconProps>(function AlertIcon(\n { children, className, ...props },\n ref,\n) {\n const tone = useContext(AlertToneContext);\n\n return (\n <span\n {...props}\n aria-hidden=\"true\"\n ref={ref}\n className={cx(useAlertStyles().icon, className)}\n data-slot=\"alert-icon\"\n >\n {children ?? iconByTone[tone]}\n </span>\n );\n});\n\nexport type AlertTitleProps = ComponentPropsWithoutRef<\"div\">;\n\nexport const AlertTitle = forwardRef<HTMLDivElement, AlertTitleProps>(function AlertTitle(\n { className, ...props },\n ref,\n) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(useAlertStyles().title, className)}\n data-slot=\"alert-title\"\n />\n );\n});\n\nexport type AlertDescriptionProps = ComponentPropsWithoutRef<\"div\">;\n\nexport const AlertDescription = forwardRef<HTMLDivElement, AlertDescriptionProps>(\n function AlertDescription({ className, ...props }, ref) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(useAlertStyles().description, className)}\n data-slot=\"alert-description\"\n />\n );\n },\n);\n\nexport type AlertActionsProps = ComponentPropsWithoutRef<\"div\">;\n\nexport const AlertActions = forwardRef<HTMLDivElement, AlertActionsProps>(function AlertActions(\n { className, ...props },\n ref,\n) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(useAlertStyles().actions, className)}\n data-slot=\"alert-actions\"\n />\n );\n});\n\nexport const Alert = {\n Root: AlertRoot,\n Icon: AlertIcon,\n Title: AlertTitle,\n Description: AlertDescription,\n Actions: AlertActions,\n};\n"],"mappings":";;;;;AAQA,MAAM,mBAAmB,cAAyB,MAAM;AAExD,SAAS,iBAAiB;CACxB,OAAO,MAAM,EAAE,MAAM,WAAW,gBAAgB,EAAE,CAAC;AACrD;AAEA,MAAM,aAAwC;CAC5C,QAAQ;CACR,MAAM;CACN,SAAS;CACT,SAAS;AACX;;;;;AAUA,MAAa,YAAY,WAA2C,SAAS,UAC3E,EAAE,WAAW,MAAM,OAAO,QAAQ,GAAG,SACrC,KACA;CACA,MAAM,SAAS,MAAM,EAAE,KAAK,CAAC;CAC7B,MAAM,cAAc,SAAS,YAAY,SAAS,YAAY,UAAU;CAExE,OACE,oBAAC,iBAAiB,UAAlB;EAA2B,OAAO;YAChC,oBAAC,OAAD;GACE,GAAI;GACC;GACL,WAAW,GAAG,OAAO,MAAM,SAAS;GACpC,uBAAoB;GACpB,kBAAgB;GAChB,aAAU;GACV,MAAM,QAAQ;EACf,CAAA;CACwB,CAAA;AAE/B,CAAC;AAID,MAAa,YAAY,WAA4C,SAAS,UAC5E,EAAE,UAAU,WAAW,GAAG,SAC1B,KACA;CACA,MAAM,OAAO,WAAW,gBAAgB;CAExC,OACE,oBAAC,QAAD;EACE,GAAI;EACJ,eAAY;EACP;EACL,WAAW,GAAG,eAAe,CAAC,CAAC,MAAM,SAAS;EAC9C,aAAU;YAET,YAAY,WAAW;CACpB,CAAA;AAEV,CAAC;AAID,MAAa,aAAa,WAA4C,SAAS,WAC7E,EAAE,WAAW,GAAG,SAChB,KACA;CACA,OACE,oBAAC,OAAD;EACE,GAAI;EACC;EACL,WAAW,GAAG,eAAe,CAAC,CAAC,OAAO,SAAS;EAC/C,aAAU;CACX,CAAA;AAEL,CAAC;AAID,MAAa,mBAAmB,WAC9B,SAAS,iBAAiB,EAAE,WAAW,GAAG,SAAS,KAAK;CACtD,OACE,oBAAC,OAAD;EACE,GAAI;EACC;EACL,WAAW,GAAG,eAAe,CAAC,CAAC,aAAa,SAAS;EACrD,aAAU;CACX,CAAA;AAEL,CACF;AAIA,MAAa,eAAe,WAA8C,SAAS,aACjF,EAAE,WAAW,GAAG,SAChB,KACA;CACA,OACE,oBAAC,OAAD;EACE,GAAI;EACC;EACL,WAAW,GAAG,eAAe,CAAC,CAAC,SAAS,SAAS;EACjD,aAAU;CACX,CAAA;AAEL,CAAC;AAED,MAAa,QAAQ;CACnB,MAAM;CACN,MAAM;CACN,OAAO;CACP,aAAa;CACb,SAAS;AACX"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Alert, AlertDescription, AlertDescriptionProps, AlertIcon, AlertIconProps, AlertRoot, AlertRootProps, AlertTitle, AlertTitleProps, AlertTone } from "./alert.cjs";
|
|
2
|
-
export { Alert, AlertDescription, type AlertDescriptionProps, AlertIcon, type AlertIconProps, AlertRoot, type AlertRootProps, AlertTitle, type AlertTitleProps, type AlertTone };
|
|
1
|
+
import { Alert, AlertActions, AlertActionsProps, AlertDescription, AlertDescriptionProps, AlertIcon, AlertIconProps, AlertRoot, AlertRootProps, AlertTitle, AlertTitleProps, AlertTone } from "./alert.cjs";
|
|
2
|
+
export { Alert, AlertActions, type AlertActionsProps, AlertDescription, type AlertDescriptionProps, AlertIcon, type AlertIconProps, AlertRoot, type AlertRootProps, AlertTitle, type AlertTitleProps, type AlertTone };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Alert, AlertDescription, AlertDescriptionProps, AlertIcon, AlertIconProps, AlertRoot, AlertRootProps, AlertTitle, AlertTitleProps, AlertTone } from "./alert.js";
|
|
2
|
-
export { Alert, AlertDescription, type AlertDescriptionProps, AlertIcon, type AlertIconProps, AlertRoot, type AlertRootProps, AlertTitle, type AlertTitleProps, type AlertTone };
|
|
1
|
+
import { Alert, AlertActions, AlertActionsProps, AlertDescription, AlertDescriptionProps, AlertIcon, AlertIconProps, AlertRoot, AlertRootProps, AlertTitle, AlertTitleProps, AlertTone } from "./alert.js";
|
|
2
|
+
export { Alert, AlertActions, type AlertActionsProps, AlertDescription, type AlertDescriptionProps, AlertIcon, type AlertIconProps, AlertRoot, type AlertRootProps, AlertTitle, type AlertTitleProps, type AlertTone };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const require_cx = require("../../styled-system/css/cx.cjs");
|
|
2
|
+
const require_aspect_ratio_box = require("../../styled-system/recipes/aspect-ratio-box.cjs");
|
|
3
|
+
let react = require("react");
|
|
4
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
5
|
+
//#region src/components/aspect-ratio/aspect-ratio.tsx
|
|
6
|
+
const AspectRatio = (0, react.forwardRef)(function AspectRatio({ className, ratio = 1, style, ...props }, ref) {
|
|
7
|
+
const safeRatio = Number.isFinite(ratio) && ratio > 0 ? ratio : 1;
|
|
8
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
9
|
+
...props,
|
|
10
|
+
ref,
|
|
11
|
+
className: require_cx.cx(require_aspect_ratio_box.aspectRatioBox(), className),
|
|
12
|
+
"data-jaci-component": "aspect-ratio",
|
|
13
|
+
"data-slot": "aspect-ratio",
|
|
14
|
+
style: {
|
|
15
|
+
aspectRatio: safeRatio,
|
|
16
|
+
...style
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
//#endregion
|
|
21
|
+
exports.AspectRatio = AspectRatio;
|
|
22
|
+
|
|
23
|
+
//# sourceMappingURL=aspect-ratio.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aspect-ratio.cjs","names":["cx","aspectRatioBox"],"sources":["../../../src/components/aspect-ratio/aspect-ratio.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport type { ComponentPropsWithoutRef } from \"react\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { aspectRatioBox } from \"../../styled-system/recipes\";\n\nexport interface AspectRatioProps extends ComponentPropsWithoutRef<\"div\"> {\n ratio?: number;\n}\n\nexport const AspectRatio = forwardRef<HTMLDivElement, AspectRatioProps>(function AspectRatio(\n { className, ratio = 1, style, ...props },\n ref,\n) {\n const safeRatio = Number.isFinite(ratio) && ratio > 0 ? ratio : 1;\n\n return (\n <div\n {...props}\n ref={ref}\n className={cx(aspectRatioBox(), className)}\n data-jaci-component=\"aspect-ratio\"\n data-slot=\"aspect-ratio\"\n style={{ aspectRatio: safeRatio, ...style }}\n />\n );\n});\n"],"mappings":";;;;;AAUA,MAAa,eAAA,GAAA,MAAA,WAAA,CAA2D,SAAS,YAC/E,EAAE,WAAW,QAAQ,GAAG,OAAO,GAAG,SAClC,KACA;CACA,MAAM,YAAY,OAAO,SAAS,KAAK,KAAK,QAAQ,IAAI,QAAQ;CAEhE,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EACE,GAAI;EACC;EACL,WAAWA,WAAAA,GAAGC,yBAAAA,eAAe,GAAG,SAAS;EACzC,uBAAoB;EACpB,aAAU;EACV,OAAO;GAAE,aAAa;GAAW,GAAG;EAAM;CAC3C,CAAA;AAEL,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef } from "react";
|
|
2
|
+
//#region src/components/aspect-ratio/aspect-ratio.d.ts
|
|
3
|
+
interface AspectRatioProps extends ComponentPropsWithoutRef<"div"> {
|
|
4
|
+
ratio?: number;
|
|
5
|
+
}
|
|
6
|
+
declare const AspectRatio: import("react").ForwardRefExoticComponent<AspectRatioProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { AspectRatio, AspectRatioProps };
|
|
9
|
+
//# sourceMappingURL=aspect-ratio.d.cts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef } from "react";
|
|
2
|
+
//#region src/components/aspect-ratio/aspect-ratio.d.ts
|
|
3
|
+
interface AspectRatioProps extends ComponentPropsWithoutRef<"div"> {
|
|
4
|
+
ratio?: number;
|
|
5
|
+
}
|
|
6
|
+
declare const AspectRatio: import("react").ForwardRefExoticComponent<AspectRatioProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { AspectRatio, AspectRatioProps };
|
|
9
|
+
//# sourceMappingURL=aspect-ratio.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { cx } from "../../styled-system/css/cx.js";
|
|
2
|
+
import { aspectRatioBox } from "../../styled-system/recipes/aspect-ratio-box.js";
|
|
3
|
+
import { forwardRef } from "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/aspect-ratio/aspect-ratio.tsx
|
|
6
|
+
const AspectRatio = forwardRef(function AspectRatio({ className, ratio = 1, style, ...props }, ref) {
|
|
7
|
+
const safeRatio = Number.isFinite(ratio) && ratio > 0 ? ratio : 1;
|
|
8
|
+
return /* @__PURE__ */ jsx("div", {
|
|
9
|
+
...props,
|
|
10
|
+
ref,
|
|
11
|
+
className: cx(aspectRatioBox(), className),
|
|
12
|
+
"data-jaci-component": "aspect-ratio",
|
|
13
|
+
"data-slot": "aspect-ratio",
|
|
14
|
+
style: {
|
|
15
|
+
aspectRatio: safeRatio,
|
|
16
|
+
...style
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
//#endregion
|
|
21
|
+
export { AspectRatio };
|
|
22
|
+
|
|
23
|
+
//# sourceMappingURL=aspect-ratio.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aspect-ratio.js","names":[],"sources":["../../../src/components/aspect-ratio/aspect-ratio.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport type { ComponentPropsWithoutRef } from \"react\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { aspectRatioBox } from \"../../styled-system/recipes\";\n\nexport interface AspectRatioProps extends ComponentPropsWithoutRef<\"div\"> {\n ratio?: number;\n}\n\nexport const AspectRatio = forwardRef<HTMLDivElement, AspectRatioProps>(function AspectRatio(\n { className, ratio = 1, style, ...props },\n ref,\n) {\n const safeRatio = Number.isFinite(ratio) && ratio > 0 ? ratio : 1;\n\n return (\n <div\n {...props}\n ref={ref}\n className={cx(aspectRatioBox(), className)}\n data-jaci-component=\"aspect-ratio\"\n data-slot=\"aspect-ratio\"\n style={{ aspectRatio: safeRatio, ...style }}\n />\n );\n});\n"],"mappings":";;;;;AAUA,MAAa,cAAc,WAA6C,SAAS,YAC/E,EAAE,WAAW,QAAQ,GAAG,OAAO,GAAG,SAClC,KACA;CACA,MAAM,YAAY,OAAO,SAAS,KAAK,KAAK,QAAQ,IAAI,QAAQ;CAEhE,OACE,oBAAC,OAAD;EACE,GAAI;EACC;EACL,WAAW,GAAG,eAAe,GAAG,SAAS;EACzC,uBAAoB;EACpB,aAAU;EACV,OAAO;GAAE,aAAa;GAAW,GAAG;EAAM;CAC3C,CAAA;AAEL,CAAC"}
|
|
@@ -3,7 +3,7 @@ const require_card = require("../../styled-system/recipes/card.cjs");
|
|
|
3
3
|
let react = require("react");
|
|
4
4
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
5
5
|
//#region src/components/card/card.tsx
|
|
6
|
-
const
|
|
6
|
+
const CardBase = (0, react.forwardRef)(function Card({ className, variant = "outline", ...props }, ref) {
|
|
7
7
|
const styles = require_card.card({ variant });
|
|
8
8
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("article", {
|
|
9
9
|
...props,
|
|
@@ -45,11 +45,20 @@ const CardFooter = (0, react.forwardRef)(function CardFooter({ className, ...pro
|
|
|
45
45
|
"data-slot": "card-footer"
|
|
46
46
|
});
|
|
47
47
|
});
|
|
48
|
+
const Card = Object.assign(CardBase, {
|
|
49
|
+
Root: CardBase,
|
|
50
|
+
Header: CardHeader,
|
|
51
|
+
Title: CardTitle,
|
|
52
|
+
Content: CardContent,
|
|
53
|
+
Footer: CardFooter
|
|
54
|
+
});
|
|
55
|
+
const CardNamespace = Card;
|
|
48
56
|
//#endregion
|
|
49
57
|
exports.Card = Card;
|
|
50
58
|
exports.CardContent = CardContent;
|
|
51
59
|
exports.CardFooter = CardFooter;
|
|
52
60
|
exports.CardHeader = CardHeader;
|
|
61
|
+
exports.CardNamespace = CardNamespace;
|
|
53
62
|
exports.CardTitle = CardTitle;
|
|
54
63
|
|
|
55
64
|
//# sourceMappingURL=card.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.cjs","names":["card","cx"],"sources":["../../../src/components/card/card.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport type { ComponentPropsWithoutRef } from \"react\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { card } from \"../../styled-system/recipes\";\n\nexport interface CardProps extends ComponentPropsWithoutRef<\"article\"> {\n variant?: \"outline\" | \"elevated\" | \"subtle\";\n}\n\
|
|
1
|
+
{"version":3,"file":"card.cjs","names":["card","cx"],"sources":["../../../src/components/card/card.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport type { ComponentPropsWithoutRef } from \"react\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { card } from \"../../styled-system/recipes\";\n\nexport interface CardProps extends ComponentPropsWithoutRef<\"article\"> {\n variant?: \"outline\" | \"elevated\" | \"subtle\";\n}\n\nconst CardBase = forwardRef<HTMLElement, CardProps>(function Card(\n { className, variant = \"outline\", ...props },\n ref,\n) {\n const styles = card({ variant });\n\n return (\n <article\n {...props}\n ref={ref}\n className={cx(styles.root, className)}\n data-jaci-component=\"card\"\n data-slot=\"card\"\n />\n );\n});\n\nexport const CardHeader = forwardRef<HTMLDivElement, ComponentPropsWithoutRef<\"div\">>(\n function CardHeader({ className, ...props }, ref) {\n return (\n <div {...props} ref={ref} className={cx(card().header, className)} data-slot=\"card-header\" />\n );\n },\n);\n\nexport const CardTitle = forwardRef<HTMLHeadingElement, ComponentPropsWithoutRef<\"h3\">>(\n function CardTitle({ className, ...props }, ref) {\n return (\n <h3 {...props} ref={ref} className={cx(card().title, className)} data-slot=\"card-title\" />\n );\n },\n);\n\nexport const CardContent = forwardRef<HTMLDivElement, ComponentPropsWithoutRef<\"div\">>(\n function CardContent({ className, ...props }, ref) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(card().content, className)}\n data-slot=\"card-content\"\n />\n );\n },\n);\n\nexport const CardFooter = forwardRef<HTMLDivElement, ComponentPropsWithoutRef<\"div\">>(\n function CardFooter({ className, ...props }, ref) {\n return (\n <div {...props} ref={ref} className={cx(card().footer, className)} data-slot=\"card-footer\" />\n );\n },\n);\n\nexport const Card = Object.assign(CardBase, {\n Root: CardBase,\n Header: CardHeader,\n Title: CardTitle,\n Content: CardContent,\n Footer: CardFooter,\n});\n\nexport const CardNamespace = Card;\n"],"mappings":";;;;;AAUA,MAAM,YAAA,GAAA,MAAA,WAAA,CAA8C,SAAS,KAC3D,EAAE,WAAW,UAAU,WAAW,GAAG,SACrC,KACA;CACA,MAAM,SAASA,aAAAA,KAAK,EAAE,QAAQ,CAAC;CAE/B,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,WAAD;EACE,GAAI;EACC;EACL,WAAWC,WAAAA,GAAG,OAAO,MAAM,SAAS;EACpC,uBAAoB;EACpB,aAAU;CACX,CAAA;AAEL,CAAC;AAED,MAAa,cAAA,GAAA,MAAA,WAAA,CACX,SAAS,WAAW,EAAE,WAAW,GAAG,SAAS,KAAK;CAChD,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EAAK,GAAI;EAAY;EAAK,WAAWA,WAAAA,GAAGD,aAAAA,KAAK,CAAC,CAAC,QAAQ,SAAS;EAAG,aAAU;CAAe,CAAA;AAEhG,CACF;AAEA,MAAa,aAAA,GAAA,MAAA,WAAA,CACX,SAAS,UAAU,EAAE,WAAW,GAAG,SAAS,KAAK;CAC/C,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,MAAD;EAAI,GAAI;EAAY;EAAK,WAAWC,WAAAA,GAAGD,aAAAA,KAAK,CAAC,CAAC,OAAO,SAAS;EAAG,aAAU;CAAc,CAAA;AAE7F,CACF;AAEA,MAAa,eAAA,GAAA,MAAA,WAAA,CACX,SAAS,YAAY,EAAE,WAAW,GAAG,SAAS,KAAK;CACjD,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EACE,GAAI;EACC;EACL,WAAWC,WAAAA,GAAGD,aAAAA,KAAK,CAAC,CAAC,SAAS,SAAS;EACvC,aAAU;CACX,CAAA;AAEL,CACF;AAEA,MAAa,cAAA,GAAA,MAAA,WAAA,CACX,SAAS,WAAW,EAAE,WAAW,GAAG,SAAS,KAAK;CAChD,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EAAK,GAAI;EAAY;EAAK,WAAWC,WAAAA,GAAGD,aAAAA,KAAK,CAAC,CAAC,QAAQ,SAAS;EAAG,aAAU;CAAe,CAAA;AAEhG,CACF;AAEA,MAAa,OAAO,OAAO,OAAO,UAAU;CAC1C,MAAM;CACN,QAAQ;CACR,OAAO;CACP,SAAS;CACT,QAAQ;AACV,CAAC;AAED,MAAa,gBAAgB"}
|
|
@@ -3,11 +3,24 @@ import { ComponentPropsWithoutRef } from "react";
|
|
|
3
3
|
interface CardProps extends ComponentPropsWithoutRef<"article"> {
|
|
4
4
|
variant?: "outline" | "elevated" | "subtle";
|
|
5
5
|
}
|
|
6
|
-
declare const Card: import("react").ForwardRefExoticComponent<CardProps & import("react").RefAttributes<HTMLElement>>;
|
|
7
6
|
declare const CardHeader: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
8
7
|
declare const CardTitle: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
9
8
|
declare const CardContent: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
10
9
|
declare const CardFooter: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
10
|
+
declare const Card: import("react").ForwardRefExoticComponent<CardProps & import("react").RefAttributes<HTMLElement>> & {
|
|
11
|
+
Root: import("react").ForwardRefExoticComponent<CardProps & import("react").RefAttributes<HTMLElement>>;
|
|
12
|
+
Header: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
13
|
+
Title: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
14
|
+
Content: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
15
|
+
Footer: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
16
|
+
};
|
|
17
|
+
declare const CardNamespace: import("react").ForwardRefExoticComponent<CardProps & import("react").RefAttributes<HTMLElement>> & {
|
|
18
|
+
Root: import("react").ForwardRefExoticComponent<CardProps & import("react").RefAttributes<HTMLElement>>;
|
|
19
|
+
Header: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
20
|
+
Title: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
21
|
+
Content: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
22
|
+
Footer: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
23
|
+
};
|
|
11
24
|
//#endregion
|
|
12
|
-
export { Card, CardContent, CardFooter, CardHeader, CardProps, CardTitle };
|
|
25
|
+
export { Card, CardContent, CardFooter, CardHeader, CardNamespace, CardProps, CardTitle };
|
|
13
26
|
//# sourceMappingURL=card.d.cts.map
|
|
@@ -3,11 +3,24 @@ import { ComponentPropsWithoutRef } from "react";
|
|
|
3
3
|
interface CardProps extends ComponentPropsWithoutRef<"article"> {
|
|
4
4
|
variant?: "outline" | "elevated" | "subtle";
|
|
5
5
|
}
|
|
6
|
-
declare const Card: import("react").ForwardRefExoticComponent<CardProps & import("react").RefAttributes<HTMLElement>>;
|
|
7
6
|
declare const CardHeader: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
8
7
|
declare const CardTitle: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
9
8
|
declare const CardContent: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
10
9
|
declare const CardFooter: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
10
|
+
declare const Card: import("react").ForwardRefExoticComponent<CardProps & import("react").RefAttributes<HTMLElement>> & {
|
|
11
|
+
Root: import("react").ForwardRefExoticComponent<CardProps & import("react").RefAttributes<HTMLElement>>;
|
|
12
|
+
Header: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
13
|
+
Title: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
14
|
+
Content: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
15
|
+
Footer: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
16
|
+
};
|
|
17
|
+
declare const CardNamespace: import("react").ForwardRefExoticComponent<CardProps & import("react").RefAttributes<HTMLElement>> & {
|
|
18
|
+
Root: import("react").ForwardRefExoticComponent<CardProps & import("react").RefAttributes<HTMLElement>>;
|
|
19
|
+
Header: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
20
|
+
Title: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
21
|
+
Content: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
22
|
+
Footer: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
23
|
+
};
|
|
11
24
|
//#endregion
|
|
12
|
-
export { Card, CardContent, CardFooter, CardHeader, CardProps, CardTitle };
|
|
25
|
+
export { Card, CardContent, CardFooter, CardHeader, CardNamespace, CardProps, CardTitle };
|
|
13
26
|
//# sourceMappingURL=card.d.ts.map
|
|
@@ -3,7 +3,7 @@ import { card } from "../../styled-system/recipes/card.js";
|
|
|
3
3
|
import { forwardRef } from "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/card/card.tsx
|
|
6
|
-
const
|
|
6
|
+
const CardBase = forwardRef(function Card({ className, variant = "outline", ...props }, ref) {
|
|
7
7
|
const styles = card({ variant });
|
|
8
8
|
return /* @__PURE__ */ jsx("article", {
|
|
9
9
|
...props,
|
|
@@ -45,7 +45,15 @@ const CardFooter = forwardRef(function CardFooter({ className, ...props }, ref)
|
|
|
45
45
|
"data-slot": "card-footer"
|
|
46
46
|
});
|
|
47
47
|
});
|
|
48
|
+
const Card = Object.assign(CardBase, {
|
|
49
|
+
Root: CardBase,
|
|
50
|
+
Header: CardHeader,
|
|
51
|
+
Title: CardTitle,
|
|
52
|
+
Content: CardContent,
|
|
53
|
+
Footer: CardFooter
|
|
54
|
+
});
|
|
55
|
+
const CardNamespace = Card;
|
|
48
56
|
//#endregion
|
|
49
|
-
export { Card, CardContent, CardFooter, CardHeader, CardTitle };
|
|
57
|
+
export { Card, CardContent, CardFooter, CardHeader, CardNamespace, CardTitle };
|
|
50
58
|
|
|
51
59
|
//# sourceMappingURL=card.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.js","names":[],"sources":["../../../src/components/card/card.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport type { ComponentPropsWithoutRef } from \"react\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { card } from \"../../styled-system/recipes\";\n\nexport interface CardProps extends ComponentPropsWithoutRef<\"article\"> {\n variant?: \"outline\" | \"elevated\" | \"subtle\";\n}\n\
|
|
1
|
+
{"version":3,"file":"card.js","names":[],"sources":["../../../src/components/card/card.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport type { ComponentPropsWithoutRef } from \"react\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { card } from \"../../styled-system/recipes\";\n\nexport interface CardProps extends ComponentPropsWithoutRef<\"article\"> {\n variant?: \"outline\" | \"elevated\" | \"subtle\";\n}\n\nconst CardBase = forwardRef<HTMLElement, CardProps>(function Card(\n { className, variant = \"outline\", ...props },\n ref,\n) {\n const styles = card({ variant });\n\n return (\n <article\n {...props}\n ref={ref}\n className={cx(styles.root, className)}\n data-jaci-component=\"card\"\n data-slot=\"card\"\n />\n );\n});\n\nexport const CardHeader = forwardRef<HTMLDivElement, ComponentPropsWithoutRef<\"div\">>(\n function CardHeader({ className, ...props }, ref) {\n return (\n <div {...props} ref={ref} className={cx(card().header, className)} data-slot=\"card-header\" />\n );\n },\n);\n\nexport const CardTitle = forwardRef<HTMLHeadingElement, ComponentPropsWithoutRef<\"h3\">>(\n function CardTitle({ className, ...props }, ref) {\n return (\n <h3 {...props} ref={ref} className={cx(card().title, className)} data-slot=\"card-title\" />\n );\n },\n);\n\nexport const CardContent = forwardRef<HTMLDivElement, ComponentPropsWithoutRef<\"div\">>(\n function CardContent({ className, ...props }, ref) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(card().content, className)}\n data-slot=\"card-content\"\n />\n );\n },\n);\n\nexport const CardFooter = forwardRef<HTMLDivElement, ComponentPropsWithoutRef<\"div\">>(\n function CardFooter({ className, ...props }, ref) {\n return (\n <div {...props} ref={ref} className={cx(card().footer, className)} data-slot=\"card-footer\" />\n );\n },\n);\n\nexport const Card = Object.assign(CardBase, {\n Root: CardBase,\n Header: CardHeader,\n Title: CardTitle,\n Content: CardContent,\n Footer: CardFooter,\n});\n\nexport const CardNamespace = Card;\n"],"mappings":";;;;;AAUA,MAAM,WAAW,WAAmC,SAAS,KAC3D,EAAE,WAAW,UAAU,WAAW,GAAG,SACrC,KACA;CACA,MAAM,SAAS,KAAK,EAAE,QAAQ,CAAC;CAE/B,OACE,oBAAC,WAAD;EACE,GAAI;EACC;EACL,WAAW,GAAG,OAAO,MAAM,SAAS;EACpC,uBAAoB;EACpB,aAAU;CACX,CAAA;AAEL,CAAC;AAED,MAAa,aAAa,WACxB,SAAS,WAAW,EAAE,WAAW,GAAG,SAAS,KAAK;CAChD,OACE,oBAAC,OAAD;EAAK,GAAI;EAAY;EAAK,WAAW,GAAG,KAAK,CAAC,CAAC,QAAQ,SAAS;EAAG,aAAU;CAAe,CAAA;AAEhG,CACF;AAEA,MAAa,YAAY,WACvB,SAAS,UAAU,EAAE,WAAW,GAAG,SAAS,KAAK;CAC/C,OACE,oBAAC,MAAD;EAAI,GAAI;EAAY;EAAK,WAAW,GAAG,KAAK,CAAC,CAAC,OAAO,SAAS;EAAG,aAAU;CAAc,CAAA;AAE7F,CACF;AAEA,MAAa,cAAc,WACzB,SAAS,YAAY,EAAE,WAAW,GAAG,SAAS,KAAK;CACjD,OACE,oBAAC,OAAD;EACE,GAAI;EACC;EACL,WAAW,GAAG,KAAK,CAAC,CAAC,SAAS,SAAS;EACvC,aAAU;CACX,CAAA;AAEL,CACF;AAEA,MAAa,aAAa,WACxB,SAAS,WAAW,EAAE,WAAW,GAAG,SAAS,KAAK;CAChD,OACE,oBAAC,OAAD;EAAK,GAAI;EAAY;EAAK,WAAW,GAAG,KAAK,CAAC,CAAC,QAAQ,SAAS;EAAG,aAAU;CAAe,CAAA;AAEhG,CACF;AAEA,MAAa,OAAO,OAAO,OAAO,UAAU;CAC1C,MAAM;CACN,QAAQ;CACR,OAAO;CACP,SAAS;CACT,QAAQ;AACV,CAAC;AAED,MAAa,gBAAgB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Card, CardContent, CardFooter, CardHeader, CardProps, CardTitle } from "./card.cjs";
|
|
2
|
-
export { Card, CardContent, CardFooter, CardHeader, type CardProps, CardTitle };
|
|
1
|
+
import { Card, CardContent, CardFooter, CardHeader, CardNamespace, CardProps, CardTitle } from "./card.cjs";
|
|
2
|
+
export { Card, CardContent, CardFooter, CardHeader, CardNamespace, type CardProps, CardTitle };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Card, CardContent, CardFooter, CardHeader, CardProps, CardTitle } from "./card.js";
|
|
2
|
-
export { Card, CardContent, CardFooter, CardHeader, type CardProps, CardTitle };
|
|
1
|
+
import { Card, CardContent, CardFooter, CardHeader, CardNamespace, CardProps, CardTitle } from "./card.js";
|
|
2
|
+
export { Card, CardContent, CardFooter, CardHeader, CardNamespace, type CardProps, CardTitle };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
const require_cx = require("../../styled-system/css/cx.cjs");
|
|
2
|
+
const require_code = require("../../styled-system/recipes/code.cjs");
|
|
3
|
+
let react = require("react");
|
|
4
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
5
|
+
//#region src/components/code/code.tsx
|
|
6
|
+
const Code = (0, react.forwardRef)(function Code({ children, className, language, truncate = false, variant = "inline", wrap = false, ...props }, ref) {
|
|
7
|
+
const classNames = require_cx.cx(require_code.code({
|
|
8
|
+
truncate,
|
|
9
|
+
variant,
|
|
10
|
+
wrap
|
|
11
|
+
}), className);
|
|
12
|
+
if (variant === "block") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("pre", {
|
|
13
|
+
...props,
|
|
14
|
+
ref,
|
|
15
|
+
className: classNames,
|
|
16
|
+
"data-jaci-component": "code",
|
|
17
|
+
"data-language": language || void 0,
|
|
18
|
+
"data-slot": "code",
|
|
19
|
+
"data-variant": variant,
|
|
20
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", {
|
|
21
|
+
"data-slot": "code-content",
|
|
22
|
+
children
|
|
23
|
+
})
|
|
24
|
+
});
|
|
25
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", {
|
|
26
|
+
...props,
|
|
27
|
+
ref,
|
|
28
|
+
className: classNames,
|
|
29
|
+
"data-jaci-component": "code",
|
|
30
|
+
"data-language": language || void 0,
|
|
31
|
+
"data-slot": "code",
|
|
32
|
+
"data-variant": variant,
|
|
33
|
+
children
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
//#endregion
|
|
37
|
+
exports.Code = Code;
|
|
38
|
+
|
|
39
|
+
//# sourceMappingURL=code.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code.cjs","names":["cx","code"],"sources":["../../../src/components/code/code.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport type { ComponentPropsWithoutRef, ReactNode } from \"react\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { code } from \"../../styled-system/recipes\";\n\nexport type CodeVariant = \"inline\" | \"block\";\n\nexport interface CodeProps extends Omit<ComponentPropsWithoutRef<\"code\">, \"children\"> {\n children?: ReactNode;\n variant?: CodeVariant;\n language?: string;\n wrap?: boolean;\n truncate?: boolean;\n}\n\nexport const Code = forwardRef<HTMLElement, CodeProps>(function Code(\n { children, className, language, truncate = false, variant = \"inline\", wrap = false, ...props },\n ref,\n) {\n const classNames = cx(code({ truncate, variant, wrap }), className);\n\n if (variant === \"block\") {\n return (\n <pre\n {...props}\n ref={ref as React.Ref<HTMLPreElement>}\n className={classNames}\n data-jaci-component=\"code\"\n data-language={language || undefined}\n data-slot=\"code\"\n data-variant={variant}\n >\n <code data-slot=\"code-content\">{children}</code>\n </pre>\n );\n }\n\n return (\n <code\n {...props}\n ref={ref as React.Ref<HTMLElement>}\n className={classNames}\n data-jaci-component=\"code\"\n data-language={language || undefined}\n data-slot=\"code\"\n data-variant={variant}\n >\n {children}\n </code>\n );\n});\n"],"mappings":";;;;;AAgBA,MAAa,QAAA,GAAA,MAAA,WAAA,CAA0C,SAAS,KAC9D,EAAE,UAAU,WAAW,UAAU,WAAW,OAAO,UAAU,UAAU,OAAO,OAAO,GAAG,SACxF,KACA;CACA,MAAM,aAAaA,WAAAA,GAAGC,aAAAA,KAAK;EAAE;EAAU;EAAS;CAAK,CAAC,GAAG,SAAS;CAElE,IAAI,YAAY,SACd,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EACE,GAAI;EACC;EACL,WAAW;EACX,uBAAoB;EACpB,iBAAe,YAAY,KAAA;EAC3B,aAAU;EACV,gBAAc;YAEd,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;GAAM,aAAU;GAAgB;EAAe,CAAA;CAC5C,CAAA;CAIT,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;EACE,GAAI;EACC;EACL,WAAW;EACX,uBAAoB;EACpB,iBAAe,YAAY,KAAA;EAC3B,aAAU;EACV,gBAAc;EAEb;CACG,CAAA;AAEV,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef, ReactNode } from "react";
|
|
2
|
+
//#region src/components/code/code.d.ts
|
|
3
|
+
type CodeVariant = "inline" | "block";
|
|
4
|
+
interface CodeProps extends Omit<ComponentPropsWithoutRef<"code">, "children"> {
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
variant?: CodeVariant;
|
|
7
|
+
language?: string;
|
|
8
|
+
wrap?: boolean;
|
|
9
|
+
truncate?: boolean;
|
|
10
|
+
}
|
|
11
|
+
declare const Code: import("react").ForwardRefExoticComponent<CodeProps & import("react").RefAttributes<HTMLElement>>;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { Code, CodeProps, CodeVariant };
|
|
14
|
+
//# sourceMappingURL=code.d.cts.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef, ReactNode } from "react";
|
|
2
|
+
//#region src/components/code/code.d.ts
|
|
3
|
+
type CodeVariant = "inline" | "block";
|
|
4
|
+
interface CodeProps extends Omit<ComponentPropsWithoutRef<"code">, "children"> {
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
variant?: CodeVariant;
|
|
7
|
+
language?: string;
|
|
8
|
+
wrap?: boolean;
|
|
9
|
+
truncate?: boolean;
|
|
10
|
+
}
|
|
11
|
+
declare const Code: import("react").ForwardRefExoticComponent<CodeProps & import("react").RefAttributes<HTMLElement>>;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { Code, CodeProps, CodeVariant };
|
|
14
|
+
//# sourceMappingURL=code.d.ts.map
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { cx } from "../../styled-system/css/cx.js";
|
|
2
|
+
import { code } from "../../styled-system/recipes/code.js";
|
|
3
|
+
import { forwardRef } from "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/code/code.tsx
|
|
6
|
+
const Code = forwardRef(function Code({ children, className, language, truncate = false, variant = "inline", wrap = false, ...props }, ref) {
|
|
7
|
+
const classNames = cx(code({
|
|
8
|
+
truncate,
|
|
9
|
+
variant,
|
|
10
|
+
wrap
|
|
11
|
+
}), className);
|
|
12
|
+
if (variant === "block") return /* @__PURE__ */ jsx("pre", {
|
|
13
|
+
...props,
|
|
14
|
+
ref,
|
|
15
|
+
className: classNames,
|
|
16
|
+
"data-jaci-component": "code",
|
|
17
|
+
"data-language": language || void 0,
|
|
18
|
+
"data-slot": "code",
|
|
19
|
+
"data-variant": variant,
|
|
20
|
+
children: /* @__PURE__ */ jsx("code", {
|
|
21
|
+
"data-slot": "code-content",
|
|
22
|
+
children
|
|
23
|
+
})
|
|
24
|
+
});
|
|
25
|
+
return /* @__PURE__ */ jsx("code", {
|
|
26
|
+
...props,
|
|
27
|
+
ref,
|
|
28
|
+
className: classNames,
|
|
29
|
+
"data-jaci-component": "code",
|
|
30
|
+
"data-language": language || void 0,
|
|
31
|
+
"data-slot": "code",
|
|
32
|
+
"data-variant": variant,
|
|
33
|
+
children
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
//#endregion
|
|
37
|
+
export { Code };
|
|
38
|
+
|
|
39
|
+
//# sourceMappingURL=code.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code.js","names":[],"sources":["../../../src/components/code/code.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport type { ComponentPropsWithoutRef, ReactNode } from \"react\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { code } from \"../../styled-system/recipes\";\n\nexport type CodeVariant = \"inline\" | \"block\";\n\nexport interface CodeProps extends Omit<ComponentPropsWithoutRef<\"code\">, \"children\"> {\n children?: ReactNode;\n variant?: CodeVariant;\n language?: string;\n wrap?: boolean;\n truncate?: boolean;\n}\n\nexport const Code = forwardRef<HTMLElement, CodeProps>(function Code(\n { children, className, language, truncate = false, variant = \"inline\", wrap = false, ...props },\n ref,\n) {\n const classNames = cx(code({ truncate, variant, wrap }), className);\n\n if (variant === \"block\") {\n return (\n <pre\n {...props}\n ref={ref as React.Ref<HTMLPreElement>}\n className={classNames}\n data-jaci-component=\"code\"\n data-language={language || undefined}\n data-slot=\"code\"\n data-variant={variant}\n >\n <code data-slot=\"code-content\">{children}</code>\n </pre>\n );\n }\n\n return (\n <code\n {...props}\n ref={ref as React.Ref<HTMLElement>}\n className={classNames}\n data-jaci-component=\"code\"\n data-language={language || undefined}\n data-slot=\"code\"\n data-variant={variant}\n >\n {children}\n </code>\n );\n});\n"],"mappings":";;;;;AAgBA,MAAa,OAAO,WAAmC,SAAS,KAC9D,EAAE,UAAU,WAAW,UAAU,WAAW,OAAO,UAAU,UAAU,OAAO,OAAO,GAAG,SACxF,KACA;CACA,MAAM,aAAa,GAAG,KAAK;EAAE;EAAU;EAAS;CAAK,CAAC,GAAG,SAAS;CAElE,IAAI,YAAY,SACd,OACE,oBAAC,OAAD;EACE,GAAI;EACC;EACL,WAAW;EACX,uBAAoB;EACpB,iBAAe,YAAY,KAAA;EAC3B,aAAU;EACV,gBAAc;YAEd,oBAAC,QAAD;GAAM,aAAU;GAAgB;EAAe,CAAA;CAC5C,CAAA;CAIT,OACE,oBAAC,QAAD;EACE,GAAI;EACC;EACL,WAAW;EACX,uBAAoB;EACpB,iBAAe,YAAY,KAAA;EAC3B,aAAU;EACV,gBAAc;EAEb;CACG,CAAA;AAEV,CAAC"}
|