@ssa-ui-kit/core 3.25.1 → 3.26.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/dist/ai/source-map.md +33 -10
- package/dist/components/Chip/helpers.d.ts +2 -2
- package/dist/components/Chip/types.d.ts +10 -3
- package/dist/components/Dropdown/Dropdown.d.ts +1 -1
- package/dist/components/Dropdown/types.d.ts +7 -0
- package/dist/components/Footer/Footer.d.ts +42 -0
- package/dist/components/Footer/index.d.ts +1 -0
- package/dist/components/Footer/styles.d.ts +53 -0
- package/dist/components/Footer/types.d.ts +110 -0
- package/dist/components/Label/Label.d.ts +11 -1
- package/dist/components/Label/index.d.ts +1 -0
- package/dist/components/Label/types.d.ts +36 -1
- package/dist/components/TextField/TextField.d.ts +1 -1
- package/dist/components/TextField/types.d.ts +7 -0
- package/dist/components/Textarea/types.d.ts +4 -0
- package/dist/components/Typeahead/Typeahead.context.d.ts +1 -0
- package/dist/components/Typeahead/Typeahead.d.ts +1 -1
- package/dist/components/Typeahead/types.d.ts +8 -1
- package/dist/components/Typeahead/useTypeahead.d.ts +2 -1
- package/dist/components/index.d.ts +3 -0
- package/dist/index.js +857 -449
- package/dist/index.mjs +856 -450
- package/dist/tsbuildcache +1 -1
- package/package.json +3 -3
package/dist/ai/source-map.md
CHANGED
|
@@ -4,7 +4,7 @@ Generated from the TypeScript program at build time — do not edit by hand.
|
|
|
4
4
|
|
|
5
5
|
**Everything below is imported from the package root:** `import { X } from '@ssa-ui-kit/core'`
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
194 components · 20 contexts · 23 hooks · 21 functions · 16 constants · 346 exported types
|
|
8
8
|
|
|
9
9
|
## Reading this file
|
|
10
10
|
|
|
@@ -22,7 +22,7 @@ Generated from the TypeScript program at build time — do not edit by hand.
|
|
|
22
22
|
|
|
23
23
|
**Data Display** — Avatar, Badge, BarGaugeChart, BarGaugeChartComponent, BarLineComplexChart, BigNumberChart, BigNumberChartComponent, Calendar, CalendarEventDetails, CandlestickChart, CandlestickChartComponent, Card, CardBase, CardContent, CardHeader, CardList, Carousel, ChartBackground, Chip, ColumnFreezeMenu, ColumnResizeHandle, Counter, FunnelChart, GaugeChart, ImageItem, Indicator, Label, NestedTable, NestedTableCell, NestedTableCellHeader, NestedTableCellSubHeader, NestedTableRow, PieChart, PieChartComponent, PieChartLegend, Progress, ProgressBar, ProgressCircle, ProgressInfo, ProgressInfoTotals, ProgressLegend, ProgressLegendItem, ProgressVertical, ResponsiveImage, SegmentedPieChart, SegmentedPieChartComponent, Table, TableBody, TableCell, TableCellHeader, TableContainer, TableFilterCheckbox, TableFilters, TableFiltersAccordion, TableFiltersAccordionContent, TableFiltersButtons, TableFiltersCancelButton, TableFiltersClearButton, TableFilterTrigger, TableFilterTriggerWithNotification, TableHead, TableRow, Tag, TreeMapChart, TreeMapChartComponent, TreeMapTooltipBase, Typography, WithNestedTableRow
|
|
24
24
|
|
|
25
|
-
**Navigation & Layout** — CollapsibleNavBar, CollapsibleNavBarCustomIconSVG, Header, History, LargeTab, Link, LinksTabBar, NavBar, Pagination, Step, StepConnector, StepLabel, Stepper, Tab, TabBar, TreeView, WithLink, WithPagination, WithVisibleLG, WithVisibleMD, WithVisibleSM, WithVisibleUpToLG, Wrapper
|
|
25
|
+
**Navigation & Layout** — CollapsibleNavBar, CollapsibleNavBarCustomIconSVG, Footer, Header, History, LargeTab, Link, LinksTabBar, NavBar, Pagination, Step, StepConnector, StepLabel, Stepper, Tab, TabBar, TreeView, WithLink, WithPagination, WithVisibleLG, WithVisibleMD, WithVisibleSM, WithVisibleUpToLG, Wrapper
|
|
26
26
|
|
|
27
27
|
**Overlay & Feedback** — Modal, ModalContent, ModalDialog, ModalDismissButton, ModalOpenButton, NotificationCard, NotificationMenu, Popover, PopoverClose, PopoverContent, PopoverDescription, PopoverHeading, PopoverTrigger, ProgressChartTooltip, SimpleChartTooltip, Tooltip, TooltipContent, TooltipContentBase, TooltipTrigger
|
|
28
28
|
|
|
@@ -253,6 +253,7 @@ Select-like dropdown component for single selection
|
|
|
253
253
|
- `maxHeight?: number` `= 200` — Max height (px) of the options list; overflow scrolls.
|
|
254
254
|
- `avatarBorder?: boolean` `= false` — Shows a border around the avatar in the selected-item display.
|
|
255
255
|
- `label?: string` — Label text displayed above the dropdown
|
|
256
|
+
- `labelBadge?: LabelBadge` — Status badge to the right of the label, e.g. `{ text: 'default', color: 'grey' }`. Announced as the toggle's…
|
|
256
257
|
- `helperText?: string` — Helper text displayed below the dropdown Shown when no errors are present
|
|
257
258
|
- `errors?: FieldError` — React Hook Form field error object Used to display validation error messages
|
|
258
259
|
- `success?: boolean` `= false` — Whether to display success state styling When true, status is set to 'success'
|
|
@@ -680,6 +681,7 @@ Multi-line text input component
|
|
|
680
681
|
- `status?: 'custom' | 'error' | 'success' | 'basic'` `= 'basic'` — Visual validation status (aligns with Input/TextField palette behavior). - `basic`: default border/outline…
|
|
681
682
|
- `title?: string` — Title attribute for the textarea element Provides tooltip text on hover
|
|
682
683
|
- `id?: string` — HTML id attribute for the textarea (e.g. for label htmlFor). Defaults to `formElement-${name}` when not…
|
|
684
|
+
- `aria-describedby?: string` — Ids of the elements describing the textarea — a label badge, helper text
|
|
683
685
|
- `onPaste?: ClipboardEventHandler<HTMLTextAreaElement>` — Paste event handler Fired when content is pasted into the textarea
|
|
684
686
|
- `setCountChar?: ReactEventHandler` — Callback function to track character count Called with the event when content changes Useful for displaying…
|
|
685
687
|
|
|
@@ -687,6 +689,7 @@ Multi-line text input component
|
|
|
687
689
|
Ready-to-use text input (single- or multi-line) with label and validation UI.
|
|
688
690
|
|
|
689
691
|
- `label?: string` — Label text displayed above the input field
|
|
692
|
+
- `labelBadge?: LabelBadge` — Status badge to the right of the label, e.g. `{ text: 'mapped', color: 'primary' }`. Announced as the field's…
|
|
690
693
|
- `errors?: FieldError` — React Hook Form field error object Used to display validation error messages
|
|
691
694
|
- `success?: boolean` `= false` — Whether to display success state styling When true, status is set to 'success'
|
|
692
695
|
- `helperText?: string` — Helper text displayed below the input Shown when no errors are present
|
|
@@ -736,6 +739,7 @@ Advanced autocomplete search component with dropdown functionality
|
|
|
736
739
|
- `endIconClassName?: string` — Custom CSS class name for the end icon
|
|
737
740
|
- `name?: string` `= 'typeahead-search'` — Form field name (required for React Hook Form integration)
|
|
738
741
|
- `label?: string` — Label text displayed above the input
|
|
742
|
+
- `labelBadge?: LabelBadge` — Status badge to the right of the label, e.g. `{ text: 'mapped', color: 'primary' }`. Announced as the input's…
|
|
739
743
|
- `helperText?: string` — Helper text displayed below the input
|
|
740
744
|
- `error?: FieldError` — Field error from React Hook Form
|
|
741
745
|
- `success?: boolean` `= false` — Whether to show success state
|
|
@@ -1102,7 +1106,7 @@ Compact component for tags, labels, and removable items.
|
|
|
1102
1106
|
- `label: ReactNode` — Main text content of the chip Can be a string, number, or React node
|
|
1103
1107
|
- `title?: ReactNode` — Optional title/heading text displayed before the label Useful for chips with additional context
|
|
1104
1108
|
- `variant?: ChipVariant` `= 'filled'` — Visual style variant - `filled`: Solid background (default) - `outlined`: Transparent with border
|
|
1105
|
-
- `color?:
|
|
1109
|
+
- `color?: (string & {}) | 'black' | 'black25' | 'black45' | 'white' | 'white60' | …(139 more)` `= 'default'` — Color theme for the chip. Semantic colors read from `theme.palette`, so palette overrides in a custom theme…
|
|
1106
1110
|
- `size?: ChipSize` `= 'medium'` — Size of the chip
|
|
1107
1111
|
- `disabled?: boolean` `= false` — Whether the chip is disabled Disabled chips cannot be clicked or deleted
|
|
1108
1112
|
- `icon?: 'reset' | 'archive' | 'arrow-down' | 'arrow-up' | …(223 more — full list under "Icon.name")` — Icon name to display before the label Uses the Icon component internally Defaults to 'plus' if showIcon is…
|
|
@@ -1112,6 +1116,7 @@ Compact component for tags, labels, and removable items.
|
|
|
1112
1116
|
- `showIcon?: boolean` `= true` — Whether to show the leading icon If false, no icon will be displayed even if icon prop is provided
|
|
1113
1117
|
- `onClick?: MouseEventHandler<HTMLDivElement>` — Click handler for the chip Makes the chip clickable/interactive
|
|
1114
1118
|
- `clickable?: boolean` — Explicitly mark chip as clickable Used to enable pointer cursor and keyboard interaction Automatically true…
|
|
1119
|
+
- `id?: string` — `id` of the chip element, e.g. for a control's `aria-describedby`
|
|
1115
1120
|
|
|
1116
1121
|
#### ColumnFreezeMenu
|
|
1117
1122
|
The freeze/unfreeze menu in a table header cell
|
|
@@ -1188,7 +1193,9 @@ Stage diagram drawn as a funnel or a triangle
|
|
|
1188
1193
|
#### Label
|
|
1189
1194
|
|
|
1190
1195
|
- `htmlFor?: string`
|
|
1196
|
+
- `id?: string` — `id` of the `<label>` element, e.g. for a control's `aria-labelledby`
|
|
1191
1197
|
- `children: ReactNode`
|
|
1198
|
+
- `badge?: LabelBadge` — Status badge shown to the right of the label text
|
|
1192
1199
|
- `disabled?: boolean` — Renders the label in its muted, disabled state.
|
|
1193
1200
|
- `isDisabled?: boolean`
|
|
1194
1201
|
- `onMouseEnter?: MouseEventHandler<HTMLLabelElement>`
|
|
@@ -1586,6 +1593,18 @@ The app sidebar: a logo, a menu, and three layouts.
|
|
|
1586
1593
|
_No library-specific props._
|
|
1587
1594
|
- _plus native element attributes_
|
|
1588
1595
|
|
|
1596
|
+
#### Footer
|
|
1597
|
+
The page's bottom bar: a copyright line and legal links, and optionally a logo, a short description and navigation columns above them.
|
|
1598
|
+
|
|
1599
|
+
- `copyright?: ReactNode` — Copyright line, on the left of the bottom bar
|
|
1600
|
+
- `links?: FooterLink[]` — Legal links — privacy policy, terms — on the right of the bottom bar
|
|
1601
|
+
- `logo?: ReactNode` — Project logo, at the top left of the extended footer, in a 64px high box. Passing it makes the footer…
|
|
1602
|
+
- `description?: ReactNode` — Short text under the logo — a tagline, the company name. Passing it makes the footer extended.
|
|
1603
|
+
- `columns?: FooterColumn[]` — Navigation columns on the right of the extended footer. Passing any makes the footer extended.
|
|
1604
|
+
- `size?: FooterSize` `= 'small'` — Text size and height of the bottom bar. Ignored by the extended footer, which the design only has in medium.
|
|
1605
|
+
- `linksLabel?: string` `= 'Legal'` — Accessible name of the legal links' navigation landmark
|
|
1606
|
+
- _plus native element attributes_
|
|
1607
|
+
|
|
1589
1608
|
#### Header
|
|
1590
1609
|
The application's top bar: logo, main navigation and a free slot on the right for the user profile, notifications or log out.
|
|
1591
1610
|
|
|
@@ -2205,6 +2224,8 @@ Accessible label for form fields
|
|
|
2205
2224
|
|
|
2206
2225
|
- `children: ReactNode` — Label text content
|
|
2207
2226
|
- `htmlFor?: string`
|
|
2227
|
+
- `id?: string` — `id` of the `<label>` element, e.g. for a control's `aria-labelledby`
|
|
2228
|
+
- `badge?: LabelBadge` — Status badge shown to the right of the label text
|
|
2208
2229
|
- `disabled?: boolean` — Renders the label in its muted, disabled state.
|
|
2209
2230
|
- `isDisabled?: boolean`
|
|
2210
2231
|
- `onMouseEnter?: MouseEventHandler<HTMLLabelElement>`
|
|
@@ -2351,6 +2372,7 @@ A sticky action bar across the bottom of the panel.
|
|
|
2351
2372
|
- `deriveBreadcrumbs` — Pure derivation of breadcrumb items from a route tree and a pathname. Extracted from the hook so it can be unit-tested without a router.
|
|
2352
2373
|
- `filterButtonStyles`
|
|
2353
2374
|
- `getContextMenuOptionId` — DOM id of an option, for `aria-activedescendant` on an element outside the list (e.g. a combobox input). `menuId` is the `id` given to the ContextMenu. Characters not…
|
|
2375
|
+
- `getLabelBadgeId` — Builds the default badge id for a label's `htmlFor`, so a field can point its control's `aria-describedby` at the badge.
|
|
2354
2376
|
- `getNextActiveValue` — Where a navigation key moves the highlight: ArrowDown / ArrowUp step over disabled options and wrap, Home / End jump to the ends. Returns `undefined` for any other key,…
|
|
2355
2377
|
- `highlightInputMatch`
|
|
2356
2378
|
- `nextIncludeExcludeType` — Where Enter moves an `includeExclude` row: none → include → exclude → none, or none ⇄ selected for `selectOnly` rows. For driving that cycle from an input that keeps…
|
|
@@ -2438,13 +2460,14 @@ _Names only — read the `.d.ts` for their shape._
|
|
|
2438
2460
|
`FileUploadProps` · `Filter` · `FiltersMultiSelectEmptyProps` · `FiltersMultiSelectOptionProps`
|
|
2439
2461
|
`FiltersMultiSelectProps` · `FloatingActionButtonAction` · `FloatingActionButtonColor`
|
|
2440
2462
|
`FloatingActionButtonIcon` · `FloatingActionButtonPosition` · `FloatingActionButtonProps`
|
|
2441
|
-
`FloatingActionButtonSize` · `FloatingSurfaceColor` · `FloatingSurfaceSize` · `
|
|
2442
|
-
`
|
|
2443
|
-
`
|
|
2444
|
-
`
|
|
2445
|
-
`
|
|
2446
|
-
`
|
|
2447
|
-
`
|
|
2463
|
+
`FloatingActionButtonSize` · `FloatingSurfaceColor` · `FloatingSurfaceSize` · `FooterColumn`
|
|
2464
|
+
`FooterLink` · `FooterProps` · `FooterSize` · `FooterTheme` · `Format` · `FrozenColumns`
|
|
2465
|
+
`FullscreenModeContextType` · `FunnelChartItem` · `FunnelChartProps` · `FunnelChartRender`
|
|
2466
|
+
`FunnelChartType` · `GaugeBarProps` · `GaugeBarThreshold` · `GaugeBarValueFormatter`
|
|
2467
|
+
`GaugeChartFeature` · `GaugeChartProps` · `HeaderNavItem` · `HeaderProps` · `HeaderSize`
|
|
2468
|
+
`HeaderTheme` · `HistoryItemType` · `HistoryProps` · `IFormCheckboxProps` · `IconButtonProps`
|
|
2469
|
+
`IconProps` · `ImageItemProps` · `IndicatorProps` · `InputColors` · `InputProps`
|
|
2470
|
+
`InputStatusColors` · `InteractionsEnabled` · `Item` · `LabelBadge` · `LabelProps` · `LargeTabProps`
|
|
2448
2471
|
`LastFocusedElement` · `LinkProps` · `LinksTabBarProps` · `MainColors` · `MainSizes`
|
|
2449
2472
|
`MapIconsType` · `ModalContextProps` · `ModalDialogProps` · `ModalProps` · `ModalRootProps`
|
|
2450
2473
|
`MountMode` · `MultipleStylesProps` · `NavBarExtendedGroup` · `NavBarExtendedItem`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Theme } from '@emotion/react';
|
|
2
|
-
import { ChipProps } from './types';
|
|
3
|
-
type SemanticColor = Exclude<
|
|
2
|
+
import { ChipColor, ChipProps } from './types';
|
|
3
|
+
type SemanticColor = Exclude<ChipColor, 'default'>;
|
|
4
4
|
type ColorConfig = {
|
|
5
5
|
/** Solid background for filled variant / border + text for outlined */
|
|
6
6
|
main: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CommonProps } from '../../types/emotion';
|
|
1
|
+
import { ColorsKeys, CommonProps } from '../../types/emotion';
|
|
2
2
|
import { Interpolation, Theme } from '@emotion/react';
|
|
3
3
|
import { ReactNode, MouseEventHandler } from 'react';
|
|
4
4
|
import { IconProps } from '../Icon/types';
|
|
@@ -90,10 +90,13 @@ export interface ChipProps extends CommonProps {
|
|
|
90
90
|
variant?: ChipVariant;
|
|
91
91
|
/**
|
|
92
92
|
* Color theme for the chip. Semantic colors read from `theme.palette`,
|
|
93
|
-
* so palette overrides in a custom theme apply automatically.
|
|
93
|
+
* so palette overrides in a custom theme apply automatically. Any other
|
|
94
|
+
* theme color key (e.g. `'purple'`) or CSS color (e.g. `'#ff8a00'`) is
|
|
95
|
+
* used as is: border and text in `outlined`, background in `filled`, with
|
|
96
|
+
* the text color picked for contrast.
|
|
94
97
|
* @default 'default'
|
|
95
98
|
*/
|
|
96
|
-
color?: ChipColor;
|
|
99
|
+
color?: ChipColor | ColorsKeys | (string & {});
|
|
97
100
|
/**
|
|
98
101
|
* Size of the chip
|
|
99
102
|
* @default 'medium'
|
|
@@ -148,4 +151,8 @@ export interface ChipProps extends CommonProps {
|
|
|
148
151
|
* Custom Emotion CSS styles
|
|
149
152
|
*/
|
|
150
153
|
css?: Interpolation<Theme>;
|
|
154
|
+
/**
|
|
155
|
+
* `id` of the chip element, e.g. for a control's `aria-describedby`
|
|
156
|
+
*/
|
|
157
|
+
id?: string;
|
|
151
158
|
}
|
|
@@ -94,5 +94,5 @@ import { DropdownProps } from './types';
|
|
|
94
94
|
*
|
|
95
95
|
* @see https://www.w3.org/WAI/ARIA/apg/example-index/combobox/combobox-select-only.html
|
|
96
96
|
*/
|
|
97
|
-
declare const Dropdown: <T extends DropdownOptionProps>({ selectedItem, disabled, isDisabled, isOpen: isInitOpen, children, onChange: handleChange, className, placeholder, maxHeight, avatarBorder, label, helperText, errors, success, icon, width, dropdownProps: componentProps, }: DropdownProps<T>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
97
|
+
declare const Dropdown: <T extends DropdownOptionProps>({ selectedItem, disabled, isDisabled, isOpen: isInitOpen, children, onChange: handleChange, className, placeholder, maxHeight, avatarBorder, label, labelBadge, helperText, errors, success, icon, width, dropdownProps: componentProps, }: DropdownProps<T>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
98
98
|
export default Dropdown;
|
|
@@ -4,6 +4,7 @@ import { Interpolation, Theme } from '@emotion/react';
|
|
|
4
4
|
import { DropdownOptionProps } from '../DropdownOptions';
|
|
5
5
|
import { CommonProps } from '../../types/emotion';
|
|
6
6
|
import { IconProps } from '../Icon/types';
|
|
7
|
+
import { LabelBadge } from '../Label/types';
|
|
7
8
|
export declare enum DropdownPositions {
|
|
8
9
|
top = "top",
|
|
9
10
|
bottom = "bottom",
|
|
@@ -108,6 +109,12 @@ export interface DropdownProps<P extends DropdownOptionProps> extends CommonProp
|
|
|
108
109
|
* Label text displayed above the dropdown
|
|
109
110
|
*/
|
|
110
111
|
label?: string;
|
|
112
|
+
/**
|
|
113
|
+
* Status badge to the right of the label, e.g.
|
|
114
|
+
* `{ text: 'default', color: 'grey' }`. Announced as the toggle's
|
|
115
|
+
* description. Needs a `label`.
|
|
116
|
+
*/
|
|
117
|
+
labelBadge?: LabelBadge;
|
|
111
118
|
/**
|
|
112
119
|
* Helper text displayed below the dropdown
|
|
113
120
|
* Shown when no errors are present
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { FooterProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Footer - The page's bottom bar: a copyright line and legal links, and
|
|
4
|
+
* optionally a logo, a short description and navigation columns above them.
|
|
5
|
+
*
|
|
6
|
+
* ### Default and extended
|
|
7
|
+
* With only `copyright` and `links` the Footer is a single bar in one of
|
|
8
|
+
* three sizes. Passing `logo`, `description` or `columns` makes it extended:
|
|
9
|
+
* the brand block and columns sit above the same bar. The design has the
|
|
10
|
+
* extended footer in medium only, so it ignores `size`.
|
|
11
|
+
*
|
|
12
|
+
* ### Links
|
|
13
|
+
* A link with a `path` renders as a react-router link, so the Footer must
|
|
14
|
+
* then sit inside a router; a link with an `href` renders as a plain anchor.
|
|
15
|
+
* Each column is its own navigation landmark, named by its title.
|
|
16
|
+
*
|
|
17
|
+
* ### Layout
|
|
18
|
+
* The layout follows the Footer's own width, not the window's. Below 900px
|
|
19
|
+
* the bottom bar stacks the copyright over the links, and the extended
|
|
20
|
+
* footer puts the brand block above its columns, two per row.
|
|
21
|
+
*
|
|
22
|
+
* @category Navigation
|
|
23
|
+
* @example
|
|
24
|
+
* ```tsx
|
|
25
|
+
* <Footer
|
|
26
|
+
* copyright="Acme © 2007-2026. All rights reserved."
|
|
27
|
+
* links={[
|
|
28
|
+
* { id: 'privacy', label: 'Privacy Policy', path: '/privacy' },
|
|
29
|
+
* { id: 'terms', label: 'Terms & Conditions', path: '/terms' },
|
|
30
|
+
* ]}
|
|
31
|
+
* logo={<img src="/logo.svg" alt="Acme" height={64} />}
|
|
32
|
+
* columns={[
|
|
33
|
+
* {
|
|
34
|
+
* id: 'company',
|
|
35
|
+
* title: 'Company',
|
|
36
|
+
* links: [{ id: 'about', label: 'About us', path: '/about' }],
|
|
37
|
+
* },
|
|
38
|
+
* ]}
|
|
39
|
+
* />
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
export declare const Footer: import("react").ForwardRefExoticComponent<FooterProps & import("react").RefAttributes<HTMLElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Footer';
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { Theme } from '@emotion/react';
|
|
2
|
+
import { FooterSize, FooterTheme } from './types';
|
|
3
|
+
export declare const TYPOGRAPHY: Record<FooterSize, {
|
|
4
|
+
fontSize: number;
|
|
5
|
+
lineHeight: number;
|
|
6
|
+
fontWeight: number;
|
|
7
|
+
}>;
|
|
8
|
+
/** From this footer width up the design layout; below it, everything stacks. */
|
|
9
|
+
export declare const DESKTOP_MIN_WIDTH = 900;
|
|
10
|
+
export declare const resolvePalette: (theme: Theme, footerTheme: FooterTheme) => {
|
|
11
|
+
background: string;
|
|
12
|
+
text: `rgb${string}` | undefined;
|
|
13
|
+
accent: `rgb${string}` | undefined;
|
|
14
|
+
} | {
|
|
15
|
+
background: `rgb${string}` | "transparent";
|
|
16
|
+
text: `rgb${string}` | undefined;
|
|
17
|
+
accent: `rgb${string}` | "transparent";
|
|
18
|
+
};
|
|
19
|
+
export type FooterPalette = ReturnType<typeof resolvePalette>;
|
|
20
|
+
/**
|
|
21
|
+
* The query container. It is the footer itself, so consumer styles land on
|
|
22
|
+
* the outermost element; the padding the query switches lives on the inner
|
|
23
|
+
* wrapper, as a container cannot query its own width. The kit's global reset
|
|
24
|
+
* gives every element its own color, hence the explicit inherit inside.
|
|
25
|
+
*/
|
|
26
|
+
export declare const container: (palette: FooterPalette) => import("@emotion/react").SerializedStyles;
|
|
27
|
+
export declare const inner: import("@emotion/react").SerializedStyles;
|
|
28
|
+
/**
|
|
29
|
+
* Design: 24px above the content, 40px between it and the bottom bar. The
|
|
30
|
+
* container already pads 12px, so this adds the other 12px on top.
|
|
31
|
+
*/
|
|
32
|
+
export declare const extended: import("@emotion/react").SerializedStyles;
|
|
33
|
+
export declare const content: import("@emotion/react").SerializedStyles;
|
|
34
|
+
export declare const brand: import("@emotion/react").SerializedStyles;
|
|
35
|
+
/**
|
|
36
|
+
* Fixed height, as in the design's placeholder; width follows the logo so
|
|
37
|
+
* wordmarks fit.
|
|
38
|
+
*/
|
|
39
|
+
export declare const logo: import("@emotion/react").SerializedStyles;
|
|
40
|
+
export declare const description: import("@emotion/react").SerializedStyles;
|
|
41
|
+
/**
|
|
42
|
+
* Two columns side by side on phones. On desktop the design's 160px gaps,
|
|
43
|
+
* shrinking with the footer so a fourth column still fits.
|
|
44
|
+
*/
|
|
45
|
+
export declare const columns: import("@emotion/react").SerializedStyles;
|
|
46
|
+
export declare const column: import("@emotion/react").SerializedStyles;
|
|
47
|
+
export declare const columnTitle: import("@emotion/react").SerializedStyles;
|
|
48
|
+
export declare const linkList: import("@emotion/react").SerializedStyles;
|
|
49
|
+
/** Stacked on phones; copyright left and links right from 900px. */
|
|
50
|
+
export declare const bottomBar: (size: FooterSize) => import("@emotion/react").SerializedStyles;
|
|
51
|
+
export declare const copyright: import("@emotion/react").SerializedStyles;
|
|
52
|
+
export declare const legalList: import("@emotion/react").SerializedStyles;
|
|
53
|
+
export declare const link: (theme: Theme, palette: FooterPalette) => import("@emotion/react").SerializedStyles;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Footer size: the text size of the bottom bar — 14px, 16px or 20px — and so
|
|
4
|
+
* its height, 42px, 48px or 52px. The extended footer is always medium.
|
|
5
|
+
*/
|
|
6
|
+
export type FooterSize = 'small' | 'medium' | 'large';
|
|
7
|
+
/**
|
|
8
|
+
* Footer color scheme: the light grey bar, or the dark graphite gradient the
|
|
9
|
+
* Header uses.
|
|
10
|
+
*/
|
|
11
|
+
export type FooterTheme = 'light' | 'dark';
|
|
12
|
+
/**
|
|
13
|
+
* One link of the Footer — a legal link in the bottom bar, or a line of a
|
|
14
|
+
* navigation column.
|
|
15
|
+
*
|
|
16
|
+
* Give it a `path` to render a react-router link (the Footer must then sit
|
|
17
|
+
* inside a router), or an `href` for a plain anchor — a page on another site,
|
|
18
|
+
* a `mailto:`. With neither it renders as plain text.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```tsx
|
|
22
|
+
* const links: FooterLink[] = [
|
|
23
|
+
* { id: 'privacy', label: 'Privacy Policy', path: '/privacy' },
|
|
24
|
+
* { id: 'terms', label: 'Terms & Conditions', href: 'https://example.com/terms' },
|
|
25
|
+
* ];
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export interface FooterLink {
|
|
29
|
+
/** Unique key of the link within its list */
|
|
30
|
+
id: string;
|
|
31
|
+
/** Visible label */
|
|
32
|
+
label: ReactNode;
|
|
33
|
+
/** In-app route, rendered as a react-router link. Wins over `href`. */
|
|
34
|
+
path?: string;
|
|
35
|
+
/** Address of a plain anchor, for links outside the app */
|
|
36
|
+
href?: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* A navigation column of the extended Footer: a bold title over a list of
|
|
40
|
+
* links.
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```tsx
|
|
44
|
+
* const column: FooterColumn = {
|
|
45
|
+
* id: 'company',
|
|
46
|
+
* title: 'Company',
|
|
47
|
+
* links: [
|
|
48
|
+
* { id: 'about', label: 'About us', path: '/about' },
|
|
49
|
+
* { id: 'careers', label: 'Careers', path: '/careers' },
|
|
50
|
+
* ],
|
|
51
|
+
* };
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
export interface FooterColumn {
|
|
55
|
+
/** Unique key of the column */
|
|
56
|
+
id: string;
|
|
57
|
+
/** Column title; also names the column's navigation landmark */
|
|
58
|
+
title: ReactNode;
|
|
59
|
+
/** Links listed under the title */
|
|
60
|
+
links: FooterLink[];
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Props for the Footer component.
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* ```tsx
|
|
67
|
+
* <Footer
|
|
68
|
+
* copyright="Acme © 2007-2026. All rights reserved."
|
|
69
|
+
* links={[{ id: 'privacy', label: 'Privacy Policy', path: '/privacy' }]}
|
|
70
|
+
* />
|
|
71
|
+
* ```
|
|
72
|
+
*/
|
|
73
|
+
export interface FooterProps extends Omit<HTMLAttributes<HTMLElement>, 'children'> {
|
|
74
|
+
/** Copyright line, on the left of the bottom bar */
|
|
75
|
+
copyright?: ReactNode;
|
|
76
|
+
/** Legal links — privacy policy, terms — on the right of the bottom bar */
|
|
77
|
+
links?: FooterLink[];
|
|
78
|
+
/**
|
|
79
|
+
* Project logo, at the top left of the extended footer, in a 64px high box.
|
|
80
|
+
* Passing it makes the footer extended.
|
|
81
|
+
*/
|
|
82
|
+
logo?: ReactNode;
|
|
83
|
+
/**
|
|
84
|
+
* Short text under the logo — a tagline, the company name. Passing it makes
|
|
85
|
+
* the footer extended.
|
|
86
|
+
*/
|
|
87
|
+
description?: ReactNode;
|
|
88
|
+
/**
|
|
89
|
+
* Navigation columns on the right of the extended footer. Passing any makes
|
|
90
|
+
* the footer extended.
|
|
91
|
+
*/
|
|
92
|
+
columns?: FooterColumn[];
|
|
93
|
+
/**
|
|
94
|
+
* Color scheme. Named after the kit's other light/dark components (Header,
|
|
95
|
+
* TreeView) — not the Emotion theme.
|
|
96
|
+
* @default 'light'
|
|
97
|
+
*/
|
|
98
|
+
theme?: FooterTheme;
|
|
99
|
+
/**
|
|
100
|
+
* Text size and height of the bottom bar. Ignored by the extended footer,
|
|
101
|
+
* which the design only has in medium.
|
|
102
|
+
* @default 'small'
|
|
103
|
+
*/
|
|
104
|
+
size?: FooterSize;
|
|
105
|
+
/**
|
|
106
|
+
* Accessible name of the legal links' navigation landmark
|
|
107
|
+
* @default 'Legal'
|
|
108
|
+
*/
|
|
109
|
+
linksLabel?: string;
|
|
110
|
+
}
|
|
@@ -1,3 +1,13 @@
|
|
|
1
1
|
import { LabelProps } from './types';
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Builds the default badge id for a label's `htmlFor`, so a field can point
|
|
4
|
+
* its control's `aria-describedby` at the badge.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* <input id="email" aria-describedby={getLabelBadgeId('email')} />
|
|
9
|
+
* ```
|
|
10
|
+
*/
|
|
11
|
+
export declare const getLabelBadgeId: (htmlFor: string) => string;
|
|
12
|
+
declare const Label: ({ children, htmlFor, id, badge, className, disabled, isDisabled, onMouseEnter, onMouseLeave, }: LabelProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
3
13
|
export default Label;
|
|
@@ -1,8 +1,43 @@
|
|
|
1
|
-
import { MouseEventHandler } from 'react';
|
|
1
|
+
import { MouseEventHandler, ReactNode } from 'react';
|
|
2
2
|
import { CommonProps } from '../../types/emotion';
|
|
3
|
+
import { ChipProps } from '../Chip/types';
|
|
4
|
+
/**
|
|
5
|
+
* A small status pill shown to the right of a field label — "mapped",
|
|
6
|
+
* "default", "not present in the CV". Rendered as an outlined Chip.
|
|
7
|
+
*
|
|
8
|
+
* The badge sits next to the `<label>` element, not inside it, so it does
|
|
9
|
+
* not become part of the field's accessible name. Point the control's
|
|
10
|
+
* `aria-describedby` at its `id` to have it announced as a description —
|
|
11
|
+
* the kit's fields with a `labelBadge` prop do this for you.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```tsx
|
|
15
|
+
* const badge: LabelBadge = { text: 'mapped', color: 'primary' };
|
|
16
|
+
* const custom: LabelBadge = { text: 'not present in the CV', color: '#ff8a00' };
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export interface LabelBadge {
|
|
20
|
+
/** Badge text */
|
|
21
|
+
text: ReactNode;
|
|
22
|
+
/**
|
|
23
|
+
* A Chip color: `primary`, `success`, `warning`… , any theme color key
|
|
24
|
+
* (e.g. `'purple'`) or a CSS color (e.g. `'#ff8a00'`).
|
|
25
|
+
* @default 'default'
|
|
26
|
+
*/
|
|
27
|
+
color?: ChipProps['color'];
|
|
28
|
+
/**
|
|
29
|
+
* `id` of the badge element, for the control's `aria-describedby`
|
|
30
|
+
* @default `${htmlFor}-badge`, or a generated id without `htmlFor`
|
|
31
|
+
*/
|
|
32
|
+
id?: string;
|
|
33
|
+
}
|
|
3
34
|
export interface LabelProps extends CommonProps {
|
|
4
35
|
htmlFor?: string;
|
|
36
|
+
/** `id` of the `<label>` element, e.g. for a control's `aria-labelledby` */
|
|
37
|
+
id?: string;
|
|
5
38
|
children: React.ReactNode;
|
|
39
|
+
/** Status badge shown to the right of the label text */
|
|
40
|
+
badge?: LabelBadge;
|
|
6
41
|
/** Renders the label in its muted, disabled state. */
|
|
7
42
|
disabled?: boolean;
|
|
8
43
|
/**
|
|
@@ -75,5 +75,5 @@ import { TextFieldProps } from './types';
|
|
|
75
75
|
* - ARIA attributes via React Hook Form (when register is provided)
|
|
76
76
|
* - Error messages announced to screen readers
|
|
77
77
|
*/
|
|
78
|
-
declare const TextField: ({ multirow, name, label, errors, helperText, success, disabled, maxLength, ...props }: TextFieldProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
78
|
+
declare const TextField: ({ multirow, name, label, labelBadge, errors, helperText, success, disabled, maxLength, ...props }: TextFieldProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
79
79
|
export default TextField;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { UseFormReturn, FieldError } from 'react-hook-form';
|
|
2
2
|
import { InputProps } from '../Input/types';
|
|
3
|
+
import { LabelBadge } from '../Label/types';
|
|
3
4
|
/**
|
|
4
5
|
* Props for the TextField component
|
|
5
6
|
*
|
|
@@ -55,6 +56,12 @@ export interface TextFieldProps extends InputProps, Partial<Pick<UseFormReturn,
|
|
|
55
56
|
* Label text displayed above the input field
|
|
56
57
|
*/
|
|
57
58
|
label?: string;
|
|
59
|
+
/**
|
|
60
|
+
* Status badge to the right of the label, e.g.
|
|
61
|
+
* `{ text: 'mapped', color: 'primary' }`. Announced as the field's
|
|
62
|
+
* description. Needs a `label`.
|
|
63
|
+
*/
|
|
64
|
+
labelBadge?: LabelBadge;
|
|
58
65
|
/**
|
|
59
66
|
* React Hook Form field error object
|
|
60
67
|
* Used to display validation error messages
|
|
@@ -111,6 +111,10 @@ export interface TextareaProps extends Partial<Pick<UseFormReturn, 'register'>>
|
|
|
111
111
|
* Defaults to `formElement-${name}` when not provided.
|
|
112
112
|
*/
|
|
113
113
|
id?: string;
|
|
114
|
+
/**
|
|
115
|
+
* Ids of the elements describing the textarea — a label badge, helper text
|
|
116
|
+
*/
|
|
117
|
+
'aria-describedby'?: string;
|
|
114
118
|
/**
|
|
115
119
|
* Paste event handler
|
|
116
120
|
* Fired when content is pasted into the textarea
|
|
@@ -11,6 +11,7 @@ export declare const TypeaheadContext: React.Context<{
|
|
|
11
11
|
isMultiple: boolean | undefined;
|
|
12
12
|
singleLine: boolean;
|
|
13
13
|
typeaheadId: string;
|
|
14
|
+
labelId: string | undefined;
|
|
14
15
|
triggerRef: React.RefObject<HTMLDivElement | null>;
|
|
15
16
|
className: string | undefined;
|
|
16
17
|
startIcon: React.ReactNode;
|
|
@@ -172,4 +172,4 @@ import { TypeaheadProps } from './types';
|
|
|
172
172
|
*
|
|
173
173
|
* @see https://www.w3.org/WAI/ARIA/apg/patterns/combobox/examples/combobox-select-only/
|
|
174
174
|
*/
|
|
175
|
-
export declare const Typeahead: ({ name, label, value, defaultValue, selectedItems, defaultSelectedItems, isOpen, disabled, isDisabled, isMultiple, singleLine, children, className, startIcon, endIcon, error, success, helperText, validationSchema, placeholder, startIconClassName, endIconClassName, popoverClassName, optionsClassName, wrapperClassName, filterOptions, autoSelect, allowCustomValues, width, onChange, onEmptyChange, onClearAll, onRemoveSelectedClick, renderOption, }: TypeaheadProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
175
|
+
export declare const Typeahead: ({ name, label, labelBadge, value, defaultValue, selectedItems, defaultSelectedItems, isOpen, disabled, isDisabled, isMultiple, singleLine, children, className, startIcon, endIcon, error, success, helperText, validationSchema, placeholder, startIconClassName, endIconClassName, popoverClassName, optionsClassName, wrapperClassName, filterOptions, autoSelect, allowCustomValues, width, onChange, onEmptyChange, onClearAll, onRemoveSelectedClick, renderOption, }: TypeaheadProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CommonProps } from '../../types/emotion';
|
|
2
2
|
import { FieldError } from 'react-hook-form';
|
|
3
|
+
import { LabelBadge } from '../Label/types';
|
|
3
4
|
/**
|
|
4
5
|
* Allowed value types for Typeahead options
|
|
5
6
|
*/
|
|
@@ -139,6 +140,12 @@ export interface TypeaheadProps {
|
|
|
139
140
|
* Label text displayed above the input
|
|
140
141
|
*/
|
|
141
142
|
label?: string;
|
|
143
|
+
/**
|
|
144
|
+
* Status badge to the right of the label, e.g.
|
|
145
|
+
* `{ text: 'mapped', color: 'primary' }`. Announced as the input's
|
|
146
|
+
* description. Needs a `label`.
|
|
147
|
+
*/
|
|
148
|
+
labelBadge?: LabelBadge;
|
|
142
149
|
/**
|
|
143
150
|
* Helper text displayed below the input
|
|
144
151
|
*/
|
|
@@ -214,7 +221,7 @@ export interface TypeaheadProps {
|
|
|
214
221
|
* Props used by the useTypeahead hook
|
|
215
222
|
* Internal type that picks specific props from TypeaheadProps
|
|
216
223
|
*/
|
|
217
|
-
export type UseTypeaheadProps = Pick<TypeaheadProps, 'selectedItems' | 'defaultSelectedItems' | 'isDisabled' | 'children' | 'isMultiple' | 'singleLine' | 'onChange' | 'onClearAll' | 'onRemoveSelectedClick' | 'onEmptyChange' | 'renderOption' | 'isOpen' | 'className' | 'startIcon' | 'endIcon' | 'startIconClassName' | 'endIconClassName' | 'name' | 'validationSchema' | 'error' | 'success' | 'placeholder' | 'filterOptions' | 'autoSelect' | 'allowCustomValues'>;
|
|
224
|
+
export type UseTypeaheadProps = Pick<TypeaheadProps, 'selectedItems' | 'defaultSelectedItems' | 'isDisabled' | 'children' | 'isMultiple' | 'singleLine' | 'onChange' | 'onClearAll' | 'onRemoveSelectedClick' | 'onEmptyChange' | 'renderOption' | 'isOpen' | 'className' | 'startIcon' | 'endIcon' | 'startIconClassName' | 'endIconClassName' | 'name' | 'validationSchema' | 'error' | 'success' | 'placeholder' | 'filterOptions' | 'autoSelect' | 'allowCustomValues' | 'label'>;
|
|
218
225
|
/**
|
|
219
226
|
* Props for TypeaheadOptions container component
|
|
220
227
|
*/
|
|
@@ -7,7 +7,7 @@ type HandleChangeParams = {
|
|
|
7
7
|
shouldClose?: boolean;
|
|
8
8
|
resetInput?: boolean;
|
|
9
9
|
};
|
|
10
|
-
export declare const useTypeahead: ({ name, isOpen: isInitOpen, selectedItems: providedSelectedItems, defaultSelectedItems, isDisabled, isMultiple, singleLine, children, className, startIcon, endIcon, startIconClassName, endIconClassName, validationSchema, error, success, placeholder, filterOptions, autoSelect, allowCustomValues, onChange, onClearAll, onRemoveSelectedClick, onEmptyChange, renderOption, }: UseTypeaheadProps) => {
|
|
10
|
+
export declare const useTypeahead: ({ name, isOpen: isInitOpen, selectedItems: providedSelectedItems, defaultSelectedItems, isDisabled, isMultiple, singleLine, children, className, startIcon, endIcon, startIconClassName, endIconClassName, validationSchema, error, success, placeholder, filterOptions, autoSelect, allowCustomValues, onChange, onClearAll, onRemoveSelectedClick, onEmptyChange, renderOption, label, }: UseTypeaheadProps) => {
|
|
11
11
|
isOpen: boolean;
|
|
12
12
|
isDisabled: boolean | undefined;
|
|
13
13
|
optionsWithKey: Record<string | number, TypeaheadOptionProps>;
|
|
@@ -17,6 +17,7 @@ export declare const useTypeahead: ({ name, isOpen: isInitOpen, selectedItems: p
|
|
|
17
17
|
isMultiple: boolean | undefined;
|
|
18
18
|
singleLine: boolean;
|
|
19
19
|
typeaheadId: string;
|
|
20
|
+
labelId: string | undefined;
|
|
20
21
|
triggerRef: React.RefObject<HTMLDivElement | null>;
|
|
21
22
|
className: string | undefined;
|
|
22
23
|
startIcon: React.ReactNode;
|
|
@@ -93,6 +93,7 @@ export type * from './Chip/types';
|
|
|
93
93
|
export { default as Avatar } from './Avatar';
|
|
94
94
|
export * from './Avatar/types';
|
|
95
95
|
export { default as Label } from './Label';
|
|
96
|
+
export { getLabelBadgeId } from './Label';
|
|
96
97
|
export type * from './Label/types';
|
|
97
98
|
export { default as Indicator } from './Indicator';
|
|
98
99
|
export type * from './Indicator/types';
|
|
@@ -121,6 +122,8 @@ export * from './NavBar';
|
|
|
121
122
|
export * from './CollapsibleNavBar';
|
|
122
123
|
export * from './Header';
|
|
123
124
|
export type * from './Header/types';
|
|
125
|
+
export * from './Footer';
|
|
126
|
+
export type * from './Footer/types';
|
|
124
127
|
export * from './TreeView';
|
|
125
128
|
export { default as Tab } from './Tab';
|
|
126
129
|
export { default as TabBar } from './TabBar';
|