@charcoal-ui/react 4.6.1 → 4.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/HintText/index.d.ts +10 -0
- package/dist/components/HintText/index.d.ts.map +1 -0
- package/dist/index.cjs.js +16 -0
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.css +33 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +15 -0
- package/dist/index.esm.js.map +1 -1
- package/dist/layered.css +33 -0
- package/dist/layered.css.map +1 -1
- package/package.json +6 -6
- package/src/components/HintText/__snapshots__/index.story.storyshot +57 -0
- package/src/components/HintText/index.css +35 -0
- package/src/components/HintText/index.story.tsx +39 -0
- package/src/components/HintText/index.tsx +29 -0
- package/src/index.ts +1 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import './index.css';
|
|
3
|
+
export type HintTextContext = 'page' | 'section';
|
|
4
|
+
export interface HintTextProps {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
context: HintTextContext;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
export default function HintText({ children, context, className, }: HintTextProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/HintText/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGjC,OAAO,aAAa,CAAA;AAGpB,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,SAAS,CAAA;AAChD,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,SAAS,CAAA;IACnB,OAAO,EAAE,eAAe,CAAA;IACxB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,EAC/B,QAAQ,EACR,OAAO,EACP,SAAS,GACV,EAAE,aAAa,2CAWf"}
|
package/dist/index.cjs.js
CHANGED
|
@@ -37,6 +37,7 @@ __export(src_exports, {
|
|
|
37
37
|
Clickable: () => Clickable_default,
|
|
38
38
|
DropdownMenuItem: () => DropdownMenuItem,
|
|
39
39
|
DropdownSelector: () => DropdownSelector,
|
|
40
|
+
HintText: () => HintText,
|
|
40
41
|
Icon: () => Icon_default,
|
|
41
42
|
IconButton: () => IconButton_default,
|
|
42
43
|
LoadingSpinner: () => LoadingSpinner_default,
|
|
@@ -1564,6 +1565,20 @@ var TagItem = (0, import_react37.forwardRef)(function TagItemInner({
|
|
|
1564
1565
|
] });
|
|
1565
1566
|
});
|
|
1566
1567
|
var TagItem_default = (0, import_react37.memo)(TagItem);
|
|
1568
|
+
|
|
1569
|
+
// src/components/HintText/index.tsx
|
|
1570
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
1571
|
+
function HintText({
|
|
1572
|
+
children,
|
|
1573
|
+
context,
|
|
1574
|
+
className
|
|
1575
|
+
}) {
|
|
1576
|
+
const classNames = useClassNames("charcoal-hint-text", className);
|
|
1577
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: classNames, "data-context": context, children: [
|
|
1578
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "charcoal-hint-text-icon", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Icon_default, { name: "16/Info" }) }),
|
|
1579
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: "charcoal-hint-text-message", children })
|
|
1580
|
+
] });
|
|
1581
|
+
}
|
|
1567
1582
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1568
1583
|
0 && (module.exports = {
|
|
1569
1584
|
Button,
|
|
@@ -1572,6 +1587,7 @@ var TagItem_default = (0, import_react37.memo)(TagItem);
|
|
|
1572
1587
|
Clickable,
|
|
1573
1588
|
DropdownMenuItem,
|
|
1574
1589
|
DropdownSelector,
|
|
1590
|
+
HintText,
|
|
1575
1591
|
Icon,
|
|
1576
1592
|
IconButton,
|
|
1577
1593
|
LoadingSpinner,
|