@apliteni/apliteni-ui 0.149.0 → 0.154.0

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/react/README.md CHANGED
@@ -1004,7 +1004,7 @@ avatar mark, the reader's name and address, the rows in `items` and Sign out. Bo
1004
1004
  kit's `Dropdown`, so they share its keyboard and placement. `current` marks one account page in
1005
1005
  accent ink and defaults to `prefs`.
1006
1006
 
1007
- ## NavTabs and Breadcrumbs
1007
+ ## NavTabs
1008
1008
 
1009
1009
  `NavTabs` renders route links with the kit’s underline or pill presentation. Pass
1010
1010
  unique item IDs and set `active` to the current route’s ID. The current link has
@@ -1017,11 +1017,6 @@ badges accept text, numbers (including zero), or `{ text, tone }`.
1017
1017
  { id: 'payouts', label: 'Payouts', href: '/payouts', badge: 3 },
1018
1018
  { id: 'exports', label: 'Exports', disabled: true },
1019
1019
  ]} />
1020
- <Breadcrumbs items={[
1021
- { label: 'Finance', href: '/finance' },
1022
- { label: 'Payouts', href: '/payouts' },
1023
- { label: 'PY-4821' },
1024
- ]} />
1025
1020
  ```
1026
1021
 
1027
1022
  Use `Tabs` for panels within a page. `NavTabs` keeps normal link keyboard behavior.
@@ -1029,7 +1024,7 @@ An omitted `href` falls back to `#` plus the item ID. `variant="pill"` selects t
1029
1024
  existing pill styles. A badge of `null` renders no badge, so a count that is not in
1030
1025
  yet costs nothing to pass.
1031
1026
 
1032
- Both components take `renderLink`, the prop `AppShell` already uses, so a router
1027
+ `NavTabs` takes `renderLink`, the prop `AppShell` already uses, so a router
1033
1028
  handles the navigation instead of the browser reloading the document:
1034
1029
 
1035
1030
  ```tsx
@@ -1039,18 +1034,14 @@ handles the navigation instead of the browser reloading the document:
1039
1034
  )} />
1040
1035
  ```
1041
1036
 
1042
- Without it both render a plain `<a>`. The kit's class, destination, current state
1037
+ Without it, it renders a plain `<a>`. The kit's class, destination, current state
1043
1038
  and children all arrive in `linkProps`, so pass them through rather than rebuilding
1044
1039
  them.
1045
1040
 
1046
- `Breadcrumbs` renders an ordered trail. Earlier items link only when they have an
1047
- `href`; the final item is always current-page text. Items accept a decorative kit
1048
- `icon` name. Both components accept native navigation attributes and a forwarded
1049
- root ref. Use `aria-label` to distinguish navigation landmarks. Link items accept
1041
+ `NavTabs` accepts native navigation attributes and a forwarded root ref. Use `aria-label` to distinguish navigation landmarks. Link items accept
1050
1042
  `target`. Script, data, and VBScript destinations fall back to `#`.
1051
1043
 
1052
- Tab rows scroll within their container when the links do not fit; a breadcrumb
1053
- trail wraps instead. A row whose links do fit scrolls nothing and clips nothing, so
1044
+ Tab rows scroll within their container when the links do not fit. A row whose links do fit scrolls nothing and clips nothing, so
1054
1045
  a focus ring in it keeps its complete band. The current route is revealed after
1055
1046
  mounting and route changes. Content and container changes update the fit state
1056
1047
  without revealing the route again, so they preserve the reader's scroll position
@@ -103,6 +103,14 @@
103
103
  --tap-clear-x: var(--tap-gap);
104
104
  --tap-clear-y: 0px;
105
105
  }
