@theguild/components 9.6.0 → 9.7.0-alpha-20250402161139-ca41df4325613c4c8201ec633c2872357bad25c6

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.
@@ -10,6 +10,7 @@ export { ReactComponent as AccountBox, ReactComponent as AppsIcon, ReactComponen
10
10
  export { DiscordIcon, GitHubIcon, InformationCircleIcon } from 'nextra/icons';
11
11
  export { Image } from './image.mjs';
12
12
  export { InfoList } from './info-list.mjs';
13
+ export { Input } from './input.mjs';
13
14
  export { LegacyPackageCmd } from './legacy-package-cmd.mjs';
14
15
  export { MarketplaceList } from './marketplace-list.mjs';
15
16
  export { MarketplaceSearch } from './marketplace-search.mjs';
@@ -46,6 +47,7 @@ import 'next/image';
46
47
  import 'next/link';
47
48
  import 'react-player';
48
49
  import 'react/jsx-runtime';
50
+ import '../types/severity.mjs';
49
51
  import '../products.mjs';
50
52
  import '@giscus/react';
51
53
  import './faq/attach-page-faq-schema.mjs';
@@ -9,6 +9,7 @@ import { HeroVideo } from "./hero-video";
9
9
  export * from "./icons";
10
10
  import { Image } from "./image";
11
11
  import { InfoList } from "./info-list";
12
+ import { Input } from "./input";
12
13
  import { LegacyPackageCmd } from "./legacy-package-cmd";
13
14
  import { MarketplaceList } from "./marketplace-list";
14
15
  import { MarketplaceSearch } from "./marketplace-search";
@@ -55,6 +56,7 @@ export {
55
56
  HiveNavigation,
56
57
  Image,
57
58
  InfoList,
59
+ Input,
58
60
  LegacyPackageCmd,
59
61
  MarketplaceList,
60
62
  MarketplaceSearch,
@@ -0,0 +1,10 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { Severity } from '../types/severity.mjs';
3
+
4
+ interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
5
+ severity?: Severity;
6
+ message?: string;
7
+ }
8
+ declare function Input({ severity, message, ...props }: InputProps): react_jsx_runtime.JSX.Element;
9
+
10
+ export { Input, type InputProps };
@@ -0,0 +1,35 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { cn } from "../cn";
3
+ function Input({ severity, message, ...props }) {
4
+ return /* @__PURE__ */ jsxs(
5
+ "div",
6
+ {
7
+ className: cn(
8
+ "rounded-[9px] border border-blue-400 bg-white outline-offset-2 focus-within:outline focus-within:outline-2 dark:border-neutral-400 dark:bg-neutral-800",
9
+ "focus-visible:outline-green-800/40",
10
+ "[&:focus-within:has([aria-invalid],:invalid)]:outline-critical-dark [&:has([aria-invalid],:invalid)]:border-critical-dark/50",
11
+ severity === "warning" && "border-warning-bright/50 outline-warning-bright dark:border-warning-bright/50",
12
+ severity === "positive" && "border-positive-dark/50 outline-positive-dark dark:border-positive-dark/50"
13
+ ),
14
+ children: [
15
+ /* @__PURE__ */ jsx(
16
+ "input",
17
+ {
18
+ "aria-invalid": severity === "critical" ? true : void 0,
19
+ className: cn(
20
+ "w-full rounded-lg bg-white py-3 indent-4 font-medium transition-[background-color] placeholder:text-green-800 placeholder-shown:bg-blue-100 autofill:shadow-[inset_0_0_0px_1000px_rgb(255,255,255)] autofill:[-webkit-text-fill-color:theme(colors.green.1000)] autofill:first-line:font-sans hover:bg-white focus:bg-white focus-visible:outline-none focus-visible:ring-0 dark:bg-neutral-800 dark:text-white dark:placeholder:text-neutral-300 dark:placeholder-shown:bg-neutral-900 dark:hover:bg-neutral-800 dark:focus:bg-neutral-800",
21
+ message && "rounded-b-none",
22
+ "pr-6 [&:is(:invalid,[aria-invalid])]:border-critical-dark/20 [&:is(:invalid,[aria-invalid])]:placeholder-shown:bg-critical-dark/5",
23
+ props.className
24
+ ),
25
+ ...props
26
+ }
27
+ ),
28
+ message && (severity === "critical" ? /* @__PURE__ */ jsx("p", { className: "rounded-b-lg bg-critical-dark/10 py-0.5 pl-4 text-sm text-critical-dark dark:bg-critical-bright/20 dark:text-white", children: message }) : severity === "warning" ? /* @__PURE__ */ jsx("p", { className: "rounded-b-lg bg-warning-bright/10 py-0.5 pl-4 text-sm text-warning-bright", children: message }) : /* @__PURE__ */ jsx("p", { className: "rounded-b-lg bg-positive-dark/10 py-0.5 pl-4 text-sm text-positive-dark", children: message }))
29
+ ]
30
+ }
31
+ );
32
+ }
33
+ export {
34
+ Input
35
+ };
package/dist/index.d.mts CHANGED
@@ -13,6 +13,7 @@ export { ReactComponent as AccountBox, ReactComponent as AngularLogo, ReactCompo
13
13
  export { DiscordIcon, GitHubIcon, InformationCircleIcon } from 'nextra/icons';
14
14
  export { Image } from './components/image.mjs';
15
15
  export { InfoList } from './components/info-list.mjs';
16
+ export { Input } from './components/input.mjs';
16
17
  export { LegacyPackageCmd } from './components/legacy-package-cmd.mjs';
17
18
  export { MarketplaceList } from './components/marketplace-list.mjs';
18
19
  export { MarketplaceSearch } from './components/marketplace-search.mjs';
@@ -52,6 +53,7 @@ import 'react';
52
53
  import 'url';
53
54
  import 'next/image';
54
55
  import 'react/jsx-runtime';
56
+ import './types/severity.mjs';
55
57
  import '@giscus/react';
56
58
  import './components/faq/attach-page-faq-schema.mjs';
57
59
  import 'next/link';
@@ -0,0 +1,3 @@
1
+ type Severity = 'critical' | 'positive' | 'warning';
2
+
3
+ export type { Severity };
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theguild/components",
3
- "version": "9.6.0",
3
+ "version": "9.7.0-alpha-20250402161139-ca41df4325613c4c8201ec633c2872357bad25c6",
4
4
  "repository": {
5
5
  "url": "https://github.com/the-guild-org/docs",
6
6
  "directory": "packages/components"
@@ -38,7 +38,7 @@
38
38
  "style.css"
39
39
  ],
40
40
  "peerDependencies": {
41
- "@theguild/tailwind-config": "^0.6.2",
41
+ "@theguild/tailwind-config": "^0.6.3",
42
42
  "next": "^13 || ^14 || ^15.0.0",
43
43
  "react": "^18.2.0",
44
44
  "react-dom": "^18.2.0"
@@ -61,7 +61,7 @@
61
61
  },
62
62
  "devDependencies": {
63
63
  "@svgr/plugin-svgo": "^8.1.0",
64
- "@theguild/tailwind-config": "0.6.2",
64
+ "@theguild/tailwind-config": "0.6.3",
65
65
  "@types/dedent": "0.7.2",
66
66
  "@types/mdast": "4.0.4",
67
67
  "@types/react": "18.3.18",