@orfium/ictinus 5.43.2 → 5.43.4

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.
Files changed (44) hide show
  1. package/.turbo/turbo-build.log +20 -20
  2. package/CHANGELOG.md +12 -0
  3. package/dist/components/IconButton/IconButton.js +16 -17
  4. package/dist/components/Modal/Modal.js +27 -27
  5. package/dist/components/Table/components/TPagination/TPagination.js +26 -27
  6. package/dist/index.js +237 -236
  7. package/dist/package.json.d.ts +1 -1
  8. package/dist/package.json.js +1 -1
  9. package/dist/src/components/Box/Box.d.ts +5 -0
  10. package/dist/src/components/Icon/Icon.d.ts +5 -0
  11. package/dist/src/components/IconButton/IconButton.d.ts +9 -4
  12. package/dist/src/components/Menu/Menu.d.ts +5 -0
  13. package/dist/src/components/Table/Table.d.ts +5 -0
  14. package/dist/src/components/Typography/Typography.d.ts +5 -0
  15. package/dist/src/data-table/DataTable.test.d.ts +1 -0
  16. package/dist/src/data-table/DataTableBulkActions.d.ts +3 -0
  17. package/dist/src/data-table/DataTableCounter.d.ts +7 -0
  18. package/dist/src/data-table/index.d.ts +2 -0
  19. package/dist/src/index.d.ts +1 -0
  20. package/dist/vanilla/index.d.ts +12 -2
  21. package/dist/vanilla/index.js +2 -0
  22. package/dist/vanilla/package.json.js +1 -1
  23. package/dist/vanilla/src/components/IconButton/IconButton.js +15 -6
  24. package/dist/vanilla/src/data-table/DataTableBulkActions.js +13 -0
  25. package/dist/vanilla/src/data-table/DataTableCounter.js +25 -0
  26. package/dist/vanilla/src/data-table/DataTableEditColumns.js +1 -1
  27. package/dist/vanilla/src/data-table/DataTableHeaderCell.js +15 -13
  28. package/eslint.config.mjs +1 -1
  29. package/package.json +1 -1
  30. package/src/components/Box/Box.tsx +5 -0
  31. package/src/components/Icon/Icon.tsx +5 -0
  32. package/src/components/IconButton/IconButton.tsx +23 -9
  33. package/src/components/Menu/Menu.tsx +5 -0
  34. package/src/components/Modal/Modal.tsx +1 -2
  35. package/src/components/Table/Table.tsx +5 -0
  36. package/src/components/Table/components/TPagination/TPagination.tsx +0 -5
  37. package/src/components/Typography/Typography.tsx +5 -0
  38. package/src/data-table/DataTable.test.tsx +425 -0
  39. package/src/data-table/DataTableBulkActions.tsx +17 -0
  40. package/src/data-table/DataTableCounter.tsx +37 -0
  41. package/src/data-table/DataTableEditColumns.tsx +3 -1
  42. package/src/data-table/DataTableHeaderCell.tsx +96 -90
  43. package/src/data-table/index.ts +2 -0
  44. package/src/index.ts +2 -0
@@ -24,5 +24,10 @@ export type TypographyProps = {
24
24
  id?: string;
25
25
  };
26
26
  export declare const detectComponentBasedOnType: (variant: TypographyVariant) => TypographyComponent;
27
+ /**
28
+ *
29
+ * @deprecated {@link Typography} has been deprecated; use vanilla Text instead.
30
+ *
31
+ */
27
32
  declare const Typography: React.ForwardRefExoticComponent<TypographyProps & React.RefAttributes<HTMLHeadingElement>>;
28
33
  export default Typography;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ import { BoxProps } from '../vanilla/Box';
