@ostack.tech/ui 1.3.0-beta.1 → 1.3.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/LICENSE +202 -0
- package/README.md +13 -1
- package/dist/chunks/{en-W4OWqPrv.js → en-Czf-_HZt.js} +9 -11
- package/dist/chunks/en-Czf-_HZt.js.map +1 -0
- package/dist/locales/en-GB.js +1 -1
- package/dist/locales/en-US.js +1 -1
- package/dist/locales/fr-FR.js +8 -10
- package/dist/locales/fr-FR.js.map +1 -1
- package/dist/locales/pt-PT.js +8 -10
- package/dist/locales/pt-PT.js.map +1 -1
- package/dist/ostack-ui.css +69 -6
- package/dist/ostack-ui.js +904 -557
- package/dist/ostack-ui.js.map +1 -1
- package/package.json +4 -2
- package/scss/_utils.scss +1 -0
- package/scss/components/ButtonGroup/_ButtonGroup.scss +2 -5
- package/scss/components/Pagination/_Pagination-variables.scss +89 -0
- package/scss/components/Pagination/_Pagination.scss +135 -0
- package/scss/components/Select/_Select-variables.scss +1 -1
- package/scss/components/Tabs/_Tabs-variables.scss +1 -1
- package/scss/components/Tabs/_Tabs.scss +3 -2
- package/scss/index.scss +1 -0
- package/scss/scss/placeholders/button/_button-variables.scss +3 -0
- package/scss/scss/placeholders/button/_button.scss +4 -3
- package/scss/scss/placeholders/menu/_menu-variables.scss +4 -1
- package/scss/scss/placeholders/menu/_menu.scss +4 -0
- package/types/components/Alert/Alert.d.ts +1 -1
- package/types/components/AlertDialog/AlertDialog.d.ts +0 -1
- package/types/components/AlertDialog/AlertDialogBody.d.ts +2 -2
- package/types/components/AlertDialog/AlertDialogFooter.d.ts +2 -2
- package/types/components/Box/Box.d.ts +1 -1
- package/types/components/CheckboxGroup/CheckboxGroup.d.ts +2 -2
- package/types/components/CommandMenu/CommandMenuItem.d.ts +6 -0
- package/types/components/CommandMenu/cmdk/index.d.ts +2 -2
- package/types/components/Container/Container.d.ts +1 -1
- package/types/components/DataTable/DataTable.d.ts +13 -6
- package/types/components/DataTable/DataTableContent.d.ts +1 -1
- package/types/components/DataTable/DataTablePagination.d.ts +7 -16
- package/types/components/DataTable/DataTableRowsPerPage.d.ts +1 -5
- package/types/components/DataTable/PagedDataTablePagination.d.ts +5 -5
- package/types/components/DataTable/sanitizeProps.d.ts +0 -2
- package/types/components/DateInput/DateInput.d.ts +4 -4
- package/types/components/DateRangeInput/DateRangeInput.d.ts +1 -1
- package/types/components/DropdownMenu/DropdownMenuItem.d.ts +6 -0
- package/types/components/Form/Form.d.ts +12 -3
- package/types/components/Form/FormError.d.ts +3 -2
- package/types/components/Keyboard/Keyboard.d.ts +1 -5
- package/types/components/Link/Link.d.ts +1 -1
- package/types/components/NumericInput/NumericInput.d.ts +4 -4
- package/types/components/Output/Output.d.ts +12 -0
- package/types/components/Pagination/Pagination.d.ts +93 -0
- package/types/components/Pagination/index.d.ts +1 -0
- package/types/components/Pagination/paginationItems.d.ts +7 -0
- package/types/components/Select/Select.d.ts +1 -1
- package/types/components/Separator/Separator.d.ts +1 -1
- package/types/components/Table/TableCell.d.ts +2 -2
- package/types/components/Text/Text.d.ts +2 -6
- package/types/components/Tooltip/Tooltip.d.ts +1 -1
- package/types/index.d.ts +1 -0
- package/types/providers/AlertDialogProvider/AlertDialogProviderContext.d.ts +1 -1
- package/types/providers/LocalizationProvider/LocalizationObject.d.ts +3 -1
- package/types/utils/sanitizeProps.d.ts +2 -0
- package/dist/chunks/en-W4OWqPrv.js.map +0 -1
package/dist/ostack-ui.js
CHANGED
|
@@ -9,7 +9,7 @@ import { BROWSER, DEV } from "esm-env";
|
|
|
9
9
|
import { subscribeWithSelector } from "zustand/middleware";
|
|
10
10
|
import { shallow } from "zustand/shallow";
|
|
11
11
|
import { addMonths, endOfMonth, format, formatISO, isAfter, isBefore, isDate, isEqual, isSameDay, isValid, isWithinInterval, lastDayOfMonth, max, min, parse, parseISO, setMonth, setYear, startOfMonth, startOfYear } from "date-fns";
|
|
12
|
-
import { faArrowDown, faArrowLeft, faArrowRight, faArrowUp, faArrowUpRightFromSquare, faAsterisk, faCaretDown, faCheck,
|
|
12
|
+
import { faAngleDown, faAngleLeft, faAngleRight, faAngleUp, faArrowDown, faArrowLeft, faArrowRight, faArrowUp, faArrowUpRightFromSquare, faAsterisk, faCaretDown, faCheck, faCircleCheck, faCircleExclamation, faCircleInfo, faCircleQuestion, faClose, faEllipsis, faMinus, faRedo, faSearch, faSortDown, faSortUp, faTriangleExclamation } from "@fortawesome/free-solid-svg-icons";
|
|
13
13
|
import { defaultKeybindingsHandlerIgnore, parseKeybinding, tinykeys } from "tinykeys";
|
|
14
14
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
15
15
|
import { useShallow } from "zustand/react/shallow";
|
|
@@ -58,7 +58,6 @@ import fromExponential from "from-exponential";
|
|
|
58
58
|
* AlertDialogAction,
|
|
59
59
|
* AlertDialogBody,
|
|
60
60
|
* AlertDialogCancel,
|
|
61
|
-
* AlertDialogClose,
|
|
62
61
|
* AlertDialogContent,
|
|
63
62
|
* AlertDialogDescription,
|
|
64
63
|
* AlertDialogFooter,
|
|
@@ -4220,7 +4219,7 @@ function Spinner(t0) {
|
|
|
4220
4219
|
* ```tsx
|
|
4221
4220
|
* import { Button, Tooltip } from "@ostack.tech/ui";
|
|
4222
4221
|
*
|
|
4223
|
-
* function BookmarkButton() {
|
|
4222
|
+
* function BookmarkButton() {
|
|
4224
4223
|
* return (
|
|
4225
4224
|
* <Tooltip content="Save for later…">
|
|
4226
4225
|
* <Button>Bookmark</Button>
|
|
@@ -4375,7 +4374,7 @@ var TooltipProvider = Tooltip$1.Provider;
|
|
|
4375
4374
|
* ```
|
|
4376
4375
|
*/
|
|
4377
4376
|
function IconButton(t0) {
|
|
4378
|
-
const $ = c(
|
|
4377
|
+
const $ = c(95);
|
|
4379
4378
|
let active;
|
|
4380
4379
|
let ariaDisabled;
|
|
4381
4380
|
let asChild;
|
|
@@ -4583,31 +4582,37 @@ function IconButton(t0) {
|
|
|
4583
4582
|
} else t15 = $[61];
|
|
4584
4583
|
const t16 = isAriaDisabled || !isButton && disabled || void 0;
|
|
4585
4584
|
let t17;
|
|
4586
|
-
if ($[62] !==
|
|
4587
|
-
t17 = boolDataAttr(
|
|
4588
|
-
$[62] =
|
|
4585
|
+
if ($[62] !== showSpinner) {
|
|
4586
|
+
t17 = boolDataAttr(showSpinner);
|
|
4587
|
+
$[62] = showSpinner;
|
|
4589
4588
|
$[63] = t17;
|
|
4590
4589
|
} else t17 = $[63];
|
|
4591
4590
|
let t18;
|
|
4592
|
-
if ($[64] !==
|
|
4593
|
-
t18 =
|
|
4594
|
-
$[64] =
|
|
4591
|
+
if ($[64] !== active) {
|
|
4592
|
+
t18 = boolDataAttr(active);
|
|
4593
|
+
$[64] = active;
|
|
4595
4594
|
$[65] = t18;
|
|
4596
4595
|
} else t18 = $[65];
|
|
4597
|
-
|
|
4598
|
-
|
|
4599
|
-
|
|
4600
|
-
|
|
4596
|
+
let t19;
|
|
4597
|
+
if ($[66] !== keybinds) {
|
|
4598
|
+
t19 = keybindsToAriaKeyShortcuts(keybinds);
|
|
4599
|
+
$[66] = keybinds;
|
|
4600
|
+
$[67] = t19;
|
|
4601
|
+
} else t19 = $[67];
|
|
4602
|
+
const t20 = !isButton && disabled ? -1 : void 0;
|
|
4603
|
+
let t21;
|
|
4604
|
+
if ($[68] !== marginProps.cssVars || $[69] !== style) {
|
|
4605
|
+
t21 = {
|
|
4601
4606
|
...marginProps.cssVars,
|
|
4602
4607
|
...style
|
|
4603
4608
|
};
|
|
4604
|
-
$[
|
|
4605
|
-
$[
|
|
4606
|
-
$[
|
|
4607
|
-
} else
|
|
4608
|
-
let
|
|
4609
|
-
if ($[
|
|
4610
|
-
|
|
4609
|
+
$[68] = marginProps.cssVars;
|
|
4610
|
+
$[69] = style;
|
|
4611
|
+
$[70] = t21;
|
|
4612
|
+
} else t21 = $[70];
|
|
4613
|
+
let t22;
|
|
4614
|
+
if ($[71] !== As || $[72] !== color || $[73] !== content || $[74] !== disabled || $[75] !== handleClick || $[76] !== marginProps.dataAttrs || $[77] !== nonMarginProps || $[78] !== t12 || $[79] !== t13 || $[80] !== t15 || $[81] !== t16 || $[82] !== t17 || $[83] !== t18 || $[84] !== t19 || $[85] !== t20 || $[86] !== t21) {
|
|
4615
|
+
t22 = /* @__PURE__ */ jsx(As, {
|
|
4611
4616
|
type: t12,
|
|
4612
4617
|
className: t13,
|
|
4613
4618
|
onClick: handleClick,
|
|
@@ -4615,35 +4620,37 @@ function IconButton(t0) {
|
|
|
4615
4620
|
disabled,
|
|
4616
4621
|
"data-disabled": t15,
|
|
4617
4622
|
"aria-disabled": t16,
|
|
4618
|
-
"data-
|
|
4619
|
-
"
|
|
4620
|
-
|
|
4621
|
-
|
|
4623
|
+
"data-spinning": t17,
|
|
4624
|
+
"data-active": t18,
|
|
4625
|
+
"aria-keyshortcuts": t19,
|
|
4626
|
+
tabIndex: t20,
|
|
4627
|
+
style: t21,
|
|
4622
4628
|
...marginProps.dataAttrs,
|
|
4623
4629
|
...nonMarginProps,
|
|
4624
4630
|
children: content
|
|
4625
4631
|
});
|
|
4626
|
-
$[
|
|
4627
|
-
$[
|
|
4628
|
-
$[
|
|
4629
|
-
$[
|
|
4630
|
-
$[
|
|
4631
|
-
$[
|
|
4632
|
-
$[
|
|
4633
|
-
$[
|
|
4634
|
-
$[
|
|
4635
|
-
$[
|
|
4636
|
-
$[
|
|
4637
|
-
$[
|
|
4638
|
-
$[
|
|
4639
|
-
$[
|
|
4640
|
-
$[
|
|
4641
|
-
$[
|
|
4642
|
-
|
|
4643
|
-
|
|
4644
|
-
|
|
4645
|
-
|
|
4646
|
-
|
|
4632
|
+
$[71] = As;
|
|
4633
|
+
$[72] = color;
|
|
4634
|
+
$[73] = content;
|
|
4635
|
+
$[74] = disabled;
|
|
4636
|
+
$[75] = handleClick;
|
|
4637
|
+
$[76] = marginProps.dataAttrs;
|
|
4638
|
+
$[77] = nonMarginProps;
|
|
4639
|
+
$[78] = t12;
|
|
4640
|
+
$[79] = t13;
|
|
4641
|
+
$[80] = t15;
|
|
4642
|
+
$[81] = t16;
|
|
4643
|
+
$[82] = t17;
|
|
4644
|
+
$[83] = t18;
|
|
4645
|
+
$[84] = t19;
|
|
4646
|
+
$[85] = t20;
|
|
4647
|
+
$[86] = t21;
|
|
4648
|
+
$[87] = t22;
|
|
4649
|
+
} else t22 = $[87];
|
|
4650
|
+
const button = t22;
|
|
4651
|
+
let t23;
|
|
4652
|
+
if ($[88] !== button || $[89] !== keybinds || $[90] !== keybindsProps || $[91] !== prefix || $[92] !== tooltipContent || $[93] !== tooltipProps) {
|
|
4653
|
+
t23 = tooltipContent && typeof tooltipContent !== "boolean" || keybinds ? /* @__PURE__ */ jsx(Tooltip, {
|
|
4647
4654
|
...tooltipProps,
|
|
4648
4655
|
content: /* @__PURE__ */ jsxs(Fragment$1, { children: [tooltipContent && /* @__PURE__ */ jsx("div", {
|
|
4649
4656
|
"aria-hidden": true,
|
|
@@ -4656,15 +4663,15 @@ function IconButton(t0) {
|
|
|
4656
4663
|
})] }),
|
|
4657
4664
|
children: button
|
|
4658
4665
|
}) : button;
|
|
4659
|
-
$[
|
|
4660
|
-
$[
|
|
4661
|
-
$[
|
|
4662
|
-
$[
|
|
4663
|
-
$[
|
|
4664
|
-
$[
|
|
4665
|
-
$[
|
|
4666
|
-
} else
|
|
4667
|
-
return
|
|
4666
|
+
$[88] = button;
|
|
4667
|
+
$[89] = keybinds;
|
|
4668
|
+
$[90] = keybindsProps;
|
|
4669
|
+
$[91] = prefix;
|
|
4670
|
+
$[92] = tooltipContent;
|
|
4671
|
+
$[93] = tooltipProps;
|
|
4672
|
+
$[94] = t23;
|
|
4673
|
+
} else t23 = $[94];
|
|
4674
|
+
return t23;
|
|
4668
4675
|
}
|
|
4669
4676
|
// src/components/CloseButton/CloseButton.tsx
|
|
4670
4677
|
/** Component rendering a “close” button. */
|
|
@@ -4883,7 +4890,16 @@ function DialogTrigger(props) {
|
|
|
4883
4890
|
}
|
|
4884
4891
|
// src/components/AlertDialog/AlertDialogBody.tsx
|
|
4885
4892
|
/** Body section of the alert dialog. */
|
|
4886
|
-
|
|
4893
|
+
function AlertDialogBody(props) {
|
|
4894
|
+
const $ = c(2);
|
|
4895
|
+
let t0;
|
|
4896
|
+
if ($[0] !== props) {
|
|
4897
|
+
t0 = /* @__PURE__ */ jsx(DialogBody, { ...props });
|
|
4898
|
+
$[0] = props;
|
|
4899
|
+
$[1] = t0;
|
|
4900
|
+
} else t0 = $[1];
|
|
4901
|
+
return t0;
|
|
4902
|
+
}
|
|
4887
4903
|
// src/components/AlertDialog/AlertDialogCancel.tsx
|
|
4888
4904
|
/**
|
|
4889
4905
|
* Button which closes the alert dialog by cancelling the action. These buttons should be
|
|
@@ -5076,7 +5092,16 @@ function AlertDialogDescription(t0) {
|
|
|
5076
5092
|
}
|
|
5077
5093
|
// src/components/AlertDialog/AlertDialogFooter.tsx
|
|
5078
5094
|
/** Footer section of the alert dialog. */
|
|
5079
|
-
|
|
5095
|
+
function AlertDialogFooter(props) {
|
|
5096
|
+
const $ = c(2);
|
|
5097
|
+
let t0;
|
|
5098
|
+
if ($[0] !== props) {
|
|
5099
|
+
t0 = /* @__PURE__ */ jsx(DialogFooter, { ...props });
|
|
5100
|
+
$[0] = props;
|
|
5101
|
+
$[1] = t0;
|
|
5102
|
+
} else t0 = $[1];
|
|
5103
|
+
return t0;
|
|
5104
|
+
}
|
|
5080
5105
|
// src/components/AlertDialog/AlertDialogHeader.tsx
|
|
5081
5106
|
/** Header section of the alert dialog. */
|
|
5082
5107
|
function AlertDialogHeader(t0) {
|
|
@@ -5194,7 +5219,7 @@ function AlertDialogTrigger(props) {
|
|
|
5194
5219
|
* ```
|
|
5195
5220
|
*/
|
|
5196
5221
|
function Button(t0) {
|
|
5197
|
-
const $ = c(
|
|
5222
|
+
const $ = c(97);
|
|
5198
5223
|
let active;
|
|
5199
5224
|
let ariaDisabled;
|
|
5200
5225
|
let asChild;
|
|
@@ -5377,41 +5402,47 @@ function Button(t0) {
|
|
|
5377
5402
|
} else t16 = $[57];
|
|
5378
5403
|
const t17 = isAriaDisabled || !isButton && disabled || void 0;
|
|
5379
5404
|
let t18;
|
|
5380
|
-
if ($[58] !==
|
|
5381
|
-
t18 = boolDataAttr(
|
|
5382
|
-
$[58] =
|
|
5405
|
+
if ($[58] !== showSpinner) {
|
|
5406
|
+
t18 = boolDataAttr(showSpinner);
|
|
5407
|
+
$[58] = showSpinner;
|
|
5383
5408
|
$[59] = t18;
|
|
5384
5409
|
} else t18 = $[59];
|
|
5385
5410
|
let t19;
|
|
5386
|
-
if ($[60] !==
|
|
5387
|
-
t19 =
|
|
5388
|
-
$[60] =
|
|
5411
|
+
if ($[60] !== active) {
|
|
5412
|
+
t19 = boolDataAttr(active);
|
|
5413
|
+
$[60] = active;
|
|
5389
5414
|
$[61] = t19;
|
|
5390
5415
|
} else t19 = $[61];
|
|
5391
|
-
|
|
5392
|
-
|
|
5393
|
-
|
|
5394
|
-
|
|
5416
|
+
let t20;
|
|
5417
|
+
if ($[62] !== keybinds) {
|
|
5418
|
+
t20 = keybindsToAriaKeyShortcuts(keybinds);
|
|
5419
|
+
$[62] = keybinds;
|
|
5420
|
+
$[63] = t20;
|
|
5421
|
+
} else t20 = $[63];
|
|
5422
|
+
const t21 = !isButton && disabled ? -1 : void 0;
|
|
5423
|
+
let t22;
|
|
5424
|
+
if ($[64] !== marginProps.cssVars || $[65] !== style) {
|
|
5425
|
+
t22 = {
|
|
5395
5426
|
...marginProps.cssVars,
|
|
5396
5427
|
...style
|
|
5397
5428
|
};
|
|
5398
|
-
$[
|
|
5399
|
-
$[
|
|
5400
|
-
$[
|
|
5401
|
-
} else
|
|
5402
|
-
const
|
|
5403
|
-
const
|
|
5404
|
-
let
|
|
5405
|
-
if ($[
|
|
5406
|
-
|
|
5407
|
-
$[
|
|
5408
|
-
$[
|
|
5409
|
-
} else
|
|
5410
|
-
const
|
|
5411
|
-
const
|
|
5412
|
-
let
|
|
5413
|
-
if ($[
|
|
5414
|
-
|
|
5429
|
+
$[64] = marginProps.cssVars;
|
|
5430
|
+
$[65] = style;
|
|
5431
|
+
$[66] = t22;
|
|
5432
|
+
} else t22 = $[66];
|
|
5433
|
+
const t23 = iconPlacement === "start" && spinnerEl;
|
|
5434
|
+
const t24 = iconPlacement === "start" && iconEl;
|
|
5435
|
+
let t25;
|
|
5436
|
+
if ($[67] !== content) {
|
|
5437
|
+
t25 = /* @__PURE__ */ jsx(Slottable, { children: content });
|
|
5438
|
+
$[67] = content;
|
|
5439
|
+
$[68] = t25;
|
|
5440
|
+
} else t25 = $[68];
|
|
5441
|
+
const t26 = iconPlacement === "end" && iconEl;
|
|
5442
|
+
const t27 = iconPlacement === "end" && spinnerEl;
|
|
5443
|
+
let t28;
|
|
5444
|
+
if ($[69] !== As || $[70] !== color || $[71] !== disabled || $[72] !== handleClick || $[73] !== marginProps.dataAttrs || $[74] !== nonMarginProps || $[75] !== t13 || $[76] !== t14 || $[77] !== t16 || $[78] !== t17 || $[79] !== t18 || $[80] !== t19 || $[81] !== t20 || $[82] !== t21 || $[83] !== t22 || $[84] !== t23 || $[85] !== t24 || $[86] !== t25 || $[87] !== t26 || $[88] !== t27) {
|
|
5445
|
+
t28 = /* @__PURE__ */ jsxs(As, {
|
|
5415
5446
|
type: t13,
|
|
5416
5447
|
className: t14,
|
|
5417
5448
|
onClick: handleClick,
|
|
@@ -5419,45 +5450,47 @@ function Button(t0) {
|
|
|
5419
5450
|
disabled,
|
|
5420
5451
|
"data-disabled": t16,
|
|
5421
5452
|
"aria-disabled": t17,
|
|
5422
|
-
"data-
|
|
5423
|
-
"
|
|
5424
|
-
|
|
5425
|
-
|
|
5453
|
+
"data-spinning": t18,
|
|
5454
|
+
"data-active": t19,
|
|
5455
|
+
"aria-keyshortcuts": t20,
|
|
5456
|
+
tabIndex: t21,
|
|
5457
|
+
style: t22,
|
|
5426
5458
|
...marginProps.dataAttrs,
|
|
5427
5459
|
...nonMarginProps,
|
|
5428
5460
|
children: [
|
|
5429
|
-
t22,
|
|
5430
5461
|
t23,
|
|
5431
5462
|
t24,
|
|
5432
5463
|
t25,
|
|
5433
|
-
t26
|
|
5464
|
+
t26,
|
|
5465
|
+
t27
|
|
5434
5466
|
]
|
|
5435
5467
|
});
|
|
5436
|
-
$[
|
|
5437
|
-
$[
|
|
5438
|
-
$[
|
|
5439
|
-
$[
|
|
5440
|
-
$[
|
|
5441
|
-
$[
|
|
5442
|
-
$[
|
|
5443
|
-
$[
|
|
5444
|
-
$[
|
|
5445
|
-
$[
|
|
5446
|
-
$[
|
|
5447
|
-
$[
|
|
5448
|
-
$[
|
|
5449
|
-
$[
|
|
5450
|
-
$[
|
|
5451
|
-
$[
|
|
5452
|
-
$[
|
|
5453
|
-
$[
|
|
5454
|
-
$[
|
|
5455
|
-
$[
|
|
5456
|
-
|
|
5457
|
-
|
|
5458
|
-
|
|
5459
|
-
|
|
5460
|
-
|
|
5468
|
+
$[69] = As;
|
|
5469
|
+
$[70] = color;
|
|
5470
|
+
$[71] = disabled;
|
|
5471
|
+
$[72] = handleClick;
|
|
5472
|
+
$[73] = marginProps.dataAttrs;
|
|
5473
|
+
$[74] = nonMarginProps;
|
|
5474
|
+
$[75] = t13;
|
|
5475
|
+
$[76] = t14;
|
|
5476
|
+
$[77] = t16;
|
|
5477
|
+
$[78] = t17;
|
|
5478
|
+
$[79] = t18;
|
|
5479
|
+
$[80] = t19;
|
|
5480
|
+
$[81] = t20;
|
|
5481
|
+
$[82] = t21;
|
|
5482
|
+
$[83] = t22;
|
|
5483
|
+
$[84] = t23;
|
|
5484
|
+
$[85] = t24;
|
|
5485
|
+
$[86] = t25;
|
|
5486
|
+
$[87] = t26;
|
|
5487
|
+
$[88] = t27;
|
|
5488
|
+
$[89] = t28;
|
|
5489
|
+
} else t28 = $[89];
|
|
5490
|
+
const buttonEl = t28;
|
|
5491
|
+
let t29;
|
|
5492
|
+
if ($[90] !== buttonEl || $[91] !== keybinds || $[92] !== keybindsProps || $[93] !== prefix || $[94] !== tooltipContent || $[95] !== tooltipProps) {
|
|
5493
|
+
t29 = tooltipContent && typeof tooltipContent !== "boolean" || keybinds ? /* @__PURE__ */ jsx(Tooltip, {
|
|
5461
5494
|
...tooltipProps,
|
|
5462
5495
|
content: /* @__PURE__ */ jsxs(Fragment$1, { children: [tooltipContent && /* @__PURE__ */ jsx("div", { children: tooltipContent }), keybinds && /* @__PURE__ */ jsx(Keybinds, {
|
|
5463
5496
|
keybinds,
|
|
@@ -5467,15 +5500,15 @@ function Button(t0) {
|
|
|
5467
5500
|
})] }),
|
|
5468
5501
|
children: buttonEl
|
|
5469
5502
|
}) : buttonEl;
|
|
5470
|
-
$[
|
|
5471
|
-
$[
|
|
5472
|
-
$[
|
|
5473
|
-
$[
|
|
5474
|
-
$[
|
|
5475
|
-
$[
|
|
5476
|
-
$[
|
|
5477
|
-
} else
|
|
5478
|
-
return
|
|
5503
|
+
$[90] = buttonEl;
|
|
5504
|
+
$[91] = keybinds;
|
|
5505
|
+
$[92] = keybindsProps;
|
|
5506
|
+
$[93] = prefix;
|
|
5507
|
+
$[94] = tooltipContent;
|
|
5508
|
+
$[95] = tooltipProps;
|
|
5509
|
+
$[96] = t29;
|
|
5510
|
+
} else t29 = $[96];
|
|
5511
|
+
return t29;
|
|
5479
5512
|
}
|
|
5480
5513
|
// src/providers/AlertDialogProvider/AlertDialogProviderContext.ts
|
|
5481
5514
|
/** Alert dialog context. */
|
|
@@ -7100,7 +7133,7 @@ function _temp$44(v) {
|
|
|
7100
7133
|
/**
|
|
7101
7134
|
* Basic layout component. Built on top of the browser's [`<div>`
|
|
7102
7135
|
* element](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/div) with access to
|
|
7103
|
-
* margin, padding,
|
|
7136
|
+
* margin, padding, and sizing properties.
|
|
7104
7137
|
*
|
|
7105
7138
|
* Example usage:
|
|
7106
7139
|
*
|
|
@@ -7379,8 +7412,8 @@ function CollapsibleTrigger(t0) {
|
|
|
7379
7412
|
});
|
|
7380
7413
|
}
|
|
7381
7414
|
const { icon, expandIcon: expandIconProp, collapseIcon: collapseIconProp, label, expandLabel: expandLabelProp, collapseLabel: collapseLabelProp, className, ...iconButtonProps } = otherProps;
|
|
7382
|
-
const expandIcon = expandIconProp ?? icon ?? (orientation === "horizontal" ?
|
|
7383
|
-
const collapseIcon = collapseIconProp ?? icon ?? (orientation === "horizontal" ?
|
|
7415
|
+
const expandIcon = expandIconProp ?? icon ?? (orientation === "horizontal" ? faAngleRight : faAngleDown);
|
|
7416
|
+
const collapseIcon = collapseIconProp ?? icon ?? (orientation === "horizontal" ? faAngleLeft : faAngleUp);
|
|
7384
7417
|
const expandLabel = expandLabelProp ?? label ?? locale.CollapsibleTrigger.expandLabel;
|
|
7385
7418
|
const collapseLabel = collapseLabelProp ?? label ?? locale.CollapsibleTrigger.collapseLabel;
|
|
7386
7419
|
const t1 = Collapsible$1;
|
|
@@ -7448,7 +7481,7 @@ var SEVERITY_ICON = {
|
|
|
7448
7481
|
* ```tsx
|
|
7449
7482
|
* import { Alert, AlertTitle } from "@ostack.tech/ui";
|
|
7450
7483
|
*
|
|
7451
|
-
* function TermsAndConditionsNotice {
|
|
7484
|
+
* function TermsAndConditionsNotice() {
|
|
7452
7485
|
* return (
|
|
7453
7486
|
* <Alert>
|
|
7454
7487
|
* <AlertTitle>Notice</AlertTitle>
|
|
@@ -8641,7 +8674,7 @@ function MenuListGroup(t0) {
|
|
|
8641
8674
|
// src/components/MenuList/MenuListItem.tsx
|
|
8642
8675
|
/** Menu list item component. */
|
|
8643
8676
|
function MenuListItem(t0) {
|
|
8644
|
-
const $ = c(
|
|
8677
|
+
const $ = c(107);
|
|
8645
8678
|
let actionProps;
|
|
8646
8679
|
let ariaDisabled;
|
|
8647
8680
|
let asChild;
|
|
@@ -8784,169 +8817,177 @@ function MenuListItem(t0) {
|
|
|
8784
8817
|
} else t10 = $[41];
|
|
8785
8818
|
const t11 = type === "button" && softDisabled || type === "link" && (disabled || softDisabled) || void 0;
|
|
8786
8819
|
let t12;
|
|
8787
|
-
if ($[42] !==
|
|
8788
|
-
t12 = boolDataAttr(
|
|
8789
|
-
$[42] =
|
|
8820
|
+
if ($[42] !== showSpinner) {
|
|
8821
|
+
t12 = boolDataAttr(showSpinner);
|
|
8822
|
+
$[42] = showSpinner;
|
|
8790
8823
|
$[43] = t12;
|
|
8791
8824
|
} else t12 = $[43];
|
|
8792
8825
|
let t13;
|
|
8793
|
-
if ($[44] !==
|
|
8794
|
-
t13 =
|
|
8795
|
-
$[44] =
|
|
8796
|
-
$[45] =
|
|
8797
|
-
|
|
8798
|
-
|
|
8799
|
-
|
|
8800
|
-
|
|
8801
|
-
|
|
8802
|
-
|
|
8803
|
-
|
|
8804
|
-
|
|
8805
|
-
|
|
8806
|
-
|
|
8807
|
-
|
|
8808
|
-
} else t17 = $[49];
|
|
8826
|
+
if ($[44] !== selected) {
|
|
8827
|
+
t13 = boolDataAttr(selected);
|
|
8828
|
+
$[44] = selected;
|
|
8829
|
+
$[45] = t13;
|
|
8830
|
+
} else t13 = $[45];
|
|
8831
|
+
let t14;
|
|
8832
|
+
if ($[46] !== keybinds || $[47] !== type) {
|
|
8833
|
+
t14 = type !== "text" ? keybindsToAriaKeyShortcuts(keybinds) : void 0;
|
|
8834
|
+
$[46] = keybinds;
|
|
8835
|
+
$[47] = type;
|
|
8836
|
+
$[48] = t14;
|
|
8837
|
+
} else t14 = $[48];
|
|
8838
|
+
const t15 = type === "link" && disabled ? -1 : void 0;
|
|
8839
|
+
const t16 = actionProps;
|
|
8840
|
+
const t17 = actionProps?.onClick;
|
|
8809
8841
|
let t18;
|
|
8810
|
-
if ($[50]
|
|
8811
|
-
t18 =
|
|
8812
|
-
$[
|
|
8813
|
-
|
|
8814
|
-
|
|
8815
|
-
|
|
8816
|
-
|
|
8817
|
-
|
|
8818
|
-
|
|
8819
|
-
$[52] =
|
|
8820
|
-
|
|
8821
|
-
|
|
8822
|
-
|
|
8823
|
-
|
|
8824
|
-
|
|
8825
|
-
|
|
8826
|
-
|
|
8827
|
-
|
|
8828
|
-
$[
|
|
8829
|
-
|
|
8830
|
-
|
|
8831
|
-
|
|
8832
|
-
|
|
8833
|
-
|
|
8834
|
-
|
|
8835
|
-
|
|
8842
|
+
if ($[49] !== handleSelect || $[50] !== t17) {
|
|
8843
|
+
t18 = [handleSelect, t17];
|
|
8844
|
+
$[49] = handleSelect;
|
|
8845
|
+
$[50] = t17;
|
|
8846
|
+
$[51] = t18;
|
|
8847
|
+
} else t18 = $[51];
|
|
8848
|
+
let t19;
|
|
8849
|
+
if ($[52] === Symbol.for("react.memo_cache_sentinel")) {
|
|
8850
|
+
t19 = { checkDefaultPrevented: true };
|
|
8851
|
+
$[52] = t19;
|
|
8852
|
+
} else t19 = $[52];
|
|
8853
|
+
const t20 = useCombinedEventHandler(t18, t19);
|
|
8854
|
+
let t21;
|
|
8855
|
+
if ($[53] !== actionProps?.className || $[54] !== prefix || $[55] !== variant) {
|
|
8856
|
+
t21 = cx(prefix("menu-list__item-action"), prefix(`menu-list__item-action--${variant}`), actionProps?.className);
|
|
8857
|
+
$[53] = actionProps?.className;
|
|
8858
|
+
$[54] = prefix;
|
|
8859
|
+
$[55] = variant;
|
|
8860
|
+
$[56] = t21;
|
|
8861
|
+
} else t21 = $[56];
|
|
8862
|
+
const t22 = iconPlacement === "start" && spinnerEl;
|
|
8863
|
+
const t23 = iconPlacement === "start" && iconEl;
|
|
8864
|
+
let t24;
|
|
8865
|
+
if ($[57] !== contentProps?.className || $[58] !== prefix) {
|
|
8866
|
+
t24 = cx(prefix("menu-list__item-content"), contentProps?.className);
|
|
8867
|
+
$[57] = contentProps?.className;
|
|
8868
|
+
$[58] = prefix;
|
|
8869
|
+
$[59] = t24;
|
|
8870
|
+
} else t24 = $[59];
|
|
8871
|
+
const t25 = loading && loadingContent ? loadingContent : asChild ? children.props.children : children;
|
|
8872
|
+
let t26;
|
|
8873
|
+
if ($[60] !== contentProps || $[61] !== t24 || $[62] !== t25) {
|
|
8874
|
+
t26 = /* @__PURE__ */ jsx("span", {
|
|
8836
8875
|
...contentProps,
|
|
8837
|
-
className:
|
|
8838
|
-
children:
|
|
8876
|
+
className: t24,
|
|
8877
|
+
children: t25
|
|
8839
8878
|
});
|
|
8840
|
-
$[
|
|
8841
|
-
$[
|
|
8842
|
-
$[
|
|
8843
|
-
$[
|
|
8844
|
-
} else
|
|
8845
|
-
let
|
|
8846
|
-
if ($[
|
|
8847
|
-
|
|
8879
|
+
$[60] = contentProps;
|
|
8880
|
+
$[61] = t24;
|
|
8881
|
+
$[62] = t25;
|
|
8882
|
+
$[63] = t26;
|
|
8883
|
+
} else t26 = $[63];
|
|
8884
|
+
let t27;
|
|
8885
|
+
if ($[64] !== keybinds || $[65] !== keybindsProps || $[66] !== prefix) {
|
|
8886
|
+
t27 = keybinds && /* @__PURE__ */ jsx(Keybinds, {
|
|
8848
8887
|
"aria-hidden": true,
|
|
8849
8888
|
keybinds,
|
|
8850
8889
|
limit: 1,
|
|
8851
8890
|
...keybindsProps,
|
|
8852
8891
|
className: cx(prefix("menu-list__item-keybinds"), keybindsProps?.className)
|
|
8853
8892
|
});
|
|
8854
|
-
$[
|
|
8855
|
-
$[
|
|
8856
|
-
$[
|
|
8857
|
-
$[
|
|
8858
|
-
} else
|
|
8859
|
-
const
|
|
8860
|
-
const
|
|
8861
|
-
let
|
|
8862
|
-
if ($[
|
|
8863
|
-
|
|
8893
|
+
$[64] = keybinds;
|
|
8894
|
+
$[65] = keybindsProps;
|
|
8895
|
+
$[66] = prefix;
|
|
8896
|
+
$[67] = t27;
|
|
8897
|
+
} else t27 = $[67];
|
|
8898
|
+
const t28 = iconPlacement === "end" && iconEl;
|
|
8899
|
+
const t29 = iconPlacement === "end" && spinnerEl;
|
|
8900
|
+
let t30;
|
|
8901
|
+
if ($[68] !== Action || $[69] !== color || $[70] !== href || $[71] !== rel || $[72] !== t10 || $[73] !== t11 || $[74] !== t12 || $[75] !== t13 || $[76] !== t14 || $[77] !== t15 || $[78] !== t16 || $[79] !== t20 || $[80] !== t21 || $[81] !== t22 || $[82] !== t23 || $[83] !== t26 || $[84] !== t27 || $[85] !== t28 || $[86] !== t29 || $[87] !== t7 || $[88] !== t8 || $[89] !== target) {
|
|
8902
|
+
t30 = /* @__PURE__ */ jsxs(Action, {
|
|
8864
8903
|
type: t7,
|
|
8865
8904
|
disabled: t8,
|
|
8866
8905
|
"data-disabled": t10,
|
|
8867
8906
|
"aria-disabled": t11,
|
|
8868
|
-
"data-
|
|
8907
|
+
"data-spinning": t12,
|
|
8908
|
+
"data-selected": t13,
|
|
8869
8909
|
"data-accent": color,
|
|
8870
8910
|
href,
|
|
8871
8911
|
target,
|
|
8872
8912
|
rel,
|
|
8873
|
-
"aria-keyshortcuts":
|
|
8874
|
-
tabIndex:
|
|
8875
|
-
...
|
|
8876
|
-
onClick:
|
|
8877
|
-
className:
|
|
8913
|
+
"aria-keyshortcuts": t14,
|
|
8914
|
+
tabIndex: t15,
|
|
8915
|
+
...t16,
|
|
8916
|
+
onClick: t20,
|
|
8917
|
+
className: t21,
|
|
8878
8918
|
children: [
|
|
8879
|
-
t21,
|
|
8880
8919
|
t22,
|
|
8881
|
-
|
|
8920
|
+
t23,
|
|
8882
8921
|
t26,
|
|
8883
8922
|
t27,
|
|
8884
|
-
t28
|
|
8923
|
+
t28,
|
|
8924
|
+
t29
|
|
8885
8925
|
]
|
|
8886
8926
|
});
|
|
8887
|
-
$[
|
|
8888
|
-
$[
|
|
8889
|
-
$[
|
|
8890
|
-
$[
|
|
8891
|
-
$[
|
|
8892
|
-
$[
|
|
8893
|
-
$[
|
|
8894
|
-
$[
|
|
8895
|
-
$[
|
|
8896
|
-
$[
|
|
8897
|
-
$[
|
|
8898
|
-
$[
|
|
8899
|
-
$[
|
|
8900
|
-
$[
|
|
8901
|
-
$[
|
|
8902
|
-
$[
|
|
8903
|
-
$[
|
|
8904
|
-
$[
|
|
8905
|
-
$[
|
|
8906
|
-
$[
|
|
8907
|
-
$[
|
|
8908
|
-
$[
|
|
8909
|
-
} else t29 = $[87];
|
|
8910
|
-
const actionEl = t29;
|
|
8911
|
-
const As = asChild ? Slot : "li";
|
|
8912
|
-
let t30;
|
|
8913
|
-
if ($[88] !== className || $[89] !== prefix) {
|
|
8914
|
-
t30 = cx(prefix("menu-list__item"), className);
|
|
8915
|
-
$[88] = className;
|
|
8916
|
-
$[89] = prefix;
|
|
8927
|
+
$[68] = Action;
|
|
8928
|
+
$[69] = color;
|
|
8929
|
+
$[70] = href;
|
|
8930
|
+
$[71] = rel;
|
|
8931
|
+
$[72] = t10;
|
|
8932
|
+
$[73] = t11;
|
|
8933
|
+
$[74] = t12;
|
|
8934
|
+
$[75] = t13;
|
|
8935
|
+
$[76] = t14;
|
|
8936
|
+
$[77] = t15;
|
|
8937
|
+
$[78] = t16;
|
|
8938
|
+
$[79] = t20;
|
|
8939
|
+
$[80] = t21;
|
|
8940
|
+
$[81] = t22;
|
|
8941
|
+
$[82] = t23;
|
|
8942
|
+
$[83] = t26;
|
|
8943
|
+
$[84] = t27;
|
|
8944
|
+
$[85] = t28;
|
|
8945
|
+
$[86] = t29;
|
|
8946
|
+
$[87] = t7;
|
|
8947
|
+
$[88] = t8;
|
|
8948
|
+
$[89] = target;
|
|
8917
8949
|
$[90] = t30;
|
|
8918
8950
|
} else t30 = $[90];
|
|
8951
|
+
const actionEl = t30;
|
|
8952
|
+
const As = asChild ? Slot : "li";
|
|
8919
8953
|
let t31;
|
|
8920
|
-
if ($[91] !==
|
|
8921
|
-
t31 =
|
|
8922
|
-
$[91] =
|
|
8923
|
-
$[92] =
|
|
8954
|
+
if ($[91] !== className || $[92] !== prefix) {
|
|
8955
|
+
t31 = cx(prefix("menu-list__item"), className);
|
|
8956
|
+
$[91] = className;
|
|
8957
|
+
$[92] = prefix;
|
|
8924
8958
|
$[93] = t31;
|
|
8925
8959
|
} else t31 = $[93];
|
|
8926
8960
|
let t32;
|
|
8927
|
-
if ($[94] !==
|
|
8928
|
-
t32 =
|
|
8929
|
-
$[94] =
|
|
8930
|
-
$[95] =
|
|
8931
|
-
$[96] =
|
|
8932
|
-
|
|
8933
|
-
} else t32 = $[97];
|
|
8961
|
+
if ($[94] !== keybinds || $[95] !== type) {
|
|
8962
|
+
t32 = type === "text" ? keybindsToAriaKeyShortcuts(keybinds) : void 0;
|
|
8963
|
+
$[94] = keybinds;
|
|
8964
|
+
$[95] = type;
|
|
8965
|
+
$[96] = t32;
|
|
8966
|
+
} else t32 = $[96];
|
|
8934
8967
|
let t33;
|
|
8935
|
-
if ($[
|
|
8936
|
-
t33 =
|
|
8937
|
-
|
|
8938
|
-
|
|
8968
|
+
if ($[97] !== actionEl || $[98] !== asChild || $[99] !== children) {
|
|
8969
|
+
t33 = asChild ? cloneElement(children, void 0, actionEl) : actionEl;
|
|
8970
|
+
$[97] = actionEl;
|
|
8971
|
+
$[98] = asChild;
|
|
8972
|
+
$[99] = children;
|
|
8973
|
+
$[100] = t33;
|
|
8974
|
+
} else t33 = $[100];
|
|
8975
|
+
let t34;
|
|
8976
|
+
if ($[101] !== As || $[102] !== otherProps || $[103] !== t31 || $[104] !== t32 || $[105] !== t33) {
|
|
8977
|
+
t34 = /* @__PURE__ */ jsx(As, {
|
|
8978
|
+
className: t31,
|
|
8979
|
+
"aria-keyshortcuts": t32,
|
|
8939
8980
|
...otherProps,
|
|
8940
|
-
children:
|
|
8981
|
+
children: t33
|
|
8941
8982
|
});
|
|
8942
|
-
$[
|
|
8943
|
-
$[
|
|
8944
|
-
$[
|
|
8945
|
-
$[
|
|
8946
|
-
$[
|
|
8947
|
-
$[
|
|
8948
|
-
} else
|
|
8949
|
-
return
|
|
8983
|
+
$[101] = As;
|
|
8984
|
+
$[102] = otherProps;
|
|
8985
|
+
$[103] = t31;
|
|
8986
|
+
$[104] = t32;
|
|
8987
|
+
$[105] = t33;
|
|
8988
|
+
$[106] = t34;
|
|
8989
|
+
} else t34 = $[106];
|
|
8990
|
+
return t34;
|
|
8950
8991
|
}
|
|
8951
8992
|
// src/components/DropdownMenu/DropdownMenuCheckboxItem.tsx
|
|
8952
8993
|
/** A dropdown menu item that can be controlled and rendered like a checkbox. */
|
|
@@ -9914,7 +9955,7 @@ function DropdownMenuSubTrigger(t0) {
|
|
|
9914
9955
|
otherProps = $[7];
|
|
9915
9956
|
t1 = $[8];
|
|
9916
9957
|
}
|
|
9917
|
-
const icon = t1 === void 0 ?
|
|
9958
|
+
const icon = t1 === void 0 ? faAngleRight : t1;
|
|
9918
9959
|
const prefix = usePrefix();
|
|
9919
9960
|
let t2;
|
|
9920
9961
|
if ($[9] !== iconProps?.className || $[10] !== prefix) {
|
|
@@ -10141,7 +10182,7 @@ function Action(t0) {
|
|
|
10141
10182
|
* ```
|
|
10142
10183
|
*/
|
|
10143
10184
|
function ButtonGroup(t0) {
|
|
10144
|
-
const $ = c(
|
|
10185
|
+
const $ = c(35);
|
|
10145
10186
|
let asChild;
|
|
10146
10187
|
let children;
|
|
10147
10188
|
let className;
|
|
@@ -10181,7 +10222,7 @@ function ButtonGroup(t0) {
|
|
|
10181
10222
|
const generatedId = useId();
|
|
10182
10223
|
let t2;
|
|
10183
10224
|
if ($[10] !== generatedId || $[11] !== label || $[12] !== prefix) {
|
|
10184
|
-
t2 = label && typeof label !== "string" && prefix(`button-group-${generatedId}`);
|
|
10225
|
+
t2 = label != null && typeof label !== "string" && prefix(`button-group-${generatedId}`);
|
|
10185
10226
|
$[10] = generatedId;
|
|
10186
10227
|
$[11] = label;
|
|
10187
10228
|
$[12] = prefix;
|
|
@@ -10220,8 +10261,14 @@ function ButtonGroup(t0) {
|
|
|
10220
10261
|
$[22] = t7;
|
|
10221
10262
|
} else t7 = $[22];
|
|
10222
10263
|
let t8;
|
|
10223
|
-
if ($[23] !==
|
|
10224
|
-
t8 = /* @__PURE__ */
|
|
10264
|
+
if ($[23] !== children) {
|
|
10265
|
+
t8 = /* @__PURE__ */ jsx(Slottable, { children });
|
|
10266
|
+
$[23] = children;
|
|
10267
|
+
$[24] = t8;
|
|
10268
|
+
} else t8 = $[24];
|
|
10269
|
+
let t9;
|
|
10270
|
+
if ($[25] !== As || $[26] !== marginProps.dataAttrs || $[27] !== nonMarginProps || $[28] !== t3 || $[29] !== t4 || $[30] !== t5 || $[31] !== t6 || $[32] !== t7 || $[33] !== t8) {
|
|
10271
|
+
t9 = /* @__PURE__ */ jsxs(As, {
|
|
10225
10272
|
className: t3,
|
|
10226
10273
|
role: "group",
|
|
10227
10274
|
"aria-label": t4,
|
|
@@ -10229,20 +10276,20 @@ function ButtonGroup(t0) {
|
|
|
10229
10276
|
style: t6,
|
|
10230
10277
|
...marginProps.dataAttrs,
|
|
10231
10278
|
...nonMarginProps,
|
|
10232
|
-
children: [t7,
|
|
10279
|
+
children: [t7, t8]
|
|
10233
10280
|
});
|
|
10234
|
-
$[
|
|
10235
|
-
$[
|
|
10236
|
-
$[
|
|
10237
|
-
$[
|
|
10238
|
-
$[
|
|
10239
|
-
$[
|
|
10240
|
-
$[
|
|
10241
|
-
$[
|
|
10242
|
-
$[
|
|
10243
|
-
$[
|
|
10244
|
-
} else
|
|
10245
|
-
return
|
|
10281
|
+
$[25] = As;
|
|
10282
|
+
$[26] = marginProps.dataAttrs;
|
|
10283
|
+
$[27] = nonMarginProps;
|
|
10284
|
+
$[28] = t3;
|
|
10285
|
+
$[29] = t4;
|
|
10286
|
+
$[30] = t5;
|
|
10287
|
+
$[31] = t6;
|
|
10288
|
+
$[32] = t7;
|
|
10289
|
+
$[33] = t8;
|
|
10290
|
+
$[34] = t9;
|
|
10291
|
+
} else t9 = $[34];
|
|
10292
|
+
return t9;
|
|
10246
10293
|
}
|
|
10247
10294
|
// src/components/Actions/ActionGroup.tsx
|
|
10248
10295
|
/** Component used to group actions together, both inline or within a dropdown menu. */
|
|
@@ -14618,6 +14665,12 @@ var ControlContext = createContext(null);
|
|
|
14618
14665
|
function useControlContext() {
|
|
14619
14666
|
return useContext(ControlContext);
|
|
14620
14667
|
}
|
|
14668
|
+
// src/utils/sanitizeProps.ts
|
|
14669
|
+
/** Sanitizes an integer property. */
|
|
14670
|
+
function sanitizeInt(value) {
|
|
14671
|
+
const numValue = typeof value === "string" ? +value : value;
|
|
14672
|
+
return numValue === void 0 || Number.isNaN(numValue) ? void 0 : Math.trunc(numValue);
|
|
14673
|
+
}
|
|
14621
14674
|
// src/components/DataTable/columnUtils.ts
|
|
14622
14675
|
/** List of "leaf" columns (columns with no sub columns, i.e. the "bottom" ones). */
|
|
14623
14676
|
function leafColumns(columns) {
|
|
@@ -14663,11 +14716,6 @@ function DataTableColumns(_props) {
|
|
|
14663
14716
|
return null;
|
|
14664
14717
|
}
|
|
14665
14718
|
// src/components/DataTable/sanitizeProps.ts
|
|
14666
|
-
/** Sanitizes an integer property. */
|
|
14667
|
-
function sanitizeInt(value) {
|
|
14668
|
-
const numValue = typeof value === "string" ? +value : value;
|
|
14669
|
-
return numValue === void 0 || Number.isNaN(numValue) ? void 0 : Math.trunc(numValue);
|
|
14670
|
-
}
|
|
14671
14719
|
/** Sanitizes the `sortBy` property. */
|
|
14672
14720
|
function sanitizeSortBy(sortBy, leaves) {
|
|
14673
14721
|
return sortBy == null || sortBy in leaves ? sortBy : null;
|
|
@@ -14704,7 +14752,14 @@ var DEFAULT_LIMIT = 10;
|
|
|
14704
14752
|
* Example usage:
|
|
14705
14753
|
*
|
|
14706
14754
|
* ```tsx
|
|
14707
|
-
* import {
|
|
14755
|
+
* import {
|
|
14756
|
+
* DataTable,
|
|
14757
|
+
* DataTableColumn,
|
|
14758
|
+
* DataTableColumns,
|
|
14759
|
+
* DataTableContent,
|
|
14760
|
+
* DataTablePagination,
|
|
14761
|
+
* DataTableRowsPerPage,
|
|
14762
|
+
* } from "@ostack.tech/ui";
|
|
14708
14763
|
*
|
|
14709
14764
|
* function InventoryTable() {
|
|
14710
14765
|
* return (
|
|
@@ -14722,11 +14777,11 @@ var DEFAULT_LIMIT = 10;
|
|
|
14722
14777
|
* ]}
|
|
14723
14778
|
* >
|
|
14724
14779
|
* <DataTableColumns>
|
|
14725
|
-
* <DataTableColumn
|
|
14726
|
-
* <DataTableColumn
|
|
14727
|
-
* <DataTableColumn
|
|
14728
|
-
* <DataTableColumn
|
|
14729
|
-
* <DataTableColumn
|
|
14780
|
+
* <DataTableColumn id="sku" label="SKU" header />
|
|
14781
|
+
* <DataTableColumn id="product" label="Product" />
|
|
14782
|
+
* <DataTableColumn id="category" label="Category" />
|
|
14783
|
+
* <DataTableColumn id="stock" label="Stock" />
|
|
14784
|
+
* <DataTableColumn id="condition" label="Condition" />
|
|
14730
14785
|
* </DataTableColumns>
|
|
14731
14786
|
* <DataTableContent caption="Inventory" />
|
|
14732
14787
|
* <DataTableRowsPerPage />
|
|
@@ -18478,247 +18533,495 @@ function DataTableFilter(t0) {
|
|
|
18478
18533
|
function _temp$23(state) {
|
|
18479
18534
|
return state.filter;
|
|
18480
18535
|
}
|
|
18481
|
-
// src/components/
|
|
18482
|
-
/**
|
|
18483
|
-
|
|
18484
|
-
|
|
18485
|
-
|
|
18536
|
+
// src/components/Pagination/paginationItems.ts
|
|
18537
|
+
/**
|
|
18538
|
+
* Computes the items to display in a pagination, e.g. `[1, "start-ellipsis", 4, 5, 6,
|
|
18539
|
+
* "end-ellipsis", 20]`.
|
|
18540
|
+
*/
|
|
18541
|
+
function paginationItems(page, count, siblingCount, boundaryCount) {
|
|
18542
|
+
const range = (start, end) => Array.from({ length: Math.max(0, end - start + 1) }, (_, i) => start + i);
|
|
18543
|
+
const startPages = range(1, Math.min(boundaryCount, count));
|
|
18544
|
+
const endPages = range(Math.max(count - boundaryCount + 1, boundaryCount + 1), count);
|
|
18545
|
+
const siblingsStart = Math.max(Math.min(page - siblingCount, count - boundaryCount - siblingCount * 2 - 1), boundaryCount + 2);
|
|
18546
|
+
const siblingsEnd = Math.min(Math.max(page + siblingCount, boundaryCount + siblingCount * 2 + 2), count - boundaryCount - 1);
|
|
18547
|
+
return [
|
|
18548
|
+
...startPages,
|
|
18549
|
+
...siblingsStart > boundaryCount + 2 ? ["start-ellipsis"] : boundaryCount + 1 < count - boundaryCount ? [boundaryCount + 1] : [],
|
|
18550
|
+
...range(siblingsStart, siblingsEnd),
|
|
18551
|
+
...siblingsEnd < count - boundaryCount - 1 ? ["end-ellipsis"] : count - boundaryCount > boundaryCount ? [count - boundaryCount] : [],
|
|
18552
|
+
...endPages
|
|
18553
|
+
];
|
|
18554
|
+
}
|
|
18555
|
+
// src/components/Pagination/Pagination.tsx
|
|
18556
|
+
/**
|
|
18557
|
+
* The pagination component allows users to navigate between pages of content.
|
|
18558
|
+
*
|
|
18559
|
+
* Pages are numbered starting at `1`.
|
|
18560
|
+
*
|
|
18561
|
+
* Built on top of the browser's [`<nav>`
|
|
18562
|
+
* element](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/nav) and the
|
|
18563
|
+
* [`Button`](/docs/ostack-ui-forms-button--docs)/[`IconButton`](/docs/ostack-ui-forms-icon-button--docs)
|
|
18564
|
+
* components.
|
|
18565
|
+
*
|
|
18566
|
+
* Example usage:
|
|
18567
|
+
*
|
|
18568
|
+
* ```tsx
|
|
18569
|
+
* import { Pagination } from "@ostack.tech/ui";
|
|
18570
|
+
*
|
|
18571
|
+
* function SearchResultsPagination() {
|
|
18572
|
+
* return <Pagination count={20} />;
|
|
18573
|
+
* }
|
|
18574
|
+
* ```
|
|
18575
|
+
*/
|
|
18576
|
+
function Pagination(t0) {
|
|
18577
|
+
const $ = c(105);
|
|
18486
18578
|
let className;
|
|
18487
|
-
let
|
|
18579
|
+
let controllablePage;
|
|
18580
|
+
let count;
|
|
18581
|
+
let defaultPage;
|
|
18582
|
+
let disabled;
|
|
18583
|
+
let ellipsisButtonProps;
|
|
18584
|
+
let labelProp;
|
|
18585
|
+
let loading;
|
|
18586
|
+
let loadingButtonProps;
|
|
18587
|
+
let nextPageButtonLabelProp;
|
|
18488
18588
|
let nextPageButtonProps;
|
|
18589
|
+
let onPageChange;
|
|
18489
18590
|
let otherProps;
|
|
18490
|
-
let
|
|
18491
|
-
let
|
|
18591
|
+
let pageButtonLabelProp;
|
|
18592
|
+
let pageButtonProps;
|
|
18593
|
+
let previousPageButtonLabelProp;
|
|
18492
18594
|
let previousPageButtonProps;
|
|
18493
|
-
let
|
|
18494
|
-
let
|
|
18595
|
+
let size;
|
|
18596
|
+
let t1;
|
|
18597
|
+
let t2;
|
|
18495
18598
|
if ($[0] !== t0) {
|
|
18496
|
-
({
|
|
18599
|
+
({count, defaultPage, page: controllablePage, onPageChange, size, siblingCount: t1, boundaryCount: t2, disabled, loading, label: labelProp, previousPageButtonLabel: previousPageButtonLabelProp, nextPageButtonLabel: nextPageButtonLabelProp, pageButtonLabel: pageButtonLabelProp, previousPageButtonProps, nextPageButtonProps, pageButtonProps, ellipsisButtonProps, loadingButtonProps, className, ...otherProps} = t0);
|
|
18497
18600
|
$[0] = t0;
|
|
18498
|
-
$[1] =
|
|
18499
|
-
$[2] =
|
|
18500
|
-
$[3] =
|
|
18501
|
-
$[4] =
|
|
18502
|
-
$[5] =
|
|
18503
|
-
$[6] =
|
|
18504
|
-
$[7] =
|
|
18505
|
-
$[8] =
|
|
18506
|
-
$[9] =
|
|
18507
|
-
$[10] =
|
|
18601
|
+
$[1] = className;
|
|
18602
|
+
$[2] = controllablePage;
|
|
18603
|
+
$[3] = count;
|
|
18604
|
+
$[4] = defaultPage;
|
|
18605
|
+
$[5] = disabled;
|
|
18606
|
+
$[6] = ellipsisButtonProps;
|
|
18607
|
+
$[7] = labelProp;
|
|
18608
|
+
$[8] = loading;
|
|
18609
|
+
$[9] = loadingButtonProps;
|
|
18610
|
+
$[10] = nextPageButtonLabelProp;
|
|
18611
|
+
$[11] = nextPageButtonProps;
|
|
18612
|
+
$[12] = onPageChange;
|
|
18613
|
+
$[13] = otherProps;
|
|
18614
|
+
$[14] = pageButtonLabelProp;
|
|
18615
|
+
$[15] = pageButtonProps;
|
|
18616
|
+
$[16] = previousPageButtonLabelProp;
|
|
18617
|
+
$[17] = previousPageButtonProps;
|
|
18618
|
+
$[18] = size;
|
|
18619
|
+
$[19] = t1;
|
|
18620
|
+
$[20] = t2;
|
|
18508
18621
|
} else {
|
|
18509
|
-
|
|
18510
|
-
|
|
18511
|
-
|
|
18512
|
-
|
|
18513
|
-
|
|
18514
|
-
|
|
18515
|
-
|
|
18516
|
-
|
|
18517
|
-
|
|
18518
|
-
|
|
18519
|
-
|
|
18622
|
+
className = $[1];
|
|
18623
|
+
controllablePage = $[2];
|
|
18624
|
+
count = $[3];
|
|
18625
|
+
defaultPage = $[4];
|
|
18626
|
+
disabled = $[5];
|
|
18627
|
+
ellipsisButtonProps = $[6];
|
|
18628
|
+
labelProp = $[7];
|
|
18629
|
+
loading = $[8];
|
|
18630
|
+
loadingButtonProps = $[9];
|
|
18631
|
+
nextPageButtonLabelProp = $[10];
|
|
18632
|
+
nextPageButtonProps = $[11];
|
|
18633
|
+
onPageChange = $[12];
|
|
18634
|
+
otherProps = $[13];
|
|
18635
|
+
pageButtonLabelProp = $[14];
|
|
18636
|
+
pageButtonProps = $[15];
|
|
18637
|
+
previousPageButtonLabelProp = $[16];
|
|
18638
|
+
previousPageButtonProps = $[17];
|
|
18639
|
+
size = $[18];
|
|
18640
|
+
t1 = $[19];
|
|
18641
|
+
t2 = $[20];
|
|
18642
|
+
}
|
|
18643
|
+
const siblingCount = t1 === void 0 ? 1 : t1;
|
|
18644
|
+
const boundaryCount = t2 === void 0 ? 1 : t2;
|
|
18520
18645
|
const prefix = usePrefix();
|
|
18521
18646
|
const [locale] = useLocale();
|
|
18522
|
-
const
|
|
18523
|
-
const
|
|
18524
|
-
const
|
|
18525
|
-
const
|
|
18526
|
-
const
|
|
18527
|
-
const { setOffset } = useStore(store, _temp4$2);
|
|
18528
|
-
let t1;
|
|
18529
|
-
if ($[11] !== setOffset) {
|
|
18530
|
-
t1 = (offset) => startTransition(() => setOffset(offset));
|
|
18531
|
-
$[11] = setOffset;
|
|
18532
|
-
$[12] = t1;
|
|
18533
|
-
} else t1 = $[12];
|
|
18534
|
-
const setOffsetWithTransition = t1;
|
|
18535
|
-
const currentPage = useStore(store, _temp5$2);
|
|
18536
|
-
const numberOfPages = Math.ceil((totalCount ?? 0) / limit);
|
|
18537
|
-
const lastPage = Math.max(0, numberOfPages - 1);
|
|
18538
|
-
let t2;
|
|
18539
|
-
if ($[13] !== className || $[14] !== prefix) {
|
|
18540
|
-
t2 = cx(prefix("data-table__pagination"), className);
|
|
18541
|
-
$[13] = className;
|
|
18542
|
-
$[14] = prefix;
|
|
18543
|
-
$[15] = t2;
|
|
18544
|
-
} else t2 = $[15];
|
|
18647
|
+
const label = labelProp ?? locale.Pagination.label;
|
|
18648
|
+
const previousPageButtonLabel = previousPageButtonLabelProp ?? locale.Pagination.previousPageButtonLabel;
|
|
18649
|
+
const nextPageButtonLabel = nextPageButtonLabelProp ?? locale.Pagination.nextPageButtonLabel;
|
|
18650
|
+
const pageButtonLabel = pageButtonLabelProp ?? locale.Pagination.pageButtonLabel;
|
|
18651
|
+
const generatedId = useId();
|
|
18545
18652
|
let t3;
|
|
18546
|
-
if ($[
|
|
18547
|
-
t3 =
|
|
18548
|
-
$[
|
|
18549
|
-
$[
|
|
18550
|
-
|
|
18653
|
+
if ($[21] !== generatedId || $[22] !== label || $[23] !== prefix) {
|
|
18654
|
+
t3 = label != null && typeof label !== "string" && prefix(`button-group-${generatedId}`);
|
|
18655
|
+
$[21] = generatedId;
|
|
18656
|
+
$[22] = label;
|
|
18657
|
+
$[23] = prefix;
|
|
18658
|
+
$[24] = t3;
|
|
18659
|
+
} else t3 = $[24];
|
|
18660
|
+
const labelId = t3;
|
|
18661
|
+
const formatter = new Intl.NumberFormat(locale.languageTag, { useGrouping: true });
|
|
18662
|
+
const [rawPage, setPage] = useControllableState(defaultPage ?? 1, controllablePage);
|
|
18551
18663
|
let t4;
|
|
18552
|
-
if ($[
|
|
18553
|
-
t4 =
|
|
18554
|
-
|
|
18555
|
-
|
|
18556
|
-
|
|
18664
|
+
if ($[25] !== onPageChange || $[26] !== setPage) {
|
|
18665
|
+
t4 = (page) => {
|
|
18666
|
+
setPage(page);
|
|
18667
|
+
onPageChange?.(page);
|
|
18668
|
+
};
|
|
18669
|
+
$[25] = onPageChange;
|
|
18670
|
+
$[26] = setPage;
|
|
18671
|
+
$[27] = t4;
|
|
18672
|
+
} else t4 = $[27];
|
|
18673
|
+
const handlePageChange = t4;
|
|
18557
18674
|
let t5;
|
|
18558
|
-
if ($[
|
|
18559
|
-
t5 = (
|
|
18560
|
-
$[
|
|
18561
|
-
$[
|
|
18562
|
-
|
|
18563
|
-
|
|
18564
|
-
|
|
18675
|
+
if ($[28] !== rawPage) {
|
|
18676
|
+
t5 = sanitizeInt(rawPage) ?? 1;
|
|
18677
|
+
$[28] = rawPage;
|
|
18678
|
+
$[29] = t5;
|
|
18679
|
+
} else t5 = $[29];
|
|
18680
|
+
const page_0 = Math.min(Math.max(t5, 1), Math.max(count, 1));
|
|
18681
|
+
const items = paginationItems(page_0, count, siblingCount, boundaryCount);
|
|
18565
18682
|
let t6;
|
|
18566
|
-
if ($[
|
|
18567
|
-
t6 =
|
|
18568
|
-
|
|
18569
|
-
|
|
18570
|
-
|
|
18571
|
-
|
|
18572
|
-
|
|
18573
|
-
|
|
18574
|
-
|
|
18575
|
-
|
|
18576
|
-
|
|
18577
|
-
|
|
18578
|
-
|
|
18579
|
-
|
|
18580
|
-
|
|
18581
|
-
|
|
18582
|
-
|
|
18583
|
-
|
|
18584
|
-
|
|
18585
|
-
|
|
18586
|
-
$[24] = currentPage;
|
|
18587
|
-
$[25] = limit;
|
|
18588
|
-
$[26] = loading;
|
|
18589
|
-
$[27] = numberOfPages;
|
|
18590
|
-
$[28] = prefix;
|
|
18591
|
-
$[29] = rowsRange;
|
|
18592
|
-
$[30] = rowsRangeSelectLabel;
|
|
18593
|
-
$[31] = setOffsetWithTransition;
|
|
18594
|
-
$[32] = totalCount;
|
|
18595
|
-
$[33] = t6;
|
|
18596
|
-
} else t6 = $[33];
|
|
18597
|
-
let t7;
|
|
18598
|
-
if ($[34] !== t4 || $[35] !== t5 || $[36] !== t6) {
|
|
18599
|
-
t7 = /* @__PURE__ */ jsxs("label", {
|
|
18600
|
-
className: t4,
|
|
18601
|
-
children: [t5, t6]
|
|
18683
|
+
if ($[30] !== className || $[31] !== prefix) {
|
|
18684
|
+
t6 = cx(prefix("pagination"), className);
|
|
18685
|
+
$[30] = className;
|
|
18686
|
+
$[31] = prefix;
|
|
18687
|
+
$[32] = t6;
|
|
18688
|
+
} else t6 = $[32];
|
|
18689
|
+
const t7 = typeof label === "string" ? label : void 0;
|
|
18690
|
+
const t8 = labelId || void 0;
|
|
18691
|
+
let t9;
|
|
18692
|
+
if ($[33] !== disabled) {
|
|
18693
|
+
t9 = boolDataAttr(disabled);
|
|
18694
|
+
$[33] = disabled;
|
|
18695
|
+
$[34] = t9;
|
|
18696
|
+
} else t9 = $[34];
|
|
18697
|
+
let t10;
|
|
18698
|
+
if ($[35] !== label || $[36] !== labelId) {
|
|
18699
|
+
t10 = labelId && /* @__PURE__ */ jsx("span", {
|
|
18700
|
+
id: labelId,
|
|
18701
|
+
hidden: true,
|
|
18702
|
+
children: label
|
|
18602
18703
|
});
|
|
18603
|
-
$[
|
|
18604
|
-
$[
|
|
18605
|
-
$[
|
|
18606
|
-
|
|
18607
|
-
|
|
18608
|
-
let t8;
|
|
18704
|
+
$[35] = label;
|
|
18705
|
+
$[36] = labelId;
|
|
18706
|
+
$[37] = t10;
|
|
18707
|
+
} else t10 = $[37];
|
|
18708
|
+
let t11;
|
|
18609
18709
|
if ($[38] !== prefix) {
|
|
18610
|
-
|
|
18710
|
+
t11 = prefix("pagination__list");
|
|
18611
18711
|
$[38] = prefix;
|
|
18612
|
-
$[39] =
|
|
18613
|
-
} else
|
|
18614
|
-
|
|
18615
|
-
|
|
18616
|
-
|
|
18617
|
-
|
|
18618
|
-
|
|
18619
|
-
|
|
18620
|
-
|
|
18621
|
-
|
|
18622
|
-
|
|
18623
|
-
|
|
18624
|
-
|
|
18625
|
-
|
|
18626
|
-
|
|
18627
|
-
|
|
18628
|
-
|
|
18629
|
-
|
|
18630
|
-
|
|
18631
|
-
|
|
18632
|
-
|
|
18633
|
-
|
|
18634
|
-
|
|
18635
|
-
|
|
18636
|
-
|
|
18637
|
-
|
|
18638
|
-
|
|
18639
|
-
|
|
18640
|
-
|
|
18641
|
-
|
|
18642
|
-
|
|
18643
|
-
|
|
18644
|
-
$[47] = previousPageButtonProps;
|
|
18645
|
-
$[48] = t10;
|
|
18646
|
-
$[49] = t15;
|
|
18647
|
-
$[50] = t9;
|
|
18648
|
-
$[51] = t16;
|
|
18649
|
-
} else t16 = $[51];
|
|
18650
|
-
const t17 = nextPageButtonLabel ?? "";
|
|
18651
|
-
const t18 = loading || currentPage === lastPage || nextPageButtonProps?.disabled;
|
|
18712
|
+
$[39] = t11;
|
|
18713
|
+
} else t11 = $[39];
|
|
18714
|
+
let t12;
|
|
18715
|
+
if ($[40] !== prefix) {
|
|
18716
|
+
t12 = prefix("pagination__item");
|
|
18717
|
+
$[40] = prefix;
|
|
18718
|
+
$[41] = t12;
|
|
18719
|
+
} else t12 = $[41];
|
|
18720
|
+
let t13;
|
|
18721
|
+
if ($[42] !== prefix || $[43] !== previousPageButtonProps?.className) {
|
|
18722
|
+
t13 = cx(prefix("pagination__button"), prefix("pagination__arrow"), previousPageButtonProps?.className);
|
|
18723
|
+
$[42] = prefix;
|
|
18724
|
+
$[43] = previousPageButtonProps?.className;
|
|
18725
|
+
$[44] = t13;
|
|
18726
|
+
} else t13 = $[44];
|
|
18727
|
+
const t14 = disabled || previousPageButtonProps?.disabled;
|
|
18728
|
+
const t15 = loading || page_0 <= 1 || previousPageButtonProps?.["aria-disabled"];
|
|
18729
|
+
const t16 = previousPageButtonProps?.onClick;
|
|
18730
|
+
let t17;
|
|
18731
|
+
if ($[45] !== handlePageChange || $[46] !== page_0) {
|
|
18732
|
+
t17 = () => handlePageChange(page_0 - 1);
|
|
18733
|
+
$[45] = handlePageChange;
|
|
18734
|
+
$[46] = page_0;
|
|
18735
|
+
$[47] = t17;
|
|
18736
|
+
} else t17 = $[47];
|
|
18737
|
+
let t18;
|
|
18738
|
+
if ($[48] !== t16 || $[49] !== t17) {
|
|
18739
|
+
t18 = [t16, t17];
|
|
18740
|
+
$[48] = t16;
|
|
18741
|
+
$[49] = t17;
|
|
18742
|
+
$[50] = t18;
|
|
18743
|
+
} else t18 = $[50];
|
|
18652
18744
|
let t19;
|
|
18653
|
-
if ($[
|
|
18654
|
-
t19 =
|
|
18655
|
-
$[
|
|
18656
|
-
|
|
18657
|
-
|
|
18658
|
-
|
|
18659
|
-
|
|
18660
|
-
|
|
18661
|
-
|
|
18745
|
+
if ($[51] === Symbol.for("react.memo_cache_sentinel")) {
|
|
18746
|
+
t19 = { checkDefaultPrevented: true };
|
|
18747
|
+
$[51] = t19;
|
|
18748
|
+
} else t19 = $[51];
|
|
18749
|
+
const t20 = useCombinedEventHandler(t18, t19);
|
|
18750
|
+
let t21;
|
|
18751
|
+
if ($[52] !== previousPageButtonLabel || $[53] !== previousPageButtonProps || $[54] !== size || $[55] !== t13 || $[56] !== t14 || $[57] !== t15 || $[58] !== t20) {
|
|
18752
|
+
t21 = /* @__PURE__ */ jsx(IconButton, {
|
|
18753
|
+
variant: "ghost",
|
|
18754
|
+
size,
|
|
18755
|
+
icon: faAngleLeft,
|
|
18756
|
+
label: previousPageButtonLabel,
|
|
18757
|
+
...previousPageButtonProps,
|
|
18758
|
+
className: t13,
|
|
18759
|
+
disabled: t14,
|
|
18760
|
+
"aria-disabled": t15,
|
|
18761
|
+
onClick: t20
|
|
18762
|
+
});
|
|
18763
|
+
$[52] = previousPageButtonLabel;
|
|
18764
|
+
$[53] = previousPageButtonProps;
|
|
18765
|
+
$[54] = size;
|
|
18766
|
+
$[55] = t13;
|
|
18767
|
+
$[56] = t14;
|
|
18768
|
+
$[57] = t15;
|
|
18769
|
+
$[58] = t20;
|
|
18770
|
+
$[59] = t21;
|
|
18771
|
+
} else t21 = $[59];
|
|
18662
18772
|
let t22;
|
|
18663
|
-
if ($[
|
|
18664
|
-
t22 =
|
|
18665
|
-
|
|
18666
|
-
|
|
18667
|
-
|
|
18668
|
-
|
|
18669
|
-
|
|
18773
|
+
if ($[60] !== t12 || $[61] !== t21) {
|
|
18774
|
+
t22 = /* @__PURE__ */ jsx("li", {
|
|
18775
|
+
className: t12,
|
|
18776
|
+
children: t21
|
|
18777
|
+
});
|
|
18778
|
+
$[60] = t12;
|
|
18779
|
+
$[61] = t21;
|
|
18780
|
+
$[62] = t22;
|
|
18781
|
+
} else t22 = $[62];
|
|
18782
|
+
const t23 = !loading && items.map((item) => {
|
|
18783
|
+
if (typeof item !== "number") return /* @__PURE__ */ jsx("li", {
|
|
18784
|
+
className: prefix("pagination__item"),
|
|
18785
|
+
"aria-hidden": true,
|
|
18786
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
18787
|
+
asChild: true,
|
|
18788
|
+
variant: "ghost",
|
|
18789
|
+
size,
|
|
18790
|
+
"data-disabled": boolDataAttr(disabled),
|
|
18791
|
+
...ellipsisButtonProps,
|
|
18792
|
+
className: cx(prefix("pagination__button"), prefix("pagination__ellipsis"), ellipsisButtonProps?.className),
|
|
18793
|
+
children: /* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsx("span", {
|
|
18794
|
+
className: prefix("pagination__ellipsis-text"),
|
|
18795
|
+
children: "…"
|
|
18796
|
+
}) })
|
|
18797
|
+
})
|
|
18798
|
+
}, item);
|
|
18799
|
+
const isCurrent = item === page_0;
|
|
18800
|
+
const itemStr = formatter.format(item);
|
|
18801
|
+
const itemLabel = pageButtonLabel?.(itemStr);
|
|
18802
|
+
return /* @__PURE__ */ jsx("li", {
|
|
18803
|
+
className: prefix("pagination__item"),
|
|
18804
|
+
children: /* @__PURE__ */ jsxs(Button, {
|
|
18805
|
+
variant: isCurrent ? "subtle" : "ghost",
|
|
18806
|
+
size,
|
|
18807
|
+
disabled,
|
|
18808
|
+
"data-current": boolDataAttr(isCurrent),
|
|
18809
|
+
"aria-current": isCurrent ? "page" : void 0,
|
|
18810
|
+
...pageButtonProps,
|
|
18811
|
+
className: cx(prefix("pagination__button"), prefix("pagination__page"), pageButtonProps?.className),
|
|
18812
|
+
onClick: (event) => {
|
|
18813
|
+
pageButtonProps?.onClick?.(event);
|
|
18814
|
+
if (!event.defaultPrevented) handlePageChange(item);
|
|
18815
|
+
},
|
|
18816
|
+
children: [itemLabel != null && /* @__PURE__ */ jsx(VisuallyHidden, { children: itemLabel }), /* @__PURE__ */ jsx("span", {
|
|
18817
|
+
"aria-hidden": itemLabel != null || void 0,
|
|
18818
|
+
children: itemStr
|
|
18819
|
+
})]
|
|
18820
|
+
})
|
|
18821
|
+
}, item);
|
|
18822
|
+
});
|
|
18670
18823
|
let t24;
|
|
18671
|
-
if ($[
|
|
18672
|
-
t24 = /* @__PURE__ */ jsx(
|
|
18673
|
-
|
|
18674
|
-
|
|
18675
|
-
|
|
18676
|
-
|
|
18677
|
-
|
|
18678
|
-
|
|
18824
|
+
if ($[63] !== loading || $[64] !== loadingButtonProps || $[65] !== prefix || $[66] !== size) {
|
|
18825
|
+
t24 = loading && /* @__PURE__ */ jsx("li", {
|
|
18826
|
+
className: prefix("pagination__item"),
|
|
18827
|
+
"aria-hidden": true,
|
|
18828
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
18829
|
+
variant: "ghost",
|
|
18830
|
+
size,
|
|
18831
|
+
loading: true,
|
|
18832
|
+
disabled: true,
|
|
18833
|
+
...loadingButtonProps,
|
|
18834
|
+
className: cx(prefix("pagination__button"), prefix("pagination__loading"), loadingButtonProps?.className)
|
|
18835
|
+
})
|
|
18679
18836
|
});
|
|
18680
|
-
$[
|
|
18681
|
-
$[
|
|
18682
|
-
$[
|
|
18683
|
-
$[
|
|
18684
|
-
$[
|
|
18685
|
-
} else t24 = $[
|
|
18837
|
+
$[63] = loading;
|
|
18838
|
+
$[64] = loadingButtonProps;
|
|
18839
|
+
$[65] = prefix;
|
|
18840
|
+
$[66] = size;
|
|
18841
|
+
$[67] = t24;
|
|
18842
|
+
} else t24 = $[67];
|
|
18686
18843
|
let t25;
|
|
18687
|
-
if ($[
|
|
18688
|
-
t25 =
|
|
18689
|
-
|
|
18690
|
-
|
|
18691
|
-
|
|
18692
|
-
$[64] = t16;
|
|
18693
|
-
$[65] = t24;
|
|
18694
|
-
$[66] = t8;
|
|
18695
|
-
$[67] = t25;
|
|
18696
|
-
} else t25 = $[67];
|
|
18844
|
+
if ($[68] !== prefix) {
|
|
18845
|
+
t25 = prefix("pagination__item");
|
|
18846
|
+
$[68] = prefix;
|
|
18847
|
+
$[69] = t25;
|
|
18848
|
+
} else t25 = $[69];
|
|
18697
18849
|
let t26;
|
|
18698
|
-
if ($[
|
|
18699
|
-
t26 =
|
|
18700
|
-
|
|
18701
|
-
|
|
18702
|
-
|
|
18850
|
+
if ($[70] !== nextPageButtonProps?.className || $[71] !== prefix) {
|
|
18851
|
+
t26 = cx(prefix("pagination__button"), prefix("pagination__arrow"), nextPageButtonProps?.className);
|
|
18852
|
+
$[70] = nextPageButtonProps?.className;
|
|
18853
|
+
$[71] = prefix;
|
|
18854
|
+
$[72] = t26;
|
|
18855
|
+
} else t26 = $[72];
|
|
18856
|
+
const t27 = disabled || nextPageButtonProps?.disabled;
|
|
18857
|
+
const t28 = loading || page_0 >= count || nextPageButtonProps?.["aria-disabled"];
|
|
18858
|
+
const t29 = nextPageButtonProps?.onClick;
|
|
18859
|
+
let t30;
|
|
18860
|
+
if ($[73] !== handlePageChange || $[74] !== page_0) {
|
|
18861
|
+
t30 = () => handlePageChange(page_0 + 1);
|
|
18862
|
+
$[73] = handlePageChange;
|
|
18863
|
+
$[74] = page_0;
|
|
18864
|
+
$[75] = t30;
|
|
18865
|
+
} else t30 = $[75];
|
|
18866
|
+
let t31;
|
|
18867
|
+
if ($[76] !== t29 || $[77] !== t30) {
|
|
18868
|
+
t31 = [t29, t30];
|
|
18869
|
+
$[76] = t29;
|
|
18870
|
+
$[77] = t30;
|
|
18871
|
+
$[78] = t31;
|
|
18872
|
+
} else t31 = $[78];
|
|
18873
|
+
let t32;
|
|
18874
|
+
if ($[79] === Symbol.for("react.memo_cache_sentinel")) {
|
|
18875
|
+
t32 = { checkDefaultPrevented: true };
|
|
18876
|
+
$[79] = t32;
|
|
18877
|
+
} else t32 = $[79];
|
|
18878
|
+
const t33 = useCombinedEventHandler(t31, t32);
|
|
18879
|
+
let t34;
|
|
18880
|
+
if ($[80] !== nextPageButtonLabel || $[81] !== nextPageButtonProps || $[82] !== size || $[83] !== t26 || $[84] !== t27 || $[85] !== t28 || $[86] !== t33) {
|
|
18881
|
+
t34 = /* @__PURE__ */ jsx(IconButton, {
|
|
18882
|
+
variant: "ghost",
|
|
18883
|
+
size,
|
|
18884
|
+
icon: faAngleRight,
|
|
18885
|
+
label: nextPageButtonLabel,
|
|
18886
|
+
...nextPageButtonProps,
|
|
18887
|
+
className: t26,
|
|
18888
|
+
disabled: t27,
|
|
18889
|
+
"aria-disabled": t28,
|
|
18890
|
+
onClick: t33
|
|
18891
|
+
});
|
|
18892
|
+
$[80] = nextPageButtonLabel;
|
|
18893
|
+
$[81] = nextPageButtonProps;
|
|
18894
|
+
$[82] = size;
|
|
18895
|
+
$[83] = t26;
|
|
18896
|
+
$[84] = t27;
|
|
18897
|
+
$[85] = t28;
|
|
18898
|
+
$[86] = t33;
|
|
18899
|
+
$[87] = t34;
|
|
18900
|
+
} else t34 = $[87];
|
|
18901
|
+
let t35;
|
|
18902
|
+
if ($[88] !== t25 || $[89] !== t34) {
|
|
18903
|
+
t35 = /* @__PURE__ */ jsx("li", {
|
|
18904
|
+
className: t25,
|
|
18905
|
+
children: t34
|
|
18906
|
+
});
|
|
18907
|
+
$[88] = t25;
|
|
18908
|
+
$[89] = t34;
|
|
18909
|
+
$[90] = t35;
|
|
18910
|
+
} else t35 = $[90];
|
|
18911
|
+
let t36;
|
|
18912
|
+
if ($[91] !== t11 || $[92] !== t22 || $[93] !== t23 || $[94] !== t24 || $[95] !== t35) {
|
|
18913
|
+
t36 = /* @__PURE__ */ jsxs("ul", {
|
|
18914
|
+
className: t11,
|
|
18915
|
+
children: [
|
|
18916
|
+
t22,
|
|
18917
|
+
t23,
|
|
18918
|
+
t24,
|
|
18919
|
+
t35
|
|
18920
|
+
]
|
|
18921
|
+
});
|
|
18922
|
+
$[91] = t11;
|
|
18923
|
+
$[92] = t22;
|
|
18924
|
+
$[93] = t23;
|
|
18925
|
+
$[94] = t24;
|
|
18926
|
+
$[95] = t35;
|
|
18927
|
+
$[96] = t36;
|
|
18928
|
+
} else t36 = $[96];
|
|
18929
|
+
let t37;
|
|
18930
|
+
if ($[97] !== otherProps || $[98] !== t10 || $[99] !== t36 || $[100] !== t6 || $[101] !== t7 || $[102] !== t8 || $[103] !== t9) {
|
|
18931
|
+
t37 = /* @__PURE__ */ jsxs("nav", {
|
|
18932
|
+
className: t6,
|
|
18933
|
+
"aria-label": t7,
|
|
18934
|
+
"aria-labelledby": t8,
|
|
18935
|
+
"data-disabled": t9,
|
|
18936
|
+
...otherProps,
|
|
18937
|
+
children: [t10, t36]
|
|
18938
|
+
});
|
|
18939
|
+
$[97] = otherProps;
|
|
18940
|
+
$[98] = t10;
|
|
18941
|
+
$[99] = t36;
|
|
18942
|
+
$[100] = t6;
|
|
18943
|
+
$[101] = t7;
|
|
18944
|
+
$[102] = t8;
|
|
18945
|
+
$[103] = t9;
|
|
18946
|
+
$[104] = t37;
|
|
18947
|
+
} else t37 = $[104];
|
|
18948
|
+
return t37;
|
|
18949
|
+
}
|
|
18950
|
+
// src/components/DataTable/PagedDataTablePagination.tsx
|
|
18951
|
+
/** Pagination component of the paged data table. */
|
|
18952
|
+
function PagedDataTablePagination(t0) {
|
|
18953
|
+
const $ = c(20);
|
|
18954
|
+
let className;
|
|
18955
|
+
let otherProps;
|
|
18956
|
+
let preferRightAlignment;
|
|
18957
|
+
if ($[0] !== t0) {
|
|
18958
|
+
({preferRightAlignment, className, ...otherProps} = t0);
|
|
18959
|
+
$[0] = t0;
|
|
18960
|
+
$[1] = className;
|
|
18961
|
+
$[2] = otherProps;
|
|
18962
|
+
$[3] = preferRightAlignment;
|
|
18963
|
+
} else {
|
|
18964
|
+
className = $[1];
|
|
18965
|
+
otherProps = $[2];
|
|
18966
|
+
preferRightAlignment = $[3];
|
|
18967
|
+
}
|
|
18968
|
+
const prefix = usePrefix();
|
|
18969
|
+
const { store } = useDataTableContext();
|
|
18970
|
+
const loading = useStore(store, _temp$22);
|
|
18971
|
+
const totalCount = useStore(store, _temp2$14);
|
|
18972
|
+
const limit = useStore(store, _temp3$7);
|
|
18973
|
+
const currentPage = useStore(store, _temp4$2);
|
|
18974
|
+
const { setOffset } = useStore(store, _temp5$2);
|
|
18975
|
+
let t1;
|
|
18976
|
+
if ($[4] !== className || $[5] !== prefix) {
|
|
18977
|
+
t1 = cx(prefix("data-table__pagination"), className);
|
|
18978
|
+
$[4] = className;
|
|
18979
|
+
$[5] = prefix;
|
|
18980
|
+
$[6] = t1;
|
|
18981
|
+
} else t1 = $[6];
|
|
18982
|
+
const t2 = Math.ceil((totalCount ?? 0) / limit);
|
|
18983
|
+
const t3 = currentPage + 1;
|
|
18984
|
+
let t4;
|
|
18985
|
+
if ($[7] !== limit || $[8] !== setOffset) {
|
|
18986
|
+
t4 = (page) => startTransition(() => setOffset((page - 1) * limit));
|
|
18987
|
+
$[7] = limit;
|
|
18988
|
+
$[8] = setOffset;
|
|
18989
|
+
$[9] = t4;
|
|
18990
|
+
} else t4 = $[9];
|
|
18991
|
+
const t5 = loading || totalCount == null;
|
|
18992
|
+
let t6;
|
|
18993
|
+
if ($[10] !== preferRightAlignment) {
|
|
18994
|
+
t6 = boolDataAttr(preferRightAlignment);
|
|
18995
|
+
$[10] = preferRightAlignment;
|
|
18996
|
+
$[11] = t6;
|
|
18997
|
+
} else t6 = $[11];
|
|
18998
|
+
let t7;
|
|
18999
|
+
if ($[12] !== otherProps || $[13] !== t1 || $[14] !== t2 || $[15] !== t3 || $[16] !== t4 || $[17] !== t5 || $[18] !== t6) {
|
|
19000
|
+
t7 = /* @__PURE__ */ jsx(ClearContexts, { children: /* @__PURE__ */ jsx(Pagination, {
|
|
19001
|
+
className: t1,
|
|
19002
|
+
count: t2,
|
|
19003
|
+
page: t3,
|
|
19004
|
+
onPageChange: t4,
|
|
19005
|
+
loading: t5,
|
|
18703
19006
|
...otherProps,
|
|
18704
|
-
"data-prefer-right-alignment":
|
|
18705
|
-
children: [t7, t25]
|
|
19007
|
+
"data-prefer-right-alignment": t6
|
|
18706
19008
|
}) });
|
|
18707
|
-
$[
|
|
18708
|
-
$[
|
|
18709
|
-
$[
|
|
18710
|
-
$[
|
|
18711
|
-
$[
|
|
18712
|
-
$[
|
|
18713
|
-
$[
|
|
18714
|
-
|
|
18715
|
-
|
|
19009
|
+
$[12] = otherProps;
|
|
19010
|
+
$[13] = t1;
|
|
19011
|
+
$[14] = t2;
|
|
19012
|
+
$[15] = t3;
|
|
19013
|
+
$[16] = t4;
|
|
19014
|
+
$[17] = t5;
|
|
19015
|
+
$[18] = t6;
|
|
19016
|
+
$[19] = t7;
|
|
19017
|
+
} else t7 = $[19];
|
|
19018
|
+
return t7;
|
|
18716
19019
|
}
|
|
18717
19020
|
function _temp5$2(state_3) {
|
|
18718
|
-
return state_3.
|
|
19021
|
+
return state_3.actions;
|
|
18719
19022
|
}
|
|
18720
19023
|
function _temp4$2(state_2) {
|
|
18721
|
-
return state_2.
|
|
19024
|
+
return state_2.currentPage();
|
|
18722
19025
|
}
|
|
18723
19026
|
function _temp3$7(state_1) {
|
|
18724
19027
|
return state_1.limit();
|
|
@@ -18777,7 +19080,7 @@ function ScrolledDataTablePagination(t0) {
|
|
|
18777
19080
|
} else t3 = $[12];
|
|
18778
19081
|
let t4;
|
|
18779
19082
|
if ($[13] !== rowsRange || $[14] !== scrolledRangeEnd || $[15] !== scrolledRangeStart || $[16] !== totalCount) {
|
|
18780
|
-
t4 = totalCount != null && rowsRange?.(
|
|
19083
|
+
t4 = totalCount != null && rowsRange?.(Math.min(scrolledRangeStart + 1, totalCount), Math.min(scrolledRangeEnd + 1, totalCount), totalCount);
|
|
18781
19084
|
$[13] = rowsRange;
|
|
18782
19085
|
$[14] = scrolledRangeEnd;
|
|
18783
19086
|
$[15] = scrolledRangeStart;
|
|
@@ -18813,68 +19116,96 @@ function _temp$21(state) {
|
|
|
18813
19116
|
// src/components/DataTable/DataTablePagination.tsx
|
|
18814
19117
|
/** Component used to provide pagination to the data table. */
|
|
18815
19118
|
function DataTablePagination(t0) {
|
|
18816
|
-
const $ = c(
|
|
19119
|
+
const $ = c(41);
|
|
19120
|
+
let boundaryCount;
|
|
19121
|
+
let ellipsisButtonProps;
|
|
19122
|
+
let labelProp;
|
|
19123
|
+
let loadingButtonProps;
|
|
18817
19124
|
let nextPageButtonLabelProp;
|
|
18818
19125
|
let nextPageButtonProps;
|
|
18819
19126
|
let otherProps;
|
|
19127
|
+
let pageButtonLabelProp;
|
|
19128
|
+
let pageButtonProps;
|
|
18820
19129
|
let previousPageButtonLabelProp;
|
|
18821
19130
|
let previousPageButtonProps;
|
|
18822
19131
|
let rowsRangeProp;
|
|
18823
|
-
let
|
|
19132
|
+
let siblingCount;
|
|
19133
|
+
let size;
|
|
18824
19134
|
let style;
|
|
18825
19135
|
let t1;
|
|
18826
19136
|
if ($[0] !== t0) {
|
|
18827
|
-
({rowsRange: rowsRangeProp,
|
|
19137
|
+
({rowsRange: rowsRangeProp, size, siblingCount, boundaryCount, label: labelProp, previousPageButtonLabel: previousPageButtonLabelProp, nextPageButtonLabel: nextPageButtonLabelProp, pageButtonLabel: pageButtonLabelProp, previousPageButtonProps, nextPageButtonProps, pageButtonProps, ellipsisButtonProps, loadingButtonProps, preferRightAlignment: t1, style, ...otherProps} = t0);
|
|
18828
19138
|
$[0] = t0;
|
|
18829
|
-
$[1] =
|
|
18830
|
-
$[2] =
|
|
18831
|
-
$[3] =
|
|
18832
|
-
$[4] =
|
|
18833
|
-
$[5] =
|
|
18834
|
-
$[6] =
|
|
18835
|
-
$[7] =
|
|
18836
|
-
$[8] =
|
|
18837
|
-
$[9] =
|
|
19139
|
+
$[1] = boundaryCount;
|
|
19140
|
+
$[2] = ellipsisButtonProps;
|
|
19141
|
+
$[3] = labelProp;
|
|
19142
|
+
$[4] = loadingButtonProps;
|
|
19143
|
+
$[5] = nextPageButtonLabelProp;
|
|
19144
|
+
$[6] = nextPageButtonProps;
|
|
19145
|
+
$[7] = otherProps;
|
|
19146
|
+
$[8] = pageButtonLabelProp;
|
|
19147
|
+
$[9] = pageButtonProps;
|
|
19148
|
+
$[10] = previousPageButtonLabelProp;
|
|
19149
|
+
$[11] = previousPageButtonProps;
|
|
19150
|
+
$[12] = rowsRangeProp;
|
|
19151
|
+
$[13] = siblingCount;
|
|
19152
|
+
$[14] = size;
|
|
19153
|
+
$[15] = style;
|
|
19154
|
+
$[16] = t1;
|
|
18838
19155
|
} else {
|
|
18839
|
-
|
|
18840
|
-
|
|
18841
|
-
|
|
18842
|
-
|
|
18843
|
-
|
|
18844
|
-
|
|
18845
|
-
|
|
18846
|
-
|
|
18847
|
-
|
|
19156
|
+
boundaryCount = $[1];
|
|
19157
|
+
ellipsisButtonProps = $[2];
|
|
19158
|
+
labelProp = $[3];
|
|
19159
|
+
loadingButtonProps = $[4];
|
|
19160
|
+
nextPageButtonLabelProp = $[5];
|
|
19161
|
+
nextPageButtonProps = $[6];
|
|
19162
|
+
otherProps = $[7];
|
|
19163
|
+
pageButtonLabelProp = $[8];
|
|
19164
|
+
pageButtonProps = $[9];
|
|
19165
|
+
previousPageButtonLabelProp = $[10];
|
|
19166
|
+
previousPageButtonProps = $[11];
|
|
19167
|
+
rowsRangeProp = $[12];
|
|
19168
|
+
siblingCount = $[13];
|
|
19169
|
+
size = $[14];
|
|
19170
|
+
style = $[15];
|
|
19171
|
+
t1 = $[16];
|
|
18848
19172
|
}
|
|
18849
19173
|
const preferRightAlignment = t1 === void 0 ? true : t1;
|
|
18850
19174
|
const [locale] = useLocale();
|
|
18851
19175
|
const rowsRange = rowsRangeProp ?? locale.DataTablePagination.rowsRange;
|
|
18852
|
-
const
|
|
19176
|
+
const label = labelProp ?? locale.DataTablePagination.label;
|
|
18853
19177
|
const previousPageButtonLabel = previousPageButtonLabelProp ?? locale.DataTablePagination.previousPageButtonLabel;
|
|
18854
19178
|
const nextPageButtonLabel = nextPageButtonLabelProp ?? locale.DataTablePagination.nextPageButtonLabel;
|
|
19179
|
+
const pageButtonLabel = pageButtonLabelProp ?? locale.DataTablePagination.pageButtonLabel;
|
|
18855
19180
|
const t2 = useMarginProps(otherProps);
|
|
18856
19181
|
let marginProps;
|
|
18857
19182
|
let nonMarginProps;
|
|
18858
|
-
if ($[
|
|
19183
|
+
if ($[17] !== t2) {
|
|
18859
19184
|
({marginProps, ...nonMarginProps} = t2);
|
|
18860
|
-
$[
|
|
18861
|
-
$[
|
|
18862
|
-
$[
|
|
19185
|
+
$[17] = t2;
|
|
19186
|
+
$[18] = marginProps;
|
|
19187
|
+
$[19] = nonMarginProps;
|
|
18863
19188
|
} else {
|
|
18864
|
-
marginProps = $[
|
|
18865
|
-
nonMarginProps = $[
|
|
19189
|
+
marginProps = $[18];
|
|
19190
|
+
nonMarginProps = $[19];
|
|
18866
19191
|
}
|
|
18867
19192
|
const { displayMode, showAllRowsWhilePrinting } = useDataTableContext();
|
|
18868
19193
|
const printing = usePrinting();
|
|
18869
19194
|
let t3;
|
|
18870
|
-
if ($[
|
|
19195
|
+
if ($[20] !== boundaryCount || $[21] !== displayMode || $[22] !== ellipsisButtonProps || $[23] !== label || $[24] !== loadingButtonProps || $[25] !== marginProps || $[26] !== nextPageButtonLabel || $[27] !== nextPageButtonProps || $[28] !== nonMarginProps || $[29] !== pageButtonLabel || $[30] !== pageButtonProps || $[31] !== preferRightAlignment || $[32] !== previousPageButtonLabel || $[33] !== previousPageButtonProps || $[34] !== printing || $[35] !== rowsRange || $[36] !== showAllRowsWhilePrinting || $[37] !== siblingCount || $[38] !== size || $[39] !== style) {
|
|
18871
19196
|
t3 = printing && showAllRowsWhilePrinting ? null : displayMode === "paged" ? /* @__PURE__ */ jsx(PagedDataTablePagination, {
|
|
18872
|
-
|
|
18873
|
-
|
|
19197
|
+
size,
|
|
19198
|
+
siblingCount,
|
|
19199
|
+
boundaryCount,
|
|
19200
|
+
label,
|
|
18874
19201
|
previousPageButtonLabel,
|
|
18875
19202
|
nextPageButtonLabel,
|
|
19203
|
+
pageButtonLabel,
|
|
18876
19204
|
previousPageButtonProps,
|
|
18877
19205
|
nextPageButtonProps,
|
|
19206
|
+
pageButtonProps,
|
|
19207
|
+
ellipsisButtonProps,
|
|
19208
|
+
loadingButtonProps,
|
|
18878
19209
|
preferRightAlignment,
|
|
18879
19210
|
style: {
|
|
18880
19211
|
...marginProps.cssVars,
|
|
@@ -18892,21 +19223,28 @@ function DataTablePagination(t0) {
|
|
|
18892
19223
|
...marginProps.dataAttrs,
|
|
18893
19224
|
...nonMarginProps
|
|
18894
19225
|
});
|
|
18895
|
-
$[
|
|
18896
|
-
$[
|
|
18897
|
-
$[
|
|
18898
|
-
$[
|
|
18899
|
-
$[
|
|
18900
|
-
$[
|
|
18901
|
-
$[
|
|
18902
|
-
$[
|
|
18903
|
-
$[
|
|
18904
|
-
$[
|
|
18905
|
-
$[
|
|
18906
|
-
$[
|
|
18907
|
-
$[
|
|
18908
|
-
$[
|
|
18909
|
-
|
|
19226
|
+
$[20] = boundaryCount;
|
|
19227
|
+
$[21] = displayMode;
|
|
19228
|
+
$[22] = ellipsisButtonProps;
|
|
19229
|
+
$[23] = label;
|
|
19230
|
+
$[24] = loadingButtonProps;
|
|
19231
|
+
$[25] = marginProps;
|
|
19232
|
+
$[26] = nextPageButtonLabel;
|
|
19233
|
+
$[27] = nextPageButtonProps;
|
|
19234
|
+
$[28] = nonMarginProps;
|
|
19235
|
+
$[29] = pageButtonLabel;
|
|
19236
|
+
$[30] = pageButtonProps;
|
|
19237
|
+
$[31] = preferRightAlignment;
|
|
19238
|
+
$[32] = previousPageButtonLabel;
|
|
19239
|
+
$[33] = previousPageButtonProps;
|
|
19240
|
+
$[34] = printing;
|
|
19241
|
+
$[35] = rowsRange;
|
|
19242
|
+
$[36] = showAllRowsWhilePrinting;
|
|
19243
|
+
$[37] = siblingCount;
|
|
19244
|
+
$[38] = size;
|
|
19245
|
+
$[39] = style;
|
|
19246
|
+
$[40] = t3;
|
|
19247
|
+
} else t3 = $[40];
|
|
18910
19248
|
return t3;
|
|
18911
19249
|
}
|
|
18912
19250
|
// src/components/DataTable/DataTableRowsPerPage.tsx
|
|
@@ -23368,7 +23706,7 @@ function Select(t0) {
|
|
|
23368
23706
|
let t32;
|
|
23369
23707
|
if ($[148] !== arrowProps?.className || $[149] !== disabled || $[150] !== prefix || $[151] !== printHidden || $[152] !== readOnly || $[153] !== showOpen || $[154] !== softDisabled || $[155] !== status) {
|
|
23370
23708
|
t32 = !readOnly && /* @__PURE__ */ jsx(Icon, {
|
|
23371
|
-
icon: showOpen ?
|
|
23709
|
+
icon: showOpen ? faAngleUp : faAngleDown,
|
|
23372
23710
|
className: cx(prefix("select__arrow"), printHidden, arrowProps?.className),
|
|
23373
23711
|
onClick: _temp2$8,
|
|
23374
23712
|
"data-status": status,
|
|
@@ -24080,7 +24418,7 @@ function CalendarHeader(t0) {
|
|
|
24080
24418
|
if ($[60] !== previousButtonProps || $[61] !== t15 || $[62] !== t16 || $[63] !== t17 || $[64] !== t21) {
|
|
24081
24419
|
t22 = /* @__PURE__ */ jsx(IconButton, {
|
|
24082
24420
|
variant: "ghost",
|
|
24083
|
-
icon:
|
|
24421
|
+
icon: faAngleLeft,
|
|
24084
24422
|
disabled: t15,
|
|
24085
24423
|
circle: true,
|
|
24086
24424
|
...previousButtonProps,
|
|
@@ -24123,7 +24461,7 @@ function CalendarHeader(t0) {
|
|
|
24123
24461
|
if ($[73] !== nextButtonProps || $[74] !== t23 || $[75] !== t24 || $[76] !== t25 || $[77] !== t29) {
|
|
24124
24462
|
t30 = /* @__PURE__ */ jsx(IconButton, {
|
|
24125
24463
|
variant: "ghost",
|
|
24126
|
-
icon:
|
|
24464
|
+
icon: faAngleRight,
|
|
24127
24465
|
disabled: t23,
|
|
24128
24466
|
circle: true,
|
|
24129
24467
|
...nextButtonProps,
|
|
@@ -29519,8 +29857,8 @@ function FieldGroupTitle(t0) {
|
|
|
29519
29857
|
}
|
|
29520
29858
|
// src/components/Form/Form.tsx
|
|
29521
29859
|
/**
|
|
29522
|
-
* The `Form` provides a wrapper over the browser's native validation capabilities and can
|
|
29523
|
-
* to declaratively build simple forms.
|
|
29860
|
+
* The `Form` component provides a wrapper over the browser's native validation capabilities and can
|
|
29861
|
+
* be used to declaratively build simple forms.
|
|
29524
29862
|
*
|
|
29525
29863
|
* It composes the following subcomponents:
|
|
29526
29864
|
*
|
|
@@ -29536,7 +29874,16 @@ function FieldGroupTitle(t0) {
|
|
|
29536
29874
|
* Example usage:
|
|
29537
29875
|
*
|
|
29538
29876
|
* ```tsx
|
|
29539
|
-
* import {
|
|
29877
|
+
* import {
|
|
29878
|
+
* Button,
|
|
29879
|
+
* Field,
|
|
29880
|
+
* Form,
|
|
29881
|
+
* FormError,
|
|
29882
|
+
* FormSubmit,
|
|
29883
|
+
* Input,
|
|
29884
|
+
* Label,
|
|
29885
|
+
* Stack,
|
|
29886
|
+
* } from "@ostack.tech/ui";
|
|
29540
29887
|
*
|
|
29541
29888
|
* function SignInForm() {
|
|
29542
29889
|
* return (
|
|
@@ -32113,7 +32460,7 @@ function RadioGroup(t0) {
|
|
|
32113
32460
|
// src/components/Separator/Separator.tsx
|
|
32114
32461
|
/**
|
|
32115
32462
|
* Component that visually or semantically separates content. Built on top of the [Radix Separator
|
|
32116
|
-
* primitive](https://www.radix-ui.com/primitives/docs/components/separator)
|
|
32463
|
+
* primitive](https://www.radix-ui.com/primitives/docs/components/separator).
|
|
32117
32464
|
*
|
|
32118
32465
|
* Example usage:
|
|
32119
32466
|
*
|
|
@@ -34321,7 +34668,7 @@ function TabListScrollButton(t0) {
|
|
|
34321
34668
|
if ($[9] !== className || $[10] !== disabled || $[11] !== label || $[12] !== onClick || $[13] !== otherProps || $[14] !== prefix || $[15] !== shouldDisable || $[16] !== showScrollButtons || $[17] !== side) {
|
|
34322
34669
|
t2 = showScrollButtons && /* @__PURE__ */ jsx(IconButton, {
|
|
34323
34670
|
variant: "ghost",
|
|
34324
|
-
icon: side === "left" ?
|
|
34671
|
+
icon: side === "left" ? faAngleLeft : faAngleRight,
|
|
34325
34672
|
label,
|
|
34326
34673
|
className: cx(prefix("tabs__scroll-button"), prefix(`tabs__scroll-button--${side}`), className),
|
|
34327
34674
|
disabled: shouldDisable || disabled,
|
|
@@ -34492,7 +34839,7 @@ function Tabs(t0) {
|
|
|
34492
34839
|
// src/components/Text/Text.tsx
|
|
34493
34840
|
/**
|
|
34494
34841
|
* Component used to render text. By default, it renders as a [`<span>`
|
|
34495
|
-
* element](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/
|
|
34842
|
+
* element](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/span). Use the `as`
|
|
34496
34843
|
* property to render as an `<em>`, `<p>`, `<strong>`, or other text elements.
|
|
34497
34844
|
*
|
|
34498
34845
|
* Example usage:
|
|
@@ -34980,6 +35327,6 @@ function _temp2(nextSearchParams, t0) {
|
|
|
34980
35327
|
function _temp(location) {
|
|
34981
35328
|
return location.search;
|
|
34982
35329
|
}
|
|
34983
|
-
export { Action, ActionGroup, ActionMenu, ActionMenuCheckboxItem, ActionMenuRadioGroup, ActionMenuRadioItem, ActionSplit, Actions, ActionsSecondary, Alert, AlertDialog, AlertDialogAction, AlertDialogBody, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogProvider, AlertDialogProviderContext, AlertDialogTitle, AlertDialogTrigger, AlertTitle, BREAKPOINTS, Badge, Box, Button, ButtonGroup, Calendar, Card, CardBody, CardFooter, CardHeader, CardTitle, Checkbox, CheckboxGroup, ClearContexts, CloseButton, Code, Collapsible, CollapsibleContent, CollapsibleTrigger, CommandMenu, CommandMenuDialog, CommandMenuGroup, CommandMenuItem, Container, Control, ControlAddon, ControlCode, ControlContext, ControlWithContainerRef, DATA_TABLE_SELECTION_COLUMN_WIDTH, DEFAULT_DATE_FORMAT, DEFAULT_DOCUMENT_TITLE_BASE_SEPARATOR, DEFAULT_DOCUMENT_TITLE_BREADCRUMBS_SEPARATOR, DEFAULT_TABLE_COLUMN_WIDTH, DEFAULT_TABLE_ROW_HEIGHT, DataTable, DataTableCell, DataTableColumn, DataTableColumnGroup, DataTableColumns, DataTableContent, DataTableFilter, DataTablePagination, DataTableRow, DataTableRowsPerPage, DataTableSelectionTrigger, DateInput, DateRangeInput, DescriptionList, DescriptionListItem, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, DocumentTitle, DocumentTitleProvider, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ErrorBoundary, ErrorReportingContext, ErrorReportingProvider, Feedback, FeedbackList, FeedbackPopover, FeedbackProvider, Field, FieldGroup, FieldGroupBody, FieldGroupHeader, FieldGroupTitle, Form, FormError, FormReset, FormState, FormSubmit, Grid, Heading, HelperText, HelperTextProvider, Icon, IconButton, Input, Keybinds, Keyboard, Label, LabelProvider, Layer, Link, LocalizationContext, LocalizationProvider, Mark, MenuList, MenuListGroup, MenuListItem, NATIVE_CONTROLS, NumericInput, Option, OptionsGroup, Output, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger, Portal, PortalContext, PrefixContext, PrefixProvider, Printer, PrinterContent, PrinterTrigger, Radio, RadioGroup, Root, Select, Separator, Slot, Slottable, Spinner, Stack, Step, StepContent, StepList, Stepper, StepperFinishTrigger, StepperNextTrigger, StepperPreviousTrigger, StepperState, Tab, TabContent, TabList, Table, TableBody, TableCell, TableColumn, TableColumnGroup, TableFoot, TableHead, TableRow, Tabs, Tag, Text, TextArea, Toast, ToastDescription, ToastManagerContext, ToastManagerProvider, ToastProvider, ToastTitle, ToastViewport, Tooltip, TooltipProvider, VisuallyHidden, boolDataAttr, buildErrorReport, combineAriaIds, compare, compareNumericStrings, computed, controlStatusToAccent, cx, defaultIgnoreKeyboardShortcut, ensureStore, formatNumericValue, ignoreKeyboardShortcutInEditableElements, isNumericStringNegative, isResponsiveValueObject, keybindsToAriaKeyShortcuts, localeLabel, matchAgainstFilter, mergeResponsiveValues, navigate, normalizeKeybinds, normalizeNumericString, numericStringFloatToInt, numericStringIntToFloat, numericStringRepresentsNull, numericToString, parseChildren, parseDateStrict, parseNumericValue, registerKeyboardShortcut, setBoolDataAttr, setDefaultPrefix, setNativeProperty, stableSort, stringHash, useActionsContext, useAlertDialog, useCombinedEventHandler, useCombinedRef, useConstant, useControlContext, useControllableState, useCssVars, useCurrentMediaBreakpoint, useCurrentResponsiveValue, useDataTableApiRef, useDataTableColumnLabel, useDataTableColumnLabelId, useDateTransformer, useErrorBoundary, useErrorReporter, useFeedbackControlName, useFeedbackIds, useFormApi, useFormState, useFormValue, useHelperTextIds, useIntersectionObserver, useIsInFeedbackList, useIsInFeedbackProvider, useIsInField, useIsInLabelProvider, useIsInRoot, useIsInTableCell, useKeyboardShortcut, useLabel, useLabelId, useLatestRef, useLayerZIndex, useLocale, useLocation, useMarginProps, useMeasure, useMediaBreakpointDown, useMediaBreakpointUp, useMediaQuery, useNumericTransformer, useOnLabelChange, usePaddingProps, usePortalContext, usePrefix, usePrevious, usePrint, usePrintClassNames, usePrintInProgress, usePrinterDocumentTitle, usePrinting, useRegisterControl, useRegisterControlInField, useRegisterControlInLabelProvider, useRegisterControlNameInFeedbackProvider, useRegisterControlStatusInFeedbackProvider, useResponsiveValue, useResponsiveValues, useSafeLayoutEffect, useScrollPosition, useScrollbarSize, useSearchParam, useSearchParams, useSetControlFocusedInFeedbackProvider, useSizingProps, useSpacing, useStartPrintingTask, useStepperApi, useTableNumberOfColumns, useTextProps, useToastManager, validateNumericTransformerOptions, warnOnce, withCleanup };
|
|
35330
|
+
export { Action, ActionGroup, ActionMenu, ActionMenuCheckboxItem, ActionMenuRadioGroup, ActionMenuRadioItem, ActionSplit, Actions, ActionsSecondary, Alert, AlertDialog, AlertDialogAction, AlertDialogBody, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogProvider, AlertDialogProviderContext, AlertDialogTitle, AlertDialogTrigger, AlertTitle, BREAKPOINTS, Badge, Box, Button, ButtonGroup, Calendar, Card, CardBody, CardFooter, CardHeader, CardTitle, Checkbox, CheckboxGroup, ClearContexts, CloseButton, Code, Collapsible, CollapsibleContent, CollapsibleTrigger, CommandMenu, CommandMenuDialog, CommandMenuGroup, CommandMenuItem, Container, Control, ControlAddon, ControlCode, ControlContext, ControlWithContainerRef, DATA_TABLE_SELECTION_COLUMN_WIDTH, DEFAULT_DATE_FORMAT, DEFAULT_DOCUMENT_TITLE_BASE_SEPARATOR, DEFAULT_DOCUMENT_TITLE_BREADCRUMBS_SEPARATOR, DEFAULT_TABLE_COLUMN_WIDTH, DEFAULT_TABLE_ROW_HEIGHT, DataTable, DataTableCell, DataTableColumn, DataTableColumnGroup, DataTableColumns, DataTableContent, DataTableFilter, DataTablePagination, DataTableRow, DataTableRowsPerPage, DataTableSelectionTrigger, DateInput, DateRangeInput, DescriptionList, DescriptionListItem, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, DocumentTitle, DocumentTitleProvider, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ErrorBoundary, ErrorReportingContext, ErrorReportingProvider, Feedback, FeedbackList, FeedbackPopover, FeedbackProvider, Field, FieldGroup, FieldGroupBody, FieldGroupHeader, FieldGroupTitle, Form, FormError, FormReset, FormState, FormSubmit, Grid, Heading, HelperText, HelperTextProvider, Icon, IconButton, Input, Keybinds, Keyboard, Label, LabelProvider, Layer, Link, LocalizationContext, LocalizationProvider, Mark, MenuList, MenuListGroup, MenuListItem, NATIVE_CONTROLS, NumericInput, Option, OptionsGroup, Output, Pagination, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger, Portal, PortalContext, PrefixContext, PrefixProvider, Printer, PrinterContent, PrinterTrigger, Radio, RadioGroup, Root, Select, Separator, Slot, Slottable, Spinner, Stack, Step, StepContent, StepList, Stepper, StepperFinishTrigger, StepperNextTrigger, StepperPreviousTrigger, StepperState, Tab, TabContent, TabList, Table, TableBody, TableCell, TableColumn, TableColumnGroup, TableFoot, TableHead, TableRow, Tabs, Tag, Text, TextArea, Toast, ToastDescription, ToastManagerContext, ToastManagerProvider, ToastProvider, ToastTitle, ToastViewport, Tooltip, TooltipProvider, VisuallyHidden, boolDataAttr, buildErrorReport, combineAriaIds, compare, compareNumericStrings, computed, controlStatusToAccent, cx, defaultIgnoreKeyboardShortcut, ensureStore, formatNumericValue, ignoreKeyboardShortcutInEditableElements, isNumericStringNegative, isResponsiveValueObject, keybindsToAriaKeyShortcuts, localeLabel, matchAgainstFilter, mergeResponsiveValues, navigate, normalizeKeybinds, normalizeNumericString, numericStringFloatToInt, numericStringIntToFloat, numericStringRepresentsNull, numericToString, parseChildren, parseDateStrict, parseNumericValue, registerKeyboardShortcut, setBoolDataAttr, setDefaultPrefix, setNativeProperty, stableSort, stringHash, useActionsContext, useAlertDialog, useCombinedEventHandler, useCombinedRef, useConstant, useControlContext, useControllableState, useCssVars, useCurrentMediaBreakpoint, useCurrentResponsiveValue, useDataTableApiRef, useDataTableColumnLabel, useDataTableColumnLabelId, useDateTransformer, useErrorBoundary, useErrorReporter, useFeedbackControlName, useFeedbackIds, useFormApi, useFormState, useFormValue, useHelperTextIds, useIntersectionObserver, useIsInFeedbackList, useIsInFeedbackProvider, useIsInField, useIsInLabelProvider, useIsInRoot, useIsInTableCell, useKeyboardShortcut, useLabel, useLabelId, useLatestRef, useLayerZIndex, useLocale, useLocation, useMarginProps, useMeasure, useMediaBreakpointDown, useMediaBreakpointUp, useMediaQuery, useNumericTransformer, useOnLabelChange, usePaddingProps, usePortalContext, usePrefix, usePrevious, usePrint, usePrintClassNames, usePrintInProgress, usePrinterDocumentTitle, usePrinting, useRegisterControl, useRegisterControlInField, useRegisterControlInLabelProvider, useRegisterControlNameInFeedbackProvider, useRegisterControlStatusInFeedbackProvider, useResponsiveValue, useResponsiveValues, useSafeLayoutEffect, useScrollPosition, useScrollbarSize, useSearchParam, useSearchParams, useSetControlFocusedInFeedbackProvider, useSizingProps, useSpacing, useStartPrintingTask, useStepperApi, useTableNumberOfColumns, useTextProps, useToastManager, validateNumericTransformerOptions, warnOnce, withCleanup };
|
|
34984
35331
|
|
|
34985
35332
|
//# sourceMappingURL=ostack-ui.js.map
|