@apliteni/apliteni-ui 0.58.2 → 0.60.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 +11 -3
- package/react/README.md +17 -4
- package/react/dist/index.d.ts +17 -3
- package/react/dist/index.js +379 -287
- package/src/components/command-palette.js +2 -128
- package/src/components/dropdown.js +2 -16
- package/src/components/index.js +3 -1
- package/src/components/pagination.js +3 -2
- package/src/components/segmented.js +2 -9
- package/src/components/table-values.js +7 -7
- package/src/index.d.ts +128 -0
- package/src/index.js +7 -0
- package/src/logic/callout.js +1 -0
- package/src/logic/command-palette.js +127 -0
- package/src/logic/dropdown.js +16 -0
- package/src/logic/pagination.js +2 -0
- package/src/logic/segmented.js +8 -0
- package/src/logic/table-values.js +10 -0
- package/src/motion.d.ts +6 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apliteni/apliteni-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.60.0",
|
|
4
4
|
"workspaces": [
|
|
5
5
|
"react"
|
|
6
6
|
],
|
|
@@ -18,9 +18,17 @@
|
|
|
18
18
|
"access": "public"
|
|
19
19
|
},
|
|
20
20
|
"exports": {
|
|
21
|
-
".":
|
|
21
|
+
".": {
|
|
22
|
+
"types": "./src/index.d.ts",
|
|
23
|
+
"import": "./src/index.js",
|
|
24
|
+
"default": "./src/index.js"
|
|
25
|
+
},
|
|
22
26
|
"./guidelines/*": "./guidelines/*",
|
|
23
|
-
"./motion":
|
|
27
|
+
"./motion": {
|
|
28
|
+
"types": "./src/motion.d.ts",
|
|
29
|
+
"import": "./src/motion.js",
|
|
30
|
+
"default": "./src/motion.js"
|
|
31
|
+
},
|
|
24
32
|
"./inline": "./src/inline.js",
|
|
25
33
|
"./css": "./src/index.css",
|
|
26
34
|
"./tokens": "./src/tokens/tokens.css",
|
package/react/README.md
CHANGED
|
@@ -7,9 +7,10 @@ This directory is a **private workspace**, not a package. It builds to `react/di
|
|
|
7
7
|
and ships as the `@apliteni/apliteni-ui/react` subpath of the kit — one package, one
|
|
8
8
|
version, one pin. There is no `@apliteni/apliteni-ui-react` on npm.
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
Use React components for new React screens. The vanilla factories are deprecated
|
|
11
|
+
and scheduled for removal under #429. This version still ships them, working as
|
|
12
|
+
before: keep existing vanilla surfaces on them, and move a surface to React when
|
|
13
|
+
you next change it.
|
|
13
14
|
|
|
14
15
|
## Install (as a consumer)
|
|
15
16
|
|
|
@@ -28,7 +29,19 @@ import '@apliteni/apliteni-ui/react/css'; // React components' shell styles (mo
|
|
|
28
29
|
import { DataTable, Modal, Button } from '@apliteni/apliteni-ui/react';
|
|
29
30
|
```
|
|
30
31
|
|
|
31
|
-
Components: `EmptyState`, `DataTable`, `Pagination`, `StatBand`, `Modal`, `Confirm`, `Drawer`, `CommandPalette`, `Dropdown`, `BackLink`, `Tooltip`, `Snippet`, `Tabs`, `Button`, `Badge`, `Card`, `Callout`, `Icon`.
|
|
32
|
+
Components: `EmptyState`, `DataTable`, `Pagination`, `StatBand`, `Modal`, `Confirm`, `Drawer`, `CommandPalette`, `Dropdown`, `BackLink`, `Tooltip`, `Snippet`, `Tabs`, `Button`, `Badge`, `Pill`, `StatusDot`, `Card`, `Callout`, `Icon`.
|
|
33
|
+
|
|
34
|
+
`Pill` renders metadata with the existing pill spacing. Omit `variant` for neutral
|
|
35
|
+
metadata or use `live` or `soon`. Its children accept React content.
|
|
36
|
+
`StatusDot` takes `live` (default `false`). Place it beside visible status text;
|
|
37
|
+
it is decorative by default. Use `aria-label` or `aria-labelledby` to expose a
|
|
38
|
+
meaningful dot as a named image. Neither component announces changes automatically.
|
|
39
|
+
Both forward a span ref and native span attributes, including `className`.
|
|
40
|
+
|
|
41
|
+
```tsx
|
|
42
|
+
<Pill variant="soon">Coming soon</Pill>
|
|
43
|
+
<span><StatusDot live /> API online</span>
|
|
44
|
+
```
|
|
32
45
|
|
|
33
46
|
`Snippet` accepts `label`, `code`, `reveal`, and `copyLabel` props. It treats `code`
|
|
34
47
|
as plain text and copies it exactly as provided. After a successful clipboard write,
|
package/react/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { ReactNode, ButtonHTMLAttributes, RefObject, MouseEvent, ElementType, ComponentPropsWithoutRef, InputHTMLAttributes, SelectHTMLAttributes, TextareaHTMLAttributes } from 'react';
|
|
2
|
+
import { ReactNode, ButtonHTMLAttributes, HTMLAttributes, RefObject, MouseEvent, ElementType, ComponentPropsWithoutRef, InputHTMLAttributes, SelectHTMLAttributes, TextareaHTMLAttributes } from 'react';
|
|
3
3
|
|
|
4
4
|
declare function Icon({ name }: {
|
|
5
5
|
name: string;
|
|
@@ -37,6 +37,20 @@ declare function Badge({ variant, children }: {
|
|
|
37
37
|
children: ReactNode;
|
|
38
38
|
}): react.JSX.Element;
|
|
39
39
|
|
|
40
|
+
type PillProps = HTMLAttributes<HTMLSpanElement> & {
|
|
41
|
+
variant?: 'live' | 'soon';
|
|
42
|
+
};
|
|
43
|
+
declare const Pill: react.ForwardRefExoticComponent<HTMLAttributes<HTMLSpanElement> & {
|
|
44
|
+
variant?: "live" | "soon";
|
|
45
|
+
} & react.RefAttributes<HTMLSpanElement>>;
|
|
46
|
+
|
|
47
|
+
type StatusDotProps = Omit<HTMLAttributes<HTMLSpanElement>, 'children'> & {
|
|
48
|
+
live?: boolean;
|
|
49
|
+
};
|
|
50
|
+
declare const StatusDot: react.ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLSpanElement>, "children"> & {
|
|
51
|
+
live?: boolean;
|
|
52
|
+
} & react.RefAttributes<HTMLSpanElement>>;
|
|
53
|
+
|
|
40
54
|
type Level = 2 | 3 | 4 | 5 | 6;
|
|
41
55
|
declare function Card({ title, sub, level, children }: {
|
|
42
56
|
title?: ReactNode;
|
|
@@ -465,7 +479,7 @@ type FilterBarProps = {
|
|
|
465
479
|
onClear: () => void;
|
|
466
480
|
onChange: (id: string, value: string | undefined) => void;
|
|
467
481
|
};
|
|
468
|
-
declare function FilterBar(
|
|
482
|
+
declare function FilterBar({ filters, label, clearLabel, disabled, busy, onRemove, onClear, onChange }: FilterBarProps): react.JSX.Element;
|
|
469
483
|
|
|
470
484
|
type KeyValueRow = {
|
|
471
485
|
label: string;
|
|
@@ -626,4 +640,4 @@ declare function Tooltip({ text, children }: TooltipProps): react.JSX.Element;
|
|
|
626
640
|
declare const PAGE_SIZES: readonly number[];
|
|
627
641
|
declare const DEFAULT_PAGE_SIZE: number;
|
|
628
642
|
|
|
629
|
-
export { AppShell, type AppShellProps, type AppShellSection, BackLink, type BackLinkOwnProps, type BackLinkProps, Badge, BusyRegion, type BusyRegionProps, Button, type ButtonProps, Callout, type CalloutProps, type CalloutVariant, Card, type Column, type CommandGroup, type CommandItem, CommandPalette, type CommandPaletteProps, Confirm, type ConfirmProps, DEFAULT_PAGE_SIZE, DataTable, type DataTableProps, DeltaValue, type DeltaValueProps, Denied, type DeniedProps, Drawer, type DrawerProps, DrawerSection, type DrawerSectionProps, Dropdown, type DropdownBadge, type DropdownEntry, type DropdownItem, type DropdownProps, type DropdownRowProps, type DropdownSearch, type DropdownSection, type DropdownSeparator, EmptyState, type EmptyStateProps, type EmptyStateVariant, FileField, type FileFieldProps, type Filter, FilterBar, type FilterBarProps, Icon, KeyValueList, type KeyValueListProps, type KeyValueRow, Modal, type ModalProps, NumericValue, type NumericValueProps, PAGE_SIZES, Pagination, type PaginationProps, RowIdentity, type RowIdentityProps, type SegmentOption, Segmented, type SegmentedProps, SelectField, type SelectFieldProps, Skeleton, type SkeletonProps, SkeletonTable, type SkeletonTableProps, Snippet, type SnippetProps, StatBand, type StatBandProps, type StatDelta, type StatFigure, type StatTone, type StatVariant, 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 };
|
|
643
|
+
export { AppShell, type AppShellProps, type AppShellSection, BackLink, type BackLinkOwnProps, type BackLinkProps, Badge, BusyRegion, type BusyRegionProps, Button, type ButtonProps, Callout, type CalloutProps, type CalloutVariant, Card, type Column, type CommandGroup, type CommandItem, CommandPalette, type CommandPaletteProps, Confirm, type ConfirmProps, DEFAULT_PAGE_SIZE, DataTable, type DataTableProps, DeltaValue, type DeltaValueProps, Denied, type DeniedProps, Drawer, type DrawerProps, DrawerSection, type DrawerSectionProps, Dropdown, type DropdownBadge, type DropdownEntry, type DropdownItem, type DropdownProps, type DropdownRowProps, type DropdownSearch, type DropdownSection, type DropdownSeparator, EmptyState, type EmptyStateProps, type EmptyStateVariant, FileField, type FileFieldProps, type Filter, FilterBar, type FilterBarProps, Icon, KeyValueList, type KeyValueListProps, type KeyValueRow, Modal, type ModalProps, NumericValue, type NumericValueProps, PAGE_SIZES, Pagination, type PaginationProps, Pill, type PillProps, RowIdentity, type RowIdentityProps, type SegmentOption, Segmented, type SegmentedProps, SelectField, type SelectFieldProps, Skeleton, type SkeletonProps, SkeletonTable, type SkeletonTableProps, Snippet, type SnippetProps, StatBand, type StatBandProps, type StatDelta, type StatFigure, type StatTone, type StatVariant, StatusDot, type StatusDotProps, 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 };
|