2
+ export type DataTableBulkActionsProps = BoxProps<'div'>;
3
+ export declare function DataTableBulkActions({ children, ...props }: DataTableBulkActionsProps): import("@emotion/react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { BoxProps } from '../vanilla/Box';
2
+ export type DataTableCounterProps = BoxProps<'div', {
3
+ count?: number;
4
+ singular?: string;
5
+ plural?: string;
6
+ }>;
7
+ export declare function DataTableCounter({ count: countProp, singular, plural, ...props }: DataTableCounterProps): import("@emotion/react/jsx-runtime").JSX.Element;
@@ -1,5 +1,7 @@
1
1
  export * from './DataTable';
2
2
  export * from './DataTableBody';
3
+ export * from './DataTableBulkActions';
3
4
  export * from './DataTableCheckbox';
5
+ export * from './DataTableCounter';
4
6
  export * from './DataTableEditColumns';
5
7
  export * from './DataTableHeader';
@@ -19,6 +19,7 @@ export type { BorderRadiusKey, BorderWidthKey, Colors, ColorsKey, FontFamilyKey,
19
19
  export { semanticVariablesBoxShadow, semanticVariablesColors, semanticVariablesTypography, } from '@orfium/tokens';
20
20
  export type { SemanticBoxShadow, SemanticBoxShadowKey, SemanticColors, SemanticColorsKey, SemanticDisabledState, SemanticState, SemanticTypography, SemanticTypographyKey, TypographyKeys, TypographyObject, } from '@orfium/tokens';
21
21
  export type { DotKeys, Token, TokensObject } from '@orfium/tokens';
22
+ export { vars } from '@orfium/tokens';
22
23
  export type { OnCheckHandler } from './hooks/useCheck';
23
24
  export type { ClickEvent, ClickHandler } from './hooks/useLoading';
24
25
  export type { ModalContentProps } from './components/Modal/ModalContent/ModalContent';
@@ -1706,6 +1706,9 @@ declare const DataTableBody: react.ForwardRefExoticComponent<{
1706
1706
  className?: string;
1707
1707
  }>, "size"> & Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "color" | "className"> & react.RefAttributes<HTMLDivElement>>;
1708
1708
 
1709
+ type DataTableBulkActionsProps = BoxProps<'div'>;
1710
+ declare function DataTableBulkActions({ children, ...props }: DataTableBulkActionsProps): _emotion_react_jsx_runtime.JSX.Element;
1711
+
1709
1712
  declare const CheckBox: react__default.ForwardRefExoticComponent<any>;
1710
1713
 
1711
1714
  type DataTableCheckboxProps = ComponentPropsWithoutRef<typeof CheckBox>;
@@ -1714,6 +1717,13 @@ type DataTableCheckboxProps = ComponentPropsWithoutRef<typeof CheckBox>;
1714
1717
  */
1715
1718
  declare const DataTableCheckbox: react.ForwardRefExoticComponent<any>;
1716
1719
 
1720
+ type DataTableCounterProps = BoxProps<'div', {
1721
+ count?: number;
1722
+ singular?: string;
1723
+ plural?: string;
1724
+ }>;
1725
+ declare function DataTableCounter({ count: countProp, singular, plural, ...props }: DataTableCounterProps): _emotion_react_jsx_runtime.JSX.Element;
1726
+
1717
1727
  declare function DataTableEditColumns(): _emotion_react_jsx_runtime.JSX.Element;
1718
1728
 
1719
1729
  type DataTableHeaderProps = BoxProps;
@@ -6164,5 +6174,5 @@ declare namespace TooltipTrigger {
6164
6174
  var displayName: string;
6165
6175
  }
6166
6176
 
6167
- export { AccountIcon, AlbumIcon, AnalyticsIcon, AppsIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, ArtistIcon, AssetIcon, AudioIcon, AudioOffIcon, BookmarkIcon, BookmarkOffIcon, Box, BroadcastIcon, CalendarIcon, CatalogIcon, ChannelIcon, ChatIcon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CinemaIcon, ClaimIcon, CloseIcon, ColumnChooserIcon, CompositionIcon, ConcertIcon, ConflictIcon, ConvertIcon, CopyIcon, CueSheetIcon, DashboardIcon, DataTable, DataTableBody, DataTableCheckbox, DataTableEditColumns, DataTableHeader, DatasetIcon, DeleteIcon, DeliveryIcon, DetailsIcon, Dialog, DialogBody, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, DigitalIcon, DistributionIcon, DownloadIcon, EarningsIcon, EditIcon, EntitiesIcon, ErrorIcon, ExternalLinkIcon, EyeIcon, EyeOffIcon, FavoriteIcon, FavoriteOffIcon, FileIcon, FilterIcon, FlagIcon, FlagOffIcon, ForwardIcon, FreezeIcon, HelpIcon, ICONS, Icon, ImageIcon, ImageOffIcon, IncomeIcon, InformationalIcon, InsightIcon, InvoiceIcon, IssueIcon, KeywordIcon, LanguageIcon, LegalIcon, LicenseIcon, LinkIcon, LocationIcon, LockIcon, LoginIcon, LogoutIcon, MailIcon, ManualIcon, MediaFileIcon, Menu, MenuContent, MenuDescription, MenuHeader, MenuIcon, MenuItem, MenuLabel, MenuSection, MenuSeparator, MenuSubmenu, MenuTrigger, MinusIcon, MoreOptionsIcon, NextIcon, NotificationIcon, OrganizationIcon, PageFirstIcon, PageLastIcon, PairIcon, PauseIcon, PendingIcon, PlayIcon, PlaycountIcon, PlusIcon, PolicyIcon, Popover, PopoverBody, PopoverContent, PopoverDescription, PopoverFooter, PopoverHeader, PopoverTitle, PopoverTrigger, PreviousIcon, PublicPerformanceIcon, PublisherIcon, RadioIcon, RecordLabelIcon, RecordingIcon, RedoIcon, RefreshIcon, ReportIcon, RestoreIcon, ResumeIcon, ReviewIcon, RewindIcon, RoleIcon, SearchFilledIcon, SearchIcon, SettingsIcon, ShareIcon, SortAscendingIcon, SortDescendingIcon, SortIcon, StatusIndicatorIcon, StopIcon, SuccessIcon, Table, TableBody, TableCell, TableFooter, TableHeader, TableHeaderCell, TableRow, TagIcon, TelevisionIcon, Text, ThemeProvider, ThumbsDownIcon, ThumbsUpIcon, Tooltip, TooltipContent, TooltipTrigger, TrendingDownIcon, TrendingUpIcon, TriangleDownIcon, TriangleLeftIcon, TriangleRightIcon, TriangleUpIcon, UndoIcon, UnfreezeIcon, UnlinkIcon, UnlockIcon, UnpairIcon, UnverifiedIcon, UpdateIcon, UploadIcon, UsageIcon, UserIcon, UsersIcon, VerifiedIcon, VideoIcon, VideoOffIcon, WarningIcon, WorkIcon, WriterIcon, YouTubeIcon, extractBoxProps, useTheme };
6168
- export type { BoxProps, DataTableBodyProps, DataTableCheckboxProps, DataTableHeaderProps, DataTableProps, DialogBodyProps, DialogDescriptionProps, DialogFooterProps, DialogHeaderProps, DialogTitleProps, IconProps, MenuContentProps, MenuHeaderProps, MenuItemProps, MenuSectionProps, MenuTriggerProps, PopoverContentProps, PopoverProps, TableBodyProps, TableCellProps, TableFooterProps, TableHeaderCellProps, TableHeaderProps, TableProps, TableRowProps, TextProps, TooltipContentProps, TooltipProps };
6177
+ export { AccountIcon, AlbumIcon, AnalyticsIcon, AppsIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, ArtistIcon, AssetIcon, AudioIcon, AudioOffIcon, BookmarkIcon, BookmarkOffIcon, Box, BroadcastIcon, CalendarIcon, CatalogIcon, ChannelIcon, ChatIcon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CinemaIcon, ClaimIcon, CloseIcon, ColumnChooserIcon, CompositionIcon, ConcertIcon, ConflictIcon, ConvertIcon, CopyIcon, CueSheetIcon, DashboardIcon, DataTable, DataTableBody, DataTableBulkActions, DataTableCheckbox, DataTableCounter, DataTableEditColumns, DataTableHeader, DatasetIcon, DeleteIcon, DeliveryIcon, DetailsIcon, Dialog, DialogBody, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, DigitalIcon, DistributionIcon, DownloadIcon, EarningsIcon, EditIcon, EntitiesIcon, ErrorIcon, ExternalLinkIcon, EyeIcon, EyeOffIcon, FavoriteIcon, FavoriteOffIcon, FileIcon, FilterIcon, FlagIcon, FlagOffIcon, ForwardIcon, FreezeIcon, HelpIcon, ICONS, Icon, ImageIcon, ImageOffIcon, IncomeIcon, InformationalIcon, InsightIcon, InvoiceIcon, IssueIcon, KeywordIcon, LanguageIcon, LegalIcon, LicenseIcon, LinkIcon, LocationIcon, LockIcon, LoginIcon, LogoutIcon, MailIcon, ManualIcon, MediaFileIcon, Menu, MenuContent, MenuDescription, MenuHeader, MenuIcon, MenuItem, MenuLabel, MenuSection, MenuSeparator, MenuSubmenu, MenuTrigger, MinusIcon, MoreOptionsIcon, NextIcon, NotificationIcon, OrganizationIcon, PageFirstIcon, PageLastIcon, PairIcon, PauseIcon, PendingIcon, PlayIcon, PlaycountIcon, PlusIcon, PolicyIcon, Popover, PopoverBody, PopoverContent, PopoverDescription, PopoverFooter, PopoverHeader, PopoverTitle, PopoverTrigger, PreviousIcon, PublicPerformanceIcon, PublisherIcon, RadioIcon, RecordLabelIcon, RecordingIcon, RedoIcon, RefreshIcon, ReportIcon, RestoreIcon, ResumeIcon, ReviewIcon, RewindIcon, RoleIcon, SearchFilledIcon, SearchIcon, SettingsIcon, ShareIcon, SortAscendingIcon, SortDescendingIcon, SortIcon, StatusIndicatorIcon, StopIcon, SuccessIcon, Table, TableBody, TableCell, TableFooter, TableHeader, TableHeaderCell, TableRow, TagIcon, TelevisionIcon, Text, ThemeProvider, ThumbsDownIcon, ThumbsUpIcon, Tooltip, TooltipContent, TooltipTrigger, TrendingDownIcon, TrendingUpIcon, TriangleDownIcon, TriangleLeftIcon, TriangleRightIcon, TriangleUpIcon, UndoIcon, UnfreezeIcon, UnlinkIcon, UnlockIcon, UnpairIcon, UnverifiedIcon, UpdateIcon, UploadIcon, UsageIcon, UserIcon, UsersIcon, VerifiedIcon, VideoIcon, VideoOffIcon, WarningIcon, WorkIcon, WriterIcon, YouTubeIcon, extractBoxProps, useTheme };
6178
+ export type { BoxProps, DataTableBodyProps, DataTableBulkActionsProps, DataTableCheckboxProps, DataTableCounterProps, DataTableHeaderProps, DataTableProps, DialogBodyProps, DialogDescriptionProps, DialogFooterProps, DialogHeaderProps, DialogTitleProps, IconProps, MenuContentProps, MenuHeaderProps, MenuItemProps, MenuSectionProps, MenuTriggerProps, PopoverContentProps, PopoverProps, TableBodyProps, TableCellProps, TableFooterProps, TableHeaderCellProps, TableHeaderProps, TableProps, TableRowProps, TextProps, TooltipContentProps, TooltipProps };
@@ -1,6 +1,8 @@
1
1
  export { DataTable } from './src/data-table/DataTable.js';
2
2
  export { DataTableBody } from './src/data-table/DataTableBody.js';
3
+ export { DataTableBulkActions } from './src/data-table/DataTableBulkActions.js';
3
4
  export { DataTableCheckbox } from './src/data-table/DataTableCheckbox.js';
5
+ export { DataTableCounter } from './src/data-table/DataTableCounter.js';
4
6
  export { DataTableEditColumns } from './src/data-table/DataTableEditColumns.js';
5
7
  export { DataTableHeader } from './src/data-table/DataTableHeader.js';
6
8
  export { ICONS, Icon } from './src/icon/Icon.js';
@@ -1,3 +1,3 @@
1
- var version = "5.43.2";
1
+ var version = "5.43.4";
2
2
 
3
3
  export { version };
@@ -4,27 +4,36 @@ import ButtonBase from '../ButtonBase/ButtonBase.js';
4
4
  import { BUTTON_ICON_COLOR } from '../ButtonBase/constants.js';
5
5
  import { Icon } from '../../icon/Icon.js';
6
6
 
7
- const IconButton = React__default.forwardRef((props, ref) => {
8
- const { iconName, size = "normal", type = "primary", shape = "circle", dataTestPrefixId } = props;
9
- return /* @__PURE__ */ jsx(
7
+ const IconButton = React__default.forwardRef(
8
+ ({
9
+ size = "normal",
10
+ type = "primary",
11
+ shape = "circle",
12
+ iconName,
13
+ iconColor,
14
+ dataTestPrefixId,
15
+ ...props
16
+ }, ref) => /* @__PURE__ */ jsx(
10
17
  ButtonBase,
11
18
  {
12
19
  ...props,
13
20
  ref,
14
21
  isIconButton: true,
15
22
  shape,
23
+ size,
24
+ type,
16
25
  dataTestPrefixId: dataTestPrefixId ? `${dataTestPrefixId}-icon-` : "icon-",
17
26
  children: /* @__PURE__ */ jsx(
18
27
  Icon,
19
28
  {
20
29
  size: size === "compact" ? "sm" : "md",
21
30
  name: iconName,
22
- color: BUTTON_ICON_COLOR[type]
31
+ color: iconColor ?? BUTTON_ICON_COLOR[type]
23
32
  }
24
33
  )
25
34
  }
26
- );
27
- });
35
+ )
36
+ );
28
37
  IconButton.displayName = "IconButton";
29
38
 
30
39
  export { IconButton as default };
@@ -0,0 +1,13 @@
1
+ import { jsx } from '@emotion/react/jsx-runtime';
2
+ import { Box } from '../../Box/Box.js';
3
+ import '../sprinkles/sprinkles.js';
4
+ import { useDataTableContext } from './DataTableContext.js';
5
+
6
+ function DataTableBulkActions({ children, ...props }) {
7
+ const { table } = useDataTableContext();
8
+ const hasSelection = table.getSelectedRowModel().rows.length > 0;
9
+ if (!hasSelection) return null;
10
+ return /* @__PURE__ */ jsx(Box, { display: "flex", alignItems: "center", gap: "sm", ...props, children });
11
+ }
12
+
13
+ export { DataTableBulkActions };
@@ -0,0 +1,25 @@
1
+ import { jsxs, jsx } from '@emotion/react/jsx-runtime';
2
+ import { Box } from '../../Box/Box.js';
3
+ import '../sprinkles/sprinkles.js';
4
+ import { Text } from '../../Text/Text.js';
5
+ import { useDataTableContext } from './DataTableContext.js';
6
+
7
+ function DataTableCounter({
8
+ count: countProp,
9
+ singular = "item",
10
+ plural = "items",
11
+ ...props
12
+ }) {
13
+ const { table } = useDataTableContext();
14
+ const selectedCount = table.getSelectedRowModel().rows.length;
15
+ const totalCount = countProp ?? table.getRowCount();
16
+ const hasSelection = selectedCount > 0;
17
+ const count = hasSelection ? selectedCount : totalCount;
18
+ const label = count === 1 ? singular : plural;
19
+ return /* @__PURE__ */ jsxs(Box, { display: "flex", alignItems: "center", gap: "sm", ...props, children: [
20
+ /* @__PURE__ */ jsx(Text, { typography: "label02", color: "active", children: count.toLocaleString() }),
21
+ /* @__PURE__ */ jsx(Text, { typography: "label02", children: hasSelection ? `${label} selected` : label })
22
+ ] });
23
+ }
24
+
25
+ export { DataTableCounter };
@@ -49,7 +49,7 @@ function DataTableEditColumns() {
49
49
  children: allColumns.map((column) => {
50
50
  const canHide = column.getCanHide();
51
51
  const isSelected = canHide ? selectedColumns.has(column.id) : true;
52
- const label = column.columnDef.meta?.label;
52
+ const label = column.columnDef.meta?.label ?? (typeof column.columnDef.header === "string" ? column.columnDef.header : void 0);
53
53
  if (!label) {
54
54
  return null;
55
55
  }
@@ -36,7 +36,7 @@ const DataTableHeaderCell = forwardRef(
36
36
  ref,
37
37
  "data-test": true,
38
38
  ...props,
39
- children: typeof children !== "string" || !header.column.getCanSort() ? children : /* @__PURE__ */ jsxs(
39
+ children: typeof children === "string" ? /* @__PURE__ */ jsxs(
40
40
  Box,
41
41
  {
42
42
  display: "flex",
@@ -84,7 +84,7 @@ const DataTableHeaderCell = forwardRef(
84
84
  /* @__PURE__ */ jsx(TooltipTrigger, { children: /* @__PURE__ */ jsx(Box, { display: "flex", alignItems: "center", justifyContent: "center", size: "3", children: /* @__PURE__ */ jsx(Icon, { name: "informational", size: "xs", color: "secondary" }) }) }),
85
85
  /* @__PURE__ */ jsx(TooltipContent, { maxW: "22", children: header.column.columnDef.meta.tooltip })
86
86
  ] }),
87
- /* @__PURE__ */ jsxs(
87
+ header.column.getCanSort() && /* @__PURE__ */ jsxs(
88
88
  ActionsContent,
89
89
  {
90
90
  display: "grid",
@@ -117,19 +117,21 @@ const DataTableHeaderCell = forwardRef(
117
117
  }
118
118
  )
119
119
  ] }),
120
- /* @__PURE__ */ jsx(ActionsContent, { visible: sortDir ? "always" : "if-needed", children: /* @__PURE__ */ jsxs(Menu, { children: [
120
+ (header.column.getCanSort() || header.column.getCanPin()) && /* @__PURE__ */ jsx(ActionsContent, { visible: sortDir ? "always" : "if-needed", children: /* @__PURE__ */ jsxs(Menu, { children: [
121
121
  /* @__PURE__ */ jsx(MenuTrigger, { children: /* @__PURE__ */ jsx(IconButton, { type: "tertiary", size: "compact", iconName: "moreOptions" }) }),
122
122
  /* @__PURE__ */ jsxs(MenuContent, { style: { minWidth: "220px" }, children: [
123
- /* @__PURE__ */ jsx(MenuItem, { onAction: () => header.column.toggleSorting(true), children: /* @__PURE__ */ jsxs(Box, { display: "flex", alignItems: "center", gap: "sm", children: [
124
- /* @__PURE__ */ jsx(Icon, { name: "sortDescending" }),
125
- /* @__PURE__ */ jsx(Text, { typography: "body03", children: "Sort descending (z-a)" })
126
- ] }) }),
127
- /* @__PURE__ */ jsx(MenuItem, { onAction: () => header.column.toggleSorting(false), children: /* @__PURE__ */ jsxs(Box, { display: "flex", alignItems: "center", gap: "sm", children: [
128
- /* @__PURE__ */ jsx(Icon, { name: "sortAscending" }),
129
- /* @__PURE__ */ jsx(Text, { typography: "body03", children: "Sort ascending (a-z)" })
130
- ] }) }),
123
+ header.column.getCanSort() && /* @__PURE__ */ jsxs(Fragment, { children: [
124
+ /* @__PURE__ */ jsx(MenuItem, { onAction: () => header.column.toggleSorting(true), children: /* @__PURE__ */ jsxs(Box, { display: "flex", alignItems: "center", gap: "sm", children: [
125
+ /* @__PURE__ */ jsx(Icon, { name: "sortDescending" }),
126
+ /* @__PURE__ */ jsx(Text, { typography: "body03", children: "Sort descending (z-a)" })
127
+ ] }) }),
128
+ /* @__PURE__ */ jsx(MenuItem, { onAction: () => header.column.toggleSorting(false), children: /* @__PURE__ */ jsxs(Box, { display: "flex", alignItems: "center", gap: "sm", children: [
129
+ /* @__PURE__ */ jsx(Icon, { name: "sortAscending" }),
130
+ /* @__PURE__ */ jsx(Text, { typography: "body03", children: "Sort ascending (a-z)" })
131
+ ] }) })
132
+ ] }),
131
133
  header.column.getCanPin() && /* @__PURE__ */ jsxs(Fragment, { children: [
132
- /* @__PURE__ */ jsx(MenuSeparator, {}),
134
+ header.column.getCanSort() && /* @__PURE__ */ jsx(MenuSeparator, {}),
133
135
  /* @__PURE__ */ jsx(
134
136
  MenuItem,
135
137
  {
@@ -177,7 +179,7 @@ const DataTableHeaderCell = forwardRef(
177
179
  ] }) })
178
180
  ]
179
181
  }
180
- )
182
+ ) : children
181
183
  }
182
184
  ) });
183
185
  }
package/eslint.config.mjs CHANGED
@@ -111,7 +111,7 @@ export default defineConfig([
111
111
  ],
112
112
 
113
113
  'react/prop-types': 'off',
114
- 'react/button-has-type': 'warn',
114
+ 'react/button-has-type': 'off',
115
115
  '@typescript-eslint/no-explicit-any': 'off',
116
116
  'react/no-array-index-key': 'warn',
117
117
  'react/no-render-return-value': 0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orfium/ictinus",
3
- "version": "5.43.2",
3
+ "version": "5.43.4",
4
4
  "type": "module",
5
5
  "main": "./dist/index.umd.cjs",
6
6
  "module": "./dist/index.js",
@@ -10,6 +10,11 @@ import { cssResolver, omitedCSSprops, pickCSSProperties, pickNonCSSProps } from
10
10
 
11
11
  export type BoxProps = StyledBoxProps & React.HTMLAttributes<HTMLDivElement>;
12
12
 
13
+ /**
14
+ *
15
+ * @deprecated {@link Box} has been deprecated; use vanilla Box instead.
16
+ *
17
+ */
13
18
  const Box = forwardRef<HTMLDivElement, BoxProps>(({ children, ...rest }, ref) => {
14
19
  const theme = useTheme();
15
20
  const cssPropsOnly = pickCSSProperties(rest);
@@ -24,6 +24,11 @@ export type IconProps = {
24
24
  } & DivProps &
25
25
  TestProps;
26
26
 
27
+ /**
28
+ *
29
+ * @deprecated {@link Icon} has been deprecated; use vanilla Icon instead.
30
+ *
31
+ */
27
32
  const Icon = React.forwardRef<HTMLDivElement, IconProps>((props, ref) => {
28
33
  props = useSlotProps(props, 'icon');
29
34
  const {
@@ -5,6 +5,7 @@ import type { ButtonBaseProps } from 'components/ButtonBase/ButtonBase';
5
5
  import ButtonBase from 'components/ButtonBase/ButtonBase';
6
6
  import { BUTTON_ICON_COLOR } from 'components/ButtonBase/constants';
7
7
  import { Icon, type IconProps } from '../../icon';
8
+ import { type BoxProps } from '../../vanilla/Box';
8
9
 
9
10
  export type IconButtonShape = 'circle' | 'square';
10
11
 
@@ -14,31 +15,44 @@ export type IconButtonProps = Omit<
14
15
  > & {
15
16
  /** This property defines the type of the IconButton */
16
17
  type?: PrimitiveButtonTypes;
17
- /** This property defines witch icon to use */
18
- iconName: IconProps['name'];
19
18
  /** This property defines the shape of the IconButton */
20
19
  shape?: IconButtonShape;
20
+ /** This property defines witch icon to use */
21
+ iconName: IconProps['name'];
22
+ /** Custom icon color */
23
+ iconColor?: BoxProps['color'];
21
24
  };
22
25
 
23
- const IconButton = React.forwardRef<HTMLButtonElement, IconButtonProps>((props, ref) => {
24
- const { iconName, size = 'normal', type = 'primary', shape = 'circle', dataTestPrefixId } = props;
25
-
26
- return (
26
+ const IconButton = React.forwardRef<HTMLButtonElement, IconButtonProps>(
27
+ (
28
+ {
29
+ size = 'normal',
30
+ type = 'primary',
31
+ shape = 'circle',
32
+ iconName,
33
+ iconColor,
34
+ dataTestPrefixId,
35
+ ...props
36
+ },
37
+ ref
38
+ ) => (
27
39
  <ButtonBase
28
40
  {...props}
29
41
  ref={ref}
30
42
  isIconButton
31
43
  shape={shape}
44
+ size={size}
45
+ type={type}
32
46
  dataTestPrefixId={dataTestPrefixId ? `${dataTestPrefixId}-icon-` : 'icon-'}
33
47
  >
34
48
  <Icon
35
49
  size={size === 'compact' ? 'sm' : 'md'}
36
50
  name={iconName}
37
- color={BUTTON_ICON_COLOR[type]}
51
+ color={iconColor ?? BUTTON_ICON_COLOR[type]}
38
52
  />
39
53
  </ButtonBase>
40
- );
41
- });
54
+ )
55
+ );
42
56
 
43
57
  IconButton.displayName = 'IconButton';
44
58
 
@@ -30,6 +30,11 @@ export type MenuProps = {
30
30
  sx?: { listProps?: { maxHeight?: number; width?: number } };
31
31
  } & TestProps;
32
32
 
33
+ /**
34
+ *
35
+ * @deprecated {@link Menu} has been deprecated; use vanilla Menu instead.
36
+ *
37
+ */
33
38
  const Menu: React.FC<MenuProps> = ({
34
39
  selectionMode = 'single',
35
40
  rowSize = 'normal',
@@ -1,4 +1,3 @@
1
- import { vars } from '@orfium/tokens';
2
1
  import Card from 'components/Card';
3
2
  import IconButton from 'components/IconButton';
4
3
  import useEscape from 'hooks/useEscape';
@@ -72,7 +71,7 @@ const Modal: React.FCC<ModalProps> = ({
72
71
  type="tertiary"
73
72
  iconName="close"
74
73
  onClick={onClose}
75
- color={vars.color.text.default.secondary}
74
+ iconColor="secondary"
76
75
  dataTestId="modal-close"
77
76
  />
78
77
  </div>
@@ -13,6 +13,11 @@ import useTable from './hooks/useTable';
13
13
  import { tableContainer, tableStyles } from './Table.style';
14
14
  import type { TableProps } from './types';
15
15
 
16
+ /**
17
+ *
18
+ * @deprecated {@link Table} has been deprecated; use DataTable instead.
19
+ *
20
+ */
16
21
  const Table = <TData extends NoUndefined<TData>>({
17
22
  type = 'read-only',
18
23
  rowsConfig,
@@ -1,4 +1,3 @@
1
- import { vars } from '@orfium/tokens';
2
1
  import IconButton from 'components/IconButton';
3
2
  import Select from 'components/Select';
4
3
  import type { TableProps } from 'components/Table/types';
@@ -64,7 +63,6 @@ const TPagination: React.FC<TPaginationProps> = ({ pagination, isSticky, dataTes
64
63
  <div css={buttonsContainer()}>
65
64
  {isEnhancedPaginationVisible && (
66
65
  <IconButton
67
- color={vars.color.text.default.secondary}
68
66
  iconName="pageFirst"
69
67
  size="compact"
70
68
  type="tertiary"
@@ -74,7 +72,6 @@ const TPagination: React.FC<TPaginationProps> = ({ pagination, isSticky, dataTes
74
72
  />
75
73
  )}
76
74
  <IconButton
77
- color={vars.color.text.default.secondary}
78
75
  iconName="chevronLeft"
79
76
  size="compact"
80
77
  type="tertiary"
@@ -83,7 +80,6 @@ const TPagination: React.FC<TPaginationProps> = ({ pagination, isSticky, dataTes
83
80
  dataTestPrefixId={`${dataTestPrefixId}_table_go_to_prev_page`}
84
81
  />
85
82
  <IconButton
86
- color={vars.color.text.default.secondary}
87
83
  iconName="chevronRight"
88
84
  size="compact"
89
85
  type="tertiary"
@@ -93,7 +89,6 @@ const TPagination: React.FC<TPaginationProps> = ({ pagination, isSticky, dataTes
93
89
  />
94
90
  {isEnhancedPaginationVisible && (
95
91
  <IconButton
96
- color={vars.color.text.default.secondary}
97
92
  iconName="pageLast"
98
93
  size="compact"
99
94
  type="tertiary"
@@ -59,6 +59,11 @@ export const detectComponentBasedOnType = (variant: TypographyVariant): Typograp
59
59
  return 'p';
60
60
  };
61
61
 
62
+ /**
63
+ *
64
+ * @deprecated {@link Typography} has been deprecated; use vanilla Text instead.
65
+ *
66
+ */
62
67
  // display name breaks storybook props
63
68
  // https://github.com/storybookjs/storybook/issues/13304
64
69
  // eslint-disable-next-line react/display-name