@apliteni/apliteni-ui 0.133.0 → 0.136.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apliteni/apliteni-ui",
3
- "version": "0.133.0",
3
+ "version": "0.136.0",
4
4
 
5
5
  "workspaces": [
6
6
  "react"
package/react/README.md CHANGED
@@ -32,7 +32,10 @@ import { DataTable, Modal, Button } from '@apliteni/apliteni-ui/react';
32
32
  Both stylesheets. The React one adds what React's own components need — it carries no tokens, no
33
33
  reset and none of the kit's control CSS, so it cannot stand in for the first import.
34
34
 
35
- Components: `Success`, `SuccessPanel`, `SuccessCheck`, `Checkbox`, `Switch`, `SearchField`, `EmptyState`, `DataTable`, `Pagination`, `StatBand`, `Chart`, `Modal`, `Confirm`, `Drawer`, `CommandPalette`, `Dropdown`, `BackLink`, `Tooltip`, `Snippet`, `Segmented`, `Tabs`, `Button`, `Badge`, `Pill`, `StatusDot`, `Card`, `Callout`, `Icon`.
35
+ Components: `Success`, `SuccessPanel`, `SuccessCheck`, `Checkbox`, `Switch`, `SearchField`, `EmptyState`, `DataTable`, `Pagination`, `StatBand`, `Chart`, `Modal`, `Confirm`, `Feedback`, `Drawer`, `CommandPalette`, `Dropdown`, `BackLink`, `Tooltip`, `Snippet`, `Segmented`, `Tabs`, `Button`, `Badge`, `Pill`, `StatusDot`, `Card`, `Callout`, `Icon`.
36
+
37
+ `Card` accepts `title`, `sub`, children, `level`, `variant`, `pad`, `icon`, `href`, and `className`. `variant` is `accent` or `live`; omit it for the default surface. `pad` is `sm` or `lg`. A title is a heading unless `href` makes the whole card a link. Compose setting rows with `ui-card__row` and kit controls.
38
+ Three-option setting rows use `ui-card__row--tight-choice` to narrow pills below 360 px and stay on one line, while other rows keep full tap width.
36
39
 
37
40
  `Segmented` is a controlled choice toolbar: pass `options`, `value`, `onChange`,
38
41
  and a `label` for its accessible name. `size="sm"` compacts it, `block` makes it
@@ -447,6 +450,30 @@ and described by its body. Modal also accepts
447
450
  `initialFocusRef` for a mounted, focusable element inside its panel. Without it, Modal
448
451
  uses its normal opening focus.
449
452
 
453
+ ## Feedback
454
+
455
+ `Feedback` lets a reader select a passage and send a note about it. Pass `container`, a ref to
456
+ the element whose text can be selected, and `onSend`. A "Give feedback" pill appears above a
457
+ selection of `minChars` (3) or more. The pill opens a form with a chip for the nearest heading,
458
+ the quoted passage, a note field, Cancel and Send. The quoted passage stays highlighted until the
459
+ form closes. The container may mount after `Feedback`. On close, focus returns to the visible
460
+ control that had it before opening. If that control is gone, hidden, or disabled, focus returns to the pill.
461
+
462
+ ```tsx
463
+ <Feedback container={articleRef}
464
+ onSend={async ({ note, excerpt, anchor }) => ({ ok: await file(note, excerpt, anchor) })} />
465
+ ```
466
+
467
+ `onSend` receives `note`, `excerpt`, `anchor`, `sectionLabel` and `sectionTitle`. Resolve
468
+ `{ ok: true }` when the note is filed. Resolve `{ ok: false, error }`, or throw, to keep the form
469
+ open with the note intact and the error shown in place. `section` reshapes the chip and the
470
+ payload from the heading. Send stays off until the note has text and shows progress while the
471
+ request runs.
472
+
473
+ A sent note shows one line, `sentMessage`, and a Close button. Cancel, Escape, the close button
474
+ and the scrim dismiss the form without sending. `Feedback` uses the shared dialog stack and the
475
+ kit's buttons.
476
+
450
477
  ## Timeline
451
478
 
452
479
  `Timeline` displays a record’s events in the order provided. Pass events from oldest
@@ -817,6 +844,24 @@ the trigger's trailing edge. Without `ariaLabel` the trigger's own text is its a
817
844
  name, so a control reading "17 September 2026" is heard as that rather than as its
818
845
  placeholder. The popover stays mounted while closed, and is `inert` while it is.
819
846
 
847
+ ## Footer
848
+
849
+ `Footer` draws the kit's `full`, `slim` and `app` versions. The full version takes
850
+ brand text, a tagline, social links and link columns. The columns sit side by side
851
+ on an iPad or desktop and stack on a phone. Supply legal text and links for every
852
+ version. Pass `AccentPicker` and `ThemeToggle` through `switcher` when needed.
853
+
854
+ ```tsx
855
+ <Footer variant="full" tagline="A short product line"
856
+ columns={[{ title: 'Product', links: [{ label: 'Overview', href: '/overview' }] }]}
857
+ legal="© 2026 Example" switcher={<ThemeToggle />} />
858
+ ```
859
+
860
+ Use `brand` to replace the lockup with React content. Set `brand={false}` to hide
861
+ the brand block. Use `links` for React link columns in place of `columns`.
862
+ Use `legal` for text or React content. The component uses the kit's footer classes
863
+ and stylesheet.
864
+
820
865
  ## AccentPicker
821
866
 
822
867
  `AccentPicker` is a controlled group of the kit’s four accent swatches. Pass `value`
@@ -96,13 +96,22 @@ declare const StatusDot: react.ForwardRefExoticComponent<Omit<HTMLAttributes<HTM
96
96
  } & react.RefAttributes<HTMLSpanElement>>;
