@atom-learning/components 6.14.0 → 6.14.3
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/banner/banner-regular/BannerRegularDismiss.d.ts +2 -2
- package/dist/components/banner/banner-slim/BannerSlimDismiss.d.ts +2 -2
- package/dist/components/index.d.ts +2 -2
- package/dist/components/number-input/NumberInputStepper.d.ts +2 -2
- package/dist/components/pagination/PaginationNextButton.d.ts +2 -2
- package/dist/components/pagination/PaginationPreviousButton.d.ts +2 -2
- package/dist/components/sortable/Handle.d.ts +2 -2
- package/dist/components/tile-toggle-group/TileToggleGroupItem.d.ts +1 -1
- package/dist/components/top-bar/TopBar.d.ts +2 -2
- package/dist/components/tree/TreeCollapsibleTrigger.js.map +1 -1
- package/dist/docgen.json +1 -1
- package/dist/index.cjs.js +6 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/types/navigatorActions.types.d.ts +2 -1
- package/dist/utilities/optional-tooltip-wrapper/OptionalTooltipWrapper.js +6 -1
- package/dist/utilities/optional-tooltip-wrapper/OptionalTooltipWrapper.js.map +1 -1
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export * from './components';
|
|
2
2
|
export * from './styled';
|
|
3
|
+
export type { NavigatorActions } from './types/navigatorActions.types';
|
|
4
|
+
export type { TOptionalTooltipWrapperProps } from './utilities/optional-tooltip-wrapper/OptionalTooltipWrapper';
|
|
3
5
|
export * from './experiments/color-scheme/ColorScheme';
|
|
@@ -2,7 +2,12 @@ import { Tooltip } from "../../components/tooltip/Tooltip.js";
|
|
|
2
2
|
import * as React$1 from "react";
|
|
3
3
|
//#region src/utilities/optional-tooltip-wrapper/OptionalTooltipWrapper.tsx
|
|
4
4
|
var OptionalTooltipWrapper = ({ hasTooltip, label, tooltipSide, children }) => {
|
|
5
|
-
if (hasTooltip) return /* @__PURE__ */ React$1.createElement(Tooltip, null, /* @__PURE__ */ React$1.createElement(Tooltip.Trigger, {
|
|
5
|
+
if (hasTooltip) return /* @__PURE__ */ React$1.createElement(Tooltip, null, /* @__PURE__ */ React$1.createElement(Tooltip.Trigger, {
|
|
6
|
+
asChild: true,
|
|
7
|
+
onFocus: (e) => {
|
|
8
|
+
if (!e.currentTarget.matches(":focus-visible")) e.preventDefault();
|
|
9
|
+
}
|
|
10
|
+
}, children), /* @__PURE__ */ React$1.createElement(Tooltip.Content, { side: tooltipSide }, label));
|
|
6
11
|
return /* @__PURE__ */ React$1.createElement(React$1.Fragment, null, children);
|
|
7
12
|
};
|
|
8
13
|
OptionalTooltipWrapper.displayName = "OptionalTooltipWrapper";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OptionalTooltipWrapper.js","names":[],"sources":["../../../src/utilities/optional-tooltip-wrapper/OptionalTooltipWrapper.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { Tooltip } from '~/components/tooltip/Tooltip'\n\nexport type TOptionalTooltipWrapperProps = {\n hasTooltip?: boolean\n label?: React.ReactNode\n tooltipSide?: React.ComponentProps<typeof Tooltip.Content>['side']\n}\n\nexport const OptionalTooltipWrapper = ({\n hasTooltip,\n label,\n tooltipSide,\n children\n}: React.PropsWithChildren<TOptionalTooltipWrapperProps>) => {\n if (hasTooltip) {\n return (\n <Tooltip>\n <Tooltip.Trigger
|
|
1
|
+
{"version":3,"file":"OptionalTooltipWrapper.js","names":[],"sources":["../../../src/utilities/optional-tooltip-wrapper/OptionalTooltipWrapper.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { Tooltip } from '~/components/tooltip/Tooltip'\n\nexport type TOptionalTooltipWrapperProps = {\n hasTooltip?: boolean\n label?: React.ReactNode\n tooltipSide?: React.ComponentProps<typeof Tooltip.Content>['side']\n}\n\nexport const OptionalTooltipWrapper = ({\n hasTooltip,\n label,\n tooltipSide,\n children\n}: React.PropsWithChildren<TOptionalTooltipWrapperProps>) => {\n if (hasTooltip) {\n return (\n <Tooltip>\n <Tooltip.Trigger\n asChild\n onFocus={(e: React.FocusEvent) => {\n // Only show the tooltip on keyboard focus, not programmatic focus\n // (e.g. when a dialog auto-focuses this element on open).\n // The browser sets :focus-visible during keyboard navigation,\n // so if it is absent we know the focus was not from the keyboard\n // and call preventDefault() to tell Radix to skip opening the tooltip.\n if (!(e.currentTarget as Element).matches(':focus-visible')) {\n e.preventDefault()\n }\n }}\n >\n {children}\n </Tooltip.Trigger>\n <Tooltip.Content side={tooltipSide}>{label}</Tooltip.Content>\n </Tooltip>\n )\n }\n\n // children could be multiple elements/components,\n // so we need a fragment here.\n // eslint-disable-next-line react/jsx-no-useless-fragment\n return <>{children}</>\n}\n\nOptionalTooltipWrapper.displayName = 'OptionalTooltipWrapper'\n"],"mappings":";;;AAUA,IAAa,0BAA0B,EACrC,YACA,OACA,aACA,eAC2D;AAC3D,KAAI,WACF,QACE,wBAAA,cAAC,SAAA,MACC,wBAAA,cAAC,QAAQ,SAAT;EACE,SAAA;EACA,UAAU,MAAwB;AAMhC,OAAI,CAAE,EAAE,cAA0B,QAAQ,iBAAiB,CACzD,GAAE,gBAAgB;;EAKN,EADf,SACe,EAClB,wBAAA,cAAC,QAAQ,SAAT,EAAiB,MAAM,aAAsC,EAAxB,MAAwB,CACrD;AAOd,QAAO,wBAAA,cAAA,QAAA,UAAA,MAAG,SAAY;;AAGxB,uBAAuB,cAAc"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atom-learning/components",
|
|
3
|
-
"version": "6.14.
|
|
3
|
+
"version": "6.14.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"homepage": "https://github.com/Atom-Learning/components#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -69,6 +69,7 @@
|
|
|
69
69
|
"validate:linting": "oxlint src/ --quiet",
|
|
70
70
|
"validate:size": "size-limit",
|
|
71
71
|
"validate:types": "tsc --noEmit",
|
|
72
|
+
"validate:public-api": "node ./scripts/api-snapshot.mjs",
|
|
72
73
|
"precommit": "lint-staged"
|
|
73
74
|
},
|
|
74
75
|
"dependencies": {
|