@aircall/ds 0.48.0 → 0.49.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/{data-table-C-UXpZWS.js → data-table-B3ahtFLP.js} +10 -5
- package/dist/data-table.js +1 -1
- package/dist/globals.css +1 -1
- package/dist/index.d.ts +56 -53
- package/dist/index.js +151 -101
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as Button, D as _objectWithoutProperties, E as _objectSpread2, O as cn, S as registerI18nNamespace, T as linkStyle, _ as ActionBarHeight, a as TableFooter, b as detectInitialLanguage, c as TableRow, d as Checkbox, f as Spinner, g as ActionBarContext, h as ActionBarButton, i as TableCell, l as useFetchMoreSentinel, m as ActionBar, n as Table, o as TableHead, p as spinnerVariants, r as TableBody, s as TableHeader, t as DataTable, u as Skeleton, v as useDsTranslation, w as buttonVariants, x as dsI18n, y as SUPPORTED_LANGUAGES } from "./data-table-
|
|
1
|
+
import { C as Button, D as _objectWithoutProperties, E as _objectSpread2, O as cn, S as registerI18nNamespace, T as linkStyle, _ as ActionBarHeight, a as TableFooter, b as detectInitialLanguage, c as TableRow, d as Checkbox, f as Spinner, g as ActionBarContext, h as ActionBarButton, i as TableCell, l as useFetchMoreSentinel, m as ActionBar, n as Table, o as TableHead, p as spinnerVariants, r as TableBody, s as TableHeader, t as DataTable, u as Skeleton, v as useDsTranslation, w as buttonVariants, x as dsI18n, y as SUPPORTED_LANGUAGES } from "./data-table-B3ahtFLP.js";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { createContext, useContext, useSyncExternalStore } from "react";
|
|
4
4
|
import { Accordion as Accordion$1 } from "@base-ui/react/accordion";
|
|
@@ -198,7 +198,7 @@ const _excluded4$30 = [
|
|
|
198
198
|
"playheadHeight"
|
|
199
199
|
];
|
|
200
200
|
const _excluded5$24 = ["className"];
|
|
201
|
-
const _excluded6$
|
|
201
|
+
const _excluded6$21 = ["mode", "className"];
|
|
202
202
|
const _excluded7$12 = ["className"];
|
|
203
203
|
const _excluded8$11 = [
|
|
204
204
|
"speeds",
|
|
@@ -639,7 +639,7 @@ function AudioPlayerCurrentTime(_ref8) {
|
|
|
639
639
|
* ```
|
|
640
640
|
*/
|
|
641
641
|
function AudioPlayerTime(_ref9) {
|
|
642
|
-
let { mode = "compact", className } = _ref9, props = _objectWithoutProperties(_ref9, _excluded6$
|
|
642
|
+
let { mode = "compact", className } = _ref9, props = _objectWithoutProperties(_ref9, _excluded6$21);
|
|
643
643
|
const { isPlaying, duration } = useAudioPlayer();
|
|
644
644
|
const elapsed = useAudioPlayerTime();
|
|
645
645
|
if (mode === "full") return /* @__PURE__ */ jsxs("span", _objectSpread2(_objectSpread2({
|
|
@@ -821,7 +821,7 @@ const _excluded2$42 = ["className", "size"];
|
|
|
821
821
|
const _excluded3$34 = ["className"];
|
|
822
822
|
const _excluded4$29 = ["className"];
|
|
823
823
|
const _excluded5$23 = ["className"];
|
|
824
|
-
const _excluded6$
|
|
824
|
+
const _excluded6$20 = ["className"];
|
|
825
825
|
const _excluded7$11 = ["className"];
|
|
826
826
|
const _excluded8$10 = ["className"];
|
|
827
827
|
const _excluded9$8 = [
|
|
@@ -954,7 +954,7 @@ AlertDialogMedia.displayName = "AlertDialogMedia";
|
|
|
954
954
|
* announced to assistive technology when the dialog opens.
|
|
955
955
|
*/
|
|
956
956
|
const AlertDialogTitle = React.forwardRef((componentProps, forwardRef) => {
|
|
957
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded6$
|
|
957
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded6$20);
|
|
958
958
|
return /* @__PURE__ */ jsx(AlertDialog$1.Title, _objectSpread2({
|
|
959
959
|
ref: forwardRef,
|
|
960
960
|
"data-slot": "alert-dialog-title",
|
|
@@ -1134,7 +1134,7 @@ const _excluded2$40 = ["className", "variant"];
|
|
|
1134
1134
|
const _excluded3$32 = ["className"];
|
|
1135
1135
|
const _excluded4$27 = ["className"];
|
|
1136
1136
|
const _excluded5$22 = ["className"];
|
|
1137
|
-
const _excluded6$
|
|
1137
|
+
const _excluded6$19 = ["className"];
|
|
1138
1138
|
const _excluded7$10 = [
|
|
1139
1139
|
"className",
|
|
1140
1140
|
"variant",
|
|
@@ -1266,7 +1266,7 @@ AttachmentDescription.displayName = "AttachmentDescription";
|
|
|
1266
1266
|
* `orientation="vertical"` it floats to the top-right corner of the card.
|
|
1267
1267
|
*/
|
|
1268
1268
|
const AttachmentActions = React.forwardRef((componentProps, forwardRef) => {
|
|
1269
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded6$
|
|
1269
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded6$19);
|
|
1270
1270
|
return /* @__PURE__ */ jsx("div", _objectSpread2({
|
|
1271
1271
|
ref: forwardRef,
|
|
1272
1272
|
"data-slot": "attachment-actions",
|
|
@@ -1343,7 +1343,7 @@ const _excluded2$39 = ["className"];
|
|
|
1343
1343
|
const _excluded3$31 = ["className"];
|
|
1344
1344
|
const _excluded4$26 = ["className"];
|
|
1345
1345
|
const _excluded5$21 = ["className"];
|
|
1346
|
-
const _excluded6$
|
|
1346
|
+
const _excluded6$18 = ["className"];
|
|
1347
1347
|
/**
|
|
1348
1348
|
* `class-variance-authority` config for {@link Avatar}. `size`
|
|
1349
1349
|
* (`xs` | `sm` | `default` | `lg` | `xl`, default `default`) sets the avatar's diameter.
|
|
@@ -1453,7 +1453,7 @@ AvatarGroup.displayName = "AvatarGroup";
|
|
|
1453
1453
|
* Renders a circular `<div>` sized to match the group's avatars.
|
|
1454
1454
|
*/
|
|
1455
1455
|
const AvatarGroupCount = React.forwardRef((componentProps, forwardRef) => {
|
|
1456
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded6$
|
|
1456
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded6$18);
|
|
1457
1457
|
return /* @__PURE__ */ jsx("div", _objectSpread2({
|
|
1458
1458
|
ref: forwardRef,
|
|
1459
1459
|
"data-slot": "avatar-group-count",
|
|
@@ -2261,7 +2261,7 @@ const _excluded4$25 = [
|
|
|
2261
2261
|
"alignItemWithTrigger"
|
|
2262
2262
|
];
|
|
2263
2263
|
const _excluded5$20 = ["className"];
|
|
2264
|
-
const _excluded6$
|
|
2264
|
+
const _excluded6$17 = ["className", "children"];
|
|
2265
2265
|
const _excluded7$9 = ["className"];
|
|
2266
2266
|
const _excluded8$8 = ["className"];
|
|
2267
2267
|
const _excluded9$6 = ["className"];
|
|
@@ -2378,7 +2378,7 @@ SelectLabel.displayName = "SelectLabel";
|
|
|
2378
2378
|
* `<div role="option">` holding the item text plus a trailing check indicator shown when selected.
|
|
2379
2379
|
*/
|
|
2380
2380
|
const SelectItem = React.forwardRef((componentProps, forwardRef) => {
|
|
2381
|
-
const { className, children } = componentProps, props = _objectWithoutProperties(componentProps, _excluded6$
|
|
2381
|
+
const { className, children } = componentProps, props = _objectWithoutProperties(componentProps, _excluded6$17);
|
|
2382
2382
|
return /* @__PURE__ */ jsxs(Select$1.Item, _objectSpread2(_objectSpread2({
|
|
2383
2383
|
ref: forwardRef,
|
|
2384
2384
|
"data-slot": "select-item",
|
|
@@ -2672,7 +2672,7 @@ const _excluded2$34 = ["className"];
|
|
|
2672
2672
|
const _excluded3$26 = ["className"];
|
|
2673
2673
|
const _excluded4$23 = ["className"];
|
|
2674
2674
|
const _excluded5$18 = ["className"];
|
|
2675
|
-
const _excluded6$
|
|
2675
|
+
const _excluded6$16 = ["className"];
|
|
2676
2676
|
const _excluded7$8 = ["className"];
|
|
2677
2677
|
/**
|
|
2678
2678
|
* `class-variance-authority` config for {@link Card}. `size`
|
|
@@ -2772,7 +2772,7 @@ CardAction.displayName = "CardAction";
|
|
|
2772
2772
|
* Main body region of a card. Renders a `<div data-slot="card-content">` with horizontal padding.
|
|
2773
2773
|
*/
|
|
2774
2774
|
const CardContent = React.forwardRef((componentProps, forwardRef) => {
|
|
2775
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded6$
|
|
2775
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded6$16);
|
|
2776
2776
|
return /* @__PURE__ */ jsx("div", _objectSpread2({
|
|
2777
2777
|
ref: forwardRef,
|
|
2778
2778
|
"data-slot": "card-content",
|
|
@@ -3565,7 +3565,7 @@ const _excluded2$28 = [
|
|
|
3565
3565
|
const _excluded3$23 = ["className", "presets"];
|
|
3566
3566
|
const _excluded4$20 = ["className"];
|
|
3567
3567
|
const _excluded5$16 = ["className", "mode"];
|
|
3568
|
-
const _excluded6$
|
|
3568
|
+
const _excluded6$15 = ["className"];
|
|
3569
3569
|
const _excluded7$7 = ["className"];
|
|
3570
3570
|
const _excluded8$7 = ["className"];
|
|
3571
3571
|
const HEX_PATTERN = /^#?([0-9a-f]{3}|[0-9a-f]{6})$/i;
|
|
@@ -4068,7 +4068,7 @@ ColorPickerPanel.displayName = "ColorPickerPanel";
|
|
|
4068
4068
|
* ```
|
|
4069
4069
|
*/
|
|
4070
4070
|
const ColorPickerArea = React.forwardRef((componentProps, forwardRef) => {
|
|
4071
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded6$
|
|
4071
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded6$15);
|
|
4072
4072
|
const { hsv, setHsv } = useColorPickerContext();
|
|
4073
4073
|
const t = useDsTranslation("ds");
|
|
4074
4074
|
const surfaceRef = React.useRef(null);
|
|
@@ -4253,7 +4253,7 @@ const _excluded3$22 = [
|
|
|
4253
4253
|
];
|
|
4254
4254
|
const _excluded4$19 = ["className"];
|
|
4255
4255
|
const _excluded5$15 = ["className"];
|
|
4256
|
-
const _excluded6$
|
|
4256
|
+
const _excluded6$14 = ["className"];
|
|
4257
4257
|
/**
|
|
4258
4258
|
* The bordered flex-row shell shared by `InputGroup` and `NumericInput`.
|
|
4259
4259
|
* Owns the border, height, hover/focus ring, disabled fade, error halo, and the
|
|
@@ -4341,7 +4341,7 @@ const InputGroupInput = React.forwardRef((componentProps, forwardRef) => {
|
|
|
4341
4341
|
});
|
|
4342
4342
|
InputGroupInput.displayName = "InputGroupInput";
|
|
4343
4343
|
const InputGroupTextarea = React.forwardRef((componentProps, forwardRef) => {
|
|
4344
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded6$
|
|
4344
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded6$14);
|
|
4345
4345
|
return /* @__PURE__ */ jsx(Textarea, _objectSpread2({
|
|
4346
4346
|
ref: forwardRef,
|
|
4347
4347
|
"data-slot": "input-group-control",
|
|
@@ -4373,7 +4373,7 @@ const _excluded4$18 = [
|
|
|
4373
4373
|
"anchor"
|
|
4374
4374
|
];
|
|
4375
4375
|
const _excluded5$14 = ["className"];
|
|
4376
|
-
const _excluded6$
|
|
4376
|
+
const _excluded6$13 = ["className", "children"];
|
|
4377
4377
|
const _excluded7$6 = ["className"];
|
|
4378
4378
|
const _excluded8$6 = ["className"];
|
|
4379
4379
|
const _excluded9$5 = ["className"];
|
|
@@ -4526,7 +4526,7 @@ ComboboxList.displayName = "ComboboxList";
|
|
|
4526
4526
|
* row with a trailing check indicator when selected.
|
|
4527
4527
|
*/
|
|
4528
4528
|
const ComboboxItem = React.forwardRef((componentProps, forwardRef) => {
|
|
4529
|
-
const { className, children } = componentProps, props = _objectWithoutProperties(componentProps, _excluded6$
|
|
4529
|
+
const { className, children } = componentProps, props = _objectWithoutProperties(componentProps, _excluded6$13);
|
|
4530
4530
|
return /* @__PURE__ */ jsxs(Combobox$1.Item, _objectSpread2(_objectSpread2({
|
|
4531
4531
|
ref: forwardRef,
|
|
4532
4532
|
"data-slot": "combobox-item",
|
|
@@ -4677,7 +4677,7 @@ const _excluded4$17 = [
|
|
|
4677
4677
|
"children"
|
|
4678
4678
|
];
|
|
4679
4679
|
const _excluded5$13 = ["className"];
|
|
4680
|
-
const _excluded6$
|
|
4680
|
+
const _excluded6$12 = ["className"];
|
|
4681
4681
|
/**
|
|
4682
4682
|
* Root of the dialog, wrapping Base UI's `Dialog.Root`. Manages open/close state and renders no DOM
|
|
4683
4683
|
* element — place `DialogTrigger` and `DialogContent` inside it.
|
|
@@ -4813,7 +4813,7 @@ DialogTitle.displayName = "DialogTitle";
|
|
|
4813
4813
|
* `<p>` and is associated with the dialog for screen readers.
|
|
4814
4814
|
*/
|
|
4815
4815
|
const DialogDescription = React.forwardRef((componentProps, forwardRef) => {
|
|
4816
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded6$
|
|
4816
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded6$12);
|
|
4817
4817
|
return /* @__PURE__ */ jsx(Dialog$1.Description, _objectSpread2({
|
|
4818
4818
|
ref: forwardRef,
|
|
4819
4819
|
"data-slot": "dialog-description",
|
|
@@ -4832,7 +4832,7 @@ const _excluded2$24 = [
|
|
|
4832
4832
|
const _excluded3$19 = ["className"];
|
|
4833
4833
|
const _excluded4$16 = ["className"];
|
|
4834
4834
|
const _excluded5$12 = ["className"];
|
|
4835
|
-
const _excluded6$
|
|
4835
|
+
const _excluded6$11 = ["className"];
|
|
4836
4836
|
const _excluded7$5 = ["className"];
|
|
4837
4837
|
const _excluded8$5 = ["className"];
|
|
4838
4838
|
/**
|
|
@@ -4954,7 +4954,7 @@ CommandGroup.displayName = "CommandGroup";
|
|
|
4954
4954
|
* one pixel tall.
|
|
4955
4955
|
*/
|
|
4956
4956
|
const CommandSeparator = React.forwardRef((componentProps, forwardRef) => {
|
|
4957
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded6$
|
|
4957
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded6$11);
|
|
4958
4958
|
return /* @__PURE__ */ jsx(Command$1.Separator, _objectSpread2({
|
|
4959
4959
|
ref: forwardRef,
|
|
4960
4960
|
"data-slot": "command-separator",
|
|
@@ -5024,6 +5024,24 @@ const CountryFlag = React.forwardRef((componentProps, forwardRef) => {
|
|
|
5024
5024
|
});
|
|
5025
5025
|
CountryFlag.displayName = "CountryFlag";
|
|
5026
5026
|
//#endregion
|
|
5027
|
+
//#region src/lib/group-by-first-seen.ts
|
|
5028
|
+
/**
|
|
5029
|
+
* Buckets `items` by `getGroupKey`, keeping groups in first-seen order and items in `items` order.
|
|
5030
|
+
* Shared by `DataCombobox` and `DataTree` so both group the same way.
|
|
5031
|
+
*
|
|
5032
|
+
* @internal Not exported from `src/index.ts`.
|
|
5033
|
+
*/
|
|
5034
|
+
function groupByFirstSeen(items, getGroupKey) {
|
|
5035
|
+
const groups = /* @__PURE__ */ new Map();
|
|
5036
|
+
for (const item of items) {
|
|
5037
|
+
const groupKey = getGroupKey(item);
|
|
5038
|
+
const bucket = groups.get(groupKey);
|
|
5039
|
+
if (bucket) bucket.push(item);
|
|
5040
|
+
else groups.set(groupKey, [item]);
|
|
5041
|
+
}
|
|
5042
|
+
return groups;
|
|
5043
|
+
}
|
|
5044
|
+
//#endregion
|
|
5027
5045
|
//#region src/components/combobox-rows.tsx
|
|
5028
5046
|
const DEFAULT_SKELETON_COUNT = 5;
|
|
5029
5047
|
const DEFAULT_ROW_HEIGHT = 36;
|
|
@@ -5041,14 +5059,7 @@ const VIRTUAL_ROW_OVERSCAN = 8;
|
|
|
5041
5059
|
function useComboboxItemGroups(items, getGroupKey, getGroupLabel) {
|
|
5042
5060
|
return React.useMemo(() => {
|
|
5043
5061
|
if (!getGroupKey) return null;
|
|
5044
|
-
|
|
5045
|
-
for (const item of items) {
|
|
5046
|
-
const gk = getGroupKey(item);
|
|
5047
|
-
const bucket = byKey.get(gk);
|
|
5048
|
-
if (bucket) bucket.push(item);
|
|
5049
|
-
else byKey.set(gk, [item]);
|
|
5050
|
-
}
|
|
5051
|
-
return Array.from(byKey, ([groupKey, groupItems]) => ({
|
|
5062
|
+
return Array.from(groupByFirstSeen(items, getGroupKey), ([groupKey, groupItems]) => ({
|
|
5052
5063
|
groupKey,
|
|
5053
5064
|
label: getGroupLabel ? getGroupLabel(groupKey) : groupKey,
|
|
5054
5065
|
items: groupItems
|
|
@@ -5607,14 +5618,17 @@ const _excluded5$11 = [
|
|
|
5607
5618
|
"children",
|
|
5608
5619
|
"className"
|
|
5609
5620
|
];
|
|
5610
|
-
const _excluded6$
|
|
5621
|
+
const _excluded6$10 = ["className"];
|
|
5611
5622
|
const TreeContext = React.createContext({
|
|
5612
5623
|
currentItem: void 0,
|
|
5613
5624
|
indent: 20,
|
|
5614
5625
|
tree: void 0
|
|
5615
5626
|
});
|
|
5627
|
+
function getTreeContext() {
|
|
5628
|
+
return TreeContext;
|
|
5629
|
+
}
|
|
5616
5630
|
function useTreeContext() {
|
|
5617
|
-
return React.useContext(
|
|
5631
|
+
return React.useContext(getTreeContext());
|
|
5618
5632
|
}
|
|
5619
5633
|
/**
|
|
5620
5634
|
* Root tree container. Renders a flex-column `<div>` and provides the tree
|
|
@@ -5636,11 +5650,12 @@ function useTreeContext() {
|
|
|
5636
5650
|
*/
|
|
5637
5651
|
function Tree(_ref) {
|
|
5638
5652
|
let { indent = 20, tree, className } = _ref, props = _objectWithoutProperties(_ref, _excluded$34);
|
|
5653
|
+
const TreeContextProvider = getTreeContext().Provider;
|
|
5639
5654
|
const containerProps = tree && typeof tree.getContainerProps === "function" ? tree.getContainerProps() : {};
|
|
5640
5655
|
const mergedProps = _objectSpread2(_objectSpread2({}, props), containerProps);
|
|
5641
5656
|
const { style: propStyle } = mergedProps, otherProps = _objectWithoutProperties(mergedProps, _excluded2$23);
|
|
5642
5657
|
const mergedStyle = _objectSpread2(_objectSpread2({}, propStyle), {}, { "--tree-indent": `${indent}px` });
|
|
5643
|
-
return /* @__PURE__ */ jsx(
|
|
5658
|
+
return /* @__PURE__ */ jsx(TreeContextProvider, {
|
|
5644
5659
|
value: {
|
|
5645
5660
|
indent,
|
|
5646
5661
|
tree
|
|
@@ -5664,6 +5679,7 @@ const ACTIVATION_KEYS = /* @__PURE__ */ new Set([
|
|
|
5664
5679
|
*/
|
|
5665
5680
|
function TreeItem(_ref2) {
|
|
5666
5681
|
let { item, className, children, onActivate, onClick: userOnClick, onKeyDown: userOnKeyDown, style: userStyle } = _ref2, props = _objectWithoutProperties(_ref2, _excluded3$18);
|
|
5682
|
+
const TreeContextProvider = getTreeContext().Provider;
|
|
5667
5683
|
const { indent } = useTreeContext();
|
|
5668
5684
|
const _ref3 = typeof item.getProps === "function" ? item.getProps() : {}, { style: itemStyle, onClick: _headlessOnClick } = _ref3, restItemProps = _objectWithoutProperties(_ref3, _excluded4$15);
|
|
5669
5685
|
const activate = () => {
|
|
@@ -5690,7 +5706,7 @@ function TreeItem(_ref2) {
|
|
|
5690
5706
|
}
|
|
5691
5707
|
};
|
|
5692
5708
|
const mergedStyle = _objectSpread2(_objectSpread2(_objectSpread2({}, userStyle), itemStyle), {}, { "--tree-padding": `${item.getItemMeta().level * indent}px` });
|
|
5693
|
-
return /* @__PURE__ */ jsx(
|
|
5709
|
+
return /* @__PURE__ */ jsx(TreeContextProvider, {
|
|
5694
5710
|
value: {
|
|
5695
5711
|
currentItem: item,
|
|
5696
5712
|
indent
|
|
@@ -5752,7 +5768,7 @@ function TreeItemLabel(_ref4) {
|
|
|
5752
5768
|
* tree instance's `getDragLineStyle()`; renders nothing when no tree is in context.
|
|
5753
5769
|
*/
|
|
5754
5770
|
function TreeDragLine(_ref5) {
|
|
5755
|
-
let { className } = _ref5, props = _objectWithoutProperties(_ref5, _excluded6$
|
|
5771
|
+
let { className } = _ref5, props = _objectWithoutProperties(_ref5, _excluded6$10);
|
|
5756
5772
|
const { tree } = useTreeContext();
|
|
5757
5773
|
if (!tree || typeof tree.getDragLineStyle !== "function") {
|
|
5758
5774
|
console.warn("TreeDragLine: No tree provided via context or tree does not have getDragLineStyle method");
|
|
@@ -5809,14 +5825,17 @@ function buildIndex(items, getKey, getChildren) {
|
|
|
5809
5825
|
* ```
|
|
5810
5826
|
*/
|
|
5811
5827
|
function DataTree(componentProps) {
|
|
5812
|
-
const { items, getKey, getLabel, getChildren, getIcon, getTextValue, selectionMode = "none", selectedKeys, defaultSelectedKeys = [], onSelectionChange, expandedKeys, defaultExpandedKeys = [], onExpandedChange, indent = 20, className, "aria-label": ariaLabel } = componentProps;
|
|
5828
|
+
const { items, getKey, getLabel, getChildren, getIcon, getTextValue, getGroupKey, selectionMode = "none", selectedKeys, defaultSelectedKeys = [], onSelectionChange, expandedKeys, defaultExpandedKeys = [], onExpandedChange, indent = 20, className, "aria-label": ariaLabel } = componentProps;
|
|
5813
5829
|
const selectable = selectionMode !== "none";
|
|
5814
5830
|
const multiple = selectionMode === "multiple";
|
|
5815
|
-
const
|
|
5831
|
+
const groups = React.useMemo(() => getGroupKey ? Array.from(groupByFirstSeen(items, getGroupKey).values()) : null, [items, getGroupKey]);
|
|
5832
|
+
const index = React.useMemo(() => buildIndex(groups ? groups.flat() : items, getKey, getChildren), [
|
|
5833
|
+
groups,
|
|
5816
5834
|
items,
|
|
5817
5835
|
getKey,
|
|
5818
5836
|
getChildren
|
|
5819
5837
|
]);
|
|
5838
|
+
const groupStartKeys = React.useMemo(() => new Set(groups === null || groups === void 0 ? void 0 : groups.slice(1).flatMap((group) => group.slice(0, 1).map(getKey))), [groups, getKey]);
|
|
5820
5839
|
const [expandedItems = [], setExpandedState] = useControllableState({
|
|
5821
5840
|
prop: expandedKeys,
|
|
5822
5841
|
defaultProp: defaultExpandedKeys,
|
|
@@ -5884,7 +5903,11 @@ function DataTree(componentProps) {
|
|
|
5884
5903
|
tree,
|
|
5885
5904
|
children: tree.getItems().map((item) => {
|
|
5886
5905
|
const checkedState = multiple ? item.getCheckedState() : void 0;
|
|
5887
|
-
return /* @__PURE__ */ jsxs(
|
|
5906
|
+
return /* @__PURE__ */ jsxs(React.Fragment, { children: [groupStartKeys.has(item.getId()) ? /* @__PURE__ */ jsx(Separator, {
|
|
5907
|
+
"aria-hidden": true,
|
|
5908
|
+
className: "my-1",
|
|
5909
|
+
"data-slot": "data-tree-separator"
|
|
5910
|
+
}) : null, /* @__PURE__ */ jsxs(TreeItem, {
|
|
5888
5911
|
item,
|
|
5889
5912
|
onActivate: multiple ? () => item.toggleCheckedState() : selectable ? () => item.select() : void 0,
|
|
5890
5913
|
children: [multiple ? /* @__PURE__ */ jsx(Checkbox, {
|
|
@@ -5897,7 +5920,7 @@ function DataTree(componentProps) {
|
|
|
5897
5920
|
return (_item$getCheckboxProp = (_item$getCheckboxProp2 = item.getCheckboxProps()).onChange) === null || _item$getCheckboxProp === void 0 ? void 0 : _item$getCheckboxProp.call(_item$getCheckboxProp2, { target: { checked } });
|
|
5898
5921
|
}
|
|
5899
5922
|
}) : null, renderLabel(item)]
|
|
5900
|
-
}, item.getId());
|
|
5923
|
+
})] }, item.getId());
|
|
5901
5924
|
})
|
|
5902
5925
|
});
|
|
5903
5926
|
}
|
|
@@ -5930,7 +5953,7 @@ const _excluded2$22 = ["className", "variant"];
|
|
|
5930
5953
|
const _excluded3$17 = ["className"];
|
|
5931
5954
|
const _excluded4$14 = ["className", "orientation"];
|
|
5932
5955
|
const _excluded5$10 = ["className"];
|
|
5933
|
-
const _excluded6$
|
|
5956
|
+
const _excluded6$9 = [
|
|
5934
5957
|
"className",
|
|
5935
5958
|
"children",
|
|
5936
5959
|
"necessityIndicator"
|
|
@@ -6055,7 +6078,7 @@ FieldContent.displayName = "FieldContent";
|
|
|
6055
6078
|
* ```
|
|
6056
6079
|
*/
|
|
6057
6080
|
const FieldLabel = React.forwardRef((componentProps, forwardRef) => {
|
|
6058
|
-
const { className, children, necessityIndicator } = componentProps, props = _objectWithoutProperties(componentProps, _excluded6$
|
|
6081
|
+
const { className, children, necessityIndicator } = componentProps, props = _objectWithoutProperties(componentProps, _excluded6$9);
|
|
6059
6082
|
const t = useDsTranslation("ds");
|
|
6060
6083
|
return /* @__PURE__ */ jsxs(Label, _objectSpread2(_objectSpread2({
|
|
6061
6084
|
ref: forwardRef,
|
|
@@ -8315,7 +8338,7 @@ const _excluded5$9 = [
|
|
|
8315
8338
|
"showBar",
|
|
8316
8339
|
"container"
|
|
8317
8340
|
];
|
|
8318
|
-
const _excluded6$
|
|
8341
|
+
const _excluded6$8 = [
|
|
8319
8342
|
"className",
|
|
8320
8343
|
"allowSelection",
|
|
8321
8344
|
"render"
|
|
@@ -8471,7 +8494,7 @@ const DrawerViewport = React.forwardRef((componentProps, forwardRef) => {
|
|
|
8471
8494
|
const { className, position, variant = "default", inContainer } = componentProps, props = _objectWithoutProperties(componentProps, _excluded4$13);
|
|
8472
8495
|
return /* @__PURE__ */ jsx(DrawerPrimitive.Viewport, _objectSpread2({
|
|
8473
8496
|
ref: forwardRef,
|
|
8474
|
-
className: cn("inset-0 z-50 [--bleed:--spacing(12)] [--inset
|
|
8497
|
+
className: cn("inset-0 z-50 [--bleed:--spacing(12)] [--inset:0px]", inContainer ? "absolute" : "fixed", "touch-none", position === "bottom" && "grid grid-rows-[1fr_auto] pt-12", position === "top" && "grid grid-rows-[auto_1fr] pb-12", position === "left" && "flex justify-start", position === "right" && "flex justify-end", variant === "inset" && "px-(--inset) sm:[--inset:--spacing(4)]", variant === "inset" && position !== "bottom" && "pt-(--inset)", variant === "inset" && position !== "top" && "pb-(--inset)", className),
|
|
8475
8498
|
"data-slot": "drawer-viewport"
|
|
8476
8499
|
}, props));
|
|
8477
8500
|
});
|
|
@@ -8520,7 +8543,7 @@ DrawerPopup.displayName = "DrawerPopup";
|
|
|
8520
8543
|
* Renders a `<div>` (or the `render` element).
|
|
8521
8544
|
*/
|
|
8522
8545
|
const DrawerHeader = React.forwardRef((componentProps, forwardRef) => {
|
|
8523
|
-
const { className, allowSelection = false, render } = componentProps, props = _objectWithoutProperties(componentProps, _excluded6$
|
|
8546
|
+
const { className, allowSelection = false, render } = componentProps, props = _objectWithoutProperties(componentProps, _excluded6$8);
|
|
8524
8547
|
const defaultProps = {
|
|
8525
8548
|
className: cn("flex flex-col gap-2 p-6 in-[[data-slot=drawer-popup]:has([data-slot=drawer-panel])]:pb-3 max-sm:pb-4", !allowSelection && "cursor-default", className),
|
|
8526
8549
|
ref: forwardRef,
|
|
@@ -8850,7 +8873,7 @@ const _excluded5$8 = [
|
|
|
8850
8873
|
"sideOffset",
|
|
8851
8874
|
"className"
|
|
8852
8875
|
];
|
|
8853
|
-
const _excluded6$
|
|
8876
|
+
const _excluded6$7 = [
|
|
8854
8877
|
"className",
|
|
8855
8878
|
"children",
|
|
8856
8879
|
"checked",
|
|
@@ -9025,7 +9048,7 @@ DropdownMenuSubContent.displayName = "DropdownMenuSubContent";
|
|
|
9025
9048
|
* Renders a `<div>` menu item with a trailing check indicator when checked.
|
|
9026
9049
|
*/
|
|
9027
9050
|
const DropdownMenuCheckboxItem = React.forwardRef((componentProps, forwardRef) => {
|
|
9028
|
-
const { className, children, checked, inset } = componentProps, props = _objectWithoutProperties(componentProps, _excluded6$
|
|
9051
|
+
const { className, children, checked, inset } = componentProps, props = _objectWithoutProperties(componentProps, _excluded6$7);
|
|
9029
9052
|
return /* @__PURE__ */ jsxs(Menu.CheckboxItem, _objectSpread2(_objectSpread2({
|
|
9030
9053
|
ref: forwardRef,
|
|
9031
9054
|
"data-slot": "dropdown-menu-checkbox-item",
|
|
@@ -9115,7 +9138,7 @@ const _excluded2$17 = ["className"];
|
|
|
9115
9138
|
const _excluded3$13 = ["className", "variant"];
|
|
9116
9139
|
const _excluded4$11 = ["className"];
|
|
9117
9140
|
const _excluded5$7 = ["className"];
|
|
9118
|
-
const _excluded6$
|
|
9141
|
+
const _excluded6$6 = ["className"];
|
|
9119
9142
|
/**
|
|
9120
9143
|
* Empty-state container that centers its content (media, text, and actions).
|
|
9121
9144
|
* Renders a `<div>`; compose it with `EmptyHeader`, `EmptyMedia`, `EmptyTitle`,
|
|
@@ -9209,7 +9232,7 @@ EmptyDescription.displayName = "EmptyDescription";
|
|
|
9209
9232
|
* Region below the header for actions or extra content (e.g. buttons). Renders a `<div>`.
|
|
9210
9233
|
*/
|
|
9211
9234
|
const EmptyContent = React.forwardRef((componentProps, forwardRef) => {
|
|
9212
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded6$
|
|
9235
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded6$6);
|
|
9213
9236
|
return /* @__PURE__ */ jsx("div", _objectSpread2({
|
|
9214
9237
|
ref: forwardRef,
|
|
9215
9238
|
"data-slot": "empty-content",
|
|
@@ -9245,7 +9268,7 @@ const _excluded2$16 = [
|
|
|
9245
9268
|
const _excluded3$12 = ["variant"];
|
|
9246
9269
|
const _excluded4$10 = ["className"];
|
|
9247
9270
|
const _excluded5$6 = ["className"];
|
|
9248
|
-
const _excluded6$
|
|
9271
|
+
const _excluded6$5 = ["render", "onClick"];
|
|
9249
9272
|
const DropzoneContext = React.createContext(null);
|
|
9250
9273
|
function useDropzoneContext() {
|
|
9251
9274
|
const ctx = React.useContext(DropzoneContext);
|
|
@@ -9522,7 +9545,7 @@ DropzoneActions.displayName = "DropzoneActions";
|
|
|
9522
9545
|
* `render` (Base UI convention) to substitute another element.
|
|
9523
9546
|
*/
|
|
9524
9547
|
const DropzoneTrigger = React.forwardRef((componentProps, forwardRef) => {
|
|
9525
|
-
const { render, onClick } = componentProps, props = _objectWithoutProperties(componentProps, _excluded6$
|
|
9548
|
+
const { render, onClick } = componentProps, props = _objectWithoutProperties(componentProps, _excluded6$5);
|
|
9526
9549
|
const { open, disabled } = useDropzoneContext();
|
|
9527
9550
|
return useRender({
|
|
9528
9551
|
defaultTagName: "button",
|
|
@@ -10966,7 +10989,7 @@ const _excluded3$8 = [
|
|
|
10966
10989
|
];
|
|
10967
10990
|
const _excluded4$7 = ["className", "variant"];
|
|
10968
10991
|
const _excluded5$5 = ["className"];
|
|
10969
|
-
const _excluded6$
|
|
10992
|
+
const _excluded6$4 = ["className"];
|
|
10970
10993
|
const _excluded7$1 = ["className"];
|
|
10971
10994
|
const _excluded8$1 = ["className"];
|
|
10972
10995
|
const _excluded9$1 = ["className"];
|
|
@@ -11095,7 +11118,7 @@ ItemContent.displayName = "ItemContent";
|
|
|
11095
11118
|
* Primary title line of an `Item`. Renders a `<div>` in medium-weight text clamped to one line.
|
|
11096
11119
|
*/
|
|
11097
11120
|
const ItemTitle = React.forwardRef((componentProps, forwardRef) => {
|
|
11098
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded6$
|
|
11121
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded6$4);
|
|
11099
11122
|
return /* @__PURE__ */ jsx("div", _objectSpread2({
|
|
11100
11123
|
ref: forwardRef,
|
|
11101
11124
|
"data-slot": "item-title",
|
|
@@ -11254,7 +11277,7 @@ const _excluded3$6 = [
|
|
|
11254
11277
|
];
|
|
11255
11278
|
const _excluded4$6 = ["className", "text"];
|
|
11256
11279
|
const _excluded5$4 = ["className", "text"];
|
|
11257
|
-
const _excluded6$
|
|
11280
|
+
const _excluded6$3 = ["className"];
|
|
11258
11281
|
/**
|
|
11259
11282
|
* Root navigation container for a set of pagination controls.
|
|
11260
11283
|
* Renders a `<nav role="navigation">` with a localized `aria-label`.
|
|
@@ -11377,7 +11400,7 @@ PaginationNext.displayName = "PaginationNext";
|
|
|
11377
11400
|
* `aria-hidden` `<span>` with an ellipsis icon and screen-reader-only text.
|
|
11378
11401
|
*/
|
|
11379
11402
|
const PaginationEllipsis = React.forwardRef((componentProps, forwardRef) => {
|
|
11380
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded6$
|
|
11403
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded6$3);
|
|
11381
11404
|
return /* @__PURE__ */ jsxs("span", _objectSpread2(_objectSpread2({
|
|
11382
11405
|
ref: forwardRef,
|
|
11383
11406
|
"aria-hidden": true,
|
|
@@ -12897,7 +12920,7 @@ const _excluded2$3 = [
|
|
|
12897
12920
|
const _excluded3$3 = ["className"];
|
|
12898
12921
|
const _excluded4$3 = ["className"];
|
|
12899
12922
|
const _excluded5$2 = ["className"];
|
|
12900
|
-
const _excluded6$
|
|
12923
|
+
const _excluded6$2 = ["className"];
|
|
12901
12924
|
/**
|
|
12902
12925
|
* Root container for a sheet (a Dialog that slides in from a screen edge),
|
|
12903
12926
|
* wrapping Base UI's `Dialog.Root`. Manages open/close state and renders no DOM
|
|
@@ -13026,7 +13049,7 @@ SheetTitle.displayName = "SheetTitle";
|
|
|
13026
13049
|
* Renders a `<p>` and describes the sheet for assistive technology.
|
|
13027
13050
|
*/
|
|
13028
13051
|
const SheetDescription = React.forwardRef((componentProps, forwardRef) => {
|
|
13029
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded6$
|
|
13052
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded6$2);
|
|
13030
13053
|
return /* @__PURE__ */ jsx(Dialog$1.Description, _objectSpread2({
|
|
13031
13054
|
ref: forwardRef,
|
|
13032
13055
|
"data-slot": "sheet-description",
|
|
@@ -13071,7 +13094,7 @@ const _excluded2$2 = [
|
|
|
13071
13094
|
const _excluded3$2 = ["className", "onClick"];
|
|
13072
13095
|
const _excluded4$2 = ["className"];
|
|
13073
13096
|
const _excluded5$1 = ["className"];
|
|
13074
|
-
const _excluded6 = ["className"];
|
|
13097
|
+
const _excluded6$1 = ["className"];
|
|
13075
13098
|
const _excluded7 = ["className"];
|
|
13076
13099
|
const _excluded8 = ["className"];
|
|
13077
13100
|
const _excluded9 = ["className"];
|
|
@@ -13334,7 +13357,7 @@ SidebarInset.displayName = "SidebarInset";
|
|
|
13334
13357
|
* Search/filter input styled for the sidebar. Renders an `Input` (`<input>`).
|
|
13335
13358
|
*/
|
|
13336
13359
|
const SidebarInput = React.forwardRef((componentProps, forwardRef) => {
|
|
13337
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded6);
|
|
13360
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded6$1);
|
|
13338
13361
|
return /* @__PURE__ */ jsx(Input, _objectSpread2({
|
|
13339
13362
|
ref: forwardRef,
|
|
13340
13363
|
"data-slot": "sidebar-input",
|
|
@@ -13766,14 +13789,11 @@ const _excluded$2 = [
|
|
|
13766
13789
|
"value",
|
|
13767
13790
|
"onValueChange"
|
|
13768
13791
|
];
|
|
13769
|
-
const _excluded2$1 = ["
|
|
13770
|
-
const _excluded3$1 = [
|
|
13771
|
-
"steps",
|
|
13772
|
-
"className",
|
|
13773
|
-
"children"
|
|
13774
|
-
];
|
|
13792
|
+
const _excluded2$1 = ["className"];
|
|
13793
|
+
const _excluded3$1 = ["className"];
|
|
13775
13794
|
const _excluded4$1 = ["className"];
|
|
13776
|
-
const _excluded5 = [
|
|
13795
|
+
const _excluded5 = ["className"];
|
|
13796
|
+
const _excluded6 = [
|
|
13777
13797
|
"value",
|
|
13778
13798
|
"forceMount",
|
|
13779
13799
|
"className"
|
|
@@ -13781,8 +13801,8 @@ const _excluded5 = [
|
|
|
13781
13801
|
const StepperContext = React.createContext(void 0);
|
|
13782
13802
|
/**
|
|
13783
13803
|
* Reads the current `Stepper` context. Must be called inside a `Stepper`.
|
|
13784
|
-
* @returns `{ activeId, goTo, getIndex, steps }
|
|
13785
|
-
*
|
|
13804
|
+
* @returns `{ activeId, goTo, getIndex, steps }`: the active step id, a setter to
|
|
13805
|
+
* navigate to a step id, an id-to-index lookup and the full step list.
|
|
13786
13806
|
* @throws if used outside a `Stepper`.
|
|
13787
13807
|
*/
|
|
13788
13808
|
function useStepper() {
|
|
@@ -13796,11 +13816,11 @@ function useStepper() {
|
|
|
13796
13816
|
*
|
|
13797
13817
|
* @example
|
|
13798
13818
|
* ```tsx
|
|
13799
|
-
* const steps = [{ id: 'account' }, { id: 'profile'
|
|
13819
|
+
* const steps = [{ id: 'account', title: 'Account' }, { id: 'profile', title: 'Profile' }];
|
|
13800
13820
|
*
|
|
13801
13821
|
* <Stepper steps={steps} defaultValue="account">
|
|
13802
13822
|
* <StepperProgress />
|
|
13803
|
-
* <
|
|
13823
|
+
* <StepperTitles />
|
|
13804
13824
|
* <StepperContent value="account">…</StepperContent>
|
|
13805
13825
|
* <StepperContent value="profile">…</StepperContent>
|
|
13806
13826
|
* </Stepper>
|
|
@@ -13838,58 +13858,88 @@ const Stepper = React.forwardRef((componentProps, forwardRef) => {
|
|
|
13838
13858
|
});
|
|
13839
13859
|
Stepper.displayName = "Stepper";
|
|
13840
13860
|
/**
|
|
13841
|
-
*
|
|
13842
|
-
*
|
|
13843
|
-
*
|
|
13861
|
+
* Decorative, non-interactive segment bar. Titles, counters and surrounding flow content
|
|
13862
|
+
* provide meaningful text; the bar adds no accessible position label.
|
|
13863
|
+
* Hovering a segment shows its canonical step title in a tooltip.
|
|
13844
13864
|
*/
|
|
13845
13865
|
const StepperProgress = React.forwardRef((componentProps, forwardRef) => {
|
|
13846
|
-
const {
|
|
13866
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded2$1);
|
|
13847
13867
|
const { activeId, getIndex, steps } = useStepper();
|
|
13848
|
-
const ids = stepIds !== null && stepIds !== void 0 ? stepIds : steps.map((s) => s.id);
|
|
13849
13868
|
const currentIndex = getIndex(activeId);
|
|
13850
13869
|
return /* @__PURE__ */ jsx("div", _objectSpread2(_objectSpread2({
|
|
13851
13870
|
ref: forwardRef,
|
|
13852
13871
|
"data-slot": "stepper-progress",
|
|
13853
13872
|
"aria-hidden": "true",
|
|
13854
|
-
className: cn("flex w-full items-
|
|
13855
|
-
}, props), {}, { children:
|
|
13856
|
-
|
|
13857
|
-
|
|
13858
|
-
"
|
|
13859
|
-
|
|
13860
|
-
|
|
13861
|
-
|
|
13873
|
+
className: cn("flex w-full items-start gap-1.5", className)
|
|
13874
|
+
}, props), {}, { children: /* @__PURE__ */ jsx(TooltipProvider, {
|
|
13875
|
+
delay: 300,
|
|
13876
|
+
children: steps.map(({ id, title }, idx) => {
|
|
13877
|
+
const state = idx < currentIndex ? "completed" : idx === currentIndex ? "active" : "inactive";
|
|
13878
|
+
const itemProps = {
|
|
13879
|
+
"data-slot": "stepper-progress-item",
|
|
13880
|
+
"data-state": state,
|
|
13881
|
+
className: "relative flex min-w-0 flex-1 before:absolute before:inset-x-0 before:-inset-y-1.5"
|
|
13882
|
+
};
|
|
13883
|
+
const segment = /* @__PURE__ */ jsx("span", {
|
|
13884
|
+
"data-slot": "stepper-progress-segment",
|
|
13885
|
+
"data-state": state,
|
|
13886
|
+
className: "bg-muted-foreground/20 h-1.5 w-full rounded-full transition-colors duration-300 data-[state=active]:bg-primary data-[state=completed]:bg-primary"
|
|
13887
|
+
});
|
|
13888
|
+
if (!title) return /* @__PURE__ */ jsx("span", _objectSpread2(_objectSpread2({}, itemProps), {}, { children: segment }), id);
|
|
13889
|
+
return /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, _objectSpread2(_objectSpread2({ render: /* @__PURE__ */ jsx("span", {}) }, itemProps), {}, { children: segment })), /* @__PURE__ */ jsx(TooltipContent, { children: title })] }, id);
|
|
13890
|
+
})
|
|
13862
13891
|
}) }));
|
|
13863
13892
|
});
|
|
13864
13893
|
StepperProgress.displayName = "StepperProgress";
|
|
13865
13894
|
/**
|
|
13866
|
-
* "Step x of y"
|
|
13867
|
-
*
|
|
13895
|
+
* Localized "Step x of y" line derived from the root's ordered steps.
|
|
13896
|
+
* Renders a `<p>` in the muted foreground colour.
|
|
13868
13897
|
*/
|
|
13869
13898
|
const StepperCounter = React.forwardRef((componentProps, forwardRef) => {
|
|
13870
|
-
const {
|
|
13871
|
-
const { activeId, steps } = useStepper();
|
|
13872
|
-
const
|
|
13873
|
-
|
|
13874
|
-
return /* @__PURE__ */ jsxs("p", _objectSpread2(_objectSpread2({
|
|
13899
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded3$1);
|
|
13900
|
+
const { activeId, getIndex, steps } = useStepper();
|
|
13901
|
+
const t = useDsTranslation("ds");
|
|
13902
|
+
return /* @__PURE__ */ jsx("p", _objectSpread2(_objectSpread2({
|
|
13875
13903
|
ref: forwardRef,
|
|
13876
13904
|
"data-slot": "stepper-counter",
|
|
13877
|
-
className: cn("text-muted-foreground text-xs
|
|
13878
|
-
}, props), {}, { children:
|
|
13879
|
-
|
|
13880
|
-
|
|
13881
|
-
|
|
13882
|
-
ids.length,
|
|
13883
|
-
children
|
|
13884
|
-
] }));
|
|
13905
|
+
className: cn("text-muted-foreground text-xs [[data-slot=stepper-progress]~&]:pt-1", className)
|
|
13906
|
+
}, props), {}, { children: t("stepper.counter", {
|
|
13907
|
+
current: getIndex(activeId) + 1,
|
|
13908
|
+
total: steps.length
|
|
13909
|
+
}) }));
|
|
13885
13910
|
});
|
|
13886
13911
|
StepperCounter.displayName = "StepperCounter";
|
|
13887
13912
|
/**
|
|
13913
|
+
* Ordered list of step titles, aligned with the progress segments.
|
|
13914
|
+
* Uses foreground for completed and active titles, muted foreground for upcoming titles.
|
|
13915
|
+
* Keep contextual explanations in the step body rather than changing its canonical title.
|
|
13916
|
+
*/
|
|
13917
|
+
const StepperTitles = React.forwardRef((componentProps, forwardRef) => {
|
|
13918
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded4$1);
|
|
13919
|
+
const { activeId, getIndex, steps } = useStepper();
|
|
13920
|
+
const currentIndex = getIndex(activeId);
|
|
13921
|
+
return /* @__PURE__ */ jsx("ol", _objectSpread2(_objectSpread2({
|
|
13922
|
+
ref: forwardRef,
|
|
13923
|
+
"data-slot": "stepper-titles",
|
|
13924
|
+
className: cn("flex w-full items-start gap-1.5 text-xs [[data-slot=stepper-progress]~&]:pt-1", className)
|
|
13925
|
+
}, props), {}, { children: steps.map(({ id, title }, index) => {
|
|
13926
|
+
const state = index < currentIndex ? "completed" : index === currentIndex ? "active" : "inactive";
|
|
13927
|
+
return /* @__PURE__ */ jsx("li", {
|
|
13928
|
+
"data-slot": "stepper-title",
|
|
13929
|
+
"data-state": state,
|
|
13930
|
+
"aria-current": state === "active" ? "step" : void 0,
|
|
13931
|
+
className: "text-foreground min-w-0 flex-1 data-[state=inactive]:text-muted-foreground",
|
|
13932
|
+
children: title
|
|
13933
|
+
}, id);
|
|
13934
|
+
}) }));
|
|
13935
|
+
});
|
|
13936
|
+
StepperTitles.displayName = "StepperTitles";
|
|
13937
|
+
/**
|
|
13888
13938
|
* Container for the step body, tagged with the active step id via `data-state`.
|
|
13889
13939
|
* Renders a `<div>`.
|
|
13890
13940
|
*/
|
|
13891
13941
|
const StepperPanel = React.forwardRef((componentProps, forwardRef) => {
|
|
13892
|
-
const { className } = componentProps, props = _objectWithoutProperties(componentProps,
|
|
13942
|
+
const { className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded5);
|
|
13893
13943
|
const { activeId } = useStepper();
|
|
13894
13944
|
return /* @__PURE__ */ jsx("div", _objectSpread2({
|
|
13895
13945
|
ref: forwardRef,
|
|
@@ -13904,7 +13954,7 @@ StepperPanel.displayName = "StepperPanel";
|
|
|
13904
13954
|
* Renders a `<div>` (or `null` when inactive and not force-mounted).
|
|
13905
13955
|
*/
|
|
13906
13956
|
const StepperContent = React.forwardRef((componentProps, forwardRef) => {
|
|
13907
|
-
const { value, forceMount, className } = componentProps, props = _objectWithoutProperties(componentProps,
|
|
13957
|
+
const { value, forceMount, className } = componentProps, props = _objectWithoutProperties(componentProps, _excluded6);
|
|
13908
13958
|
const { activeId } = useStepper();
|
|
13909
13959
|
const isActive = value === activeId;
|
|
13910
13960
|
if (!forceMount && !isActive) return null;
|
|
@@ -14127,4 +14177,4 @@ function useAudioGauge(options = {}) {
|
|
|
14127
14177
|
};
|
|
14128
14178
|
}
|
|
14129
14179
|
//#endregion
|
|
14130
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActionBar, ActionBarButton, ActionBarContext, ActionBarHeight, Alert, AlertAction, AlertAction as BannerAction, AlertDescription, AlertDescription as BannerDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AlertTitle as BannerTitle, Anchor, Attachment, AttachmentAction, AttachmentActions, AttachmentContent, AttachmentDescription, AttachmentGroup, AttachmentMedia, AttachmentTitle, AttachmentTrigger, Audio, AudioPlayerBar, AudioPlayerButton, AudioPlayerCurrentTime, AudioPlayerDuration, AudioPlayerManager, AudioPlayerRow, AudioPlayerSkip, AudioPlayerSpeed, AudioPlayerTime, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, BadgeGroup, BadgeGroupCount, Banner, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, COMBOBOX_AUTO_SEARCH_THRESHOLD, COMBOBOX_AUTO_VIRTUALIZE_THRESHOLD, Calendar, CalendarDayButton, CalendarDropdown, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, Chip, ChipRemove, Collapsible, CollapsibleContent, CollapsibleTrigger, ColorPicker, ColorPickerArea, ColorPickerContent, ColorPickerHexField, ColorPickerHue, ColorPickerModeToggle, ColorPickerPanel, ColorPickerPresets, ColorPickerTrigger, Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, CounterBadge, CountryFlag, DataCombobox, DataTable, DataTree, DatePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerBackdrop, DrawerBar, DrawerClose, DrawerContent, DrawerCreateHandle, DrawerDescription, DrawerFooter, DrawerHeader, DrawerMenu, DrawerMenuCheckboxItem, DrawerMenuGroup, DrawerMenuGroupLabel, DrawerMenuItem, DrawerMenuRadioGroup, DrawerMenuRadioItem, DrawerMenuSeparator, DrawerMenuTrigger, DrawerPanel, DrawerPopup, DrawerPortal, DrawerPrimitive, DrawerSwipeArea, DrawerTitle, DrawerTrigger, DrawerViewport, DropdownMenu, DropdownMenuAddon, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Dropzone, DropzoneActions, DropzoneContent, DropzoneDescription, DropzoneIcon, DropzoneTitle, DropzoneTrigger, DsI18nProvider, EmojiPicker, EmojiPickerCategories, EmojiPickerContent, EmojiPickerTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, FAB, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLabelAside, FieldLabelInfo, FieldLabelRow, FieldLegend, FieldSeparator, FieldSet, FieldTitle, Gauge, HoverCard, HoverCardContent, HoverCardTrigger, InlineEditInput, InlineEditMultiCombobox, InlineEditMultiComboboxChip, InlineEditMultiComboboxChips, InlineEditMultiComboboxContent, InlineEditMultiComboboxItem, InlineEditMultiComboboxTrigger, InlineEditMultiComboboxValue, InlineEditSelect, InlineEditSelectContent, InlineEditSelectItem, InlineEditSelectTrigger, InlineEditSelectValue, InlineEditTextarea, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupRichTextarea, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, LEGACY_COLOR_PRESETS, Label, List, ListCol, ListRow, NotificationQueueProvider, NotificationSlot, NumericInput, NumericInputControl, NumericInputDecrement, NumericInputIncrement, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverClose, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, Progress, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue, RadioGroup, RadioGroupItem, RichTextarea, RichTextareaContent, RichTextareaRoot, RichTextareaToolbar, SUPPORTED_LANGUAGES, ScrollArea, ScrollAreaPrimitive, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Spinner, Stepper, StepperContent, StepperCounter, StepperPanel, StepperProgress, Switch, Table, TableBody, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThemeProvider, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Tree, TreeDragLine, TreeItem, TreeItemLabel, alertVariants, anchorVariants, bannerVariants, buttonGroupVariants, buttonVariants, cardVariants, cn, counterBadgeVariants, detectInitialLanguage, fabVariants, isInsideCalendarDropdown, registerI18nNamespace, selectTriggerVariants, spinnerVariants, syncDsLanguage, toast, toggleVariants, useAudioGauge, useAudioPlayer, useAudioPlayerTime, useComboboxAnchor, useDsLocale, useDsTranslation, useNotification, useNotificationQueue, useSidebar, useStepper, useTheme };
|
|
14180
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActionBar, ActionBarButton, ActionBarContext, ActionBarHeight, Alert, AlertAction, AlertAction as BannerAction, AlertDescription, AlertDescription as BannerDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AlertTitle as BannerTitle, Anchor, Attachment, AttachmentAction, AttachmentActions, AttachmentContent, AttachmentDescription, AttachmentGroup, AttachmentMedia, AttachmentTitle, AttachmentTrigger, Audio, AudioPlayerBar, AudioPlayerButton, AudioPlayerCurrentTime, AudioPlayerDuration, AudioPlayerManager, AudioPlayerRow, AudioPlayerSkip, AudioPlayerSpeed, AudioPlayerTime, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, BadgeGroup, BadgeGroupCount, Banner, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, COMBOBOX_AUTO_SEARCH_THRESHOLD, COMBOBOX_AUTO_VIRTUALIZE_THRESHOLD, Calendar, CalendarDayButton, CalendarDropdown, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, Chip, ChipRemove, Collapsible, CollapsibleContent, CollapsibleTrigger, ColorPicker, ColorPickerArea, ColorPickerContent, ColorPickerHexField, ColorPickerHue, ColorPickerModeToggle, ColorPickerPanel, ColorPickerPresets, ColorPickerTrigger, Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, CounterBadge, CountryFlag, DataCombobox, DataTable, DataTree, DatePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerBackdrop, DrawerBar, DrawerClose, DrawerContent, DrawerCreateHandle, DrawerDescription, DrawerFooter, DrawerHeader, DrawerMenu, DrawerMenuCheckboxItem, DrawerMenuGroup, DrawerMenuGroupLabel, DrawerMenuItem, DrawerMenuRadioGroup, DrawerMenuRadioItem, DrawerMenuSeparator, DrawerMenuTrigger, DrawerPanel, DrawerPopup, DrawerPortal, DrawerPrimitive, DrawerSwipeArea, DrawerTitle, DrawerTrigger, DrawerViewport, DropdownMenu, DropdownMenuAddon, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Dropzone, DropzoneActions, DropzoneContent, DropzoneDescription, DropzoneIcon, DropzoneTitle, DropzoneTrigger, DsI18nProvider, EmojiPicker, EmojiPickerCategories, EmojiPickerContent, EmojiPickerTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, FAB, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLabelAside, FieldLabelInfo, FieldLabelRow, FieldLegend, FieldSeparator, FieldSet, FieldTitle, Gauge, HoverCard, HoverCardContent, HoverCardTrigger, InlineEditInput, InlineEditMultiCombobox, InlineEditMultiComboboxChip, InlineEditMultiComboboxChips, InlineEditMultiComboboxContent, InlineEditMultiComboboxItem, InlineEditMultiComboboxTrigger, InlineEditMultiComboboxValue, InlineEditSelect, InlineEditSelectContent, InlineEditSelectItem, InlineEditSelectTrigger, InlineEditSelectValue, InlineEditTextarea, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupRichTextarea, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, LEGACY_COLOR_PRESETS, Label, List, ListCol, ListRow, NotificationQueueProvider, NotificationSlot, NumericInput, NumericInputControl, NumericInputDecrement, NumericInputIncrement, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverClose, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, Progress, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue, RadioGroup, RadioGroupItem, RichTextarea, RichTextareaContent, RichTextareaRoot, RichTextareaToolbar, SUPPORTED_LANGUAGES, ScrollArea, ScrollAreaPrimitive, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Spinner, Stepper, StepperContent, StepperCounter, StepperPanel, StepperProgress, StepperTitles, Switch, Table, TableBody, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThemeProvider, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Tree, TreeDragLine, TreeItem, TreeItemLabel, alertVariants, anchorVariants, bannerVariants, buttonGroupVariants, buttonVariants, cardVariants, cn, counterBadgeVariants, detectInitialLanguage, fabVariants, isInsideCalendarDropdown, registerI18nNamespace, selectTriggerVariants, spinnerVariants, syncDsLanguage, toast, toggleVariants, useAudioGauge, useAudioPlayer, useAudioPlayerTime, useComboboxAnchor, useDsLocale, useDsTranslation, useNotification, useNotificationQueue, useSidebar, useStepper, useTheme };
|