97
97
 
98
98
  type Level = 2 | 3 | 4 | 5 | 6;
99
- declare function Card({ title, sub, level, className, children }: {
99
+ type CardProps = {
100
100
  title?: ReactNode;
101
101
  sub?: ReactNode;
102
102
  level?: Level;
103
+ /** `accent` tints the card with the accent and `live` with green. */
104
+ variant?: 'accent' | 'live';
105
+ /** `sm` trims the vertical padding. `lg` is the centred landing card. */
106
+ pad?: 'sm' | 'lg';
107
+ /** Glyph name for the chip before the title. Needs a `title`. */
108
+ icon?: string;
109
+ /** Makes the whole card a link. Its title is then a plain block, because a link holds no heading. */
110
+ href?: string;
103
111
  className?: string;
104
112
  children?: ReactNode;
105
- }): react.JSX.Element;
113
+ };
114
+ declare function Card({ title, sub, level, variant, pad, icon, href, className, children }: CardProps): react.JSX.Element;
106
115
 
107
116
  type CalloutVariant = 'neutral' | 'info' | 'success' | 'warn' | 'danger';
108
117
  interface CalloutProps {
@@ -156,6 +165,38 @@ type ConfirmProps = {
156
165
  };
157
166
  declare function Confirm({ open, title, body, confirmLabel, cancelLabel, danger, busy, onConfirm, onCancel, }: ConfirmProps): react.JSX.Element;
158
167
 
168
+ type FeedbackPayload = {
169
+ note: string;
170
+ excerpt: string;
171
+ anchor: string;
172
+ sectionLabel: string;
173
+ sectionTitle: string;
174
+ };
175
+ type FeedbackResult = {
176
+ ok: boolean;
177
+ error?: string;
178
+ };
179
+ type FeedbackSection = {
180
+ label?: string;
181
+ title?: string;
182
+ anchor?: string;
183
+ };
184
+ type FeedbackProps = {
185
+ /** The element whose text a reader may select. Pass a ref to it. */
186
+ container: RefObject<HTMLElement | null>;
187
+ /** Files the note. Resolve `{ ok: true }` when it is sent, or `{ ok: false, error }` to keep the form open with the error in place. */
188
+ onSend: (payload: FeedbackPayload) => Promise<FeedbackResult>;
189
+ /** Shortest selection that offers the pill. */
190
+ minChars?: number;
191
+ /** Shapes the chip and the payload from the heading above the selection. */
192
+ section?: (heading: Element | null) => FeedbackSection;
193
+ label?: string;
194
+ placeholder?: string;
195
+ /** The one line shown once the note is sent. */
196
+ sentMessage?: string;
197
+ };
198
+ declare function Feedback({ container, onSend, minChars, section, label, placeholder, sentMessage, }: FeedbackProps): react.ReactPortal;
199
+
159
200
  type ModalProps = {
160
201
  open: boolean;
161
202
  title: string;
@@ -870,6 +911,42 @@ type AppShellProps = {
870
911
  };
871
912
  declare function AppShell({ sections, pathname, title, children, word, brand, brandHref, width, back, lede, actions, bandControl, account, onSignOut, searchLabel, searchShortLabel, defaultCollapsed, palette, renderLink }: AppShellProps): react.JSX.Element;
872
913
 
914
+ type FooterLink = {
915
+ label: string;
916
+ href?: string;
917
+ target?: string;
918
+ };
919
+ type FooterColumn = {
920
+ title?: string;
921
+ links: FooterLink[];
922
+ };
923
+ type FooterSocial = {
924
+ label: string;
925
+ href?: string;
926
+ icon?: 'github' | 'x' | 'linkedin' | 'mail';
927
+ };
928
+ type FooterProps = Omit<HTMLAttributes<HTMLElement>, 'children'> & {
929
+ /** `full` is the marketing footer, `slim` a single legal row, `app` the in-product row. */
930
+ variant?: 'full' | 'slim' | 'app';
931
+ /** Product word beside the mark. Default `Strategy`. */
932
+ word?: string;
933
+ brandHref?: string;
934
+ /** Replaces the lockup. `false` hides the whole brand block: lockup, tagline and social links. Full variant only. */
935
+ brand?: ReactNode | false;
936
+ /** Short line under the brand. Full variant only. */
937
+ tagline?: string;
938
+ /** Link columns. Side by side above the phone step, stacked on a phone. Full variant only. */
939
+ columns?: FooterColumn[];
940
+ /** Contents of the link navigation. Takes the place of `columns`. Full variant only. */
941
+ links?: ReactNode;
942
+ social?: FooterSocial[];
943
+ legal?: ReactNode;
944
+ legalLinks?: FooterLink[];
945
+ /** Slot for `<AccentPicker>` and `<ThemeToggle>`. */
946
+ switcher?: ReactNode;
947
+ };
948
+ declare function Footer({ variant, word, brandHref, brand, tagline, columns, links, social, legal, legalLinks, switcher, className, ...rest }: FooterProps): react.JSX.Element;
949
+
873
950
  type EmptyStateVariant = 'first-run' | 'no-matches' | 'not-found' | 'not-yet-built';
874
951
  type EmptyStateProps = {
875
952
  variant?: EmptyStateVariant;
@@ -1157,4 +1234,4 @@ declare const Breadcrumbs: react.ForwardRefExoticComponent<Omit<Omit<react.Detai
1157
1234
  declare const PAGE_SIZES: readonly number[];
1158
1235
  declare const DEFAULT_PAGE_SIZE: number;
1159
1236
 
1160
- export { type Accent, AccentPicker, type AccentPickerProps, type AddFilter, AppShell, type AppShellProps, type AppShellSection, 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 ChartBridgeStep, type ChartBridgeTones, type ChartPeriod, type ChartProps, type ChartSeries, 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, Field, type FieldControlProps, type FieldProps, FileDrop, type FileDropFile, type FileDropProps, type FileDropStatus, FileField, type FileFieldProps, type Filter, FilterBar, type FilterBarProps, 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, sortTableRows, useToast };
1237
+ export { type Accent, AccentPicker, type AccentPickerProps, type AddFilter, AppShell, type AppShellProps, type AppShellSection, 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 ChartBridgeStep, type ChartBridgeTones, type ChartPeriod, type ChartProps, type ChartSeries, 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, sortTableRows, useToast };