prime-ui-kit 0.17.0 → 0.19.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/README.md +2 -1
- package/dist/chunks/{chunk-PRP4B6OG.js → chunk-IVS3J7AS.js} +1 -1
- package/dist/chunks/{chunk-2ODXLPW3.js → chunk-QFHE5GKW.js} +1 -0
- package/dist/chunks/{chunk-7WWZYGRC.js → chunk-RZNGLELR.js} +4497 -3896
- package/dist/chunks/{chunk-A4WE3UNC.js → chunk-WYCTXD63.js} +18399 -17624
- package/dist/chunks/{chunk-SVFWPLNW.js → chunk-ZTZ2ML2B.js} +14 -3
- package/dist/color-picker.js +3 -3
- package/dist/components/badge/Badge.d.ts +17 -0
- package/dist/components/breadcrumb/Breadcrumb.d.ts +11 -2
- package/dist/components/button/Button.d.ts +1 -1
- package/dist/components/button-group/ButtonGroup.d.ts +1 -1
- package/dist/components/card/Card.d.ts +8 -4
- package/dist/components/chat/Chat.d.ts +3 -3
- package/dist/components/chat/MessageList.d.ts +5 -1
- package/dist/components/chat/groupMessages.d.ts +12 -4
- package/dist/components/chat-list/ChatList.d.ts +18 -9
- package/dist/components/chat-list/formatChatTime.d.ts +3 -3
- package/dist/components/checkbox/Checkbox.d.ts +6 -1
- package/dist/components/color-field/ColorField.d.ts +1 -1
- package/dist/components/color-picker/ColorPicker.d.ts +6 -1
- package/dist/components/color-picker/ColorPresets.d.ts +9 -1
- package/dist/components/crossfade/Crossfade.d.ts +1 -1
- package/dist/components/data-table/ColumnsMenu.d.ts +16 -20
- package/dist/components/data-table/DataTable.d.ts +16 -11
- package/dist/components/data-table/Head.d.ts +10 -1
- package/dist/components/data-table/Row.d.ts +7 -1
- package/dist/components/data-table/StateRows.d.ts +3 -1
- package/dist/components/data-table/types.d.ts +5 -0
- package/dist/components/digit-input/DigitInput.d.ts +1 -1
- package/dist/components/drawer/Drawer.d.ts +3 -2
- package/dist/components/field-list/FieldList.d.ts +24 -12
- package/dist/components/hint/Hint.d.ts +8 -2
- package/dist/components/index.d.ts +7 -4
- package/dist/components/input/Input.d.ts +27 -5
- package/dist/components/input/inputSuggestions.d.ts +39 -0
- package/dist/components/kanban/Kanban.d.ts +8 -9
- package/dist/components/list/List.d.ts +25 -6
- package/dist/components/message/Message.d.ts +15 -3
- package/dist/components/message/MessageSticker.d.ts +27 -0
- package/dist/components/message/formatMessageTime.d.ts +5 -2
- package/dist/components/modal/Modal.d.ts +3 -2
- package/dist/components/native-select/NativeSelect.d.ts +1 -1
- package/dist/components/radio/Radio.d.ts +11 -2
- package/dist/components/rich-text/RichText.d.ts +23 -0
- package/dist/components/scroll-container/ScrollContainer.d.ts +1 -1
- package/dist/components/scroll-container/scrollGlide.d.ts +26 -0
- package/dist/components/scroll-container/useScrollMotion.d.ts +25 -0
- package/dist/components/segmented-control/SegmentedControl.d.ts +1 -1
- package/dist/components/select/selectContext.d.ts +7 -0
- package/dist/components/slider/Slider.d.ts +1 -1
- package/dist/components/switch/Switch.d.ts +6 -1
- package/dist/components/tag-select/TagSelect.d.ts +1 -1
- package/dist/components/textarea/Textarea.d.ts +6 -1
- package/dist/components/timeline/Timeline.d.ts +1 -1
- package/dist/icon-set.js +2 -2
- package/dist/index.css +1 -1
- package/dist/index.js +5 -3
- package/dist/internal/ChoiceField.d.ts +3 -1
- package/dist/internal/FieldFrame.d.ts +8 -2
- package/dist/internal/fieldCell.d.ts +7 -1
- package/dist/internal/formatClock.d.ts +23 -2
- package/dist/internal/leaveGuard.d.ts +27 -0
- package/dist/internal/messageList.d.ts +2 -0
- package/dist/internal/overlay/DialogGuard.d.ts +3 -2
- package/dist/internal/overlay/DialogParts.d.ts +40 -6
- package/dist/internal/swatch.d.ts +5 -0
- package/dist/internal/tokenDefaults.d.ts +1 -0
- package/dist/layout/index.d.ts +1 -1
- package/dist/layout/page/Page.d.ts +48 -15
- package/dist/skill/anti-slop.md +28 -0
- package/dist/skill/api-contract.md +14 -7
- package/dist/skill/cheatsheet.md +28 -9
- package/dist/skill/checklist.md +9 -0
- package/dist/skill/choosing.md +25 -12
- package/dist/skill/components.md +1 -0
- package/dist/skill/composition.md +88 -16
- package/dist/skill/layouts.md +6 -4
- package/dist/skill/reference/components/badge/COMPONENT.md +14 -1
- package/dist/skill/reference/components/badge/examples/examples.module.css +7 -0
- package/dist/skill/reference/components/badge/examples/tag-row.tsx +34 -0
- package/dist/skill/reference/components/breadcrumb/COMPONENT.md +9 -4
- package/dist/skill/reference/components/breadcrumb/examples/router.tsx +17 -0
- package/dist/skill/reference/components/button/COMPONENT.md +1 -1
- package/dist/skill/reference/components/button-group/COMPONENT.md +1 -0
- package/dist/skill/reference/components/card/COMPONENT.md +7 -1
- package/dist/skill/reference/components/card/examples/states.tsx +59 -0
- package/dist/skill/reference/components/chat/COMPONENT.md +4 -1
- package/dist/skill/reference/components/chat/examples/time-zone.tsx +83 -0
- package/dist/skill/reference/components/chat-list/COMPONENT.md +12 -6
- package/dist/skill/reference/components/chat-list/examples/links.tsx +1 -1
- package/dist/skill/reference/components/chat-list/examples/router.tsx +63 -0
- package/dist/skill/reference/components/checkbox/COMPONENT.md +1 -0
- package/dist/skill/reference/components/color-field/COMPONENT.md +2 -1
- package/dist/skill/reference/components/color-picker/COMPONENT.md +14 -5
- package/dist/skill/reference/components/color-picker/examples/presets-custom.tsx +31 -0
- package/dist/skill/reference/components/color-swatches/COMPONENT.md +1 -0
- package/dist/skill/reference/components/confirm-dialog/COMPONENT.md +1 -1
- package/dist/skill/reference/components/crossfade/COMPONENT.md +1 -1
- package/dist/skill/reference/components/data-table/COMPONENT.md +46 -41
- package/dist/skill/reference/components/data-table/examples/actions-column.tsx +154 -0
- package/dist/skill/reference/components/data-table/examples/columns-visibility.tsx +3 -12
- package/dist/skill/reference/components/data-table/examples/controlled.tsx +1 -1
- package/dist/skill/reference/components/data-table/examples/narrow.tsx +4 -11
- package/dist/skill/reference/components/data-table/examples/numeric.tsx +9 -2
- package/dist/skill/reference/components/data-table/examples/row-link.tsx +18 -22
- package/dist/skill/reference/components/data-table/examples/screen.tsx +12 -1
- package/dist/skill/reference/components/data-table/examples/toolbar.tsx +26 -32
- package/dist/skill/reference/components/datepicker/COMPONENT.md +3 -1
- package/dist/skill/reference/components/datepicker/examples/deadline.tsx +33 -0
- package/dist/skill/reference/components/digit-input/COMPONENT.md +1 -0
- package/dist/skill/reference/components/dnd/COMPONENT.md +4 -3
- package/dist/skill/reference/components/dnd/examples/examples.module.css +4 -3
- package/dist/skill/reference/components/dnd/examples/handle.tsx +5 -5
- package/dist/skill/reference/components/dnd/examples/locked.tsx +1 -1
- package/dist/skill/reference/components/dnd/examples/table.tsx +6 -6
- package/dist/skill/reference/components/drawer/COMPONENT.md +38 -9
- package/dist/skill/reference/components/drawer/examples/client-card.tsx +32 -8
- package/dist/skill/reference/components/drawer/examples/header-actions.tsx +1 -1
- package/dist/skill/reference/components/drawer/examples/loading.tsx +58 -0
- package/dist/skill/reference/components/field-list/COMPONENT.md +40 -24
- package/dist/skill/reference/components/field-list/examples/base-row.tsx +2 -1
- package/dist/skill/reference/components/field-list/examples/locked.tsx +11 -11
- package/dist/skill/reference/components/field-list/examples/reorder.tsx +1 -1
- package/dist/skill/reference/components/field-list/examples/saving.tsx +83 -0
- package/dist/skill/reference/components/field-list/examples/screen.module.css +1 -1
- package/dist/skill/reference/components/field-list/examples/screen.tsx +168 -162
- package/dist/skill/reference/components/field-list/examples/totals.tsx +83 -0
- package/dist/skill/reference/components/file-upload/COMPONENT.md +1 -0
- package/dist/skill/reference/components/hint/COMPONENT.md +16 -2
- package/dist/skill/reference/components/hint/examples/variants.tsx +48 -0
- package/dist/skill/reference/components/input/COMPONENT.md +39 -9
- package/dist/skill/reference/components/input/examples/affixes.tsx +4 -2
- package/dist/skill/reference/components/input/examples/dismiss.tsx +29 -0
- package/dist/skill/reference/components/input/examples/suggestions.tsx +26 -0
- package/dist/skill/reference/components/input/examples/time.tsx +24 -0
- package/dist/skill/reference/components/input/examples/with-select.tsx +44 -0
- package/dist/skill/reference/components/kanban/COMPONENT.md +12 -8
- package/dist/skill/reference/components/kanban/examples/columns.tsx +4 -2
- package/dist/skill/reference/components/kanban/examples/states.tsx +7 -5
- package/dist/skill/reference/components/list/COMPONENT.md +39 -13
- package/dist/skill/reference/components/list/examples/reorder.tsx +42 -7
- package/dist/skill/reference/components/list/examples/row-controls.tsx +80 -0
- package/dist/skill/reference/components/list/examples/with-icon.tsx +23 -2
- package/dist/skill/reference/components/login-form/COMPONENT.md +8 -7
- package/dist/skill/reference/components/login-form/examples/states.tsx +12 -14
- package/dist/skill/reference/components/message/COMPONENT.md +30 -9
- package/dist/skill/reference/components/message/examples/preview.tsx +28 -0
- package/dist/skill/reference/components/message/examples/sticker.tsx +35 -0
- package/dist/skill/reference/components/modal/COMPONENT.md +35 -10
- package/dist/skill/reference/components/modal/examples/long-content.tsx +37 -18
- package/dist/skill/reference/components/native-select/COMPONENT.md +1 -0
- package/dist/skill/reference/components/notification/COMPONENT.md +1 -1
- package/dist/skill/reference/components/radio/COMPONENT.md +2 -0
- package/dist/skill/reference/components/rich-text/COMPONENT.md +93 -0
- package/dist/skill/reference/components/rich-text/examples/overview.tsx +19 -0
- package/dist/skill/reference/components/scroll-container/COMPONENT.md +8 -5
- package/dist/skill/reference/components/segmented-control/COMPONENT.md +4 -2
- package/dist/skill/reference/components/segmented-control/examples/in-form.tsx +1 -1
- package/dist/skill/reference/components/select/COMPONENT.md +7 -3
- package/dist/skill/reference/components/sheet/COMPONENT.md +18 -7
- package/dist/skill/reference/components/slider/COMPONENT.md +1 -0
- package/dist/skill/reference/components/slider/examples/controlled.tsx +1 -1
- package/dist/skill/reference/components/switch/COMPONENT.md +1 -0
- package/dist/skill/reference/components/tag-select/COMPONENT.md +1 -0
- package/dist/skill/reference/components/textarea/COMPONENT.md +1 -0
- package/dist/skill/reference/components/timeline/COMPONENT.md +3 -3
- package/dist/skill/reference/components/timeline/examples/structure.tsx +2 -1
- package/dist/skill/reference/layout/app-shell/COMPONENT.md +2 -2
- package/dist/skill/reference/layout/bottom-nav/COMPONENT.md +1 -0
- package/dist/skill/reference/layout/page/COMPONENT.md +42 -20
- package/dist/skill/reference/layout/page/examples/examples.module.css +7 -0
- package/dist/skill/reference/layout/page/examples/guard.tsx +87 -0
- package/dist/skill/reference/layout/page/examples/loading.tsx +57 -0
- package/dist/skill/reference/layout/page/examples/screen.module.css +1 -1
- package/dist/skill/reference/layout/page/examples/screen.tsx +93 -104
- package/dist/skill/reference/layout/page/examples/sections.tsx +2 -15
- package/dist/skill/reference/layout/sidebar/COMPONENT.md +1 -0
- package/dist/skill/responsive.md +19 -12
- package/dist/skill/ux.md +5 -3
- package/dist/tokens/semantic.d.ts +3 -1
- package/dist/tokens/themes/dark.d.ts +1 -1
- package/package.json +2 -2
- package/src/components/badge/COMPONENT.md +14 -1
- package/src/components/badge/examples/examples.module.css +7 -0
- package/src/components/badge/examples/tag-row.tsx +34 -0
- package/src/components/breadcrumb/COMPONENT.md +9 -4
- package/src/components/breadcrumb/examples/router.tsx +17 -0
- package/src/components/button/COMPONENT.md +1 -1
- package/src/components/button-group/COMPONENT.md +1 -0
- package/src/components/card/COMPONENT.md +7 -1
- package/src/components/card/examples/states.tsx +59 -0
- package/src/components/chat/COMPONENT.md +4 -1
- package/src/components/chat/examples/time-zone.tsx +83 -0
- package/src/components/chat-list/COMPONENT.md +12 -6
- package/src/components/chat-list/examples/links.tsx +1 -1
- package/src/components/chat-list/examples/router.tsx +63 -0
- package/src/components/checkbox/COMPONENT.md +1 -0
- package/src/components/color-field/COMPONENT.md +2 -1
- package/src/components/color-picker/COMPONENT.md +14 -5
- package/src/components/color-picker/examples/presets-custom.tsx +31 -0
- package/src/components/color-swatches/COMPONENT.md +1 -0
- package/src/components/confirm-dialog/COMPONENT.md +1 -1
- package/src/components/crossfade/COMPONENT.md +1 -1
- package/src/components/data-table/COMPONENT.md +46 -41
- package/src/components/data-table/examples/actions-column.tsx +154 -0
- package/src/components/data-table/examples/columns-visibility.tsx +3 -12
- package/src/components/data-table/examples/controlled.tsx +1 -1
- package/src/components/data-table/examples/narrow.tsx +4 -11
- package/src/components/data-table/examples/numeric.tsx +9 -2
- package/src/components/data-table/examples/row-link.tsx +18 -22
- package/src/components/data-table/examples/screen.tsx +12 -1
- package/src/components/data-table/examples/toolbar.tsx +26 -32
- package/src/components/datepicker/COMPONENT.md +3 -1
- package/src/components/datepicker/examples/deadline.tsx +33 -0
- package/src/components/digit-input/COMPONENT.md +1 -0
- package/src/components/dnd/COMPONENT.md +4 -3
- package/src/components/dnd/examples/examples.module.css +4 -3
- package/src/components/dnd/examples/handle.tsx +5 -5
- package/src/components/dnd/examples/locked.tsx +1 -1
- package/src/components/dnd/examples/table.tsx +6 -6
- package/src/components/drawer/COMPONENT.md +38 -9
- package/src/components/drawer/examples/client-card.tsx +32 -8
- package/src/components/drawer/examples/header-actions.tsx +1 -1
- package/src/components/drawer/examples/loading.tsx +58 -0
- package/src/components/field-list/COMPONENT.md +40 -24
- package/src/components/field-list/examples/base-row.tsx +2 -1
- package/src/components/field-list/examples/locked.tsx +11 -11
- package/src/components/field-list/examples/reorder.tsx +1 -1
- package/src/components/field-list/examples/saving.tsx +83 -0
- package/src/components/field-list/examples/screen.module.css +1 -1
- package/src/components/field-list/examples/screen.tsx +168 -162
- package/src/components/field-list/examples/totals.tsx +83 -0
- package/src/components/file-upload/COMPONENT.md +1 -0
- package/src/components/hint/COMPONENT.md +16 -2
- package/src/components/hint/examples/variants.tsx +48 -0
- package/src/components/input/COMPONENT.md +39 -9
- package/src/components/input/examples/affixes.tsx +4 -2
- package/src/components/input/examples/dismiss.tsx +29 -0
- package/src/components/input/examples/suggestions.tsx +26 -0
- package/src/components/input/examples/time.tsx +24 -0
- package/src/components/input/examples/with-select.tsx +44 -0
- package/src/components/kanban/COMPONENT.md +12 -8
- package/src/components/kanban/examples/columns.tsx +4 -2
- package/src/components/kanban/examples/states.tsx +7 -5
- package/src/components/list/COMPONENT.md +39 -13
- package/src/components/list/examples/reorder.tsx +42 -7
- package/src/components/list/examples/row-controls.tsx +80 -0
- package/src/components/list/examples/with-icon.tsx +23 -2
- package/src/components/login-form/COMPONENT.md +8 -7
- package/src/components/login-form/examples/states.tsx +12 -14
- package/src/components/message/COMPONENT.md +30 -9
- package/src/components/message/examples/preview.tsx +28 -0
- package/src/components/message/examples/sticker.tsx +35 -0
- package/src/components/modal/COMPONENT.md +35 -10
- package/src/components/modal/examples/long-content.tsx +37 -18
- package/src/components/native-select/COMPONENT.md +1 -0
- package/src/components/notification/COMPONENT.md +1 -1
- package/src/components/radio/COMPONENT.md +2 -0
- package/src/components/rich-text/COMPONENT.md +93 -0
- package/src/components/rich-text/examples/overview.tsx +19 -0
- package/src/components/scroll-container/COMPONENT.md +8 -5
- package/src/components/segmented-control/COMPONENT.md +4 -2
- package/src/components/segmented-control/examples/in-form.tsx +1 -1
- package/src/components/select/COMPONENT.md +7 -3
- package/src/components/sheet/COMPONENT.md +18 -7
- package/src/components/slider/COMPONENT.md +1 -0
- package/src/components/slider/examples/controlled.tsx +1 -1
- package/src/components/switch/COMPONENT.md +1 -0
- package/src/components/tag-select/COMPONENT.md +1 -0
- package/src/components/textarea/COMPONENT.md +1 -0
- package/src/components/timeline/COMPONENT.md +3 -3
- package/src/components/timeline/examples/structure.tsx +2 -1
- package/src/layout/app-shell/COMPONENT.md +2 -2
- package/src/layout/bottom-nav/COMPONENT.md +1 -0
- package/src/layout/page/COMPONENT.md +42 -20
- package/src/layout/page/examples/examples.module.css +7 -0
- package/src/layout/page/examples/guard.tsx +87 -0
- package/src/layout/page/examples/loading.tsx +57 -0
- package/src/layout/page/examples/screen.module.css +1 -1
- package/src/layout/page/examples/screen.tsx +93 -104
- package/src/layout/page/examples/sections.tsx +2 -15
- package/src/layout/sidebar/COMPONENT.md +1 -0
- package/src/styles/theme-dark.css +1 -1
- package/src/styles/theme-light.css +2 -1
- package/dist/components/data-table/context.d.ts +0 -14
- package/dist/components/scroll-container/useWheelToInline.d.ts +0 -10
|
@@ -23,11 +23,11 @@ import {
|
|
|
23
23
|
useInheritedDisabled,
|
|
24
24
|
useLabels,
|
|
25
25
|
useOpenState
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-RZNGLELR.js";
|
|
27
27
|
import {
|
|
28
28
|
cx,
|
|
29
29
|
useHostTier
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-QFHE5GKW.js";
|
|
31
31
|
|
|
32
32
|
// src/components/color-field/ColorField.tsx
|
|
33
33
|
import * as React3 from "react";
|
|
@@ -359,7 +359,15 @@ function SliderMeta({ label, className, ...rest }) {
|
|
|
359
359
|
/* @__PURE__ */ jsx("output", { className: ColorPicker_default.sliderValue, "aria-live": "off", children: slider && channel ? sliderValueLabel(slider.value, channel, locale) : null })
|
|
360
360
|
] });
|
|
361
361
|
}
|
|
362
|
-
function HexInput({
|
|
362
|
+
function HexInput({
|
|
363
|
+
label,
|
|
364
|
+
hint,
|
|
365
|
+
hintTone,
|
|
366
|
+
error,
|
|
367
|
+
focusRing,
|
|
368
|
+
children,
|
|
369
|
+
...rest
|
|
370
|
+
}) {
|
|
363
371
|
const { labels } = useColorPickerContext();
|
|
364
372
|
const { inputRef, text, setText, commit } = useColorDraft(toHexText, parseHex);
|
|
365
373
|
return /* @__PURE__ */ jsx(
|
|
@@ -368,6 +376,7 @@ function HexInput({ label, hint, error, focusRing, children, ...rest }) {
|
|
|
368
376
|
...rest,
|
|
369
377
|
label: label ?? labels.hex,
|
|
370
378
|
hint,
|
|
379
|
+
hintTone,
|
|
371
380
|
error,
|
|
372
381
|
focusRing,
|
|
373
382
|
children: /* @__PURE__ */ jsxs(Input.Wrapper, { children: [
|
|
@@ -507,6 +516,7 @@ function ColorField({
|
|
|
507
516
|
required = false,
|
|
508
517
|
optional,
|
|
509
518
|
hint,
|
|
519
|
+
hintTone,
|
|
510
520
|
error,
|
|
511
521
|
className,
|
|
512
522
|
"aria-label": ariaLabel,
|
|
@@ -557,6 +567,7 @@ function ColorField({
|
|
|
557
567
|
required,
|
|
558
568
|
optional,
|
|
559
569
|
hint,
|
|
570
|
+
hintTone,
|
|
560
571
|
error,
|
|
561
572
|
disabled,
|
|
562
573
|
optionalLabel: labels.optional,
|
package/dist/color-picker.js
CHANGED
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
ColorField,
|
|
5
5
|
ColorPicker,
|
|
6
6
|
parseColor
|
|
7
|
-
} from "./chunks/chunk-
|
|
8
|
-
import "./chunks/chunk-
|
|
9
|
-
import "./chunks/chunk-
|
|
7
|
+
} from "./chunks/chunk-ZTZ2ML2B.js";
|
|
8
|
+
import "./chunks/chunk-RZNGLELR.js";
|
|
9
|
+
import "./chunks/chunk-QFHE5GKW.js";
|
|
10
10
|
export {
|
|
11
11
|
ColorField,
|
|
12
12
|
ColorPicker,
|
|
@@ -127,6 +127,13 @@ export type BadgeActionProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement
|
|
|
127
127
|
children?: React.ReactNode;
|
|
128
128
|
ref?: React.Ref<HTMLButtonElement>;
|
|
129
129
|
};
|
|
130
|
+
export type BadgeGroupProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
131
|
+
/**
|
|
132
|
+
* Tier of every badge in the group; a badge's own `size` wins. Small tiers stand closer.
|
|
133
|
+
*/
|
|
134
|
+
size?: ControlSize;
|
|
135
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
136
|
+
};
|
|
130
137
|
declare function BadgeRoot({ color, tone, variant, size: sizeProp, shape, onRemove, pressed: pressedProp, defaultPressed, onPressedChange, loading, labels, disabled: disabledProp, children, className, ref, ...rest }: BadgeRootProps): import("react/jsx-runtime").JSX.Element;
|
|
131
138
|
declare namespace BadgeRoot {
|
|
132
139
|
var displayName: string;
|
|
@@ -153,8 +160,18 @@ declare function BadgeAction({ label, onClick, persistent: _persistent, disabled
|
|
|
153
160
|
declare namespace BadgeAction {
|
|
154
161
|
var displayName: string;
|
|
155
162
|
}
|
|
163
|
+
/**
|
|
164
|
+
* A row of badges as one value (the tags of a record, the stages a deal went through): the badges
|
|
165
|
+
* wrap onto more lines, a chip gap apart. `size` sets the tier of every badge in it; without it the
|
|
166
|
+
* badges follow the host, as a lone badge does.
|
|
167
|
+
*/
|
|
168
|
+
declare function BadgeGroup({ size, className, ...rest }: BadgeGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
169
|
+
declare namespace BadgeGroup {
|
|
170
|
+
var displayName: string;
|
|
171
|
+
}
|
|
156
172
|
export declare const Badge: {
|
|
157
173
|
Root: typeof BadgeRoot;
|
|
174
|
+
Group: typeof BadgeGroup;
|
|
158
175
|
Icon: typeof BadgeIcon;
|
|
159
176
|
Dot: typeof BadgeDot;
|
|
160
177
|
Action: typeof BadgeAction;
|
|
@@ -24,9 +24,13 @@ declare namespace BreadcrumbRoot {
|
|
|
24
24
|
}
|
|
25
25
|
export type BreadcrumbItemProps = Omit<React.LiHTMLAttributes<HTMLLIElement>, "aria-label"> & {
|
|
26
26
|
/**
|
|
27
|
-
* Renders a link; without it the item is text.
|
|
27
|
+
* Renders a link; without it (and without `asChild`) the item is text.
|
|
28
28
|
*/
|
|
29
29
|
href?: string;
|
|
30
|
+
/**
|
|
31
|
+
* The single child (a router `Link`) is the level's link with the same look; its own text is the level. In the «…» menu of a folded path it is the menu item.
|
|
32
|
+
*/
|
|
33
|
+
asChild?: boolean;
|
|
30
34
|
/**
|
|
31
35
|
* Current page: `aria-current="page"` (on the link when `href` is set), primary text, medium weight. Usually the last item, without `href`.
|
|
32
36
|
*/
|
|
@@ -37,7 +41,12 @@ export type BreadcrumbItemProps = Omit<React.LiHTMLAttributes<HTMLLIElement>, "a
|
|
|
37
41
|
"aria-label"?: string;
|
|
38
42
|
ref?: React.Ref<HTMLLIElement>;
|
|
39
43
|
};
|
|
40
|
-
|
|
44
|
+
/**
|
|
45
|
+
* One level of the path in its `<li>`: a link (`href`, or the consumer's router link with
|
|
46
|
+
* `asChild`) for a previous level, plain text for the current one. A press on the link goes
|
|
47
|
+
* through `Page.Guard` (`leaveGuardCapture`).
|
|
48
|
+
*/
|
|
49
|
+
declare function BreadcrumbItem({ href, asChild, current, children, className, "aria-label": ariaLabel, onClickCapture, ...rest }: BreadcrumbItemProps): import("react/jsx-runtime").JSX.Element;
|
|
41
50
|
declare namespace BreadcrumbItem {
|
|
42
51
|
var displayName: string;
|
|
43
52
|
}
|
|
@@ -37,7 +37,7 @@ type ButtonShapeProps = {
|
|
|
37
37
|
"aria-label": string;
|
|
38
38
|
};
|
|
39
39
|
/**
|
|
40
|
-
* A `<button>` runs the long-action modes; with `asChild` the child (a link) owns its
|
|
40
|
+
* A `<button>` runs the long-action modes; with `asChild` the child (a link) owns its element, so
|
|
41
41
|
* it takes none of them.
|
|
42
42
|
*/
|
|
43
43
|
type ButtonElementProps = {
|
|
@@ -45,7 +45,7 @@ export type ButtonGroupRootProps = Omit<FieldRootDomProps, "dir"> & FieldFramePr
|
|
|
45
45
|
* The field: label · the segments · hint or error. `className`, `ref` and the rest go to the frame;
|
|
46
46
|
* `id`, `role` and the `aria-label*` / `aria-describedby` names to the `role="group"` element.
|
|
47
47
|
*/
|
|
48
|
-
declare function ButtonGroupRoot({ orientation, size: sizeProp, fullWidth, label, required, optional, hint, error, invalid, reserveSupportRow, id, labels: labelsProp, children, className, role, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, ...rest }: ButtonGroupRootProps): import("react/jsx-runtime").JSX.Element;
|
|
48
|
+
declare function ButtonGroupRoot({ orientation, size: sizeProp, fullWidth, label, required, optional, hint, hintTone, error, invalid, reserveSupportRow, id, labels: labelsProp, children, className, role, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, ...rest }: ButtonGroupRootProps): import("react/jsx-runtime").JSX.Element;
|
|
49
49
|
declare namespace ButtonGroupRoot {
|
|
50
50
|
var displayName: string;
|
|
51
51
|
}
|
|
@@ -16,12 +16,16 @@ export type CardRootProps = DivProps & {
|
|
|
16
16
|
* No raised shadow: a flat tile for dense grids.
|
|
17
17
|
*/
|
|
18
18
|
flat?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* The KPI is loading: `Card.Value`, `Card.Delta` and `Card.Meta` show a Skeleton in their own geometry and the root sets `aria-busy`; the data fades in when it arrives. Labels and titles stay.
|
|
21
|
+
*/
|
|
22
|
+
loading?: boolean;
|
|
19
23
|
/**
|
|
20
24
|
* The whole card is one link or button: pass that element as the only child with the parts inside it; it gets hover, press and the focus ring. Nothing interactive may sit inside it.
|
|
21
25
|
*/
|
|
22
26
|
asChild?: boolean;
|
|
23
27
|
};
|
|
24
|
-
declare function CardRoot({ variant, flat, asChild, className, children, ...rest }: CardRootProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
declare function CardRoot({ variant, flat, loading, asChild, className, children, ...rest }: CardRootProps): import("react/jsx-runtime").JSX.Element;
|
|
25
29
|
declare namespace CardRoot {
|
|
26
30
|
var displayName: string;
|
|
27
31
|
}
|
|
@@ -79,7 +83,7 @@ declare namespace CardLabel {
|
|
|
79
83
|
var displayName: string;
|
|
80
84
|
}
|
|
81
85
|
export type CardValueProps = SpanProps;
|
|
82
|
-
declare function CardValue({ className, ...rest }: CardValueProps): import("react/jsx-runtime").JSX.Element;
|
|
86
|
+
declare function CardValue({ className, children, ...rest }: CardValueProps): import("react/jsx-runtime").JSX.Element;
|
|
83
87
|
declare namespace CardValue {
|
|
84
88
|
var displayName: string;
|
|
85
89
|
}
|
|
@@ -89,7 +93,7 @@ export type CardDeltaProps = SpanProps & {
|
|
|
89
93
|
*/
|
|
90
94
|
tone?: Extract<Tone, "neutral" | "success" | "warning" | "danger">;
|
|
91
95
|
};
|
|
92
|
-
declare function CardDelta({ className, tone, ...rest }: CardDeltaProps): import("react/jsx-runtime").JSX.Element;
|
|
96
|
+
declare function CardDelta({ className, tone, children, ...rest }: CardDeltaProps): import("react/jsx-runtime").JSX.Element;
|
|
93
97
|
declare namespace CardDelta {
|
|
94
98
|
var displayName: string;
|
|
95
99
|
}
|
|
@@ -98,7 +102,7 @@ export type CardMetaProps = SpanProps;
|
|
|
98
102
|
* The reference line of a KPI («Лидов 120 · сделок 18»): caption, muted, tabular; it sits at the
|
|
99
103
|
* bottom of the tile, so tiles in a row line their meta up.
|
|
100
104
|
*/
|
|
101
|
-
declare function CardMeta({ className, ...rest }: CardMetaProps): import("react/jsx-runtime").JSX.Element;
|
|
105
|
+
declare function CardMeta({ className, children, ...rest }: CardMetaProps): import("react/jsx-runtime").JSX.Element;
|
|
102
106
|
declare namespace CardMeta {
|
|
103
107
|
var displayName: string;
|
|
104
108
|
}
|
|
@@ -186,9 +186,9 @@ export type ChatMessagesProps<T = unknown> = Omit<MessageListProps, "selected" |
|
|
|
186
186
|
*/
|
|
187
187
|
now?: Date;
|
|
188
188
|
/**
|
|
189
|
-
* The label of a date
|
|
189
|
+
* The label of a date; gets the `timeZone`.
|
|
190
190
|
*/
|
|
191
|
-
formatDate?: (date: Date, now: Date) => string;
|
|
191
|
+
formatDate?: (date: Date, now: Date, timeZone?: string) => string;
|
|
192
192
|
};
|
|
193
193
|
/**
|
|
194
194
|
* The conversation: the one message list of the kit, in its own scroller. A `role="log"` of rows
|
|
@@ -198,7 +198,7 @@ export type ChatMessagesProps<T = unknown> = Omit<MessageListProps, "selected" |
|
|
|
198
198
|
* and `Message.Typing` close the list). Only the rows around the view render; the list opens at
|
|
199
199
|
* the end and keeps the reader's place.
|
|
200
200
|
*/
|
|
201
|
-
declare function ChatMessages<T>({ group, loading, hasOlder, onLoadOlder, items, getKey, getAuthor, getDate, isService, renderMessage, unread, groupWindow, now, formatDate, children, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, ...rest }: ChatMessagesProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
201
|
+
declare function ChatMessages<T>({ group, loading, hasOlder, onLoadOlder, items, getKey, getAuthor, getDate, isService, renderMessage, unread, groupWindow, now, timeZone, formatDate, children, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, ...rest }: ChatMessagesProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
202
202
|
declare namespace ChatMessages {
|
|
203
203
|
var displayName: string;
|
|
204
204
|
}
|
|
@@ -38,6 +38,10 @@ export type MessageListProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
|
38
38
|
* The reader (`{ id, name: «Вы», src?, color? }`): a reaction they put shows them among the chip's avatars at once, before the data comes back; matched by `id`.
|
|
39
39
|
*/
|
|
40
40
|
reader?: MessageUser;
|
|
41
|
+
/**
|
|
42
|
+
* The IANA zone of the date separators, the runs and every message time (`"Asia/Vladivostok"`): a profile's zone, not the browser's.
|
|
43
|
+
*/
|
|
44
|
+
timeZone?: string;
|
|
41
45
|
/**
|
|
42
46
|
* A message was added at the end after mount, sent or received: for a sound, a counter, a title badge. Not called for the first render, history or a message put back in the middle.
|
|
43
47
|
*/
|
|
@@ -76,7 +80,7 @@ export type MessageListProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
|
76
80
|
* `anchor="end"`); jumps, search, selection ranges, the keyboard and playing media reach or keep
|
|
77
81
|
* rows that are not rendered.
|
|
78
82
|
*/
|
|
79
|
-
export declare function MessageList({ group, selected: selectedProp, defaultSelected, onSelectedChange, quickReaction, reactionOptions, reader, onNewMessage, onRead, jumpTo, highlight, onMatchesChange, revealRef, labels: labelsProp, className, children, onKeyDown, onFocus, ref, ...rest }: MessageListProps): import("react/jsx-runtime").JSX.Element;
|
|
83
|
+
export declare function MessageList({ group, selected: selectedProp, defaultSelected, onSelectedChange, quickReaction, reactionOptions, reader, timeZone, onNewMessage, onRead, jumpTo, highlight, onMatchesChange, revealRef, labels: labelsProp, className, children, onKeyDown, onFocus, ref, ...rest }: MessageListProps): import("react/jsx-runtime").JSX.Element;
|
|
80
84
|
export type ChatSelectionBarProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
81
85
|
ref?: React.Ref<HTMLDivElement>;
|
|
82
86
|
};
|
|
@@ -7,7 +7,7 @@ import type { MessagePosition } from "../message/types";
|
|
|
7
7
|
export type MessageListEntry<T> = {
|
|
8
8
|
type: "date";
|
|
9
9
|
key: string;
|
|
10
|
-
/** The start of the day (local time). */
|
|
10
|
+
/** The start of the day (in `timeZone`, else local time). */
|
|
11
11
|
date: Date;
|
|
12
12
|
/** «Сегодня», «Вчера», «12 марта», «12 марта 2025». */
|
|
13
13
|
label: string;
|
|
@@ -37,11 +37,19 @@ export type GroupMessagesOptions<T> = {
|
|
|
37
37
|
groupWindow?: number;
|
|
38
38
|
/** «Today» for the date labels. Default: now. */
|
|
39
39
|
now?: Date;
|
|
40
|
+
/**
|
|
41
|
+
* The zone the days are read in (an IANA name, `"Asia/Vladivostok"`): where a day starts and what
|
|
42
|
+
* «today» is. Default: the browser's zone.
|
|
43
|
+
*/
|
|
44
|
+
timeZone?: string;
|
|
40
45
|
/** The label of a date separator. Default `formatMessageDate`. */
|
|
41
|
-
formatDate?: (date: Date, now: Date) => string;
|
|
46
|
+
formatDate?: (date: Date, now: Date, timeZone?: string) => string;
|
|
42
47
|
};
|
|
43
|
-
/**
|
|
44
|
-
|
|
48
|
+
/**
|
|
49
|
+
* «Сегодня», «Вчера», «12 марта» this year, «12 марта 2025» another year; days are read in
|
|
50
|
+
* `timeZone`, or the browser's zone.
|
|
51
|
+
*/
|
|
52
|
+
export declare function formatMessageDate(date: Date, now?: Date, timeZone?: string): string;
|
|
45
53
|
/**
|
|
46
54
|
* The rows of a chat from messages in time order: a date separator before the first message of
|
|
47
55
|
* every day, and for every message its `position` in the run of one author (a new run starts with
|
|
@@ -140,17 +140,22 @@ type ChatListItemOwnProps = {
|
|
|
140
140
|
*/
|
|
141
141
|
draft?: string;
|
|
142
142
|
/**
|
|
143
|
-
*
|
|
143
|
+
* The one child element (a router `Link`) is the row; the parts go inside it.
|
|
144
|
+
*/
|
|
145
|
+
asChild?: boolean;
|
|
146
|
+
/**
|
|
147
|
+
* `ChatList.ItemIcon`, `ChatList.ItemText`, `ChatList.ItemDescription`, `ChatList.ItemMenu` — inside the child element with `asChild`.
|
|
144
148
|
*/
|
|
145
149
|
children?: React.ReactNode;
|
|
146
150
|
};
|
|
147
|
-
export type ChatListItemProps = ChatListItemOwnProps & Omit<ListItemProps, keyof ChatListItemOwnProps | "value" | "current" | "
|
|
151
|
+
export type ChatListItemProps = ChatListItemOwnProps & Omit<ListItemProps, keyof ChatListItemOwnProps | "value" | "current" | "disabled">;
|
|
148
152
|
/**
|
|
149
|
-
* A dialog: a `List.Item` row (a button,
|
|
150
|
-
*
|
|
151
|
-
*
|
|
153
|
+
* A dialog: a `List.Item` row (a button, a link with `href`, or the consumer's element with
|
|
154
|
+
* `asChild` — a router link, its children the parts) with the avatar, the name and the time on
|
|
155
|
+
* the first line, the preview and the counts on the second. Its key and `current` come from
|
|
156
|
+
* `ChatList.Root`.
|
|
152
157
|
*/
|
|
153
|
-
declare function ChatListItem({ time, status, unread, mention, muted, pinned, typing, draft, className, children, onClick, onKeyDown, onFocus, onContextMenu, onPointerDown, onPointerMove, onPointerUp, onPointerCancel, ref, ...rest }: ChatListItemProps): import("react/jsx-runtime").JSX.Element;
|
|
158
|
+
declare function ChatListItem({ asChild, time, status, unread, mention, muted, pinned, typing, draft, className, children, onClick, onKeyDown, onFocus, onContextMenu, onPointerDown, onPointerMove, onPointerUp, onPointerCancel, ref, ...rest }: ChatListItemProps): import("react/jsx-runtime").JSX.Element;
|
|
154
159
|
declare namespace ChatListItem {
|
|
155
160
|
var displayName: string;
|
|
156
161
|
}
|
|
@@ -216,9 +221,13 @@ export type ChatListRootProps<T = unknown> = Omit<React.HTMLAttributes<HTMLDivEl
|
|
|
216
221
|
*/
|
|
217
222
|
now?: Date;
|
|
218
223
|
/**
|
|
219
|
-
*
|
|
224
|
+
* The IANA zone the times of the rows are read in (`"Asia/Vladivostok"`): a profile's zone, not the browser's.
|
|
225
|
+
*/
|
|
226
|
+
timeZone?: string;
|
|
227
|
+
/**
|
|
228
|
+
* Display of a row's `Date` time: «14:32» today, «пн» this week, «12 мар», «12.03.2025»; gets the `timeZone`.
|
|
220
229
|
*/
|
|
221
|
-
formatTime?: (date: Date, now: Date) => string;
|
|
230
|
+
formatTime?: (date: Date, now: Date, timeZone?: string) => string;
|
|
222
231
|
/**
|
|
223
232
|
* Built-in strings, see Labels.
|
|
224
233
|
*/
|
|
@@ -231,7 +240,7 @@ export type ChatListRootProps<T = unknown> = Omit<React.HTMLAttributes<HTMLDivEl
|
|
|
231
240
|
* new places when the order changes, a long list rendered only around the view, placeholder rows
|
|
232
241
|
* while loading and more dialogs loaded near the end. Draws no surface: put it in a pane.
|
|
233
242
|
*/
|
|
234
|
-
declare function ChatListRoot<T>({ items, getKey, renderItem, value: valueProp, defaultValue, onValueChange, search: searchProp, defaultSearch, onSearchChange, loading, hasMore, onLoadMore, empty, size: sizeProp, now: nowProp, formatTime, labels: labelsProp, className, ref, ...rest }: ChatListRootProps<T>): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
243
|
+
declare function ChatListRoot<T>({ items, getKey, renderItem, value: valueProp, defaultValue, onValueChange, search: searchProp, defaultSearch, onSearchChange, loading, hasMore, onLoadMore, empty, size: sizeProp, now: nowProp, timeZone, formatTime, labels: labelsProp, className, ref, ...rest }: ChatListRootProps<T>): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
235
244
|
declare namespace ChatListRoot {
|
|
236
245
|
var displayName: string;
|
|
237
246
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The time of a dialog's last message, as a messenger shows it: today «14:32», within the last
|
|
3
|
-
* six days the weekday «пн», earlier this year «12 мар», another year «12.03.2025».
|
|
4
|
-
* `ChatList.Root formatTime`.
|
|
3
|
+
* six days the weekday «пн», earlier this year «12 мар», another year «12.03.2025». Days and the
|
|
4
|
+
* clock are read in `timeZone`, or the browser's zone. The default `ChatList.Root formatTime`.
|
|
5
5
|
*/
|
|
6
|
-
export declare function formatChatTime(date: Date, now: Date): string;
|
|
6
|
+
export declare function formatChatTime(date: Date, now: Date, timeZone?: string): string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import type { HintTone } from "../hint/Hint";
|
|
2
3
|
import { type ChoiceLabelProps } from "../../internal/ChoiceField";
|
|
3
4
|
import type { ControlSize } from "../../internal/states";
|
|
4
5
|
export type CheckboxShape = "square" | "circle";
|
|
@@ -32,6 +33,10 @@ export type CheckboxRootProps = Omit<React.InputHTMLAttributes<HTMLInputElement>
|
|
|
32
33
|
* Help text under the label text. Hidden while `error` is shown.
|
|
33
34
|
*/
|
|
34
35
|
hint?: React.ReactNode;
|
|
36
|
+
/**
|
|
37
|
+
* Status color of `hint` («Осталось 12 дней» in `warning`). The words carry the status, the color repeats it; an `error` replaces the hint and its tone. A validation error is `error`, never a `danger` hint.
|
|
38
|
+
*/
|
|
39
|
+
hintTone?: HintTone;
|
|
35
40
|
/**
|
|
36
41
|
* Error message in the hint slot; implies `invalid`.
|
|
37
42
|
*/
|
|
@@ -59,7 +64,7 @@ export type CheckboxRootProps = Omit<React.InputHTMLAttributes<HTMLInputElement>
|
|
|
59
64
|
/** The native checkbox input. */
|
|
60
65
|
ref?: React.Ref<HTMLInputElement>;
|
|
61
66
|
};
|
|
62
|
-
declare function CheckboxRoot({ id, checked: checkedProp, defaultChecked, onCheckedChange, indeterminate, invalid, hint, error, size: sizeProp, shape, optional, labels: labelsProp, disabled: disabledProp, readOnly, className, "aria-describedby": ariaDescribedBy, children, ref, ...inputRest }: CheckboxRootProps): import("react/jsx-runtime").JSX.Element;
|
|
67
|
+
declare function CheckboxRoot({ id, checked: checkedProp, defaultChecked, onCheckedChange, indeterminate, invalid, hint, hintTone, error, size: sizeProp, shape, optional, labels: labelsProp, disabled: disabledProp, readOnly, className, "aria-describedby": ariaDescribedBy, children, ref, ...inputRest }: CheckboxRootProps): import("react/jsx-runtime").JSX.Element;
|
|
63
68
|
declare namespace CheckboxRoot {
|
|
64
69
|
var displayName: string;
|
|
65
70
|
}
|
|
@@ -77,7 +77,7 @@ export type ColorFieldProps = FieldRootDomProps & FieldFrameProps & FieldFocusRi
|
|
|
77
77
|
* the ColorPicker panel (area, hue, optional opacity, channels with the eyedropper, presets) in a
|
|
78
78
|
* Popover.
|
|
79
79
|
*/
|
|
80
|
-
export declare function ColorField({ value: valueProp, defaultValue, onValueChange, presets, alpha, size: sizeProp, disabled: disabledProp, invalid: invalidProp, focusRing, name, id, label, required, optional, hint, error, className, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, labels: labelsProp, ...rest }: ColorFieldProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
80
|
+
export declare function ColorField({ value: valueProp, defaultValue, onValueChange, presets, alpha, size: sizeProp, disabled: disabledProp, invalid: invalidProp, focusRing, name, id, label, required, optional, hint, hintTone, error, className, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, labels: labelsProp, ...rest }: ColorFieldProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
81
81
|
export declare namespace ColorField {
|
|
82
82
|
var displayName: string;
|
|
83
83
|
}
|
|
@@ -2,6 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import { type ColorAreaProps as AriaColorAreaProps, type ColorSliderProps as AriaColorSliderProps, type ColorThumbProps as AriaColorThumbProps, type SliderTrackProps as AriaSliderTrackProps, type Color, parseColor } from "react-aria-components";
|
|
3
3
|
import { Button } from "../button/Button";
|
|
4
4
|
import { type ColorSwatchesColorProps } from "../color-swatches/ColorSwatches";
|
|
5
|
+
import type { HintTone } from "../hint/Hint";
|
|
5
6
|
import { type FieldActionButtonProps } from "../../internal/FieldAction";
|
|
6
7
|
import type { FieldFocusRingProps, FieldRootDomProps } from "../../internal/FieldFrame";
|
|
7
8
|
import type { ControlSize } from "../../internal/states";
|
|
@@ -82,6 +83,10 @@ export type ColorPickerHexInputProps = FieldRootDomProps & FieldFocusRingProps &
|
|
|
82
83
|
* Help text under the field. Hidden while `error` is shown.
|
|
83
84
|
*/
|
|
84
85
|
hint?: React.ReactNode;
|
|
86
|
+
/**
|
|
87
|
+
* Status color of `hint` («Осталось 12 дней» in `warning`). The words carry the status, the color repeats it; an `error` replaces the hint and its tone. A validation error is `error`, never a `danger` hint.
|
|
88
|
+
*/
|
|
89
|
+
hintTone?: HintTone;
|
|
85
90
|
/**
|
|
86
91
|
* Error message in the hint slot; marks the field invalid.
|
|
87
92
|
*/
|
|
@@ -165,7 +170,7 @@ export type ColorPickerSliderMetaProps = DivProps & {
|
|
|
165
170
|
* React Aria's `SliderOutput` inside a color slider points `for` at an id no input carries.
|
|
166
171
|
*/
|
|
167
172
|
declare function SliderMeta({ label, className, ...rest }: ColorPickerSliderMetaProps): import("react/jsx-runtime").JSX.Element;
|
|
168
|
-
declare function HexInput({ label, hint, error, focusRing, children, ...rest }: ColorPickerHexInputProps): import("react/jsx-runtime").JSX.Element;
|
|
173
|
+
declare function HexInput({ label, hint, hintTone, error, focusRing, children, ...rest }: ColorPickerHexInputProps): import("react/jsx-runtime").JSX.Element;
|
|
169
174
|
declare namespace HexInput {
|
|
170
175
|
var displayName: string;
|
|
171
176
|
}
|
|
@@ -10,6 +10,10 @@ export type ColorPresetsLabels = {
|
|
|
10
10
|
list: string;
|
|
11
11
|
/** The "no color" swatch (`allowEmpty`) and the trigger name for an empty value. */
|
|
12
12
|
empty: string;
|
|
13
|
+
/** Label of the hex field under the swatches (`allowCustom`). */
|
|
14
|
+
custom: string;
|
|
15
|
+
/** Error of the hex field when Enter finds no hex color in it. */
|
|
16
|
+
customInvalid: string;
|
|
13
17
|
};
|
|
14
18
|
export declare const COLOR_PRESETS_LABELS: ColorPresetsLabels;
|
|
15
19
|
export type ColorPresetsRootProps = {
|
|
@@ -65,6 +69,10 @@ export type ColorPresetsRootProps = {
|
|
|
65
69
|
* Adds the «no color» swatch after the presets (value `null`).
|
|
66
70
|
*/
|
|
67
71
|
allowEmpty?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Any color beyond the palette: a hex field under the swatches (`labels.custom`) shows the typed color, Enter picks it as `#rrggbb`; invalid text gets `labels.customInvalid`.
|
|
74
|
+
*/
|
|
75
|
+
allowCustom?: boolean;
|
|
68
76
|
/**
|
|
69
77
|
* Close the panel after a pick (focus returns to the trigger).
|
|
70
78
|
*/
|
|
@@ -78,7 +86,7 @@ export type ColorPresetsRootProps = {
|
|
|
78
86
|
*/
|
|
79
87
|
children: React.ReactNode;
|
|
80
88
|
};
|
|
81
|
-
declare function ColorPresetsRoot({ value: valueProp, defaultValue, onValueChange, open: openProp, defaultOpen, onOpenChange, closeOnEscape, closeOnOutsideClick, presets, columns: columnsProp, size: sizeProp, disabled: disabledProp, allowEmpty, closeOnSelect, labels: labelsProp, children, }: ColorPresetsRootProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
89
|
+
declare function ColorPresetsRoot({ value: valueProp, defaultValue, onValueChange, open: openProp, defaultOpen, onOpenChange, closeOnEscape, closeOnOutsideClick, presets, columns: columnsProp, size: sizeProp, disabled: disabledProp, allowEmpty, allowCustom, closeOnSelect, labels: labelsProp, children, }: ColorPresetsRootProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
82
90
|
declare namespace ColorPresetsRoot {
|
|
83
91
|
var displayName: string;
|
|
84
92
|
}
|
|
@@ -5,7 +5,7 @@ export type CrossfadeProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
|
5
5
|
*/
|
|
6
6
|
state: string | number;
|
|
7
7
|
/**
|
|
8
|
-
* The region takes its parent's height (a flex or grid item, or a sized block) and every state stretches to it; the height never glides.
|
|
8
|
+
* The region takes its parent's height (a flex or grid item, or a sized block) and every state stretches to it; the height never glides. A `Crossfade` that is the child of a `Page.Cell` fills it unless `fill` is set.
|
|
9
9
|
*/
|
|
10
10
|
fill?: boolean;
|
|
11
11
|
ref?: React.Ref<HTMLDivElement>;
|
|
@@ -1,23 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
align?: PositionAlign;
|
|
12
|
-
/** The trigger button. */
|
|
13
|
-
ref?: React.Ref<HTMLButtonElement>;
|
|
1
|
+
import { type ControlSize } from "../../internal/states";
|
|
2
|
+
import type { DataTableLabels } from "./DataTable";
|
|
3
|
+
import type { DataTableColumn } from "./types";
|
|
4
|
+
type ColumnsMenuProps = {
|
|
5
|
+
/** Every column, hidden ones included, in table order. */
|
|
6
|
+
columns: DataTableColumn<never>[];
|
|
7
|
+
hidden: ReadonlySet<string>;
|
|
8
|
+
setHidden: (hidden: string[]) => void;
|
|
9
|
+
labels: DataTableLabels;
|
|
10
|
+
size: ControlSize;
|
|
14
11
|
};
|
|
15
12
|
/**
|
|
16
|
-
* The column chooser of the table
|
|
17
|
-
*
|
|
18
|
-
* with `hideable: false` stays checked and
|
|
13
|
+
* The column chooser of the table (`columnsMenu`), drawn in its header row: an icon-only ghost
|
|
14
|
+
* Button one tier below the table, named and tipped by `labels.columns`, opening a Dropdown with a
|
|
15
|
+
* check item per column and «Показать все». A column with `hideable: false` stays checked and
|
|
16
|
+
* disabled, and the last visible column cannot be hidden.
|
|
19
17
|
*/
|
|
20
|
-
export declare function
|
|
21
|
-
export
|
|
22
|
-
var displayName: string;
|
|
23
|
-
}
|
|
18
|
+
export declare function ColumnsMenu({ columns, hidden, setHidden, labels, size }: ColumnsMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export {};
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { type ControlSize } from "../../internal/states";
|
|
3
|
-
import { DataTableColumnsMenu } from "./ColumnsMenu";
|
|
4
3
|
import type { DataTableColumn, DataTableGroup, DataTableRowClickEvent, DataTableSortState } from "./types";
|
|
5
|
-
export type { DataTableColumnsMenuProps } from "./ColumnsMenu";
|
|
6
4
|
export type { DataTableColumn, DataTableGroup, DataTableOrder, DataTableRowClickEvent, DataTableSortState, } from "./types";
|
|
7
5
|
/** System strings; `{from}`, `{to}`, `{total}`, `{label}`, `{count}`, `{group}` are replaced. */
|
|
8
6
|
export type DataTableLabels = {
|
|
@@ -26,9 +24,9 @@ export type DataTableLabels = {
|
|
|
26
24
|
expand: string;
|
|
27
25
|
/** `aria-label` of the expand toggle of an expanded row. */
|
|
28
26
|
collapse: string;
|
|
29
|
-
/**
|
|
27
|
+
/** Name and tooltip of the column chooser (`columnsMenu`); `{shown}` and `{total}` are counts. */
|
|
30
28
|
columns: string;
|
|
31
|
-
/** The
|
|
29
|
+
/** The column chooser item that shows every column again. */
|
|
32
30
|
showAllColumns: string;
|
|
33
31
|
/** `aria-label` of a row's drag handle (`onReorder`); `{label}` is `getRowLabel(row)`. */
|
|
34
32
|
reorderRow: string;
|
|
@@ -38,6 +36,8 @@ export type DataTableLabels = {
|
|
|
38
36
|
expandGroup: string;
|
|
39
37
|
/** `aria-label` of the toggle of an expanded group; `{group}` is the group key. */
|
|
40
38
|
collapseGroup: string;
|
|
39
|
+
/** Name of the info glyph of a column with a `description` (the tooltip holds the text). */
|
|
40
|
+
columnInfo: string;
|
|
41
41
|
};
|
|
42
42
|
export declare const DATA_TABLE_LABELS: DataTableLabels;
|
|
43
43
|
export type DataTableProps<Row> = Omit<React.HTMLAttributes<HTMLDivElement>, "children"> & {
|
|
@@ -48,7 +48,7 @@ export type DataTableProps<Row> = Omit<React.HTMLAttributes<HTMLDivElement>, "ch
|
|
|
48
48
|
*/
|
|
49
49
|
columns: DataTableColumn<Row>[];
|
|
50
50
|
/**
|
|
51
|
-
* Ids of columns that are not rendered, controlled. A column with `hideable: false` stays.
|
|
51
|
+
* Ids of columns that are not rendered, controlled. A column with `hideable: false` stays. The column chooser (`columnsMenu`) changes it.
|
|
52
52
|
*/
|
|
53
53
|
hiddenColumns?: string[];
|
|
54
54
|
/**
|
|
@@ -56,9 +56,13 @@ export type DataTableProps<Row> = Omit<React.HTMLAttributes<HTMLDivElement>, "ch
|
|
|
56
56
|
*/
|
|
57
57
|
defaultHiddenColumns?: string[];
|
|
58
58
|
/**
|
|
59
|
-
* The hidden ids changed (`
|
|
59
|
+
* The hidden ids changed (`columnsMenu`). The kit stores nothing: keep the list (local storage, the user's settings) and pass it back to restore the choice.
|
|
60
60
|
*/
|
|
61
61
|
onHiddenColumnsChange?: (hiddenColumns: string[]) => void;
|
|
62
|
+
/**
|
|
63
|
+
* The column chooser at the end of the header row: in the head cell of a trailing row-actions column (`hideHeader`), else in a cell of its own; sticks with `stickyLastColumn`. Needs `showHeader`.
|
|
64
|
+
*/
|
|
65
|
+
columnsMenu?: boolean;
|
|
62
66
|
/**
|
|
63
67
|
* Data; sorted in memory when a sort is set. With `source="server"` — the page (or the loaded batches) as the server returned it.
|
|
64
68
|
*/
|
|
@@ -91,6 +95,10 @@ export type DataTableProps<Row> = Omit<React.HTMLAttributes<HTMLDivElement>, "ch
|
|
|
91
95
|
* The first visible column (with the selection and toggle columns) sticks while scrolling sideways; the start edge shadow falls from its end edge.
|
|
92
96
|
*/
|
|
93
97
|
stickyFirstColumn?: boolean;
|
|
98
|
+
/**
|
|
99
|
+
* The last visible column (row actions) sticks to the end edge while scrolling sideways; the end edge shadow falls from its start edge.
|
|
100
|
+
*/
|
|
101
|
+
stickyLastColumn?: boolean;
|
|
94
102
|
/**
|
|
95
103
|
* Stable row id (position by default; sub-rows too, `index` among siblings); selection, expansion and the enter animation of new rows are keyed by it. Pass it whenever sorting, selection or expansion is used.
|
|
96
104
|
*/
|
|
@@ -252,7 +260,7 @@ export type DataTableProps<Row> = Omit<React.HTMLAttributes<HTMLDivElement>, "ch
|
|
|
252
260
|
*/
|
|
253
261
|
loadingRows?: number;
|
|
254
262
|
/**
|
|
255
|
-
* Panel above the table (
|
|
263
|
+
* Panel above the table for several controls of the table itself (bulk actions on the selected rows, a table-local search with filters); stacks below 30rem of table width.
|
|
256
264
|
*/
|
|
257
265
|
toolbar?: React.ReactNode;
|
|
258
266
|
/**
|
|
@@ -280,7 +288,4 @@ export type DataTableProps<Row> = Omit<React.HTMLAttributes<HTMLDivElement>, "ch
|
|
|
280
288
|
*/
|
|
281
289
|
onCollapsedGroupsChange?: (collapsedGroups: (string | number)[]) => void;
|
|
282
290
|
};
|
|
283
|
-
export declare function DataTable<Row>({ columns: allColumns, hiddenColumns, defaultHiddenColumns, onHiddenColumnsChange, rows, source, rowCount, size: sizeProp, className, showHeader, stickyHeader, stickyFirstColumn, getRowKey, getRowHref, onRowClick, isRowClickable, loading, empty, labels: labelsProp, rowDividers, columnDividers, sort, defaultSort, onSortChange, paging, page, defaultPage, onPageChange, pageSize, infiniteBatchSize, hasMore, loadingMore, onLoadMore, scrollHeight, fullWidth, highlightRowOnHover, highlightColumnOnHover, striped, getRowLabel, selectable, selected, defaultSelected, onSelectedChange, onReorder, getRowChildren, renderExpanded, isRowExpandable, expanded, defaultExpanded, onExpandedChange, loadError, loadingRows, toolbar, getRowGroup, renderGroupHeader, stickyGroupHeaders, collapsedGroups, defaultCollapsedGroups, onCollapsedGroupsChange, ref, ...rest }: DataTableProps<Row>): import("react/jsx-runtime").JSX.Element;
|
|
284
|
-
export declare namespace DataTable {
|
|
285
|
-
var ColumnsMenu: typeof DataTableColumnsMenu;
|
|
286
|
-
}
|
|
291
|
+
export declare function DataTable<Row>({ columns: allColumns, hiddenColumns, defaultHiddenColumns, onHiddenColumnsChange, columnsMenu, rows, source, rowCount, size: sizeProp, className, showHeader, stickyHeader, stickyFirstColumn, stickyLastColumn, getRowKey, getRowHref, onRowClick, isRowClickable, loading, empty, labels: labelsProp, rowDividers, columnDividers, sort, defaultSort, onSortChange, paging, page, defaultPage, onPageChange, pageSize, infiniteBatchSize, hasMore, loadingMore, onLoadMore, scrollHeight, fullWidth, highlightRowOnHover, highlightColumnOnHover, striped, getRowLabel, selectable, selected, defaultSelected, onSelectedChange, onReorder, getRowChildren, renderExpanded, isRowExpandable, expanded, defaultExpanded, onExpandedChange, loadError, loadingRows, toolbar, getRowGroup, renderGroupHeader, stickyGroupHeaders, collapsedGroups, defaultCollapsedGroups, onCollapsedGroupsChange, ref, ...rest }: DataTableProps<Row>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as React from "react";
|
|
1
2
|
import type { ControlSize } from "../../internal/states";
|
|
2
3
|
import type { DataTableColumn, DataTableSortState } from "./types";
|
|
3
4
|
type HeadProps<Row> = {
|
|
@@ -6,13 +7,21 @@ type HeadProps<Row> = {
|
|
|
6
7
|
sort: DataTableSortState;
|
|
7
8
|
onSort: (columnId: string) => void;
|
|
8
9
|
stickyFirstColumn: boolean;
|
|
10
|
+
/** The last visible column sticks to the end edge (with `stickyHeader`: the end corner). */
|
|
11
|
+
stickyLastColumn: boolean;
|
|
9
12
|
/** The head sticks to the top of the scroller. */
|
|
10
13
|
stickyHeader: boolean;
|
|
11
14
|
/** Sticky head and first column: the leading head cells stick to both edges. */
|
|
12
15
|
stickyCorner: boolean;
|
|
13
16
|
expandEnabled: boolean;
|
|
17
|
+
/** Name of the info glyph of a column with a `description`. */
|
|
18
|
+
infoLabel: string;
|
|
14
19
|
/** A leading column of row handles (`onReorder`). */
|
|
15
20
|
reorderable?: boolean;
|
|
21
|
+
/** The column chooser trigger (`columnsMenu`), or null. */
|
|
22
|
+
columnsMenu: React.ReactNode;
|
|
23
|
+
/** The chooser stands in a cell of its own at the end; else in the row-actions head cell. */
|
|
24
|
+
menuCell: boolean;
|
|
16
25
|
selectAll?: {
|
|
17
26
|
checked: boolean;
|
|
18
27
|
indeterminate: boolean;
|
|
@@ -21,5 +30,5 @@ type HeadProps<Row> = {
|
|
|
21
30
|
onToggle: () => void;
|
|
22
31
|
};
|
|
23
32
|
};
|
|
24
|
-
export declare function Head<Row>({ columns, size, sort, onSort, stickyFirstColumn, stickyHeader, stickyCorner, expandEnabled, reorderable, selectAll, }: HeadProps<Row>): import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export declare function Head<Row>({ columns, size, sort, onSort, stickyFirstColumn, stickyLastColumn, stickyHeader, stickyCorner, expandEnabled, infoLabel, reorderable, columnsMenu, menuCell, selectAll, }: HeadProps<Row>): import("react/jsx-runtime").JSX.Element;
|
|
25
34
|
export {};
|
|
@@ -15,6 +15,10 @@ export type RowShared<Row> = {
|
|
|
15
15
|
selectable: boolean;
|
|
16
16
|
expandEnabled: boolean;
|
|
17
17
|
stickyFirstColumn: boolean;
|
|
18
|
+
/** The last visible column sticks to the end edge (row actions). */
|
|
19
|
+
stickyLastColumn: boolean;
|
|
20
|
+
/** A trailing cell under the head's column chooser (`columnsMenu` with no row-actions column). */
|
|
21
|
+
menuCell: boolean;
|
|
18
22
|
striped: boolean;
|
|
19
23
|
totalColumns: number;
|
|
20
24
|
/**
|
|
@@ -93,10 +97,12 @@ type MeasureBodyProps<Row> = {
|
|
|
93
97
|
expandEnabled: boolean;
|
|
94
98
|
/** A leading column of row handles (`onReorder`). */
|
|
95
99
|
reorderable: boolean;
|
|
100
|
+
/** A trailing cell under the head's column chooser. */
|
|
101
|
+
menuCell: boolean;
|
|
96
102
|
};
|
|
97
103
|
/**
|
|
98
104
|
* Sub-rows of collapsed rows and rows of collapsed groups, laid out invisibly so the columns are
|
|
99
105
|
* already as wide as they will be once a row or group opens; never shown or reachable.
|
|
100
106
|
*/
|
|
101
|
-
export declare function MeasureBody<Row>({ rows, columns, selectable, expandEnabled, reorderable, }: MeasureBodyProps<Row>): import("react/jsx-runtime").JSX.Element;
|
|
107
|
+
export declare function MeasureBody<Row>({ rows, columns, selectable, expandEnabled, reorderable, menuCell, }: MeasureBodyProps<Row>): import("react/jsx-runtime").JSX.Element;
|
|
102
108
|
export {};
|