@atom-learning/components 6.6.0-beta.4 → 6.6.0-beta.5
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/pagination/Pagination.d.ts +1 -1
- package/dist/components/pagination/Pagination.js +3 -3
- package/dist/components/pagination/Pagination.js.map +1 -1
- package/dist/components/tree/TreeText.js +2 -2
- package/dist/components/tree/TreeText.js.map +1 -1
- package/dist/index.cjs.js +5 -5
- package/dist/index.cjs.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { PaginationProps } from './types';
|
|
3
3
|
export declare const Pagination: {
|
|
4
|
-
({ colorScheme, onSelectedPageChange, selectedPage, visibleElementsCount, pagesCount, indicatedPages, disabledPages, onItemHover, labels, children, ...rest }: PaginationProps): React.JSX.Element | null;
|
|
4
|
+
({ colorScheme, onSelectedPageChange, selectedPage, visibleElementsCount, pagesCount, indicatedPages, disabledPages, onItemHover, labels, children, className, ...rest }: PaginationProps): React.JSX.Element | null;
|
|
5
5
|
displayName: string;
|
|
6
6
|
} & {
|
|
7
7
|
Popover: ({ children }: React.PropsWithChildren<unknown>) => React.JSX.Element;
|
|
@@ -6,7 +6,7 @@ import { PaginationItems } from "./PaginationItems.js";
|
|
|
6
6
|
import clsx from "clsx";
|
|
7
7
|
import * as React$1 from "react";
|
|
8
8
|
//#region src/components/pagination/Pagination.tsx
|
|
9
|
-
var PaginationComponent = ({ colorScheme, onSelectedPageChange, selectedPage, visibleElementsCount = VisibleElementsAmount.LESS, pagesCount, indicatedPages = [], disabledPages = [], onItemHover = () => null, labels = {}, children, ...rest }) => {
|
|
9
|
+
var PaginationComponent = ({ colorScheme, onSelectedPageChange, selectedPage, visibleElementsCount = VisibleElementsAmount.LESS, pagesCount, indicatedPages = [], disabledPages = [], onItemHover = () => null, labels = {}, children, className, ...rest }) => {
|
|
10
10
|
if (!pagesCount) return null;
|
|
11
11
|
const paginationProviderProps = {
|
|
12
12
|
onSelectedPageChange,
|
|
@@ -24,8 +24,8 @@ var PaginationComponent = ({ colorScheme, onSelectedPageChange, selectedPage, vi
|
|
|
24
24
|
...colorScheme,
|
|
25
25
|
asChild: true
|
|
26
26
|
}, /* @__PURE__ */ React$1.createElement("div", {
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
...rest,
|
|
28
|
+
className: clsx("flex", "gap-1", className)
|
|
29
29
|
}, children || /* @__PURE__ */ React$1.createElement(PaginationItems, null))));
|
|
30
30
|
};
|
|
31
31
|
var Pagination = Object.assign(PaginationComponent, { Popover: PaginationPopover });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pagination.js","names":[],"sources":["../../../src/components/pagination/Pagination.tsx"],"sourcesContent":["import clsx from 'clsx'\nimport * as React from 'react'\n\nimport { ColorScheme } from '../../experiments/color-scheme/ColorScheme'\nimport { PaginationProvider } from './pagination-context/PaginationContext'\nimport { VisibleElementsAmount } from './pagination.constants'\nimport { PaginationItems } from './PaginationItems'\nimport { PaginationPopover } from './PaginationPopover'\nimport type { PaginationProps, PaginationProviderProps } from './types'\n\nconst PaginationComponent = ({\n colorScheme,\n onSelectedPageChange,\n selectedPage,\n visibleElementsCount = VisibleElementsAmount.LESS,\n pagesCount,\n indicatedPages = [],\n disabledPages = [],\n onItemHover = () => null,\n labels = {},\n children,\n ...rest\n}: PaginationProps) => {\n if (!pagesCount) return null\n\n const paginationProviderProps: PaginationProviderProps = {\n onSelectedPageChange,\n selectedPage,\n visibleElementsCount,\n pagesCount,\n indicatedPages,\n disabledPages,\n onItemHover,\n labels\n }\n\n return (\n <PaginationProvider {...paginationProviderProps}>\n <ColorScheme base=\"grey1\" accent=\"primary1\" {...colorScheme} asChild>\n <div className={clsx('flex', 'gap-1',
|
|
1
|
+
{"version":3,"file":"Pagination.js","names":[],"sources":["../../../src/components/pagination/Pagination.tsx"],"sourcesContent":["import clsx from 'clsx'\nimport * as React from 'react'\n\nimport { ColorScheme } from '../../experiments/color-scheme/ColorScheme'\nimport { PaginationProvider } from './pagination-context/PaginationContext'\nimport { VisibleElementsAmount } from './pagination.constants'\nimport { PaginationItems } from './PaginationItems'\nimport { PaginationPopover } from './PaginationPopover'\nimport type { PaginationProps, PaginationProviderProps } from './types'\n\nconst PaginationComponent = ({\n colorScheme,\n onSelectedPageChange,\n selectedPage,\n visibleElementsCount = VisibleElementsAmount.LESS,\n pagesCount,\n indicatedPages = [],\n disabledPages = [],\n onItemHover = () => null,\n labels = {},\n children,\n className,\n ...rest\n}: PaginationProps) => {\n if (!pagesCount) return null\n\n const paginationProviderProps: PaginationProviderProps = {\n onSelectedPageChange,\n selectedPage,\n visibleElementsCount,\n pagesCount,\n indicatedPages,\n disabledPages,\n onItemHover,\n labels\n }\n\n return (\n <PaginationProvider {...paginationProviderProps}>\n <ColorScheme base=\"grey1\" accent=\"primary1\" {...colorScheme} asChild>\n <div {...rest} className={clsx('flex', 'gap-1', className)}>\n {children || <PaginationItems />}\n </div>\n </ColorScheme>\n </PaginationProvider>\n )\n}\n\nexport const Pagination = Object.assign(PaginationComponent, {\n Popover: PaginationPopover\n})\n\nPaginationComponent.displayName = 'Pagination'\n"],"mappings":";;;;;;;;AAUA,IAAM,uBAAuB,EAC3B,aACA,sBACA,cACA,uBAAuB,sBAAsB,MAC7C,YACA,iBAAiB,EAAE,EACnB,gBAAgB,EAAE,EAClB,oBAAoB,MACpB,SAAS,EAAE,EACX,UACA,WACA,GAAG,WACkB;AACrB,KAAI,CAAC,WAAY,QAAO;CAExB,MAAM,0BAAmD;EACvD;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD;AAED,QACE,wBAAA,cAAC,oBAAuB,yBACtB,wBAAA,cAAC,aAAD;EAAa,MAAK;EAAQ,QAAO;EAAW,GAAI;EAAa,SAAA;EAI/C,EAHZ,wBAAA,cAAC,OAAD;EAAK,GAAI;EAAM,WAAW,KAAK,QAAQ,SAAS,UAAU;EAEpD,EADH,YAAY,wBAAA,cAAC,iBAAA,KAAkB,CAC5B,CACM,CACK;;AAIzB,IAAa,aAAa,OAAO,OAAO,qBAAqB,EAC3D,SAAS,mBACV,CAAC;AAEF,oBAAoB,cAAc"}
|
|
@@ -4,9 +4,9 @@ import React from "react";
|
|
|
4
4
|
//#region src/components/tree/TreeText.tsx
|
|
5
5
|
var TreeText = (props) => /* @__PURE__ */ React.createElement(Text, {
|
|
6
6
|
as: "span",
|
|
7
|
+
...props,
|
|
7
8
|
className: clsx("py-0.5", "whitespace-nowrap", "overflow-x-hidden", "text-ellipsis", props.className),
|
|
8
|
-
size: "md"
|
|
9
|
-
...props
|
|
9
|
+
size: "md"
|
|
10
10
|
});
|
|
11
11
|
//#endregion
|
|
12
12
|
export { TreeText };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TreeText.js","names":[],"sources":["../../../src/components/tree/TreeText.tsx"],"sourcesContent":["import clsx from 'clsx'\nimport React from 'react'\n\nimport { Text } from '~/components/text/Text'\n\ntype TStyledTreeTextProps = React.ComponentProps<typeof Text>\n\nexport const TreeText = (props: TStyledTreeTextProps): JSX.Element => (\n <Text\n as=\"span\"\n className={clsx(\n 'py-0.5',\n 'whitespace-nowrap',\n 'overflow-x-hidden',\n 'text-ellipsis',\n props.className\n )}\n size=\"md\"\n
|
|
1
|
+
{"version":3,"file":"TreeText.js","names":[],"sources":["../../../src/components/tree/TreeText.tsx"],"sourcesContent":["import clsx from 'clsx'\nimport React from 'react'\n\nimport { Text } from '~/components/text/Text'\n\ntype TStyledTreeTextProps = React.ComponentProps<typeof Text>\n\nexport const TreeText = (props: TStyledTreeTextProps): JSX.Element => (\n <Text\n as=\"span\"\n {...props}\n className={clsx(\n 'py-0.5',\n 'whitespace-nowrap',\n 'overflow-x-hidden',\n 'text-ellipsis',\n props.className\n )}\n size=\"md\"\n />\n)\n"],"mappings":";;;;AAOA,IAAa,YAAY,UACvB,sBAAA,cAAC,MAAD;CACE,IAAG;CACH,GAAI;CACJ,WAAW,KACT,UACA,qBACA,qBACA,iBACA,MAAM,UACP;CACD,MAAK;CACL,CAAA"}
|
package/dist/index.cjs.js
CHANGED
|
@@ -2422,9 +2422,9 @@ var TreeIcon = ({ className, ...props }) => /* @__PURE__ */ react.createElement(
|
|
|
2422
2422
|
//#region src/components/tree/TreeText.tsx
|
|
2423
2423
|
var TreeText = (props) => /* @__PURE__ */ react.default.createElement(Text, {
|
|
2424
2424
|
as: "span",
|
|
2425
|
+
...props,
|
|
2425
2426
|
className: (0, clsx.default)("py-0.5", "whitespace-nowrap", "overflow-x-hidden", "text-ellipsis", props.className),
|
|
2426
|
-
size: "md"
|
|
2427
|
-
...props
|
|
2427
|
+
size: "md"
|
|
2428
2428
|
});
|
|
2429
2429
|
//#endregion
|
|
2430
2430
|
//#region src/components/tree/TreeItemContent.tsx
|
|
@@ -5216,7 +5216,7 @@ var PaginationItems = () => {
|
|
|
5216
5216
|
};
|
|
5217
5217
|
//#endregion
|
|
5218
5218
|
//#region src/components/pagination/Pagination.tsx
|
|
5219
|
-
var PaginationComponent = ({ colorScheme, onSelectedPageChange, selectedPage, visibleElementsCount = VisibleElementsAmount.LESS, pagesCount, indicatedPages = [], disabledPages = [], onItemHover = () => null, labels = {}, children, ...rest }) => {
|
|
5219
|
+
var PaginationComponent = ({ colorScheme, onSelectedPageChange, selectedPage, visibleElementsCount = VisibleElementsAmount.LESS, pagesCount, indicatedPages = [], disabledPages = [], onItemHover = () => null, labels = {}, children, className, ...rest }) => {
|
|
5220
5220
|
if (!pagesCount) return null;
|
|
5221
5221
|
const paginationProviderProps = {
|
|
5222
5222
|
onSelectedPageChange,
|
|
@@ -5234,8 +5234,8 @@ var PaginationComponent = ({ colorScheme, onSelectedPageChange, selectedPage, vi
|
|
|
5234
5234
|
...colorScheme,
|
|
5235
5235
|
asChild: true
|
|
5236
5236
|
}, /* @__PURE__ */ react.createElement("div", {
|
|
5237
|
-
|
|
5238
|
-
|
|
5237
|
+
...rest,
|
|
5238
|
+
className: (0, clsx.default)("flex", "gap-1", className)
|
|
5239
5239
|
}, children || /* @__PURE__ */ react.createElement(PaginationItems, null))));
|
|
5240
5240
|
};
|
|
5241
5241
|
var Pagination = Object.assign(PaginationComponent, { Popover: PaginationPopover });
|