106
+ .ui-card__head {
107
+ margin-bottom: var(--space-3, 12px) !important;
108
+ }
109
+ .ui-card__tools {
110
+ column-gap: var(--tap-gap) !important;
111
+ --tap-clear-x: var(--tap-gap);
112
+ --tap-clear-y: var(--tap-gap);
113
+ }
106
114
  .ui-table__selection {
107
115
  --tap-clear-x: var(--tap-min);
108
116
  --tap-clear-y: var(--tap-min);
@@ -108,10 +108,12 @@ type CardProps = {
108
108
  icon?: string;
109
109
  /** Makes the whole card a link. Its title is then a plain block, because a link holds no heading. */
110
110
  href?: string;
111
+ /** Controls at the end of the title row, such as an icon-only button. Needs a `title`. */
112
+ tools?: ReactNode;
111
113
  className?: string;
112
114
  children?: ReactNode;
113
115
  };
114
- declare function Card({ title, sub, level, variant, pad, icon, href, className, children }: CardProps): react.JSX.Element;
116
+ declare function Card({ title, sub, level, variant, pad, icon, href, tools, className, children }: CardProps): react.JSX.Element;
115
117
 
116
118
  type CalloutVariant = 'neutral' | 'info' | 'success' | 'warn' | 'danger';
117
119
  interface CalloutProps {
@@ -921,29 +923,19 @@ type ToastProps = {
921
923
  declare function useToast(): (notice: ToastNotice) => void;
922
924
  declare function Toast({ children, collapse }: ToastProps): react.JSX.Element;
923
925
 
924
- type BreadcrumbItem = {
925
- label: string;
926
- href?: string;
927
- target?: string;
928
- icon?: string;
929
- };
930
- type BreadcrumbsProps = Omit<ComponentPropsWithoutRef<'nav'>, 'children'> & {
931
- items: readonly BreadcrumbItem[];
932
- /** Spread linkProps onto the router link, including children. */
933
- renderLink?: (item: BreadcrumbItem, linkProps: ComponentPropsWithoutRef<'a'>) => ReactNode;
934
- };
935
- declare const Breadcrumbs: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLElement>, HTMLElement>, "ref">, "children"> & {
936
- items: readonly BreadcrumbItem[];
937
- /** Spread linkProps onto the router link, including children. */
938
- renderLink?: (item: BreadcrumbItem, linkProps: ComponentPropsWithoutRef<"a">) => ReactNode;
939
- } & react.RefAttributes<HTMLElement>>;
940
-
941
926
  type AppShellSection = {
942
927
  href: string;
943
928
  label: string;
944
929
  icon: string;
945
930
  count?: number;
946
931
  };
932
+ /** A product's own row in the account menu, such as Account settings or Support (#736). */
933
+ type AppShellAccountItem = {
934
+ label: string;
935
+ icon?: string;
936
+ href?: string;
937
+ onSelect?: () => void;
938
+ };
947
939
  type AppShellProps = {
948
940
  sections: AppShellSection[];
949
941
  /** The vanilla rail layout, or the existing band layout. */
@@ -960,9 +952,11 @@ type AppShellProps = {
960
952
  href: string;
961
953
  label: string;
962
954
  };
963
- crumbs?: readonly BreadcrumbItem[];
964
955
  lede?: string;
965
956
  actions?: ReactNode;
957
+ /** Small tools for the whole page, at the end of the title row: a version badge, a
958
+ * small button. The lede stands under the whole row (#736). */
959
+ tools?: ReactNode;
966
960
  bandControl?: ReactNode;
967
961
  /** One glyph control in the sidebar head, before the fold button, drawn as the fold is.
968
962
  * On a phone it stands in the menu panel's head. Topbar layout only (#732). */
@@ -976,6 +970,8 @@ type AppShellProps = {
976
970
  name: string;
977
971
  email: string;
978
972
  };
973
+ /** Rows above the theme row and Sign out in every account menu (#736). */
974
+ accountItems?: readonly AppShellAccountItem[];
979
975
  onSignOut: () => void;
980
976
  /** Server-read fold preference. The browser restores the shared rail cookie. */
981
977
  defaultCollapsed?: boolean;
@@ -983,7 +979,7 @@ type AppShellProps = {
983
979
  /** Spread linkProps onto the router link, including children and onClick. */
984
980
  renderLink?: (section: AppShellSection, linkProps: ComponentPropsWithoutRef<'a'>) => ReactNode;
985
981
  };
986
- declare function AppShell({ sections, pathname, title, children, word, brand, layout, brandHref, width, back, crumbs, lede, actions, bandControl, headControl, account, onSignOut, searchLabel, defaultCollapsed, palette, renderLink }: AppShellProps): react.JSX.Element;
982
+ declare function AppShell({ sections, pathname, title, children, word, brand, layout, brandHref, width, back, lede, actions, tools, bandControl, headControl, account, accountItems, onSignOut, searchLabel, defaultCollapsed, palette, renderLink }: AppShellProps): react.JSX.Element;
987
983
 
988
984
  type AuthShellProps = Omit<HTMLAttributes<HTMLDivElement>, 'children'> & {
989
985
  brand: ReactNode;
@@ -1129,7 +1125,7 @@ declare const Success: react.ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLD
1129
1125
  } & react.RefAttributes<HTMLDivElement>>;
1130
1126
 
1131
1127
  type ChartLineLook = 'thin' | 'points' | 'labels';
1132
- type ChartAreaLook = 'flat' | 'stacked' | 'share';
1128
+ type ChartAreaLook = 'flat' | 'stacked' | 'share' | 'curves';
1133
1129
  type ChartStackedLook = 'columns' | 'share' | 'rows';
1134
1130
  type ChartDonutLook = 'thin' | 'table' | 'labels';
1135
1131
  type ChartSlice = {
@@ -1198,7 +1194,7 @@ type ChartCommon = {
1198
1194
  /** The plot's height in CSS px. */
1199
1195
  height?: number;
1200
1196
  /** Offer the same numbers as a table, behind a chart and table switch at the
1201
- * top right. On by default, off for a sparkline. */
1197
+ * top right, or in a titled Card's title row. On by default, off for a sparkline. */
1202
1198
  table?: boolean;
1203
1199
  /** Draw a key that names each series. Off by default: the readout and the
1204
1200
  * table name every series. */
@@ -1407,4 +1403,4 @@ declare const NavTabs: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedH
1407
1403
  declare const PAGE_SIZES: readonly number[];
1408
1404
  declare const DEFAULT_PAGE_SIZE: number;
1409
1405
 
1410
- export { type Accent, AccentPicker, type AccentPickerProps, AccountMenu, type AccountMenuProps, type AccountReader, type AccountSection, AccountWindow, type AccountWindowProps, type AddFilter, AppShell, type AppShellProps, type AppShellSection, AuthShell, type AuthShellProps, Avatar, type AvatarProps, BackLink, type BackLinkOwnProps, type BackLinkProps, Badge, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, BusyRegion, type BusyRegionProps, Button, type ButtonLinkProps, type ButtonProps, Callout, type CalloutProps, type CalloutVariant, Card, Chart, type ChartAreaLook, type ChartBridgeStep, type ChartBridgeTones, type ChartDonutLook, type ChartLineLook, type ChartLookSeries, type ChartPeriod, type ChartProps, type ChartSeries, type ChartSlice, type ChartStackedLook, type ChartTone, CheckList, type CheckListProps, Checkbox, type CheckboxProps, type Column, type CommandGroup, type CommandItem, CommandPalette, type CommandPaletteProps, Confirm, type ConfirmProps, DEFAULT_PAGE_SIZE, DataTable, type DataTableProps, DatePicker, type DatePickerMode, type DatePickerPreset, type DatePickerProps, type DatePickerRange, DeltaValue, type DeltaValueProps, Denied, type DeniedProps, Drawer, type DrawerProps, DrawerSection, type DrawerSectionProps, Dropdown, type DropdownAvatar, type DropdownBadge, type DropdownEntry, type DropdownItem, type DropdownProps, type DropdownRowProps, type DropdownSearch, type DropdownSection, type DropdownSeparator, EmptyState, type EmptyStateProps, type EmptyStateVariant, Feedback, type FeedbackPayload, type FeedbackProps, type FeedbackResult, type FeedbackSection, Field, type FieldControlProps, type FieldProps, FileDrop, type FileDropFile, type FileDropProps, type FileDropStatus, FileField, type FileFieldProps, type Filter, FilterBar, type FilterBarProps, Footer, type FooterColumn, type FooterLink, type FooterProps, type FooterSocial, Icon, KeyValueList, type KeyValueListProps, type KeyValueRow, Modal, type ModalProps, type NativeButtonProps, type NavTabBadge, type NavTabItem, NavTabs, type NavTabsProps, NumericValue, type NumericValueProps, PAGE_SIZES, Pagination, type PaginationProps, Pill, type PillProps, RowIdentity, type RowIdentityProps, SearchField, type SearchFieldProps, type SegmentOption, Segmented, type SegmentedProps, SelectField, type SelectFieldProps, SidebarNav, type SidebarNavBadge, type SidebarNavItem, type SidebarNavLeaf, type SidebarNavProps, type SidebarNavSection, Skeleton, type SkeletonProps, SkeletonTable, type SkeletonTableProps, Snippet, type SnippetProps, StatBand, type StatBandProps, type StatDelta, type StatFigure, type StatTone, type StatVariant, StatusDot, type StatusDotProps, Success, SuccessCheck, type SuccessCheckProps, type SuccessCountdown, SuccessPanel, type SuccessPanelProps, type SuccessProps, Switch, type SwitchProps, THEME_INIT_SCRIPT, type TabItem, type TableSort, Tabs, type TabsProps, TextArea, type TextAreaProps, TextField, type TextFieldProps, ThemeToggle, type ThemeToggleProps, Timeline, type TimelineEvent, type TimelineEventKind, type TimelineProps, Toast, type ToastNotice, type ToastProps, Tooltip, type TooltipProps, TopBar, type TopBarProps, type Version, VersionSwitcher, type VersionSwitcherProps, ViewSwitch, type ViewSwitchItem, type ViewSwitchProps, sortTableRows, useToast };
1406
+ export { type Accent, AccentPicker, type AccentPickerProps, AccountMenu, type AccountMenuProps, type AccountReader, type AccountSection, AccountWindow, type AccountWindowProps, type AddFilter, AppShell, type AppShellProps, type AppShellSection, AuthShell, type AuthShellProps, Avatar, type AvatarProps, BackLink, type BackLinkOwnProps, type BackLinkProps, Badge, BusyRegion, type BusyRegionProps, Button, type ButtonLinkProps, type ButtonProps, Callout, type CalloutProps, type CalloutVariant, Card, Chart, type ChartAreaLook, type ChartBridgeStep, type ChartBridgeTones, type ChartDonutLook, type ChartLineLook, type ChartLookSeries, type ChartPeriod, type ChartProps, type ChartSeries, type ChartSlice, type ChartStackedLook, type ChartTone, CheckList, type CheckListProps, Checkbox, type CheckboxProps, type Column, type CommandGroup, type CommandItem, CommandPalette, type CommandPaletteProps, Confirm, type ConfirmProps, DEFAULT_PAGE_SIZE, DataTable, type DataTableProps, DatePicker, type DatePickerMode, type DatePickerPreset, type DatePickerProps, type DatePickerRange, DeltaValue, type DeltaValueProps, Denied, type DeniedProps, Drawer, type DrawerProps, DrawerSection, type DrawerSectionProps, Dropdown, type DropdownAvatar, type DropdownBadge, type DropdownEntry, type DropdownItem, type DropdownProps, type DropdownRowProps, type DropdownSearch, type DropdownSection, type DropdownSeparator, EmptyState, type EmptyStateProps, type EmptyStateVariant, Feedback, type FeedbackPayload, type FeedbackProps, type FeedbackResult, type FeedbackSection, Field, type FieldControlProps, type FieldProps, FileDrop, type FileDropFile, type FileDropProps, type FileDropStatus, FileField, type FileFieldProps, type Filter, FilterBar, type FilterBarProps, Footer, type FooterColumn, type FooterLink, type FooterProps, type FooterSocial, Icon, KeyValueList, type KeyValueListProps, type KeyValueRow, Modal, type ModalProps, type NativeButtonProps, type NavTabBadge, type NavTabItem, NavTabs, type NavTabsProps, NumericValue, type NumericValueProps, PAGE_SIZES, Pagination, type PaginationProps, Pill, type PillProps, RowIdentity, type RowIdentityProps, SearchField, type SearchFieldProps, type SegmentOption, Segmented, type SegmentedProps, SelectField, type SelectFieldProps, SidebarNav, type SidebarNavBadge, type SidebarNavItem, type SidebarNavLeaf, type SidebarNavProps, type SidebarNavSection, Skeleton, type SkeletonProps, SkeletonTable, type SkeletonTableProps, Snippet, type SnippetProps, StatBand, type StatBandProps, type StatDelta, type StatFigure, type StatTone, type StatVariant, StatusDot, type StatusDotProps, Success, SuccessCheck, type SuccessCheckProps, type SuccessCountdown, SuccessPanel, type SuccessPanelProps, type SuccessProps, Switch, type SwitchProps, THEME_INIT_SCRIPT, type TabItem, type TableSort, Tabs, type TabsProps, TextArea, type TextAreaProps, TextField, type TextFieldProps, ThemeToggle, type ThemeToggleProps, Timeline, type TimelineEvent, type TimelineEventKind, type TimelineProps, Toast, type ToastNotice, type ToastProps, Tooltip, type TooltipProps, TopBar, type TopBarProps, type Version, VersionSwitcher, type VersionSwitcherProps, ViewSwitch, type ViewSwitchItem, type ViewSwitchProps, sortTableRows, useToast };