@economic/taco 2.49.5 → 2.50.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/esm/index.css +12 -4
- package/dist/esm/packages/taco/src/components/Card/Card.js +2 -2
- package/dist/esm/packages/taco/src/components/Card/Card.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Checkbox/Checkbox.js +3 -2
- package/dist/esm/packages/taco/src/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Datepicker/useDatepicker.js +9 -1
- package/dist/esm/packages/taco/src/components/Datepicker/useDatepicker.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/Table3.js +8 -1
- package/dist/esm/packages/taco/src/components/Table3/Table3.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/Editing/DiscardChangesConfirmationDialog.js +0 -1
- package/dist/esm/packages/taco/src/components/Table3/components/Editing/DiscardChangesConfirmationDialog.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/listeners/useTableEditingListener.js +7 -15
- package/dist/esm/packages/taco/src/components/Table3/listeners/useTableEditingListener.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/useTable3.js +1 -1
- package/dist/esm/packages/taco/src/components/Table3/useTable3.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Tooltip/Tooltip.js +6 -9
- package/dist/esm/packages/taco/src/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Actions.js +2 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Actions.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/Header.js +2 -2
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/Header.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyleGrid.js +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyleGrid.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/types.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableDataLoader2.js +2 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableDataLoader2.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowActions.js +11 -0
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowActions.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/setup.js +2 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/setup.js.map +1 -1
- package/dist/index.css +12 -4
- package/dist/primitives/Table/types.d.ts +2 -2
- package/dist/primitives/Table/useTableManager/features/useTableRowActions.d.ts +2 -0
- package/dist/taco.cjs.development.js +231 -215
- package/dist/taco.cjs.development.js.map +1 -1
- package/dist/taco.cjs.production.min.js +1 -1
- package/dist/taco.cjs.production.min.js.map +1 -1
- package/package.json +8 -8
|
@@ -6,7 +6,8 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau
|
|
|
6
6
|
|
|
7
7
|
var React = require('react');
|
|
8
8
|
var React__default = _interopDefault(React);
|
|
9
|
-
var cn =
|
|
9
|
+
var cn = require('clsx');
|
|
10
|
+
var cn__default = _interopDefault(cn);
|
|
10
11
|
var AlertDialogPrimitive = require('@radix-ui/react-alert-dialog');
|
|
11
12
|
var AccordionPrimitive = require('@radix-ui/react-accordion');
|
|
12
13
|
var TooltipPrimitive = require('@radix-ui/react-tooltip');
|
|
@@ -3845,7 +3846,7 @@ const Icon = /*#__PURE__*/React__default.forwardRef(function Icon(props, ref) {
|
|
|
3845
3846
|
} = props;
|
|
3846
3847
|
const Component = icons[name];
|
|
3847
3848
|
/* 24x24 _at the base body font_ - must be em so that they scale with font size - tailwind spacing uses rem */
|
|
3848
|
-
const className =
|
|
3849
|
+
const className = cn__default('inline-flex h-[1.715em] w-[1.715em] flex-shrink-0', props.className, {
|
|
3849
3850
|
'p-[3px]': (_props$className = props.className) === null || _props$className === void 0 ? void 0 : _props$className.includes('rounded-full')
|
|
3850
3851
|
});
|
|
3851
3852
|
return Component ? (/*#__PURE__*/React__default.createElement(Component, Object.assign({}, otherProps, {
|
|
@@ -3866,7 +3867,7 @@ const BadgeIcon = /*#__PURE__*/React.forwardRef(function Badge(props, ref) {
|
|
|
3866
3867
|
small,
|
|
3867
3868
|
...otherProps
|
|
3868
3869
|
} = props;
|
|
3869
|
-
const className =
|
|
3870
|
+
const className = cn__default(`rounded-full border overflow-hidden whitespace-nowrap inline-flex items-center justify-center border-transparent [&>*]:max-h-full shrink-0`, {
|
|
3870
3871
|
'w-5 h-5': !small
|
|
3871
3872
|
}, {
|
|
3872
3873
|
'w-4 h-4 text-xs': small
|
|
@@ -3913,7 +3914,7 @@ const Alert = /*#__PURE__*/React__default.forwardRef(function Alert(props, ref)
|
|
|
3913
3914
|
state,
|
|
3914
3915
|
onClose
|
|
3915
3916
|
} = props;
|
|
3916
|
-
const className =
|
|
3917
|
+
const className = cn__default(`flex w-full flex-row items-start gap-2 rounded-md border-transparent p-3 ${getSubtleColorShadeClasses(getColorByState(state))}`, props.className);
|
|
3917
3918
|
return /*#__PURE__*/React__default.createElement("div", Object.assign({}, props, {
|
|
3918
3919
|
ref: ref,
|
|
3919
3920
|
className: className,
|
|
@@ -3989,7 +3990,7 @@ const Action = /*#__PURE__*/React.forwardRef(function AlertDialogAction(props, r
|
|
|
3989
3990
|
});
|
|
3990
3991
|
|
|
3991
3992
|
const Backdrop = /*#__PURE__*/React.forwardRef(function Backdrop(props, ref) {
|
|
3992
|
-
const className =
|
|
3993
|
+
const className = cn__default('fixed inset-0 cursor-default overflow-y-auto bg-blue-900/[0.3] aria-hidden:invisible print:overflow-visible print:absolute', props.className);
|
|
3993
3994
|
return /*#__PURE__*/React.createElement("div", Object.assign({}, props, {
|
|
3994
3995
|
className: className,
|
|
3995
3996
|
"data-taco": "backdrop",
|
|
@@ -4041,14 +4042,14 @@ const Title = /*#__PURE__*/React.forwardRef(function AlertDialogTitle(props, ref
|
|
|
4041
4042
|
} = useCurrentAlertDialog();
|
|
4042
4043
|
const iconProps = iconPropsByVariant(parentProps.variant);
|
|
4043
4044
|
return /*#__PURE__*/React.createElement(AlertDialogPrimitive.Title, Object.assign({}, props, {
|
|
4044
|
-
className:
|
|
4045
|
+
className: cn__default('flex items-center', props.className),
|
|
4045
4046
|
ref: ref
|
|
4046
4047
|
}), iconProps ? /*#__PURE__*/React.createElement(BadgeIcon, Object.assign({}, iconProps, {
|
|
4047
4048
|
className: "mr-2"
|
|
4048
4049
|
})) : undefined, props.children);
|
|
4049
4050
|
});
|
|
4050
4051
|
const Content = /*#__PURE__*/React.forwardRef(function AlertDialogContent(props, ref) {
|
|
4051
|
-
const className =
|
|
4052
|
+
const className = cn__default('p-6', getDialogPositionClassnames(), getDialogStylingClassnames(), getDialogSizeClassnames('dialog'));
|
|
4052
4053
|
return /*#__PURE__*/React.createElement(AlertDialogPrimitive.Portal, null, /*#__PURE__*/React.createElement(AlertDialogPrimitive.Overlay, {
|
|
4053
4054
|
asChild: true
|
|
4054
4055
|
}, /*#__PURE__*/React.createElement(Backdrop, null, /*#__PURE__*/React.createElement(AlertDialogPrimitive.Content, Object.assign({}, props, {
|
|
@@ -4091,7 +4092,7 @@ const AccordionContext = /*#__PURE__*/React__default.createContext({
|
|
|
4091
4092
|
});
|
|
4092
4093
|
const StyledTrigger = /*#__PURE__*/React__default.forwardRef(function AccordionStyledTrigger(props, ref) {
|
|
4093
4094
|
const isExpanded = !!props['aria-expanded'];
|
|
4094
|
-
const className =
|
|
4095
|
+
const className = cn__default('w-full inline-flex justify-between items-center align-middle', 'focus:rounded-sm focus:border-blue-500 focus:yt-focus', props.className);
|
|
4095
4096
|
return /*#__PURE__*/React__default.createElement("button", Object.assign({}, props, {
|
|
4096
4097
|
ref: ref,
|
|
4097
4098
|
className: className
|
|
@@ -4152,7 +4153,7 @@ const Accordion = props => {
|
|
|
4152
4153
|
};
|
|
4153
4154
|
}
|
|
4154
4155
|
const type = typeof valueProps.defaultValue === 'string' || typeof valueProps.value === 'string' ? 'single' : 'multiple';
|
|
4155
|
-
const className =
|
|
4156
|
+
const className = cn__default('divide-y divide-grey-200', props.className);
|
|
4156
4157
|
return /*#__PURE__*/React__default.createElement(AccordionContext.Provider, {
|
|
4157
4158
|
value: context
|
|
4158
4159
|
}, /*#__PURE__*/React__default.createElement(AccordionPrimitive.Root, Object.assign({}, otherProps, valueProps, {
|
|
@@ -4184,7 +4185,7 @@ const Badge = /*#__PURE__*/React.forwardRef(function Badge(props, ref) {
|
|
|
4184
4185
|
...otherProps
|
|
4185
4186
|
} = props;
|
|
4186
4187
|
const isTransparent = color === 'transparent';
|
|
4187
|
-
const className =
|
|
4188
|
+
const className = cn__default('rounded-full border box-border overflow-hidden whitespace-nowrap inline-flex items-center justify-center', {
|
|
4188
4189
|
[`border ${getOutlineColorShadeClasses(color)}`]: outline,
|
|
4189
4190
|
[`border-none font-normal ${getSubtleColorShadeClasses(color)}`]: subtle,
|
|
4190
4191
|
[`border-none ${getColorShadeClasses(color)}`]: !outline && !subtle,
|
|
@@ -4204,7 +4205,7 @@ const Badge = /*#__PURE__*/React.forwardRef(function Badge(props, ref) {
|
|
|
4204
4205
|
}, children) : children;
|
|
4205
4206
|
if (status) {
|
|
4206
4207
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
4207
|
-
className:
|
|
4208
|
+
className: cn__default('mr-1 h-2 w-2 shrink-0 rounded-full', getColorShadeClasses(color))
|
|
4208
4209
|
}), contentToRender);
|
|
4209
4210
|
}
|
|
4210
4211
|
return contentToRender;
|
|
@@ -4471,7 +4472,7 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(props, ref) {
|
|
|
4471
4472
|
hide = false,
|
|
4472
4473
|
...otherProps
|
|
4473
4474
|
} = props;
|
|
4474
|
-
const className =
|
|
4475
|
+
const className = cn__default('break-words', otherProps.className);
|
|
4475
4476
|
if (hide) {
|
|
4476
4477
|
return children;
|
|
4477
4478
|
}
|
|
@@ -4481,19 +4482,16 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(props, ref) {
|
|
|
4481
4482
|
asChild: true,
|
|
4482
4483
|
ref: ref
|
|
4483
4484
|
}, children), /*#__PURE__*/React.createElement(TooltipPrimitive.Portal, null, /*#__PURE__*/React.createElement(TooltipPrimitive.Content, Object.assign({}, otherProps, {
|
|
4484
|
-
asChild: true,
|
|
4485
|
-
className: className,
|
|
4486
4485
|
side: placement,
|
|
4487
|
-
sideOffset: 3
|
|
4488
|
-
|
|
4489
|
-
className: "xs:max-w-[theme(spacing.56)] max-w-[theme(spacing.32)] animate-[fade-in_150ms] rounded-sm bg-blue-900 px-2 py-1 text-xs font-bold text-white print:hidden",
|
|
4486
|
+
sideOffset: 3,
|
|
4487
|
+
className: cn.clsx('xs:max-w-[theme(spacing.56)] max-w-[theme(spacing.32)] animate-[fade-in_150ms] rounded bg-blue-900 px-2 py-1 text-xs text-white print:hidden', className),
|
|
4490
4488
|
"data-taco": "tooltip",
|
|
4491
4489
|
style: {
|
|
4492
4490
|
transformOrigin: 'var(--radix-tooltip-content-transform-origin)'
|
|
4493
4491
|
}
|
|
4494
|
-
}, /*#__PURE__*/React.createElement(TooltipPrimitive.Arrow, {
|
|
4495
|
-
className: "-mt-px fill-blue-900
|
|
4496
|
-
})
|
|
4492
|
+
}), title, /*#__PURE__*/React.createElement(TooltipPrimitive.Arrow, {
|
|
4493
|
+
className: "-mt-px fill-blue-900 stroke-blue-900"
|
|
4494
|
+
}))));
|
|
4497
4495
|
});
|
|
4498
4496
|
|
|
4499
4497
|
const getButtonClasses = () => {
|
|
@@ -4578,7 +4576,7 @@ const Base = /*#__PURE__*/React.forwardRef(function IconButtonBase(props, ref) {
|
|
|
4578
4576
|
rounded = false,
|
|
4579
4577
|
...otherProps
|
|
4580
4578
|
} = props;
|
|
4581
|
-
const className =
|
|
4579
|
+
const className = cn__default('w-8', getButtonClasses(), getAppearanceClasses(otherProps.appearance, true), {
|
|
4582
4580
|
'rounded-full': rounded,
|
|
4583
4581
|
rounded: !rounded
|
|
4584
4582
|
}, props.className);
|
|
@@ -4953,7 +4951,7 @@ const Banner = /*#__PURE__*/React.forwardRef(function Banner(props, ref) {
|
|
|
4953
4951
|
const {
|
|
4954
4952
|
texts
|
|
4955
4953
|
} = useLocalization();
|
|
4956
|
-
const className =
|
|
4954
|
+
const className = cn__default('bg-white relative flex items-center gap-2 py-2 px-4 leading-6 shadow-md z-10', props.className);
|
|
4957
4955
|
return /*#__PURE__*/React.createElement("div", {
|
|
4958
4956
|
className: className,
|
|
4959
4957
|
"data-taco": "banner",
|
|
@@ -4973,7 +4971,7 @@ const Base$1 = /*#__PURE__*/React.forwardRef(function ButtonBase(props, ref) {
|
|
|
4973
4971
|
fluid,
|
|
4974
4972
|
...otherProps
|
|
4975
4973
|
} = props;
|
|
4976
|
-
const className =
|
|
4974
|
+
const className = cn__default(getButtonClasses(), getAppearanceClasses(appearance), 'rounded px-3', {
|
|
4977
4975
|
'w-full': fluid
|
|
4978
4976
|
}, props.className);
|
|
4979
4977
|
return createButtonWithTooltip({
|
|
@@ -5124,7 +5122,7 @@ const Calendar$1 = props => {
|
|
|
5124
5122
|
}
|
|
5125
5123
|
handleChange(date, event);
|
|
5126
5124
|
};
|
|
5127
|
-
const className =
|
|
5125
|
+
const className = cn__default('flex bg-white text-xs p-2', otherProps.className);
|
|
5128
5126
|
return /*#__PURE__*/React.createElement("div", {
|
|
5129
5127
|
"data-taco": "calendar"
|
|
5130
5128
|
}, /*#__PURE__*/React.createElement(reactDayPicker.DayPicker, {
|
|
@@ -5191,7 +5189,7 @@ const Truncate = ({
|
|
|
5191
5189
|
}, []);
|
|
5192
5190
|
const clonedChildrenWithRef = /*#__PURE__*/React__default.cloneElement(React__default.Children.only(children), {
|
|
5193
5191
|
ref,
|
|
5194
|
-
className:
|
|
5192
|
+
className: cn__default(children.props.className, 'truncate', {
|
|
5195
5193
|
'hover:cursor-pointer': isTruncated
|
|
5196
5194
|
})
|
|
5197
5195
|
});
|
|
@@ -5208,8 +5206,8 @@ const Content$2 = /*#__PURE__*/React.forwardRef(function CardContent(externalPro
|
|
|
5208
5206
|
noPadding,
|
|
5209
5207
|
...props
|
|
5210
5208
|
} = externalProps;
|
|
5211
|
-
const className =
|
|
5212
|
-
'
|
|
5209
|
+
const className = cn__default('flex-grow overflow-auto', {
|
|
5210
|
+
'px-4 pb-4': !noPadding
|
|
5213
5211
|
}, props.className);
|
|
5214
5212
|
return /*#__PURE__*/React.createElement("div", Object.assign({}, props, {
|
|
5215
5213
|
className: className,
|
|
@@ -5225,13 +5223,13 @@ const Card = /*#__PURE__*/React.forwardRef(function Card(props, ref) {
|
|
|
5225
5223
|
className,
|
|
5226
5224
|
...otherProps
|
|
5227
5225
|
} = props;
|
|
5228
|
-
const cardClassName =
|
|
5226
|
+
const cardClassName = cn__default('bg-white flex flex-col rounded-xl border border-solid border-radius-[12px] border-grey-300 hover:border-grey-500', className);
|
|
5229
5227
|
return /*#__PURE__*/React.createElement("div", Object.assign({}, otherProps, {
|
|
5230
5228
|
className: cardClassName,
|
|
5231
5229
|
"data-taco": "card",
|
|
5232
5230
|
ref: ref
|
|
5233
5231
|
}), /*#__PURE__*/React.createElement("div", {
|
|
5234
|
-
className: "
|
|
5232
|
+
className: "flex justify-between px-4 pb-2 pt-4"
|
|
5235
5233
|
}, title && (/*#__PURE__*/React.createElement(Truncate, {
|
|
5236
5234
|
tooltip: title
|
|
5237
5235
|
}, /*#__PURE__*/React.createElement("h4", {
|
|
@@ -5271,7 +5269,7 @@ const Spinner = /*#__PURE__*/React__default.forwardRef(function Spinner(props, r
|
|
|
5271
5269
|
if (!visible) {
|
|
5272
5270
|
return null;
|
|
5273
5271
|
}
|
|
5274
|
-
const className =
|
|
5272
|
+
const className = cn__default('inline-flex flex-col relative items-center', otherProps.className);
|
|
5275
5273
|
return /*#__PURE__*/React__default.createElement("div", Object.assign({}, otherProps, {
|
|
5276
5274
|
className: className,
|
|
5277
5275
|
"data-taco": "spinner",
|
|
@@ -5300,8 +5298,9 @@ const Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(props, ref) {
|
|
|
5300
5298
|
...otherProps
|
|
5301
5299
|
} = props;
|
|
5302
5300
|
const id = useId(props.id);
|
|
5303
|
-
const className =
|
|
5304
|
-
'self-start': !!label
|
|
5301
|
+
const className = cn__default('bg-white h-5 w-5 border rounded text-sm flex-shrink-0 focus-visible:yt-focus disabled:cursor-not-allowed text-white', {
|
|
5302
|
+
'self-start': !!label,
|
|
5303
|
+
'mt-[0.1rem]': !label
|
|
5305
5304
|
}, invalid ? {
|
|
5306
5305
|
'border-red-500 hover:border-red-700 aria-checked:border-red-500 aria-checked-mixed:border-red-500 aria-checked:bg-red-500 aria-checked-mixed:bg-red-500 aria-checked:hover:border-red-700 aria-checked-mixed:hover:border-red-700 aria-checked:hover:bg-red-700 aria-checked-mixed:hover:bg-red-700': !props.disabled,
|
|
5307
5306
|
'border-red-500/50 aria-checked:wcag-red-500/50 aria-checked-mixed:wcag-red-500/50': props.disabled
|
|
@@ -5326,7 +5325,7 @@ const Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(props, ref) {
|
|
|
5326
5325
|
event.currentTarget.click();
|
|
5327
5326
|
}
|
|
5328
5327
|
};
|
|
5329
|
-
const spinnerClassname =
|
|
5328
|
+
const spinnerClassname = cn__default(
|
|
5330
5329
|
//Spinner is slightly bigger then 'line' and 'tick' icons, so making it 2px smaller from each side
|
|
5331
5330
|
"m-0.5 !h-[calc(100%-theme('spacing.1'))] !w-[calc(100%-theme('spacing.1'))]", {
|
|
5332
5331
|
'text-blue-500': !checked && !indeterminate
|
|
@@ -5348,7 +5347,7 @@ const Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(props, ref) {
|
|
|
5348
5347
|
className: "!h-full !w-full"
|
|
5349
5348
|
}))));
|
|
5350
5349
|
if (label) {
|
|
5351
|
-
const labelContainerClassName =
|
|
5350
|
+
const labelContainerClassName = cn__default('flex items-center cursor-pointer gap-2', {
|
|
5352
5351
|
'cursor-not-allowed text-grey-300': props.disabled
|
|
5353
5352
|
});
|
|
5354
5353
|
return /*#__PURE__*/React.createElement("span", {
|
|
@@ -5367,7 +5366,7 @@ const getInputClasses = props => {
|
|
|
5367
5366
|
const disabled = props.disabled || !!props['aria-disabled'];
|
|
5368
5367
|
const readOnly = props.readOnly || !!props['aria-readonly'];
|
|
5369
5368
|
const invalid = props.invalid || !!props['aria-invalid'];
|
|
5370
|
-
return
|
|
5369
|
+
return cn__default('peer text-black text-sm border font-normal not-italic no-underline rounded flex items-center leading-6 px-2 relative w-full text-ellipsis transition-colors transition-opacity ease-in min-h-[theme(spacing.8)] focus:yt-focus',
|
|
5371
5370
|
// hide the arrow controls on input[type=number]
|
|
5372
5371
|
'[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none', {
|
|
5373
5372
|
'bg-white': !props.highlighted && !readOnly,
|
|
@@ -5386,7 +5385,7 @@ const getInputClasses = props => {
|
|
|
5386
5385
|
};
|
|
5387
5386
|
const getButtonStateClasses = (invalid, disabled = false) => {
|
|
5388
5387
|
if (invalid) {
|
|
5389
|
-
return
|
|
5388
|
+
return cn__default('border border-red-500 group-peer-hover:enabled:border-red-700 transition-colors ease-in', {
|
|
5390
5389
|
'border-red-500/30': disabled
|
|
5391
5390
|
});
|
|
5392
5391
|
}
|
|
@@ -5496,7 +5495,7 @@ const InputWithoutDeprecatedFeatures = /*#__PURE__*/React.forwardRef(function In
|
|
|
5496
5495
|
const prefixRect = useBoundingClientRectListener(prefixRef);
|
|
5497
5496
|
const postfixRef = React.useRef(null);
|
|
5498
5497
|
const postfixRect = useBoundingClientRectListener(postfixRef, [postfix]);
|
|
5499
|
-
const className =
|
|
5498
|
+
const className = cn__default(getInputClasses(props), {
|
|
5500
5499
|
'pl-8': !!prefix,
|
|
5501
5500
|
'pr-8': !!postfix
|
|
5502
5501
|
}, attributes.className);
|
|
@@ -5551,7 +5550,7 @@ const Affix = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function Aff
|
|
|
5551
5550
|
type
|
|
5552
5551
|
} = props;
|
|
5553
5552
|
return /*#__PURE__*/React.createElement("div", {
|
|
5554
|
-
className:
|
|
5553
|
+
className: cn__default('group absolute top-0 flex h-full items-center justify-center px-2',
|
|
5555
5554
|
// icon
|
|
5556
5555
|
'[&_[data-taco="icon"]]:!h-5 [&_[data-taco="icon"]]:!w-5', {
|
|
5557
5556
|
'text-grey-300': disabled,
|
|
@@ -5573,7 +5572,7 @@ const Input = /*#__PURE__*/React.forwardRef(function LegacyInput(props, ref) {
|
|
|
5573
5572
|
let postfix;
|
|
5574
5573
|
if (button) {
|
|
5575
5574
|
const disabled = button.props.disabled || attributes.disabled;
|
|
5576
|
-
const buttonClassName =
|
|
5575
|
+
const buttonClassName = cn__default('items-center focus:z-10 flex justify-center rounded-l-none rounded-r h-full focus:rounded focus:outline-none', getButtonStateClasses(attributes.invalid, disabled), button.props.className);
|
|
5577
5576
|
postfix = /*#__PURE__*/React.cloneElement(button, {
|
|
5578
5577
|
className: buttonClassName,
|
|
5579
5578
|
disabled
|
|
@@ -5749,7 +5748,7 @@ const ScrollableList = /*#__PURE__*/React.forwardRef(function ScrollableList(pro
|
|
|
5749
5748
|
'aria-selected': multiselect ? getOptionCheckedState(String(option.value), index) : currentIndex === index,
|
|
5750
5749
|
'data-focused': currentIndex === index,
|
|
5751
5750
|
children: option.text,
|
|
5752
|
-
className:
|
|
5751
|
+
className: cn__default('flex items-center px-3 w-full cursor-pointer bg-white flex-[0_0_2rem] focus:wcag-blue-500 focus:border-blue-500', {
|
|
5753
5752
|
'sticky top-0 font-bold': depth === 0 && !!option.hasChildren
|
|
5754
5753
|
}),
|
|
5755
5754
|
disabled: option.disabled,
|
|
@@ -5766,7 +5765,7 @@ const ScrollableList = /*#__PURE__*/React.forwardRef(function ScrollableList(pro
|
|
|
5766
5765
|
});
|
|
5767
5766
|
const list = {
|
|
5768
5767
|
...otherProps,
|
|
5769
|
-
className:
|
|
5768
|
+
className: cn__default('inline-flex flex-col list-none !p-0 m-0 overflow-y-auto h-auto', getInputClasses(props), {
|
|
5770
5769
|
'yt-list--multiselect': multiselect,
|
|
5771
5770
|
'pointer-events-none': disabled,
|
|
5772
5771
|
'cursor-not-allowed': disabled || readOnly
|
|
@@ -6247,7 +6246,7 @@ const Combobox = /*#__PURE__*/React.forwardRef(function Combobox(props, ref) {
|
|
|
6247
6246
|
texts
|
|
6248
6247
|
} = useLocalization();
|
|
6249
6248
|
const selectDimensions = useBoundingClientRectListener(internalRef);
|
|
6250
|
-
const className =
|
|
6249
|
+
const className = cn__default('inline-flex relative', {
|
|
6251
6250
|
'yt-combobox--inline': props.inline
|
|
6252
6251
|
}, externalClassName);
|
|
6253
6252
|
return /*#__PURE__*/React.createElement("span", {
|
|
@@ -6298,7 +6297,7 @@ const Combobox = /*#__PURE__*/React.forwardRef(function Combobox(props, ref) {
|
|
|
6298
6297
|
},
|
|
6299
6298
|
sideOffset: 4
|
|
6300
6299
|
}, /*#__PURE__*/React.createElement(ScrollableList, Object.assign({}, list, {
|
|
6301
|
-
className:
|
|
6300
|
+
className: cn__default('max-h-[calc(12rem+2px)] w-auto max-w-[theme(spacing.96)] !border-blue-500'),
|
|
6302
6301
|
style: {
|
|
6303
6302
|
minWidth: selectDimensions === null || selectDimensions === void 0 ? void 0 : selectDimensions.width
|
|
6304
6303
|
},
|
|
@@ -6399,6 +6398,12 @@ const useDatepicker = ({
|
|
|
6399
6398
|
setInternalValue(formattedValue !== null && formattedValue !== void 0 ? formattedValue : '');
|
|
6400
6399
|
}
|
|
6401
6400
|
}, [value]);
|
|
6401
|
+
const isDisabledDay = React.useMemo(() => {
|
|
6402
|
+
if (originalValueAsDate && calendar !== null && calendar !== void 0 && calendar.disabledDays) {
|
|
6403
|
+
return reactDayPicker.isMatch(originalValueAsDate, calendar === null || calendar === void 0 ? void 0 : calendar.disabledDays); // can happen if you type a disabled date in input.
|
|
6404
|
+
}
|
|
6405
|
+
return false;
|
|
6406
|
+
}, [originalValueAsDate]);
|
|
6402
6407
|
// event handlers
|
|
6403
6408
|
const handleInputBlur = event => {
|
|
6404
6409
|
event.persist();
|
|
@@ -6435,6 +6440,7 @@ const useDatepicker = ({
|
|
|
6435
6440
|
const inputProps = {
|
|
6436
6441
|
...props,
|
|
6437
6442
|
autoComplete: 'off',
|
|
6443
|
+
invalid: props.invalid || isDisabledDay,
|
|
6438
6444
|
onBlur: handleInputBlur,
|
|
6439
6445
|
onChange: handleInputChange,
|
|
6440
6446
|
onKeyDown: handleKeyDown,
|
|
@@ -6522,7 +6528,7 @@ const Content$3 = /*#__PURE__*/React.forwardRef(function PopoverContent(props, r
|
|
|
6522
6528
|
placement: side,
|
|
6523
6529
|
...popoverContentProps
|
|
6524
6530
|
} = props;
|
|
6525
|
-
const className =
|
|
6531
|
+
const className = cn__default(getPopoverStyleClassnames(), props.className);
|
|
6526
6532
|
let output;
|
|
6527
6533
|
if (typeof props.children === 'function') {
|
|
6528
6534
|
output = /*#__PURE__*/React.createElement(PopoverPrimitive.Close, {
|
|
@@ -6591,7 +6597,7 @@ const Datepicker = /*#__PURE__*/React.forwardRef(function Datepicker(props, ref)
|
|
|
6591
6597
|
const {
|
|
6592
6598
|
texts
|
|
6593
6599
|
} = useLocalization();
|
|
6594
|
-
const className =
|
|
6600
|
+
const className = cn__default('inline-flex w-full text-black font-normal', externalClassName);
|
|
6595
6601
|
const popoverContentRef = React.useRef(null);
|
|
6596
6602
|
const handleOpenAutofocus = React.useCallback(e => {
|
|
6597
6603
|
var _popoverContentRef$cu, _popoverContentRef$cu2;
|
|
@@ -6753,14 +6759,14 @@ const useDraggable = ref => {
|
|
|
6753
6759
|
};
|
|
6754
6760
|
|
|
6755
6761
|
const Title$1 = /*#__PURE__*/React.forwardRef(function DialogTitle(props, ref) {
|
|
6756
|
-
const className =
|
|
6762
|
+
const className = cn__default('text-center', props.className);
|
|
6757
6763
|
return /*#__PURE__*/React.createElement(DialogPrimitive.Title, Object.assign({}, props, {
|
|
6758
6764
|
className: className,
|
|
6759
6765
|
ref: ref
|
|
6760
6766
|
}));
|
|
6761
6767
|
});
|
|
6762
6768
|
const Footer$1 = /*#__PURE__*/React.forwardRef(function DialogFooter(props, ref) {
|
|
6763
|
-
const className =
|
|
6769
|
+
const className = cn__default('mt-8 flex justify-end', props.className);
|
|
6764
6770
|
return /*#__PURE__*/React.createElement("div", Object.assign({}, props, {
|
|
6765
6771
|
className: className,
|
|
6766
6772
|
ref: ref
|
|
@@ -6800,8 +6806,8 @@ const Content$4 = /*#__PURE__*/React.forwardRef(function DialogContent(props, re
|
|
|
6800
6806
|
const {
|
|
6801
6807
|
texts
|
|
6802
6808
|
} = useLocalization();
|
|
6803
|
-
const className =
|
|
6804
|
-
const containerClassName =
|
|
6809
|
+
const className = cn__default('relative bg-white animate-[fade-in_150ms] rounded print:!static', getDialogPositionClassnames(), getDialogSizeClassnames(dialog.size), 'print:w-full print:h-max print:m-0 print:overflow-visible');
|
|
6810
|
+
const containerClassName = cn__default('bg-white p-6 rounded relative z-10 shadow print:p-0',
|
|
6805
6811
|
// The `!fixed` property is crucial to ensure that when a draggable dialog is moved, the printed document still displays its content across the full page.
|
|
6806
6812
|
'print:overflow-visible print:h-max print:!transform-none print:!inset-0 print:!m-0', {
|
|
6807
6813
|
'rounded-b-none': !!dialog.elements.extra
|
|
@@ -6860,7 +6866,7 @@ const Content$4 = /*#__PURE__*/React.forwardRef(function DialogContent(props, re
|
|
|
6860
6866
|
const DialogDrawer = /*#__PURE__*/React.forwardRef(function DialogDrawer(props, ref) {
|
|
6861
6867
|
var _dialog$drawer, _dialog$drawer2;
|
|
6862
6868
|
const dialog = useCurrentDialog();
|
|
6863
|
-
const className =
|
|
6869
|
+
const className = cn__default('absolute top-0 -ml-[4px] hidden h-full w-full overflow-y-auto rounded-r bg-white p-6 text-left', props.className);
|
|
6864
6870
|
return /*#__PURE__*/React.createElement(framerMotion.motion.div, Object.assign({}, props, {
|
|
6865
6871
|
className: className,
|
|
6866
6872
|
"data-taco": "dialog-drawer",
|
|
@@ -6892,7 +6898,7 @@ const DialogDrawer = /*#__PURE__*/React.forwardRef(function DialogDrawer(props,
|
|
|
6892
6898
|
DialogDrawer.displayName = 'DialogDrawer';
|
|
6893
6899
|
|
|
6894
6900
|
const Extra = /*#__PURE__*/React.forwardRef(function DialogExtra(props, ref) {
|
|
6895
|
-
const className =
|
|
6901
|
+
const className = cn__default('wcag-grey-100 absolute top-full left-0 -mt-px w-full rounded-t-none rounded-b p-6 text-left', props.className);
|
|
6896
6902
|
return /*#__PURE__*/React.createElement("div", Object.assign({}, props, {
|
|
6897
6903
|
className: className,
|
|
6898
6904
|
"data-taco": "dialog-extra",
|
|
@@ -6974,7 +6980,7 @@ const Group = /*#__PURE__*/React.forwardRef(function Group(props, ref) {
|
|
|
6974
6980
|
orientation = 'horizontal',
|
|
6975
6981
|
...otherProps
|
|
6976
6982
|
} = props;
|
|
6977
|
-
const className =
|
|
6983
|
+
const className = cn__default('flex gap-2 [&:has([data-taco="tag"])]:!gap-1', {
|
|
6978
6984
|
'flex-col ': orientation === 'vertical'
|
|
6979
6985
|
}, props.className);
|
|
6980
6986
|
return /*#__PURE__*/React.createElement(Tag, Object.assign({}, otherProps, {
|
|
@@ -7015,7 +7021,7 @@ const getDrawerSizeClassnames = size => {
|
|
|
7015
7021
|
}
|
|
7016
7022
|
};
|
|
7017
7023
|
const getDrawerContentClassNames = (size, variant, open) => {
|
|
7018
|
-
return
|
|
7024
|
+
return cn__default('bg-white h-full bottom-0 top-0 right-0 transition-none', {
|
|
7019
7025
|
block: open,
|
|
7020
7026
|
hidden: !open,
|
|
7021
7027
|
fixed: variant === 'overlay',
|
|
@@ -7023,23 +7029,23 @@ const getDrawerContentClassNames = (size, variant, open) => {
|
|
|
7023
7029
|
}, getDrawerSizeClassnames(size));
|
|
7024
7030
|
};
|
|
7025
7031
|
const getDrawerContainerClassNames = variant => {
|
|
7026
|
-
return
|
|
7032
|
+
return cn__default('bg-white mx-auto absolute h-full w-full flex flex-col ', {
|
|
7027
7033
|
'shadow-[0_6px_9px_0_rgba(89,85,98,0.3),0_0_1px_0_rgba(89,85,98,0.2)]': variant === 'overlay',
|
|
7028
7034
|
'border-l border-grey-300 h-full': variant === 'embedded'
|
|
7029
7035
|
});
|
|
7030
7036
|
};
|
|
7031
7037
|
const getDrawerDragHandlerClassNames = () => {
|
|
7032
|
-
return
|
|
7038
|
+
return cn__default('border-[2px] absolute border-transparent top-0 w-2 h-full cursor-ew-resize left-0 hover:border-l-blue-500');
|
|
7033
7039
|
};
|
|
7034
7040
|
const getBackdropClassNames = open => {
|
|
7035
|
-
return
|
|
7041
|
+
return cn__default({
|
|
7036
7042
|
block: open,
|
|
7037
7043
|
hidden: !open
|
|
7038
7044
|
});
|
|
7039
7045
|
};
|
|
7040
7046
|
|
|
7041
7047
|
const Bar = props => {
|
|
7042
|
-
const className =
|
|
7048
|
+
const className = cn__default(`flex select-none touch-none transition-colors hover:bg-grey`, {
|
|
7043
7049
|
'w-[7px] hover:w-[14px] mr-[2px] hover:px-[2px] hover:mr-0': props.orientation === 'vertical',
|
|
7044
7050
|
'flex-col h-[7px] hover:h-[14px] mb-[2px] hover:py-[2px] hover:mb-0': props.orientation === 'horizontal'
|
|
7045
7051
|
});
|
|
@@ -7059,7 +7065,7 @@ const ScrollArea = props => {
|
|
|
7059
7065
|
...otherProps
|
|
7060
7066
|
} = props;
|
|
7061
7067
|
return /*#__PURE__*/React__default.createElement(ScrollAreaPrimitive.Root, Object.assign({}, otherProps, {
|
|
7062
|
-
className:
|
|
7068
|
+
className: cn__default('overflow-hidden', props.className),
|
|
7063
7069
|
"data-taco": "scrollarea"
|
|
7064
7070
|
}), /*#__PURE__*/React__default.createElement(ScrollAreaPrimitive.Viewport, {
|
|
7065
7071
|
className: "h-full w-full"
|
|
@@ -7110,7 +7116,7 @@ const Title$2 = /*#__PURE__*/React__default.forwardRef(function DrawerTitle(prop
|
|
|
7110
7116
|
* where we might want to hide the grey separator. For this reason separator was rendered with using of classNames,
|
|
7111
7117
|
* so it can be easily overriden in exceptional scenarios.
|
|
7112
7118
|
* */
|
|
7113
|
-
const cName =
|
|
7119
|
+
const cName = cn__default('grow-0 py-4 px-4 justify-self-start mb-0 border-b-[1px] border-grey-300 flex items-start', className);
|
|
7114
7120
|
React__default.useEffect(() => {
|
|
7115
7121
|
var _ref$current, _drawer$querySelector, _closeButton$offsetWi, _drawer$querySelector2, _actionsWrapper$offse;
|
|
7116
7122
|
const drawer = ref === null || ref === void 0 ? void 0 : (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.closest('[data-taco="drawer"]');
|
|
@@ -7150,7 +7156,7 @@ const Footer$2 = /*#__PURE__*/React__default.forwardRef(function DrawerFooter(pr
|
|
|
7150
7156
|
/**
|
|
7151
7157
|
* The same scenario as Title, grey separator rendered using classNames to have posibility to override it.
|
|
7152
7158
|
*/
|
|
7153
|
-
const cName =
|
|
7159
|
+
const cName = cn__default('mt-auto flex justify-end grow-0 p-4 border-t-[1px] border-grey-300', props.className);
|
|
7154
7160
|
return /*#__PURE__*/React__default.createElement("div", Object.assign({}, otherProps, {
|
|
7155
7161
|
className: cName,
|
|
7156
7162
|
ref: ref
|
|
@@ -7161,7 +7167,7 @@ const Actions = /*#__PURE__*/React__default.forwardRef(function Actions(props, r
|
|
|
7161
7167
|
className,
|
|
7162
7168
|
...otherProps
|
|
7163
7169
|
} = props;
|
|
7164
|
-
const cName =
|
|
7170
|
+
const cName = cn__default('absolute top-0 right-10 mr-[8px] mt-4', className);
|
|
7165
7171
|
// Id is added to identify the actions wrapper inside a useEffect in Dialog.Title
|
|
7166
7172
|
return /*#__PURE__*/React__default.createElement(Group, Object.assign({}, otherProps, {
|
|
7167
7173
|
className: cName,
|
|
@@ -7186,7 +7192,7 @@ const InnerContent = /*#__PURE__*/React__default.forwardRef(function InnerConten
|
|
|
7186
7192
|
children,
|
|
7187
7193
|
...otherProps
|
|
7188
7194
|
} = props;
|
|
7189
|
-
const cName =
|
|
7195
|
+
const cName = cn__default('grow flex flex-col', {
|
|
7190
7196
|
'overflow-y-hidden': isScrollable,
|
|
7191
7197
|
'p-4': !isScrollable
|
|
7192
7198
|
}, className);
|
|
@@ -7266,7 +7272,7 @@ const DrawerContent = /*#__PURE__*/React__default.forwardRef(function Content(pr
|
|
|
7266
7272
|
menu.close();
|
|
7267
7273
|
};
|
|
7268
7274
|
}
|
|
7269
|
-
const containerClassName = React__default.useMemo(() =>
|
|
7275
|
+
const containerClassName = React__default.useMemo(() => cn__default(getDrawerContainerClassNames(variant), className), [className]);
|
|
7270
7276
|
const {
|
|
7271
7277
|
contentClassName,
|
|
7272
7278
|
dragHandlerClassName
|
|
@@ -7387,7 +7393,7 @@ const Trigger$4 = /*#__PURE__*/React.forwardRef(function DrawerTrigger(props, re
|
|
|
7387
7393
|
const DEFAULT_OUTLET_NAME = 'default';
|
|
7388
7394
|
const Outlet = /*#__PURE__*/React.forwardRef(function Outlet(props, ref) {
|
|
7389
7395
|
var _props$name;
|
|
7390
|
-
const className =
|
|
7396
|
+
const className = cn__default('h-full ml-auto overflow-hidden flex-shrink-0', props.className);
|
|
7391
7397
|
return /*#__PURE__*/React.createElement("div", Object.assign({}, props, {
|
|
7392
7398
|
className: className,
|
|
7393
7399
|
"data-taco": "drawer-outlet",
|
|
@@ -7493,10 +7499,10 @@ const Field = /*#__PURE__*/React.forwardRef(function Field(props, ref) {
|
|
|
7493
7499
|
message,
|
|
7494
7500
|
...otherProps
|
|
7495
7501
|
} = props;
|
|
7496
|
-
const className =
|
|
7502
|
+
const className = cn__default('flex flex-col font-bold text-xs leading-loose pb-4 min-h-[theme(spacing.18)]', {
|
|
7497
7503
|
'text-grey-300': disabled
|
|
7498
7504
|
}, props.className);
|
|
7499
|
-
const messageClassName =
|
|
7505
|
+
const messageClassName = cn__default('h-4 text-xs text-left leading-normal font-normal truncate -mb-4', {
|
|
7500
7506
|
'text-grey-700': !invalid && !warning,
|
|
7501
7507
|
'text-red-500': invalid,
|
|
7502
7508
|
'text-yellow-700': warning && !invalid,
|
|
@@ -7521,7 +7527,7 @@ const Form = /*#__PURE__*/React.forwardRef(function Form(props, ref) {
|
|
|
7521
7527
|
horizontal = false,
|
|
7522
7528
|
...otherProps
|
|
7523
7529
|
} = props;
|
|
7524
|
-
const className =
|
|
7530
|
+
const className = cn__default('yt-form', {
|
|
7525
7531
|
'yt-form--horizontal flex flex-wrap': horizontal
|
|
7526
7532
|
}, props.className);
|
|
7527
7533
|
return /*#__PURE__*/React.createElement("form", Object.assign({}, otherProps, {
|
|
@@ -7554,7 +7560,7 @@ const Anchor$1 = /*#__PURE__*/React.forwardRef(function HangerAnchor(props, exte
|
|
|
7554
7560
|
}), children);
|
|
7555
7561
|
});
|
|
7556
7562
|
const Title$3 = /*#__PURE__*/React.forwardRef(function DialogTitle(props, ref) {
|
|
7557
|
-
const className =
|
|
7563
|
+
const className = cn__default('mb-1 text-base font-bold flex w-full', props.className);
|
|
7558
7564
|
return /*#__PURE__*/React.createElement("span", Object.assign({}, props, {
|
|
7559
7565
|
className: className,
|
|
7560
7566
|
ref: ref
|
|
@@ -7569,7 +7575,7 @@ const Content$6 = /*#__PURE__*/React.forwardRef(function HangerContent(props, re
|
|
|
7569
7575
|
const {
|
|
7570
7576
|
texts
|
|
7571
7577
|
} = useLocalization();
|
|
7572
|
-
const className =
|
|
7578
|
+
const className = cn__default('wcag-blue-500 border border-transparent rounded p-3 pr-12 yt-shadow focus:border-transparent max-w-sm', props.className);
|
|
7573
7579
|
const handleInteractOutside = event => {
|
|
7574
7580
|
event.preventDefault();
|
|
7575
7581
|
};
|
|
@@ -7656,7 +7662,7 @@ const Content$7 = /*#__PURE__*/React.forwardRef(function HoverCardContent(props,
|
|
|
7656
7662
|
const {
|
|
7657
7663
|
placement: side
|
|
7658
7664
|
} = props;
|
|
7659
|
-
const className =
|
|
7665
|
+
const className = cn__default(getPopoverStyleClassnames(), 'min-w-[theme(spacing.40)] max-w-[theme(spacing.96)]', props.className);
|
|
7660
7666
|
return /*#__PURE__*/React.createElement(HoverCardPrimitive.Portal, null, /*#__PURE__*/React.createElement(HoverCardPrimitive.Content, {
|
|
7661
7667
|
className: className,
|
|
7662
7668
|
"data-taco": "hover-card",
|
|
@@ -7694,7 +7700,7 @@ const Item$1 = /*#__PURE__*/React__default.forwardRef(function Item(props, ref)
|
|
|
7694
7700
|
title,
|
|
7695
7701
|
...attributes
|
|
7696
7702
|
} = props;
|
|
7697
|
-
const iconClassName =
|
|
7703
|
+
const iconClassName = cn__default('flex shrink-0 h-10 w-10 items-center justify-center rounded-md border border-black/10', getSubtleColorShadeClasses(color !== null && color !== void 0 ? color : 'transparent'));
|
|
7698
7704
|
return /*#__PURE__*/React__default.createElement(Tag, Object.assign({}, attributes, {
|
|
7699
7705
|
"aria-disabled": disabled ? true : undefined,
|
|
7700
7706
|
"data-taco": "list-item",
|
|
@@ -7766,7 +7772,7 @@ const Switch = /*#__PURE__*/React.forwardRef(function Switch(props, ref) {
|
|
|
7766
7772
|
...otherProps
|
|
7767
7773
|
} = props;
|
|
7768
7774
|
const id = useId(props.id);
|
|
7769
|
-
const className =
|
|
7775
|
+
const className = cn__default('group h-5 w-9 flex flex-shrink-0 rounded-full inline-flex focus-visible:yt-focus', {
|
|
7770
7776
|
'mr-2': !!label,
|
|
7771
7777
|
'bg-grey-500 hover:bg-grey-700 aria-checked:bg-blue-500 aria-checked:hover:bg-blue-700': !props.disabled,
|
|
7772
7778
|
'bg-grey-500/50 aria-checked:bg-blue-500/50 cursor-not-allowed': props.disabled
|
|
@@ -7787,7 +7793,7 @@ const Switch = /*#__PURE__*/React.forwardRef(function Switch(props, ref) {
|
|
|
7787
7793
|
className: "pointer-events-none mt-0.5 h-4 w-4 translate-x-[0.15rem] rounded-full bg-white transition-transform will-change-transform group-disabled:opacity-50 group-aria-checked:translate-x-[1.1rem]"
|
|
7788
7794
|
}));
|
|
7789
7795
|
if (label) {
|
|
7790
|
-
const labelContainerClassName =
|
|
7796
|
+
const labelContainerClassName = cn__default('flex self-start cursor-pointer', {
|
|
7791
7797
|
'cursor-not-allowed text-grey-300': props.disabled
|
|
7792
7798
|
});
|
|
7793
7799
|
return /*#__PURE__*/React.createElement("span", {
|
|
@@ -7836,7 +7842,7 @@ const ToggleItem = /*#__PURE__*/React__default.forwardRef(function Toggle(props,
|
|
|
7836
7842
|
return;
|
|
7837
7843
|
}
|
|
7838
7844
|
}
|
|
7839
|
-
const className =
|
|
7845
|
+
const className = cn__default('group/toggle', props.className);
|
|
7840
7846
|
return /*#__PURE__*/React__default.createElement(Item$1, Object.assign({}, attributes, {
|
|
7841
7847
|
className: className,
|
|
7842
7848
|
onClick: handleClick,
|
|
@@ -8282,7 +8288,7 @@ const Listbox = /*#__PURE__*/React.forwardRef(function Listbox(props, ref) {
|
|
|
8282
8288
|
list,
|
|
8283
8289
|
input
|
|
8284
8290
|
} = useListbox(otherProps, ref);
|
|
8285
|
-
const className =
|
|
8291
|
+
const className = cn__default('bg-white inline-flex relative w-full', externalClassName);
|
|
8286
8292
|
return /*#__PURE__*/React.createElement("span", {
|
|
8287
8293
|
"data-taco": "listbox",
|
|
8288
8294
|
className: className
|
|
@@ -8305,7 +8311,7 @@ const MultiListbox = /*#__PURE__*/React.forwardRef(function Listbox(props, ref)
|
|
|
8305
8311
|
list,
|
|
8306
8312
|
input
|
|
8307
8313
|
} = useMultiListbox(otherProps, ref);
|
|
8308
|
-
const className =
|
|
8314
|
+
const className = cn__default('bg-white inline-flex relative w-full', externalClassName);
|
|
8309
8315
|
return /*#__PURE__*/React.createElement("span", {
|
|
8310
8316
|
"data-taco": "listbox",
|
|
8311
8317
|
className: className
|
|
@@ -8329,7 +8335,7 @@ const Content$8 = /*#__PURE__*/React.forwardRef(function MenuContent(props, ref)
|
|
|
8329
8335
|
placement: side,
|
|
8330
8336
|
...otherProps
|
|
8331
8337
|
} = props;
|
|
8332
|
-
const className =
|
|
8338
|
+
const className = cn__default('border border-transparent rounded block outline-none p-1 yt-shadow wcag-white', props.className);
|
|
8333
8339
|
// attach refs to each child
|
|
8334
8340
|
const childrenRefs = React.useRef([]);
|
|
8335
8341
|
const childrenWithRefs = React.Children.toArray(props.children).filter(child => !!child) // remove falsey children
|
|
@@ -8419,7 +8425,7 @@ const Shortcut = ({
|
|
|
8419
8425
|
keys,
|
|
8420
8426
|
...props
|
|
8421
8427
|
}) => {
|
|
8422
|
-
const className =
|
|
8428
|
+
const className = cn__default('inline-flex gap-0.5', props.className);
|
|
8423
8429
|
const texts = getShortcutText(keys);
|
|
8424
8430
|
return /*#__PURE__*/React__default.createElement("span", Object.assign({}, props, {
|
|
8425
8431
|
className: className
|
|
@@ -8448,7 +8454,7 @@ const useItemStyling = ({
|
|
|
8448
8454
|
menu === null || menu === void 0 ? void 0 : menu.registerIndentation();
|
|
8449
8455
|
}
|
|
8450
8456
|
}, [indented]);
|
|
8451
|
-
return
|
|
8457
|
+
return cn__default('flex items-center justify-start h-8 pr-1.5 relative rounded w-full focus:outline-none group', {
|
|
8452
8458
|
'pl-7': menu === null || menu === void 0 ? void 0 : menu.indented,
|
|
8453
8459
|
'pl-1.5': !(menu !== null && menu !== void 0 && menu.indented),
|
|
8454
8460
|
'cursor-pointer text-black hover:wcag-grey-200 data-[highlighted]:wcag-grey-200': !disabled,
|
|
@@ -8607,7 +8613,7 @@ const Checkbox$2 = /*#__PURE__*/React.forwardRef(function MenuCheckboxItem(props
|
|
|
8607
8613
|
});
|
|
8608
8614
|
|
|
8609
8615
|
const getRadioClassnames = (disabled = false, invalid = false) => {
|
|
8610
|
-
return
|
|
8616
|
+
return cn__default('flex flex-shrink-0 items-center justify-center h-4 w-4 mt-[0.2rem] rounded-full bg-white border-2 focus-visible:yt-focus disabled:cursor-not-allowed hover:border-4', invalid ? {
|
|
8611
8617
|
'border-red-500 hover:border-red-700 aria-checked:bg-red-500 aria-checked:border-red-500 hover:aria-checked:border-red-700': !disabled,
|
|
8612
8618
|
'border-red-500/50 aria-checked:bg-red-500/50 aria-checked:border-red-500/50': disabled
|
|
8613
8619
|
} : {
|
|
@@ -8630,8 +8636,8 @@ const RadioGroupItem = /*#__PURE__*/React.forwardRef(function RadioGroupItem(pro
|
|
|
8630
8636
|
...otherProps
|
|
8631
8637
|
} = props;
|
|
8632
8638
|
const isDisabled = context.disabled || props.disabled;
|
|
8633
|
-
const className =
|
|
8634
|
-
const labelClassName =
|
|
8639
|
+
const className = cn__default('self-start', getRadioClassnames(isDisabled, context.invalid));
|
|
8640
|
+
const labelClassName = cn__default('flex items-center gap-2', {
|
|
8635
8641
|
'cursor-pointer': !isDisabled,
|
|
8636
8642
|
'cursor-not-allowed text-grey-300': isDisabled
|
|
8637
8643
|
}, props.className);
|
|
@@ -8698,7 +8704,7 @@ const RadioGroup = /*#__PURE__*/React.forwardRef(function RadioGroup(props, ref)
|
|
|
8698
8704
|
context,
|
|
8699
8705
|
props: otherProps
|
|
8700
8706
|
} = useRadioGroup(props);
|
|
8701
|
-
const className =
|
|
8707
|
+
const className = cn__default('flex items-start gap-y-2', {
|
|
8702
8708
|
'flex-wrap gap-x-4 ': otherProps.orientation === 'horizontal',
|
|
8703
8709
|
'flex-col': otherProps.orientation === 'vertical'
|
|
8704
8710
|
}, otherProps.className);
|
|
@@ -8743,7 +8749,7 @@ const RadioGroup$1 = /*#__PURE__*/React.forwardRef(function MenuRadioItem(props,
|
|
|
8743
8749
|
context,
|
|
8744
8750
|
props: otherProps
|
|
8745
8751
|
} = useRadioGroup(props);
|
|
8746
|
-
const className =
|
|
8752
|
+
const className = cn__default('flex flex-col', props.className);
|
|
8747
8753
|
return /*#__PURE__*/React.createElement(MenuRadioGroupContext.Provider, {
|
|
8748
8754
|
value: context
|
|
8749
8755
|
}, /*#__PURE__*/React.createElement(DropdownMenuPrimitive.RadioGroup, Object.assign({}, otherProps, {
|
|
@@ -8763,7 +8769,7 @@ const Separator = /*#__PURE__*/React.forwardRef(function Separator(props, ref) {
|
|
|
8763
8769
|
|
|
8764
8770
|
const Header = /*#__PURE__*/React.forwardRef(function MenuHeader(props, ref) {
|
|
8765
8771
|
const menu = useCurrentMenu();
|
|
8766
|
-
const className =
|
|
8772
|
+
const className = cn__default('flex items-center justify-start h-7 pr-1.5 text-xs text-grey-700', {
|
|
8767
8773
|
'pl-7': menu === null || menu === void 0 ? void 0 : menu.indented,
|
|
8768
8774
|
'pl-1.5': !(menu !== null && menu !== void 0 && menu.indented)
|
|
8769
8775
|
}, props.className);
|
|
@@ -8779,7 +8785,7 @@ const SubMenu = /*#__PURE__*/React.forwardRef(function MenuSubMenu(props, ref) {
|
|
|
8779
8785
|
children,
|
|
8780
8786
|
...otherProps
|
|
8781
8787
|
} = props;
|
|
8782
|
-
const className =
|
|
8788
|
+
const className = cn__default('border border-transparent rounded block outline-none p-1 yt-shadow wcag-white', props.className);
|
|
8783
8789
|
return /*#__PURE__*/React.createElement(DropdownMenuPrimitive.Portal, null, /*#__PURE__*/React.createElement(DropdownMenuPrimitive.SubContent, Object.assign({}, otherProps, {
|
|
8784
8790
|
className: className,
|
|
8785
8791
|
"data-taco": "menu-submenu",
|
|
@@ -8839,7 +8845,7 @@ const ModeSwitch = /*#__PURE__*/React.forwardRef(function ModeSwitch(props, ref)
|
|
|
8839
8845
|
onChange,
|
|
8840
8846
|
...otherProps
|
|
8841
8847
|
} = props;
|
|
8842
|
-
const className =
|
|
8848
|
+
const className = cn__default('group w-14 h-8 flex flex-shrink-0 rounded-full inline-flex focus-visible:yt-focus p-1', {
|
|
8843
8849
|
'bg-grey-500 hover:bg-grey-700 aria-checked:bg-blue-500 aria-checked:hover:bg-blue-700': !props.disabled,
|
|
8844
8850
|
'bg-grey-500 aria-checked:bg-blue-500 cursor-not-allowed opacity-50': props.disabled
|
|
8845
8851
|
}, props.className);
|
|
@@ -8878,7 +8884,7 @@ const TreeviewGroup = /*#__PURE__*/React__default.forwardRef(function TreeviewGr
|
|
|
8878
8884
|
setExpanded(fixed || initialExpanded);
|
|
8879
8885
|
}
|
|
8880
8886
|
}, [fixed, initialExpanded]);
|
|
8881
|
-
const listClassName =
|
|
8887
|
+
const listClassName = cn__default('flex-col mb-0', {
|
|
8882
8888
|
flex: expanded,
|
|
8883
8889
|
hidden: !expanded
|
|
8884
8890
|
});
|
|
@@ -8967,7 +8973,7 @@ const Item$3 = /*#__PURE__*/React__default.forwardRef(function Item(props, ref)
|
|
|
8967
8973
|
const proxyRef = useMergedRef(ref);
|
|
8968
8974
|
const [isDraggedOver, dropTargetProps] = useDropTarget(onDrop);
|
|
8969
8975
|
const isTreeitem = role === 'treeitem';
|
|
8970
|
-
const className =
|
|
8976
|
+
const className = cn__default('yt-navigation__item cursor-pointer', {
|
|
8971
8977
|
'w-full mb-px py-1 px-3 flex items-center hover:bg-grey-300': isTreeitem,
|
|
8972
8978
|
'bg-white w-full h-10 px-3 flex-shrink-0 flex items-center justify-between cursor-pointer': !isTreeitem,
|
|
8973
8979
|
'yt-navigation__item--active': active && !isDraggedOver,
|
|
@@ -8997,16 +9003,16 @@ const Item$3 = /*#__PURE__*/React__default.forwardRef(function Item(props, ref)
|
|
|
8997
9003
|
});
|
|
8998
9004
|
const Panel = /*#__PURE__*/React__default.forwardRef(function Panel(props, ref) {
|
|
8999
9005
|
return /*#__PURE__*/React__default.createElement("div", Object.assign({}, props, {
|
|
9000
|
-
className:
|
|
9006
|
+
className: cn__default('w-full bg-white p-3', props.className),
|
|
9001
9007
|
ref: ref
|
|
9002
9008
|
}));
|
|
9003
9009
|
});
|
|
9004
9010
|
const MenuGroup = /*#__PURE__*/React__default.forwardRef(function MenuGroup(props, ref) {
|
|
9005
|
-
const className =
|
|
9011
|
+
const className = cn__default('flex-shrink-0 space-y-1 outline-none', {
|
|
9006
9012
|
'bg-white pb-2': props.fixed
|
|
9007
9013
|
}, typeof props.className === 'function' ? props.className(false) : props.className);
|
|
9008
9014
|
const title = expanded => {
|
|
9009
|
-
const className =
|
|
9015
|
+
const className = cn__default('bg-white h-10 pl-3 pr-1 flex items-center justify-between w-full', {
|
|
9010
9016
|
'mb-1': expanded,
|
|
9011
9017
|
'cursor-pointer hover:text-blue-500': !props.fixed
|
|
9012
9018
|
});
|
|
@@ -9041,7 +9047,7 @@ const Menu$2 = /*#__PURE__*/React__default.forwardRef(function Menu(props, ref)
|
|
|
9041
9047
|
return scrollableAreas;
|
|
9042
9048
|
}, [props.children]);
|
|
9043
9049
|
return /*#__PURE__*/React__default.createElement(Treeview, Object.assign({}, props, {
|
|
9044
|
-
className:
|
|
9050
|
+
className: cn__default('divide-grey-100 flex flex-grow flex-col divide-y-2 overflow-y-auto', props.className),
|
|
9045
9051
|
ref: ref
|
|
9046
9052
|
}), scrollableAreas.map((area, i) => Array.isArray(area) ? (/*#__PURE__*/React__default.createElement("div", {
|
|
9047
9053
|
className: "divide-grey-100 flex h-0 flex-auto flex-shrink-0 flex-grow flex-col divide-y-2 overflow-y-auto",
|
|
@@ -9054,7 +9060,7 @@ const Navigation = /*#__PURE__*/React__default.forwardRef(function Navigation(pr
|
|
|
9054
9060
|
children,
|
|
9055
9061
|
...otherProps
|
|
9056
9062
|
} = props;
|
|
9057
|
-
const className =
|
|
9063
|
+
const className = cn__default('h-full flex flex-col bg-grey-100 divide-y-2 divide-grey-100', props.className);
|
|
9058
9064
|
return /*#__PURE__*/React__default.createElement("div", Object.assign({}, otherProps, {
|
|
9059
9065
|
className: className,
|
|
9060
9066
|
"data-taco": "navigation",
|
|
@@ -9164,18 +9170,18 @@ const OverflowGroup = /*#__PURE__*/React__default.forwardRef(function OverflowGr
|
|
|
9164
9170
|
const MoreButton = (_moreButton = moreButton === null || moreButton === void 0 ? void 0 : moreButton(moreButtonText)) !== null && _moreButton !== void 0 ? _moreButton : /*#__PURE__*/React__default.createElement(IconButton, {
|
|
9165
9171
|
icon: "more"
|
|
9166
9172
|
});
|
|
9167
|
-
const className =
|
|
9173
|
+
const className = cn__default('flex overflow-hidden', props.className);
|
|
9168
9174
|
return /*#__PURE__*/React__default.createElement("div", Object.assign({}, attributes, {
|
|
9169
9175
|
className: className,
|
|
9170
9176
|
"data-taco": "overflow-group",
|
|
9171
9177
|
ref: internalRef
|
|
9172
9178
|
}), children.map((child, index) => /*#__PURE__*/React__default.cloneElement(child, {
|
|
9173
|
-
className:
|
|
9179
|
+
className: cn__default(child.props.className, {
|
|
9174
9180
|
visible: intersectedChildIndex === undefined || index < intersectedChildIndex,
|
|
9175
9181
|
'invisible order-[100] pointer-events-none': intersectedChildIndex !== undefined && index >= intersectedChildIndex
|
|
9176
9182
|
})
|
|
9177
9183
|
})), hiddenChildren.length ? /*#__PURE__*/React__default.cloneElement(MoreButton, {
|
|
9178
|
-
className:
|
|
9184
|
+
className: cn__default('sticky right-0 order-[99]', MoreButton.props.className),
|
|
9179
9185
|
'data-observer-ignore': true,
|
|
9180
9186
|
menu: menuProps => (/*#__PURE__*/React__default.createElement(Menu$1, Object.assign({}, menuProps), /*#__PURE__*/React__default.createElement(Menu$1.Content, null, hiddenChildren.map((child, index) => wrapChild ? (/*#__PURE__*/React__default.createElement(Menu$1.Item, {
|
|
9181
9187
|
key: index
|
|
@@ -9331,7 +9337,7 @@ const useSelect = ({
|
|
|
9331
9337
|
const item = findByValue(flattenedData, value);
|
|
9332
9338
|
if (item) {
|
|
9333
9339
|
text = item.icon ? (/*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.cloneElement(item.icon, {
|
|
9334
|
-
className:
|
|
9340
|
+
className: cn__default(item.icon.props.className, 'mr-1 -mt-px')
|
|
9335
9341
|
}), item.text)) : item.text;
|
|
9336
9342
|
}
|
|
9337
9343
|
}
|
|
@@ -9441,10 +9447,10 @@ const BaseSelect = /*#__PURE__*/React.forwardRef(function BaseSelect(props, ref)
|
|
|
9441
9447
|
} = useSelect(otherProps, ref);
|
|
9442
9448
|
const internalRef = React.useRef(null);
|
|
9443
9449
|
const selectDimensions = useBoundingClientRectListener(internalRef);
|
|
9444
|
-
const className =
|
|
9450
|
+
const className = cn__default('inline-flex relative w-full', {
|
|
9445
9451
|
'yt-select--readonly': props.readOnly
|
|
9446
9452
|
}, externalClassName);
|
|
9447
|
-
const inputClassname =
|
|
9453
|
+
const inputClassname = cn__default(getInputClasses(props), 'h-8 text-left !pr-0', {
|
|
9448
9454
|
'border-blue-500': popover.open,
|
|
9449
9455
|
'select-text': otherProps.readOnly
|
|
9450
9456
|
});
|
|
@@ -9592,7 +9598,7 @@ const Pagination = /*#__PURE__*/React.forwardRef(function Pagination(props, ref)
|
|
|
9592
9598
|
const pageCount = Math.ceil(length / pageSize);
|
|
9593
9599
|
const canPreviousPage = pageIndex > 0;
|
|
9594
9600
|
const canNextPage = pageIndex < pageCount - 1;
|
|
9595
|
-
const className =
|
|
9601
|
+
const className = cn__default('inline-flex relative justify-between items-center', props.className);
|
|
9596
9602
|
return /*#__PURE__*/React.createElement("div", Object.assign({}, otherProps, {
|
|
9597
9603
|
className: className,
|
|
9598
9604
|
"data-taco": "pagination",
|
|
@@ -9659,8 +9665,8 @@ const Progress = ({
|
|
|
9659
9665
|
animationDuration: `${duration}ms`
|
|
9660
9666
|
};
|
|
9661
9667
|
}
|
|
9662
|
-
const className =
|
|
9663
|
-
const progressClassName =
|
|
9668
|
+
const className = cn__default('bg-grey-100 rounded block h-1 overflow-hidden w-full', props.className);
|
|
9669
|
+
const progressClassName = cn__default('yt-progress__bar block h-1', {
|
|
9664
9670
|
"w-full before:h-1 before:bg-grey-300 before:block before:animate-[progress-indeterminate_2s_cubic-bezier(0.4,0,0.2,1)_infinite] before:content-[' ']": !duration,
|
|
9665
9671
|
[`w-0 bg-grey-300 animate-[progress_linear]`]: duration
|
|
9666
9672
|
});
|
|
@@ -9725,7 +9731,7 @@ const Toast = ({
|
|
|
9725
9731
|
autoClose,
|
|
9726
9732
|
type = 'default'
|
|
9727
9733
|
} = options;
|
|
9728
|
-
const className =
|
|
9734
|
+
const className = cn__default('bg-white relative flex items-center py-1 px-2 mt-3 w-full rounded yt-shadow print:hidden', {
|
|
9729
9735
|
'border border-grey-200': type === 'default' || type === 'loading' || !type,
|
|
9730
9736
|
'border border-grey-500': type === 'success',
|
|
9731
9737
|
'border border-blue-500': type === 'information',
|
|
@@ -10435,7 +10441,8 @@ function processChildren(child, columns, defaultSizing, defaultSorting, defaultV
|
|
|
10435
10441
|
// To avoid errors caused by undefined row data values, we pass accessorFn as a preventive measure
|
|
10436
10442
|
// accessorKey can be dot notated strings, so we use lodash.get to access deeply nested children
|
|
10437
10443
|
accessorFn: row => get(row, accessorKey),
|
|
10438
|
-
header
|
|
10444
|
+
// The header can be either a string or a JSX.Element, but react-table expects it to be a string or a renderer function, so `() => header` ensures compatibility
|
|
10445
|
+
header: () => header,
|
|
10439
10446
|
// features
|
|
10440
10447
|
enableColumnFilter,
|
|
10441
10448
|
enableGlobalFilter,
|
|
@@ -10938,8 +10945,17 @@ function useTablePrintingSettings(tableId) {
|
|
|
10938
10945
|
|
|
10939
10946
|
const DEFAULT_ROW_ACTIONS_LENGTH = 4;
|
|
10940
10947
|
function useTableRowActions(isEnabled = false, rowActions, rowActionsLength = DEFAULT_ROW_ACTIONS_LENGTH) {
|
|
10948
|
+
const [handlers, setHandlers] = React__default.useState({});
|
|
10949
|
+
const registerHandler = (key, handler) => {
|
|
10950
|
+
return setHandlers(h => ({
|
|
10951
|
+
...h,
|
|
10952
|
+
[key]: handler
|
|
10953
|
+
}));
|
|
10954
|
+
};
|
|
10941
10955
|
return {
|
|
10956
|
+
handlers,
|
|
10942
10957
|
isEnabled,
|
|
10958
|
+
registerHandler,
|
|
10943
10959
|
rowActions: isEnabled ? rowActions : undefined,
|
|
10944
10960
|
rowActionsLength: rowActions ? Math.min(rowActions.length, rowActionsLength) : 0
|
|
10945
10961
|
};
|
|
@@ -12051,7 +12067,7 @@ function useTableStyleGrid(tableId, table, fontSize) {
|
|
|
12051
12067
|
};
|
|
12052
12068
|
// printing grid
|
|
12053
12069
|
// we have to be specific so that nested tables don't inherit the same css
|
|
12054
|
-
const hiddenColumns = printHiddenColumns.map(id => `table[data-taco^='table']#${tableId} > thead > tr > th[data-cell-id='${id}']\n,table[data-taco^='table']#${tableId}
|
|
12070
|
+
const hiddenColumns = printHiddenColumns.map(id => `table[data-taco^='table']#${tableId} > thead > tr > th[data-cell-id='${id}']\n,table[data-taco^='table']#${tableId} tr > td[data-cell-id='${id}']\n`).join(',');
|
|
12055
12071
|
const stylesheet = `@media print { table[data-taco^='table']#${tableId} { grid-template-columns: repeat(${printGridTemplateColumns}, auto) !important; }
|
|
12056
12072
|
table[data-taco^='table']#${tableId} [data-cell-id^='__']${hiddenColumns ? `, ${hiddenColumns}` : ''} { display: none; } table[data-taco^='table']#${tableId} tr { page-break-inside: avoid; break-inside: avoid;}}`;
|
|
12057
12073
|
return {
|
|
@@ -12617,11 +12633,12 @@ function Actions$1(props) {
|
|
|
12617
12633
|
const {
|
|
12618
12634
|
texts
|
|
12619
12635
|
} = useLocalization();
|
|
12636
|
+
const tableMeta = table.options.meta;
|
|
12620
12637
|
// we don't want to document passing table, so it isn't on the type
|
|
12621
|
-
const visibleActions = actions.map(action => action(data, rowId, table)).filter(action => !!action);
|
|
12638
|
+
const visibleActions = actions.map(action => action(data, rowId, tableMeta.rowActions.handlers['cleanup'], table)).filter(action => !!action);
|
|
12622
12639
|
const actionsOnRow = visibleActions.length === actionsLength ? visibleActions : visibleActions.slice(0, actionsLength - 1);
|
|
12623
12640
|
const actionsInMenu = visibleActions.slice(visibleActions.length === actionsLength ? actionsLength : actionsLength - 1);
|
|
12624
|
-
const className =
|
|
12641
|
+
const className = cn__default('flex justify-end text-right bg-[inherit] shadow-[-6px_0px_6px_var(--table-row-actions-shadow)] print:hidden');
|
|
12625
12642
|
return /*#__PURE__*/React__default.createElement("span", {
|
|
12626
12643
|
className: className
|
|
12627
12644
|
}, actionsOnRow.map((button, index) => {
|
|
@@ -12685,7 +12702,7 @@ const renderer = {
|
|
|
12685
12702
|
renderer: Cell,
|
|
12686
12703
|
meta: {
|
|
12687
12704
|
align: 'right',
|
|
12688
|
-
className: /*#__PURE__*/
|
|
12705
|
+
className: /*#__PURE__*/cn__default('print:opacity-0 !px-0 !pr-1 overflow-hidden [table_&]:group-[[data-row-active="true"]]/row:sticky right-0', 'group-[[data-row-active="true"][data-selected="false"]]/row:text-grey-200', 'group-[[data-row-selected="true"]]/row:text-blue-100', 'group-[[data-row-selected="false"]:hover]/row:text-grey-100'),
|
|
12689
12706
|
// TODO: remove when table3 is migrated, this satisfies the legacy table3 type
|
|
12690
12707
|
enableSearch: false,
|
|
12691
12708
|
header: ''
|
|
@@ -12708,7 +12725,7 @@ function Cell$1() {
|
|
|
12708
12725
|
return /*#__PURE__*/React__default.createElement(Icon, {
|
|
12709
12726
|
"aria-label": texts.table.columns.drag.tooltip,
|
|
12710
12727
|
name: "drag",
|
|
12711
|
-
className:
|
|
12728
|
+
className: cn__default("text-grey-darkest invisible -mt-1 ml-[2px] cursor-grab active:cursor-grabbing group-hover/row:visible group-[[aria-grabbed='true']]/row:text-white", '[[data-table-editing-mode]_&]:!invisible')
|
|
12712
12729
|
});
|
|
12713
12730
|
}
|
|
12714
12731
|
const renderer$1 = {
|
|
@@ -13248,7 +13265,7 @@ const DisplayRow = /*#__PURE__*/React__default.memo(function DisplayRow(props) {
|
|
|
13248
13265
|
const expansionRef = React__default.useRef(null);
|
|
13249
13266
|
const isExpanded = !!attributes['data-row-expanded'];
|
|
13250
13267
|
useSetVirtualisedRowHeight(measureRow, ref.current, expansionRef.current, isExpanded);
|
|
13251
|
-
const className =
|
|
13268
|
+
const className = cn__default('group/row', otherAttributes.className, {
|
|
13252
13269
|
'hover:cursor-grab': tableMeta.rowDrag.isEnabled && typeof attributes.onClick !== 'function',
|
|
13253
13270
|
'hover:cursor-pointer': typeof attributes.onClick === 'function'
|
|
13254
13271
|
});
|
|
@@ -13403,14 +13420,14 @@ function Resizer(props) {
|
|
|
13403
13420
|
}
|
|
13404
13421
|
};
|
|
13405
13422
|
const handle = /*#__PURE__*/React__default.createElement("div", {
|
|
13406
|
-
className:
|
|
13423
|
+
className: cn__default('invisible absolute right-0 top-0 z-10 -mr-2 flex h-full w-4 cursor-col-resize touch-none select-none justify-center rounded py-0.5', 'group-hover/header:visible', '[th:last-child>&]:!mr-0 [th:last-child>&]:w-2', {
|
|
13407
13424
|
'!visible': isResizing
|
|
13408
13425
|
}),
|
|
13409
13426
|
onClick: handleClick,
|
|
13410
13427
|
onMouseDown: handleResize,
|
|
13411
13428
|
onTouchStart: handleResize
|
|
13412
13429
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
13413
|
-
className:
|
|
13430
|
+
className: cn__default('h-full w-1 rounded', {
|
|
13414
13431
|
'!bg-blue-500': isResizing,
|
|
13415
13432
|
'bg-grey-500 hover:bg-grey-700': !isResizing
|
|
13416
13433
|
})
|
|
@@ -13628,7 +13645,7 @@ function HeaderMenu(props) {
|
|
|
13628
13645
|
}));
|
|
13629
13646
|
}, [canFilter, canGoto, canHide, canPin, canSort, customMenu, handleGoto, handleSortToggle, index, isFiltered, sortDirection]);
|
|
13630
13647
|
// can't use display: none because the button needs to be focusable
|
|
13631
|
-
const className =
|
|
13648
|
+
const className = cn__default(
|
|
13632
13649
|
// positioning
|
|
13633
13650
|
'justify-end overflow-hidden',
|
|
13634
13651
|
// sizing
|
|
@@ -13720,7 +13737,7 @@ function Header$5(props) {
|
|
|
13720
13737
|
canPin,
|
|
13721
13738
|
canResize,
|
|
13722
13739
|
canSort,
|
|
13723
|
-
className:
|
|
13740
|
+
className: cn__default('group/header', columnMeta.headerClassName),
|
|
13724
13741
|
children: reactTable.flexRender(header.column.columnDef.header, header.getContext()),
|
|
13725
13742
|
colSpan: header.colSpan,
|
|
13726
13743
|
customMenu: columnMeta.menu,
|
|
@@ -13741,7 +13758,7 @@ function Header$5(props) {
|
|
|
13741
13758
|
};
|
|
13742
13759
|
if (header.isPlaceholder) {
|
|
13743
13760
|
const nextHeader = header.headerGroup.headers[header.index + 1];
|
|
13744
|
-
memoedProps.className =
|
|
13761
|
+
memoedProps.className = cn__default('!bg-white before:!content-none', memoedProps.className, {
|
|
13745
13762
|
'after:!content-none': nextHeader === null || nextHeader === void 0 ? void 0 : nextHeader.isPlaceholder
|
|
13746
13763
|
});
|
|
13747
13764
|
}
|
|
@@ -13852,12 +13869,12 @@ const MemoedHeader = /*#__PURE__*/React__default.memo(function MemoedHeader(prop
|
|
|
13852
13869
|
"data-cell-pinned": isPinned ? isPinned : undefined,
|
|
13853
13870
|
style: style,
|
|
13854
13871
|
ref: setRef
|
|
13855
|
-
}), isPlaceholder
|
|
13872
|
+
}), !isPlaceholder && (isInternalColumn(id) || typeof children !== 'string' ? children : (/*#__PURE__*/React__default.createElement(Tooltip, {
|
|
13856
13873
|
title: String(tooltip !== null && tooltip !== void 0 ? tooltip : children),
|
|
13857
13874
|
placement: "top"
|
|
13858
13875
|
}, /*#__PURE__*/React__default.createElement("span", {
|
|
13859
13876
|
className: "truncate"
|
|
13860
|
-
}, children))), sortDirection ? /*#__PURE__*/React__default.createElement(SortIndicator, {
|
|
13877
|
+
}, children)))), sortDirection ? /*#__PURE__*/React__default.createElement(SortIndicator, {
|
|
13861
13878
|
direction: sortDirection
|
|
13862
13879
|
}) : null, hasMenu ? (/*#__PURE__*/React__default.createElement(HeaderMenu, {
|
|
13863
13880
|
canFilter: canFilter,
|
|
@@ -13865,7 +13882,7 @@ const MemoedHeader = /*#__PURE__*/React__default.memo(function MemoedHeader(prop
|
|
|
13865
13882
|
canHide: canHide,
|
|
13866
13883
|
canPin: canPin,
|
|
13867
13884
|
canSort: canSort,
|
|
13868
|
-
className:
|
|
13885
|
+
className: cn__default({
|
|
13869
13886
|
'ml-auto': align !== 'right',
|
|
13870
13887
|
'ml-0': align === 'right'
|
|
13871
13888
|
}),
|
|
@@ -14256,7 +14273,7 @@ const SearchInput2 = /*#__PURE__*/React__default.forwardRef(function SearchInput
|
|
|
14256
14273
|
}
|
|
14257
14274
|
});
|
|
14258
14275
|
}
|
|
14259
|
-
const className =
|
|
14276
|
+
const className = cn__default('!pl-7 group-focus-within:!w-72 group-focus-within:yt-focus', hasFind ? {
|
|
14260
14277
|
'!w-48': !value,
|
|
14261
14278
|
'!w-72': value
|
|
14262
14279
|
} : '!w-48', {
|
|
@@ -14286,9 +14303,9 @@ const SearchInput2 = /*#__PURE__*/React__default.forwardRef(function SearchInput
|
|
|
14286
14303
|
value: value !== null && value !== void 0 ? value : ''
|
|
14287
14304
|
}));
|
|
14288
14305
|
if (settingsContent) {
|
|
14289
|
-
const settingsClassname =
|
|
14306
|
+
const settingsClassname = cn__default('border-grey-300 absolute left-0 right-0 -mt-0.5 hidden top-full group-focus-within:flex focus-within:flex flex-col gap-y-4 rounded-b border border-t-0 bg-white p-3 shadow !pt-[calc(theme(spacing.3)_+_theme(spacing[0.5]))]');
|
|
14290
14307
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
14291
|
-
className:
|
|
14308
|
+
className: cn__default('group relative', {
|
|
14292
14309
|
'z-10 [&_[data-taco=input-container]]:z-10': focused
|
|
14293
14310
|
}),
|
|
14294
14311
|
ref: containerRef,
|
|
@@ -14570,7 +14587,7 @@ const Column = /*#__PURE__*/React__default.forwardRef(function Column(props, ref
|
|
|
14570
14587
|
...dragAttributes
|
|
14571
14588
|
} = props;
|
|
14572
14589
|
const canHide = column.getCanHide();
|
|
14573
|
-
const className =
|
|
14590
|
+
const className = cn__default('group/column flex items-center gap-x-2 rounded py-1 px-2', {
|
|
14574
14591
|
'hover:bg-grey-200': canHide || draggable,
|
|
14575
14592
|
'hover:cursor-pointer': canHide,
|
|
14576
14593
|
'active:cursor-move active:bg-grey-300': draggable
|
|
@@ -15104,7 +15121,7 @@ const Tag$1 = /*#__PURE__*/React__default.forwardRef((props, ref) => {
|
|
|
15104
15121
|
...otherProps
|
|
15105
15122
|
} = props;
|
|
15106
15123
|
const textRef = React__default.useRef(null);
|
|
15107
|
-
const className =
|
|
15124
|
+
const className = cn__default('inline-flex items-center rounded h-6 cursor-default', {
|
|
15108
15125
|
'opacity-50': disabled,
|
|
15109
15126
|
'hover:bg-opacity-75': !disabled,
|
|
15110
15127
|
'cursor-pointer': !!otherProps.onClick,
|
|
@@ -15121,7 +15138,7 @@ const Tag$1 = /*#__PURE__*/React__default.forwardRef((props, ref) => {
|
|
|
15121
15138
|
name: icon,
|
|
15122
15139
|
className: "-ml-1 mr-1 !h-5 !w-5"
|
|
15123
15140
|
})) : (/*#__PURE__*/React__default.cloneElement(icon, {
|
|
15124
|
-
className:
|
|
15141
|
+
className: cn__default(icon.props.className, 'mr-1 -ml-1')
|
|
15125
15142
|
})) : null, /*#__PURE__*/React__default.createElement("span", {
|
|
15126
15143
|
className: "truncate"
|
|
15127
15144
|
}, children)), onDelete ? (/*#__PURE__*/React__default.createElement(Icon, {
|
|
@@ -15131,7 +15148,7 @@ const Tag$1 = /*#__PURE__*/React__default.forwardRef((props, ref) => {
|
|
|
15131
15148
|
})) : null);
|
|
15132
15149
|
});
|
|
15133
15150
|
|
|
15134
|
-
const createOptionClassName = (shouldPauseHoverState = false) =>
|
|
15151
|
+
const createOptionClassName = (shouldPauseHoverState = false) => cn__default('group mb-px flex w-full text-sm flex-shrink-0 font-normal cursor-pointer items-center rounded bg-white px-2 leading-8 text-black aria-hidden:hidden gap-1.5 bg-white aria-current:wcag-grey-200 aria-disabled:text-black/25 aria-disabled:pointer-events-none !justify-normal', {
|
|
15135
15152
|
'hover:wcag-grey-200': !shouldPauseHoverState
|
|
15136
15153
|
});
|
|
15137
15154
|
const createCollectionClassName = () => 'flex flex-col gap-px';
|
|
@@ -15281,7 +15298,7 @@ const EditPopover = props => {
|
|
|
15281
15298
|
}) => (/*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
15282
15299
|
className: "flex w-32 flex-col space-y-2"
|
|
15283
15300
|
}, onEdit ? (/*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Field, {
|
|
15284
|
-
className:
|
|
15301
|
+
className: cn__default('!min-h-fit', {
|
|
15285
15302
|
'!pb-0': !validationError
|
|
15286
15303
|
}),
|
|
15287
15304
|
invalid: !!validationError,
|
|
@@ -15329,7 +15346,7 @@ const Colours = props => {
|
|
|
15329
15346
|
value: color
|
|
15330
15347
|
}, AVAILABLE_COLORS.map(availableColor => (/*#__PURE__*/React__default.createElement(RadioGroupPrimitive.Item, {
|
|
15331
15348
|
"aria-label": color,
|
|
15332
|
-
className:
|
|
15349
|
+
className: cn__default('flex h-6 w-6 cursor-pointer items-center justify-center rounded', getSubtleColorShadeClasses(availableColor)),
|
|
15333
15350
|
key: availableColor,
|
|
15334
15351
|
onFocus: () => onChangeColor(availableColor),
|
|
15335
15352
|
value: availableColor
|
|
@@ -15367,7 +15384,7 @@ const Option$1 = /*#__PURE__*/React__default.forwardRef(function Select2Option(p
|
|
|
15367
15384
|
tags,
|
|
15368
15385
|
value
|
|
15369
15386
|
} = useSelect2Context();
|
|
15370
|
-
const className =
|
|
15387
|
+
const className = cn__default(createOptionClassName(shouldPauseHoverState), getFontSize(fontSize), cName);
|
|
15371
15388
|
const hasValue = Array.isArray(value) ? !!value.length : value !== undefined;
|
|
15372
15389
|
const isTag = tags && !!color;
|
|
15373
15390
|
const handleClick = () => {
|
|
@@ -15424,7 +15441,7 @@ const Option$1 = /*#__PURE__*/React__default.forwardRef(function Select2Option(p
|
|
|
15424
15441
|
})) : postfix : null)))), popover ? (/*#__PURE__*/React__default.createElement(IconButton, {
|
|
15425
15442
|
icon: "ellipsis-vertical",
|
|
15426
15443
|
appearance: "discrete",
|
|
15427
|
-
className:
|
|
15444
|
+
className: cn__default('group-aria-current:visible invisible -mr-1 ml-auto !h-5 min-h-[theme(spacing.6)] !w-5 min-w-[theme(spacing.6)] hover:!bg-black/[.08] focus:!shadow-none group-hover:visible', {
|
|
15428
15445
|
'!visible': isMobileDevice((_window = window) === null || _window === void 0 ? void 0 : _window.navigator)
|
|
15429
15446
|
}),
|
|
15430
15447
|
onClick: event => {
|
|
@@ -15444,7 +15461,7 @@ const Group$3 = /*#__PURE__*/React__default.forwardRef(function Select2Group(pro
|
|
|
15444
15461
|
hasSeparator,
|
|
15445
15462
|
...attributes
|
|
15446
15463
|
} = props;
|
|
15447
|
-
const className =
|
|
15464
|
+
const className = cn__default(createCollectionClassName(), {
|
|
15448
15465
|
"last:after:content-none after:content-[''] after:bg-grey-300 after:mx-2 after:my-1 after:h-px": hasSeparator && children.length
|
|
15449
15466
|
}, props.className);
|
|
15450
15467
|
return /*#__PURE__*/React__default.createElement(Group$2, Object.assign({}, attributes, {
|
|
@@ -15456,7 +15473,7 @@ const Group$3 = /*#__PURE__*/React__default.forwardRef(function Select2Group(pro
|
|
|
15456
15473
|
});
|
|
15457
15474
|
|
|
15458
15475
|
const Title$5 = /*#__PURE__*/React__default.forwardRef(function Select2Title(props, ref) {
|
|
15459
|
-
const className =
|
|
15476
|
+
const className = cn__default('flex items-center text-xs pl-2 h-8', props.className);
|
|
15460
15477
|
return /*#__PURE__*/React__default.createElement(Title$4, Object.assign({}, props, {
|
|
15461
15478
|
className: className,
|
|
15462
15479
|
ref: ref
|
|
@@ -15472,7 +15489,7 @@ const Placeholder = ({
|
|
|
15472
15489
|
return null;
|
|
15473
15490
|
}
|
|
15474
15491
|
return /*#__PURE__*/React__default.createElement("div", Object.assign({}, props, {
|
|
15475
|
-
className:
|
|
15492
|
+
className: cn__default({
|
|
15476
15493
|
'text-grey-700': disabled,
|
|
15477
15494
|
'text-grey-500': !disabled
|
|
15478
15495
|
})
|
|
@@ -15513,7 +15530,7 @@ const Button$3 = /*#__PURE__*/React__default.forwardRef(function Select2TriggerB
|
|
|
15513
15530
|
open,
|
|
15514
15531
|
readOnly
|
|
15515
15532
|
} = useSelect2Context();
|
|
15516
|
-
const className =
|
|
15533
|
+
const className = cn__default('px-1.5 h-fit', getInputClasses({
|
|
15517
15534
|
...props,
|
|
15518
15535
|
disabled,
|
|
15519
15536
|
highlighted,
|
|
@@ -15587,7 +15604,7 @@ const Single = /*#__PURE__*/React__default.forwardRef(function Select2TriggerSin
|
|
|
15587
15604
|
readOnly,
|
|
15588
15605
|
tags
|
|
15589
15606
|
} = useSelect2Context();
|
|
15590
|
-
const contentClassName =
|
|
15607
|
+
const contentClassName = cn__default('truncate flex items-center gap-1');
|
|
15591
15608
|
const currentValue = children.find(matchesValue(value));
|
|
15592
15609
|
let output;
|
|
15593
15610
|
if (placeholder && currentValue === undefined) {
|
|
@@ -15645,7 +15662,7 @@ const Multiple = /*#__PURE__*/React__default.forwardRef(function Select2TriggerM
|
|
|
15645
15662
|
className
|
|
15646
15663
|
} = buttonProps;
|
|
15647
15664
|
if (open) {
|
|
15648
|
-
className =
|
|
15665
|
+
className = cn__default('!absolute z-20 !h-fit', buttonProps.className);
|
|
15649
15666
|
content = /*#__PURE__*/React__default.createElement(ScrollArea, {
|
|
15650
15667
|
className: "my-1 flex max-h-[5.5rem] flex-col",
|
|
15651
15668
|
onClick: forwardClick
|
|
@@ -15745,14 +15762,14 @@ const MultipleValue = ({
|
|
|
15745
15762
|
if (typeof child.props.children === 'string') {
|
|
15746
15763
|
output = /*#__PURE__*/React__default.createElement(Tag$1, {
|
|
15747
15764
|
key: String(child.props.value),
|
|
15748
|
-
className:
|
|
15765
|
+
className: cn__default('cursor-pointer', classNames),
|
|
15749
15766
|
color: tags ? child.props.color : undefined,
|
|
15750
15767
|
disabled: disabled,
|
|
15751
15768
|
icon: child.props.prefix,
|
|
15752
15769
|
readOnly: readOnly
|
|
15753
15770
|
}, child.props.children);
|
|
15754
15771
|
} else output = /*#__PURE__*/React__default.cloneElement(child.props.children, {
|
|
15755
|
-
className:
|
|
15772
|
+
className: cn__default('cursor-pointer', {
|
|
15756
15773
|
'shrink-0': index !== boundaryIndex
|
|
15757
15774
|
}, classNames),
|
|
15758
15775
|
key: String(child.props.value)
|
|
@@ -15890,7 +15907,7 @@ const Search$2 = /*#__PURE__*/React__default.forwardRef(function ListboxSearch(p
|
|
|
15890
15907
|
}
|
|
15891
15908
|
};
|
|
15892
15909
|
return /*#__PURE__*/React__default.createElement(Field, {
|
|
15893
|
-
className:
|
|
15910
|
+
className: cn__default('mx-1.5 mb-1.5 !min-h-fit', {
|
|
15894
15911
|
'!pb-0': !validationError
|
|
15895
15912
|
}),
|
|
15896
15913
|
invalid: !!validationError,
|
|
@@ -16027,7 +16044,7 @@ const Create = props => {
|
|
|
16027
16044
|
event.currentTarget.click();
|
|
16028
16045
|
}
|
|
16029
16046
|
};
|
|
16030
|
-
const className =
|
|
16047
|
+
const className = cn__default(createOptionClassName(), {
|
|
16031
16048
|
'!w-[calc(100%_-_theme(spacing.3))] ml-1.5': !createDialog,
|
|
16032
16049
|
'leading-normal border-grey-300 h-9 border-t py-2.5 px-4 !-mb-1.5': !!createDialog
|
|
16033
16050
|
});
|
|
@@ -16264,7 +16281,7 @@ const Select2 = /*#__PURE__*/React__default.forwardRef(function Select2(props, r
|
|
|
16264
16281
|
setValue(nextValue);
|
|
16265
16282
|
}
|
|
16266
16283
|
};
|
|
16267
|
-
const className =
|
|
16284
|
+
const className = cn__default('border-grey-300 rounded border bg-white py-1.5 shadow-md ', {
|
|
16268
16285
|
'focus-within:yt-focus': !hasSearch,
|
|
16269
16286
|
'outline-none': hasSearch
|
|
16270
16287
|
}, createCollectionClassName());
|
|
@@ -16304,10 +16321,10 @@ const Select2 = /*#__PURE__*/React__default.forwardRef(function Select2(props, r
|
|
|
16304
16321
|
}, selectAllText), /*#__PURE__*/React__default.createElement("div", {
|
|
16305
16322
|
className: "border-grey-300 mx-3 rounded border-t"
|
|
16306
16323
|
}))))) : null, loading ? (/*#__PURE__*/React__default.createElement("span", {
|
|
16307
|
-
className:
|
|
16324
|
+
className: cn__default('text-grey-700 flex items-center italic', fontSize && getFontSize(fontSize))
|
|
16308
16325
|
}, /*#__PURE__*/React__default.createElement("span", null, /*#__PURE__*/React__default.createElement(Spinner, {
|
|
16309
16326
|
delay: 0,
|
|
16310
|
-
className:
|
|
16327
|
+
className: cn__default('ml-3 mr-2 mt-1.5 h-5 w-5', {
|
|
16311
16328
|
'!mt-1 !h-3.5 !w-3.5': fontSize === exports.FontSizes.small,
|
|
16312
16329
|
'!h-4 !w-4': fontSize === exports.FontSizes.medium,
|
|
16313
16330
|
'!h-5 !w-5': fontSize === exports.FontSizes.large
|
|
@@ -18237,7 +18254,7 @@ const useTable$1 = (props, ref) => {
|
|
|
18237
18254
|
const renderCell = (cell, row) => {
|
|
18238
18255
|
const props = {
|
|
18239
18256
|
...cell.getCellProps(),
|
|
18240
|
-
className:
|
|
18257
|
+
className: cn__default('yt-table__cell flex-1 truncate p-2 align-middle', cell.column.className, {
|
|
18241
18258
|
'justify-start text-left': cell.column.align === 'left',
|
|
18242
18259
|
'justify-end text-right': cell.column.align === 'right',
|
|
18243
18260
|
'text-center': !cell.column.align
|
|
@@ -18277,7 +18294,7 @@ const Row$1 = /*#__PURE__*/React__default.forwardRef(function TableRow({
|
|
|
18277
18294
|
minHeight: rowHeight ? `${rowHeight}px` : undefined,
|
|
18278
18295
|
paddingLeft: row.depth ? `${row.depth * 2}rem` : undefined
|
|
18279
18296
|
},
|
|
18280
|
-
className:
|
|
18297
|
+
className: cn__default('yt-table__row border-grey-300 flex border-b min-h-[2.5rem] hover:bg-grey-100', {
|
|
18281
18298
|
'yt-table__row--active bg-grey-200 hover:bg-grey-200': activeIndex === index,
|
|
18282
18299
|
'yt-table__row--clickable': !!onRowClick,
|
|
18283
18300
|
'yt-table__row--dragging': !!row.isDragging,
|
|
@@ -18335,7 +18352,7 @@ const Column$2 = ({
|
|
|
18335
18352
|
...(cell.getSortByToggleProps && cell.getSortByToggleProps({
|
|
18336
18353
|
title: undefined
|
|
18337
18354
|
})),
|
|
18338
|
-
className:
|
|
18355
|
+
className: cn__default('yt-table__cell flex flex-1 truncate p-2 align-middle text-grey-700 hover:text-black', cell.className, {
|
|
18339
18356
|
'yt-table__cell__group': !!cell.columns,
|
|
18340
18357
|
'cursor-pointer': !cell.disableSorting,
|
|
18341
18358
|
'justify-start text-left': cell.align === 'left',
|
|
@@ -18378,7 +18395,7 @@ const BaseTable = /*#__PURE__*/React__default.forwardRef(function BaseTable(prop
|
|
|
18378
18395
|
tableRef.current.focus();
|
|
18379
18396
|
}
|
|
18380
18397
|
}, []);
|
|
18381
|
-
const className =
|
|
18398
|
+
const className = cn__default('yt-table flex flex-col focus:yt-focus focus:rounded-sm', props.className);
|
|
18382
18399
|
return /*#__PURE__*/React__default.createElement("div", Object.assign({}, otherProps, {
|
|
18383
18400
|
role: "table",
|
|
18384
18401
|
className: className,
|
|
@@ -18562,7 +18579,7 @@ const WindowedTable = /*#__PURE__*/React__default.forwardRef(function WindowedTa
|
|
|
18562
18579
|
}, [rows.length]);
|
|
18563
18580
|
const contentHeight = estimatedRowHeight * props.data.length || 0;
|
|
18564
18581
|
const isScrollbarVisible = height !== null ? contentHeight > height : false;
|
|
18565
|
-
const className =
|
|
18582
|
+
const className = cn__default(tableProps.className, 'yt-table--windowed', {
|
|
18566
18583
|
'table-with-scrollbar': isScrollbarVisible
|
|
18567
18584
|
});
|
|
18568
18585
|
let list;
|
|
@@ -18892,21 +18909,13 @@ function useTableEditingListener(table, tableRef, scrollToIndex) {
|
|
|
18892
18909
|
document.addEventListener('click', onClickOutside);
|
|
18893
18910
|
return () => document.removeEventListener('click', onClickOutside);
|
|
18894
18911
|
}, [tableMeta.editing.isEditing, tableMeta.editing.saveChanges]);
|
|
18895
|
-
|
|
18896
|
-
|
|
18897
|
-
|
|
18898
|
-
|
|
18899
|
-
|
|
18900
|
-
|
|
18901
|
-
|
|
18902
|
-
table.getRow(pendingChange.rowId);
|
|
18903
|
-
} catch {
|
|
18904
|
-
// TODO: this has the potential to remove changes for "unloaded" rows in server loading
|
|
18905
|
-
//tableMeta.editing.discardChanges(pendingChange.rowId, table);
|
|
18906
|
-
}
|
|
18907
|
-
});
|
|
18908
|
-
}, [rows.length]);
|
|
18909
|
-
*/
|
|
18912
|
+
React__default.useEffect(() => {
|
|
18913
|
+
if (tableMeta.editing.isEnabled) {
|
|
18914
|
+
tableMeta.rowActions.registerHandler('cleanup', rowId => {
|
|
18915
|
+
tableMeta.editing.discardChanges(rowId, table);
|
|
18916
|
+
});
|
|
18917
|
+
}
|
|
18918
|
+
}, []);
|
|
18910
18919
|
// shortcuts
|
|
18911
18920
|
useGlobalKeyDown(tableMeta.editing.isEnabled ? shortcut : undefined, event => {
|
|
18912
18921
|
event.preventDefault();
|
|
@@ -19615,7 +19624,7 @@ const Textarea = /*#__PURE__*/React.forwardRef(function Textarea(props, ref) {
|
|
|
19615
19624
|
onKeyDown,
|
|
19616
19625
|
...otherProps
|
|
19617
19626
|
} = props;
|
|
19618
|
-
const classNames =
|
|
19627
|
+
const classNames = cn__default(getInputClasses(props), 'pt-[5px] pb-[7px] min-h-[75px] disabled:resize-none !leading-5', props.className);
|
|
19619
19628
|
// home and end keys only navigate to the start/end of textarea value if the textarea container does not scroll
|
|
19620
19629
|
// if it has scroll height then the browser reverts to native scrolling behaviour only
|
|
19621
19630
|
// so we manually override it to ensure _our_ desired behaviour remains intact
|
|
@@ -20058,7 +20067,6 @@ function DiscardChangesConfirmationDialog(props) {
|
|
|
20058
20067
|
}, /*#__PURE__*/React__default.createElement(Dialog.Title, null, texts.table3.editing.clearChangesConfirmationDialog.title), /*#__PURE__*/React__default.createElement("p", null, texts.table3.editing.clearChangesConfirmationDialog.description), /*#__PURE__*/React__default.createElement(Dialog.Footer, null, /*#__PURE__*/React__default.createElement(Group, null, /*#__PURE__*/React__default.createElement(Dialog.Close, null, /*#__PURE__*/React__default.createElement(Button$1, {
|
|
20059
20068
|
tabIndex: 0
|
|
20060
20069
|
}, texts.table3.editing.clearChangesConfirmationDialog.cancel)), /*#__PURE__*/React__default.createElement(Dialog.Close, null, /*#__PURE__*/React__default.createElement(Button$1, {
|
|
20061
|
-
autoFocus: true,
|
|
20062
20070
|
tabIndex: 0,
|
|
20063
20071
|
appearance: "primary",
|
|
20064
20072
|
onClick: handleDiscard
|
|
@@ -20119,7 +20127,7 @@ function SaveStatus(props) {
|
|
|
20119
20127
|
} = useLocalization();
|
|
20120
20128
|
const tableMeta = table.options.meta;
|
|
20121
20129
|
const status = tableMeta.editing.getRowStatus(rowId);
|
|
20122
|
-
const className =
|
|
20130
|
+
const className = cn__default('col-span-full sticky ml-auto right-0 top-0 -mb-[100%] z-10 h-8 bg-[inherit] flex items-center px-1.5 shadow-[-6px_0px_6px_var(--table-row-actions-shadow)]', {
|
|
20123
20131
|
'mt-0.5': tableMeta.rowHeight.height === 'short',
|
|
20124
20132
|
'mt-1': tableMeta.rowHeight.height === 'medium',
|
|
20125
20133
|
'mt-1.5': tableMeta.rowHeight.height === 'tall',
|
|
@@ -20229,7 +20237,7 @@ function useTable3(props, ref) {
|
|
|
20229
20237
|
data,
|
|
20230
20238
|
enableRowActions: editing.isEditing ? true : props.enableRowActions,
|
|
20231
20239
|
// Display EditingActionMenu instead of row actions while editing
|
|
20232
|
-
rowActions: editing.isEditing ? [(_, rowId, table) => {
|
|
20240
|
+
rowActions: editing.isEditing ? [(_, rowId, __, table) => {
|
|
20233
20241
|
const tableMeta = table.options.meta;
|
|
20234
20242
|
return /*#__PURE__*/React__default.createElement(EditingActionsMenu, {
|
|
20235
20243
|
hasChanges: editing.hasChanges(rowId),
|
|
@@ -20472,7 +20480,7 @@ function CreateNewRow(props) {
|
|
|
20472
20480
|
keys: shortcut
|
|
20473
20481
|
});
|
|
20474
20482
|
}
|
|
20475
|
-
const className =
|
|
20483
|
+
const className = cn__default('group/row border-grey-300 !sticky z-[21]', {
|
|
20476
20484
|
'bottom-10': tableMeta.footer.isEnabled,
|
|
20477
20485
|
'bottom-0': !tableMeta.footer.isEnabled,
|
|
20478
20486
|
'border-b': !isScrolled
|
|
@@ -20562,7 +20570,7 @@ function TemporaryRow(props) {
|
|
|
20562
20570
|
}
|
|
20563
20571
|
}
|
|
20564
20572
|
};
|
|
20565
|
-
const className =
|
|
20573
|
+
const className = cn__default('group/row border-grey-300 !sticky z-[22] print:hidden', {
|
|
20566
20574
|
'bottom-[calc(5rem_+_2px)] data-[row-editing-move]:bottom-[calc(5rem_+_2px)]': tableMeta.footer.isEnabled,
|
|
20567
20575
|
'bottom-[calc(2.5rem_+_2px)] data-[row-editing-move]:bottom-[calc(2.5rem_+_2px)]': !tableMeta.footer.isEnabled,
|
|
20568
20576
|
'border-t-2 shadow-[0px_-5px_20px_0px_rgba(0,0,0,0.1)] [&>td]:!border-b-0': isScrolled
|
|
@@ -20599,7 +20607,14 @@ const BaseTable3 = /*#__PURE__*/fixedForwardRef(function BaseTable3(props, ref)
|
|
|
20599
20607
|
'data-table-editing-mode': (_table3$meta$editing = table3.meta.editing) !== null && _table3$meta$editing !== void 0 && _table3$meta$editing.isEditing ? (_table3$meta$editing2 = table3.meta.editing) !== null && _table3$meta$editing2 !== void 0 && _table3$meta$editing2.isDetailedMode ? 'detailed' : 'normal' : undefined,
|
|
20600
20608
|
enableHorizontalArrowKeyNavigation: table3.meta.editing.isEditing
|
|
20601
20609
|
};
|
|
20602
|
-
const
|
|
20610
|
+
const rowsById = table3.instance.getCoreRowModel().rowsById;
|
|
20611
|
+
const hasAlertErrors = table3.meta.editing.getErrorsShownInAlert().filter(row => {
|
|
20612
|
+
if (table3.meta.server._experimentalDataLoader2) {
|
|
20613
|
+
// consumers of dataloader2 need to run a cleanup function, as this would otherwise return false when pages are unloaded.
|
|
20614
|
+
return true;
|
|
20615
|
+
}
|
|
20616
|
+
return rowsById[row.rowId];
|
|
20617
|
+
}).length;
|
|
20603
20618
|
const hasCreateWorkflow = table3.meta.editing.isEnabled && props.onEditingCreate;
|
|
20604
20619
|
const isScrolled = isTableScrolled(table3.ref);
|
|
20605
20620
|
let createWorkflow;
|
|
@@ -20655,7 +20670,7 @@ const Tabs = /*#__PURE__*/React.forwardRef(function Tabs(props, ref) {
|
|
|
20655
20670
|
orientation = 'horizontal',
|
|
20656
20671
|
...otherProps
|
|
20657
20672
|
} = props;
|
|
20658
|
-
const className =
|
|
20673
|
+
const className = cn__default({
|
|
20659
20674
|
'flex w-full': orientation === 'vertical'
|
|
20660
20675
|
}, props.className);
|
|
20661
20676
|
return /*#__PURE__*/React.createElement(TabsPrimitive.Root, Object.assign({}, otherProps, {
|
|
@@ -20673,7 +20688,7 @@ const TabList = /*#__PURE__*/React.forwardRef(function Tab(props, ref) {
|
|
|
20673
20688
|
const {
|
|
20674
20689
|
children
|
|
20675
20690
|
} = props;
|
|
20676
|
-
const className =
|
|
20691
|
+
const className = cn__default('border-grey-300 flex flex-row m-0 mb-4 print:hidden', 'aria-orientation-horizontal:border-b', 'aria-orientation-vertical:border-r aria-orientation-vertical:m-0 aria-orientation-vertical:mr-4 aria-orientation-vertical:flex-col', props.className);
|
|
20677
20692
|
return /*#__PURE__*/React.createElement(TabsPrimitive.List, Object.assign({}, props, {
|
|
20678
20693
|
className: className,
|
|
20679
20694
|
ref: ref
|
|
@@ -20696,13 +20711,13 @@ const TabTrigger = /*#__PURE__*/React.forwardRef(function Tab(props, ref) {
|
|
|
20696
20711
|
tooltip,
|
|
20697
20712
|
...otherProps
|
|
20698
20713
|
} = props;
|
|
20699
|
-
const triggerClassName =
|
|
20714
|
+
const triggerClassName = cn__default(props.className, 'group relative p-0.5 outline-none disabled:cursor-not-allowed disabled:text-black/50',
|
|
20700
20715
|
// horizontal
|
|
20701
20716
|
'[[aria-orientation="horizontal"]_&]:pb-1',
|
|
20702
20717
|
// horizontal
|
|
20703
20718
|
'[[aria-orientation="vertical"]_&]:pr-1');
|
|
20704
|
-
const buttonClassName =
|
|
20705
|
-
const activeClassName =
|
|
20719
|
+
const buttonClassName = cn__default(getButtonClasses(), 'group-focus-visible:yt-focus-inset group-enabled:group-hover:wcag-grey-200 pointer-events-none rounded px-3');
|
|
20720
|
+
const activeClassName = cn__default('pointer-events-none absolute hidden bg-blue-500 group-aria-selected:flex',
|
|
20706
20721
|
// horizontal
|
|
20707
20722
|
'[[aria-orientation="horizontal"]_&]:rounded-t-sm [[aria-orientation="horizontal"]_&]:bottom-0 [[aria-orientation="horizontal"]_&]:left-0 [[aria-orientation="horizontal"]_&]:right-0 [[aria-orientation="horizontal"]_&]:-mb-px [[aria-orientation="horizontal"]_&]:h-0.5',
|
|
20708
20723
|
// vertical
|
|
@@ -20729,7 +20744,7 @@ const TabContent = /*#__PURE__*/React.forwardRef(function Tab(props, ref) {
|
|
|
20729
20744
|
id,
|
|
20730
20745
|
...otherProps
|
|
20731
20746
|
} = props;
|
|
20732
|
-
const className =
|
|
20747
|
+
const className = cn__default('[&[data-orientation="vertical"]]:grow outline-none', props.className);
|
|
20733
20748
|
return /*#__PURE__*/React.createElement(TabsPrimitive.Content, Object.assign({}, otherProps, {
|
|
20734
20749
|
className: className,
|
|
20735
20750
|
ref: ref,
|
|
@@ -21033,7 +21048,7 @@ function Legend(props) {
|
|
|
21033
21048
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
21034
21049
|
className: "mx-auto w-auto max-w-full overflow-hidden"
|
|
21035
21050
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
21036
|
-
className:
|
|
21051
|
+
className: cn__default('mb-0 ml-0 flex justify-center', {
|
|
21037
21052
|
'flex-col': layout === 'vertical'
|
|
21038
21053
|
})
|
|
21039
21054
|
}, /*#__PURE__*/React__default.createElement(OverflowGroup, {
|
|
@@ -21041,7 +21056,7 @@ function Legend(props) {
|
|
|
21041
21056
|
moreButton: moreButton
|
|
21042
21057
|
}, payload.map((entry, index) => (/*#__PURE__*/React__default.createElement("span", {
|
|
21043
21058
|
key: `${entry.dataKey}-${index}`,
|
|
21044
|
-
className:
|
|
21059
|
+
className: cn__default(' hover:bg-grey-100 cursor-pointer px-[8px] py-[2px] hover:rounded-[4px]', {
|
|
21045
21060
|
'bg-grey-100 rounded': activeIndex === index
|
|
21046
21061
|
}),
|
|
21047
21062
|
onMouseEnter: () => handleMouseEnter(entry, index),
|
|
@@ -21050,7 +21065,7 @@ function Legend(props) {
|
|
|
21050
21065
|
}, /*#__PURE__*/React__default.createElement("span", {
|
|
21051
21066
|
className: "text-grey-700 flex items-center gap-[4px]"
|
|
21052
21067
|
}, /*#__PURE__*/React__default.createElement("span", {
|
|
21053
|
-
className:
|
|
21068
|
+
className: cn__default('-mt-px ml-1 flex h-3 w-3 rounded-sm', {
|
|
21054
21069
|
'border-grey-300 border !bg-white': !activeItems[entry.dataKey]
|
|
21055
21070
|
}),
|
|
21056
21071
|
style: {
|
|
@@ -21333,7 +21348,7 @@ const Legend$1 = ({
|
|
|
21333
21348
|
const isHovered = isTotal ? isTotalLegendHovered : hoveredItem.includes(itemData.id);
|
|
21334
21349
|
return /*#__PURE__*/React__default.createElement("li", {
|
|
21335
21350
|
key: isTotal ? 'total' : `${itemData.label}-${index}`,
|
|
21336
|
-
className:
|
|
21351
|
+
className: cn__default('mr-2 flex cursor-pointer gap-2 rounded pl-0 pr-1', {
|
|
21337
21352
|
'bg-grey-100': isHovered && (!isTotal || legendPosition === 'right'),
|
|
21338
21353
|
'bg-grey-200': isSelected && (!isTotal || legendPosition === 'right')
|
|
21339
21354
|
}),
|
|
@@ -21343,7 +21358,7 @@ const Legend$1 = ({
|
|
|
21343
21358
|
}, legendPosition === 'bottom' ? (/*#__PURE__*/React__default.createElement("div", {
|
|
21344
21359
|
className: "flex items-center gap-1"
|
|
21345
21360
|
}, /*#__PURE__*/React__default.createElement("span", {
|
|
21346
|
-
className:
|
|
21361
|
+
className: cn__default('ml-1 h-3 w-3 rounded-sm', {
|
|
21347
21362
|
'border-grey-300 border !bg-white': !visibleItems[itemData.id]
|
|
21348
21363
|
}),
|
|
21349
21364
|
style: {
|
|
@@ -21365,13 +21380,13 @@ const Legend$1 = ({
|
|
|
21365
21380
|
appearance: "transparent",
|
|
21366
21381
|
className: "text-grey-700"
|
|
21367
21382
|
}, moreButtonText));
|
|
21368
|
-
const className =
|
|
21383
|
+
const className = cn__default('flex-grow pl-4', {
|
|
21369
21384
|
'w-full': legendPosition === 'bottom'
|
|
21370
21385
|
});
|
|
21371
21386
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
21372
21387
|
className: className
|
|
21373
21388
|
}, /*#__PURE__*/React__default.createElement("ul", {
|
|
21374
|
-
className:
|
|
21389
|
+
className: cn__default('mb-0 ml-0 mt-4 flex justify-center space-y-1', legendPosition === 'right' ? 'flex-col gap-1' : 'flex-row')
|
|
21375
21390
|
}, legendPosition === 'right' ? (/*#__PURE__*/React__default.createElement(React__default.Fragment, null, renderLegendItem(null), data.map(renderLegendItem))) : (/*#__PURE__*/React__default.createElement(OverflowGroup, {
|
|
21376
21391
|
className: "w-full items-center py-1",
|
|
21377
21392
|
moreButton: moreButton
|
|
@@ -21419,7 +21434,7 @@ const ActiveShape = props => {
|
|
|
21419
21434
|
} = props;
|
|
21420
21435
|
return /*#__PURE__*/React__default.createElement("g", {
|
|
21421
21436
|
onClick: () => onClick(id),
|
|
21422
|
-
className:
|
|
21437
|
+
className: cn__default({
|
|
21423
21438
|
'cursor-pointer': !!onClick
|
|
21424
21439
|
})
|
|
21425
21440
|
}, /*#__PURE__*/React__default.createElement(Recharts.Sector, {
|
|
@@ -21545,7 +21560,7 @@ const DonutChart = function DonutChart({
|
|
|
21545
21560
|
}));
|
|
21546
21561
|
};
|
|
21547
21562
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
21548
|
-
className:
|
|
21563
|
+
className: cn__default('relative h-full w-full', {
|
|
21549
21564
|
[`flex `]: showLegend,
|
|
21550
21565
|
'flex-col items-center': legendPosition === 'bottom'
|
|
21551
21566
|
}),
|
|
@@ -21661,7 +21676,7 @@ const Button$4 = /*#__PURE__*/React__default.forwardRef(function Button(props, r
|
|
|
21661
21676
|
const {
|
|
21662
21677
|
...attributes
|
|
21663
21678
|
} = props;
|
|
21664
|
-
const className =
|
|
21679
|
+
const className = cn__default(getButtonClasses$1(), props.className);
|
|
21665
21680
|
return /*#__PURE__*/React__default.createElement(IconButton, Object.assign({}, attributes, {
|
|
21666
21681
|
appearance: "discrete",
|
|
21667
21682
|
className: className,
|
|
@@ -21669,7 +21684,7 @@ const Button$4 = /*#__PURE__*/React__default.forwardRef(function Button(props, r
|
|
|
21669
21684
|
ref: ref
|
|
21670
21685
|
}));
|
|
21671
21686
|
});
|
|
21672
|
-
const getButtonClasses$1 = (rounded = true) =>
|
|
21687
|
+
const getButtonClasses$1 = (rounded = true) => cn__default('!h-9 !w-9 flex-shrink-0 flex-grow-0 cursor-pointer relative', 'focus:!outline-none focus:!shadow-none focus-visible:!yt-focus-dark ', 'bg-transparent enabled:hover:bg-white/[.08] focus:bg-white/[.08] aria-current-page:bg-white/[.08]', 'text-white', {
|
|
21673
21688
|
'!rounded-full': rounded
|
|
21674
21689
|
});
|
|
21675
21690
|
|
|
@@ -21684,7 +21699,7 @@ const Link$2 = /*#__PURE__*/React__default.forwardRef(function Link(props, ref)
|
|
|
21684
21699
|
const {
|
|
21685
21700
|
texts
|
|
21686
21701
|
} = useLocalization();
|
|
21687
|
-
const className =
|
|
21702
|
+
const className = cn__default(getLinkClasses(icon), 'relative', props.className);
|
|
21688
21703
|
const link = /*#__PURE__*/React__default.createElement("a", Object.assign({}, otherProps, {
|
|
21689
21704
|
className: className,
|
|
21690
21705
|
"data-taco": "header-link",
|
|
@@ -21704,13 +21719,13 @@ const Link$2 = /*#__PURE__*/React__default.forwardRef(function Link(props, ref)
|
|
|
21704
21719
|
}
|
|
21705
21720
|
return link;
|
|
21706
21721
|
});
|
|
21707
|
-
const getLinkClasses = (icon = undefined) =>
|
|
21722
|
+
const getLinkClasses = (icon = undefined) => cn__default('flex h-8 flex-shrink-0 flex-grow-0 cursor-pointer items-center justify-center ', 'focus:!shadow-none focus:!outline-none focus-visible:!yt-focus-dark', 'bg-transparent hover:bg-white/[.08] focus:bg-white/[.08] aria-current-page:bg-white/[.08]', 'text-white hover:text-white focus:text-white', {
|
|
21708
21723
|
'!rounded-full !h-9 !w-9': icon,
|
|
21709
21724
|
'whitespace-nowrap px-3 rounded text-sm hidden lg:flex': !icon
|
|
21710
21725
|
});
|
|
21711
21726
|
|
|
21712
21727
|
const Logo = /*#__PURE__*/React__default.forwardRef(function Logo(props, ref) {
|
|
21713
|
-
const className =
|
|
21728
|
+
const className = cn__default('h-7 w-7 m-1 self-center justify-self-center flex-shrink-0 flex-grow-0', props.className);
|
|
21714
21729
|
return /*#__PURE__*/React__default.createElement("svg", Object.assign({}, props, {
|
|
21715
21730
|
className: className,
|
|
21716
21731
|
ref: ref,
|
|
@@ -21727,7 +21742,7 @@ const Logo = /*#__PURE__*/React__default.forwardRef(function Logo(props, ref) {
|
|
|
21727
21742
|
})));
|
|
21728
21743
|
});
|
|
21729
21744
|
const LogoLegacy = /*#__PURE__*/React__default.forwardRef(function Logo(props, ref) {
|
|
21730
|
-
const className =
|
|
21745
|
+
const className = cn__default('-mr-[156px] xs:-mr-14 md:!mr-0 h-9 shrink-0 w-[180px] px-1', props.className);
|
|
21731
21746
|
return /*#__PURE__*/React__default.createElement("svg", Object.assign({}, props, {
|
|
21732
21747
|
className: className,
|
|
21733
21748
|
ref: ref,
|
|
@@ -21799,9 +21814,9 @@ const PrimaryNavigation = /*#__PURE__*/React__default.forwardRef(function Primar
|
|
|
21799
21814
|
texts
|
|
21800
21815
|
} = useLocalization();
|
|
21801
21816
|
const internalRef = useMergedRef(ref);
|
|
21802
|
-
const className =
|
|
21817
|
+
const className = cn__default('flex h-full w-full flex-grow items-center overflow-hidden active:outline-none relative', props.className);
|
|
21803
21818
|
const moreButton = () => (/*#__PURE__*/React__default.createElement(Button$1, {
|
|
21804
|
-
className:
|
|
21819
|
+
className: cn__default(getLinkClasses(), '!bg-transparent aria-expanded:!bg-white/[.08]')
|
|
21805
21820
|
}, texts.header.more));
|
|
21806
21821
|
return /*#__PURE__*/React__default.createElement("nav", Object.assign({}, props, {
|
|
21807
21822
|
className: className,
|
|
@@ -21813,7 +21828,7 @@ const PrimaryNavigation = /*#__PURE__*/React__default.forwardRef(function Primar
|
|
|
21813
21828
|
});
|
|
21814
21829
|
|
|
21815
21830
|
const SecondaryNavigation = /*#__PURE__*/React__default.forwardRef(function SecondaryNavigation(props, ref) {
|
|
21816
|
-
const className =
|
|
21831
|
+
const className = cn__default('flex h-full items-center gap-2 mb-0 flex-shrink-0 mr-2', props.className);
|
|
21817
21832
|
return /*#__PURE__*/React__default.createElement("div", Object.assign({}, props, {
|
|
21818
21833
|
className: className,
|
|
21819
21834
|
ref: ref
|
|
@@ -21821,7 +21836,7 @@ const SecondaryNavigation = /*#__PURE__*/React__default.forwardRef(function Seco
|
|
|
21821
21836
|
});
|
|
21822
21837
|
|
|
21823
21838
|
const MenuButton = /*#__PURE__*/React__default.forwardRef(function MenuButton(props, ref) {
|
|
21824
|
-
const className =
|
|
21839
|
+
const className = cn__default(getButtonClasses$1(false), 'mr-1 !bg-transparent hover:!bg-white/[.08] focus:!bg-white/[.08]] lg:hidden z-[2] !text-white');
|
|
21825
21840
|
return /*#__PURE__*/React__default.createElement(IconButton, Object.assign({}, props, {
|
|
21826
21841
|
className: className,
|
|
21827
21842
|
"data-taco": "header-toggle-sidebar",
|
|
@@ -21841,7 +21856,7 @@ const AgreementAvatar = /*#__PURE__*/React__default.forwardRef(function Agreemen
|
|
|
21841
21856
|
const handleError = event => {
|
|
21842
21857
|
event.target.src = fallbackSrc;
|
|
21843
21858
|
};
|
|
21844
|
-
const className =
|
|
21859
|
+
const className = cn__default('h-9 w-9 rounded-full shrink-0 group-focus:yt-focus-dark xl:group-focus:shadow-none', {
|
|
21845
21860
|
visible: loaded
|
|
21846
21861
|
}, props.className);
|
|
21847
21862
|
return /*#__PURE__*/React__default.createElement("img", Object.assign({}, otherProps, {
|
|
@@ -21878,7 +21893,7 @@ const AgreementItem = props => {
|
|
|
21878
21893
|
fallbackImageSrc,
|
|
21879
21894
|
...agreement
|
|
21880
21895
|
} = props;
|
|
21881
|
-
const className =
|
|
21896
|
+
const className = cn__default('w-full rounded flex px-2 gap-2 overflow-hidden text-left items-center', customClassName);
|
|
21882
21897
|
return /*#__PURE__*/React__default.createElement("span", {
|
|
21883
21898
|
className: className
|
|
21884
21899
|
}, /*#__PURE__*/React__default.createElement(AgreementAvatar, {
|
|
@@ -21910,7 +21925,7 @@ const AgreementDisplay = props => {
|
|
|
21910
21925
|
} = props;
|
|
21911
21926
|
const isXlScreen = useMatchMedia('(min-width: 1280px)', window.innerWidth > 1280);
|
|
21912
21927
|
if (isXlScreen) {
|
|
21913
|
-
const className =
|
|
21928
|
+
const className = cn__default('h-12 flex-grow xl:[button>&]:hover:bg-white/[0.16]', props.className);
|
|
21914
21929
|
return /*#__PURE__*/React__default.createElement(AgreementItem, Object.assign({}, currentAgreement, {
|
|
21915
21930
|
children: children,
|
|
21916
21931
|
className: className,
|
|
@@ -22059,7 +22074,7 @@ function AgreementDisplay$1(props) {
|
|
|
22059
22074
|
}
|
|
22060
22075
|
|
|
22061
22076
|
const Header$6 = /*#__PURE__*/React__default.forwardRef(function Header(props, ref) {
|
|
22062
|
-
const className =
|
|
22077
|
+
const className = cn__default('bg-blue-900 flex h-16 w-full shrink-0 items-center gap-2 pl-4', '[&>*:focus-visible]:yt-focus-dark [&>*]:rounded',
|
|
22063
22078
|
// styles for logo wrapped inside an anchor
|
|
22064
22079
|
props.className);
|
|
22065
22080
|
return /*#__PURE__*/React__default.createElement("header", Object.assign({}, props, {
|
|
@@ -22083,7 +22098,7 @@ const LayoutContext = /*#__PURE__*/React__default.createContext({
|
|
|
22083
22098
|
});
|
|
22084
22099
|
|
|
22085
22100
|
const Content$9 = /*#__PURE__*/React__default.forwardRef(function LayoutContent(props, ref) {
|
|
22086
|
-
const className =
|
|
22101
|
+
const className = cn__default('flex-grow overflow-y-auto print:overflow-visible print:h-full print:!p-0 bg-white flex flex-shrink flex-col relative', props.className);
|
|
22087
22102
|
return /*#__PURE__*/React__default.createElement("main", Object.assign({}, props, {
|
|
22088
22103
|
className: className,
|
|
22089
22104
|
ref: ref
|
|
@@ -22125,7 +22140,7 @@ const Sidebar = /*#__PURE__*/React__default.forwardRef(function LayoutSidebar(pr
|
|
|
22125
22140
|
}, [isSmallScreen, sidebarOpen]);
|
|
22126
22141
|
const showBackdrop = isSmallScreen && sidebarOpen === true;
|
|
22127
22142
|
const [ready, setReady] = React__default.useState(isSmallScreen);
|
|
22128
|
-
const className =
|
|
22143
|
+
const className = cn__default('bg-grey-50 h-full w-64 flex-shrink-0 flex-grow-0 print:hidden', {
|
|
22129
22144
|
'absolute z-10 aria-hidden:-translate-x-64 ': isSmallScreen,
|
|
22130
22145
|
// prevent animation when crossing the boundary from large to small screen,
|
|
22131
22146
|
// this prevents awkward animation in the edge case (resizing the browser, instead of starting at a given size)
|
|
@@ -22179,7 +22194,7 @@ const Top = props => {
|
|
|
22179
22194
|
};
|
|
22180
22195
|
|
|
22181
22196
|
const Page = /*#__PURE__*/React__default.forwardRef(function LayoutPage(props, ref) {
|
|
22182
|
-
const className =
|
|
22197
|
+
const className = cn__default('flex flex-grow overflow-hidden print:overflow-visible print:h-full relative', props.className);
|
|
22183
22198
|
return /*#__PURE__*/React__default.createElement("div", Object.assign({}, props, {
|
|
22184
22199
|
className: className,
|
|
22185
22200
|
ref: ref
|
|
@@ -22188,7 +22203,7 @@ const Page = /*#__PURE__*/React__default.forwardRef(function LayoutPage(props, r
|
|
|
22188
22203
|
|
|
22189
22204
|
const Layout$1 = /*#__PURE__*/React__default.forwardRef(function Layout(props, ref) {
|
|
22190
22205
|
const [sidebarOpen, setSidebarOpen] = React__default.useState(false);
|
|
22191
|
-
const className =
|
|
22206
|
+
const className = cn__default('flex h-screen w-screen flex-col overflow-hidden print:overflow-visible print:h-full relative', props.className);
|
|
22192
22207
|
return /*#__PURE__*/React__default.createElement(LayoutContext.Provider, {
|
|
22193
22208
|
value: {
|
|
22194
22209
|
sidebarOpen,
|
|
@@ -22213,7 +22228,7 @@ const Group$6 = /*#__PURE__*/React__default.forwardRef(function Group(props, ref
|
|
|
22213
22228
|
...attributes
|
|
22214
22229
|
} = props;
|
|
22215
22230
|
const [expanded, setExpanded] = React__default.useState(defaultExpanded);
|
|
22216
|
-
const className =
|
|
22231
|
+
const className = cn__default('flex w-full cursor-pointer items-center rounded px-3 font-bold text-left leading-8 hover:bg-black/[.06] focus-visible:yt-focus-dark', attributes.className);
|
|
22217
22232
|
const handleClick = event => {
|
|
22218
22233
|
setExpanded(!expanded);
|
|
22219
22234
|
if (onClick) {
|
|
@@ -22237,14 +22252,14 @@ const Group$6 = /*#__PURE__*/React__default.forwardRef(function Group(props, ref
|
|
|
22237
22252
|
}), /*#__PURE__*/React__default.createElement("span", {
|
|
22238
22253
|
className: "flex-grow truncate"
|
|
22239
22254
|
}, heading)), /*#__PURE__*/React__default.createElement("ul", {
|
|
22240
|
-
className:
|
|
22255
|
+
className: cn__default('mb-0 flex flex-col gap-y-px pt-px', {
|
|
22241
22256
|
hidden: !expanded
|
|
22242
22257
|
}),
|
|
22243
22258
|
role: "menu"
|
|
22244
22259
|
}, children));
|
|
22245
22260
|
});
|
|
22246
22261
|
|
|
22247
|
-
const getAdjacentClasses = () =>
|
|
22262
|
+
const getAdjacentClasses = () => cn__default(
|
|
22248
22263
|
// styling if the element is proceeded by a link item
|
|
22249
22264
|
'[[role=menubar]>[data-taco=navigation2-link-item]+&]:mt-2', "[[role=menubar]>[data-taco='navigation2-link-item']+&]:border-t-2", "[[role=menubar]>[data-taco='navigation2-link-item']+&]:pt-2 ",
|
|
22250
22265
|
// styling if the element is proceeded by content
|
|
@@ -22252,7 +22267,7 @@ const getAdjacentClasses = () => cn(
|
|
|
22252
22267
|
// styling if the element is proceeded by a section
|
|
22253
22268
|
"[[role=menubar]>[data-taco='navigation2-section']+&]:border-t-2", "[[role=menubar]>[data-taco='navigation2-section']+&]:pt-2");
|
|
22254
22269
|
|
|
22255
|
-
const getNavigationLinkClasses = (isDraggedOver = false) =>
|
|
22270
|
+
const getNavigationLinkClasses = (isDraggedOver = false) => cn__default('group relative flex w-full items-center rounded leading-8 !text-black px-2 focus-visible:yt-focus-dark',
|
|
22256
22271
|
// override styles for links that are children of collapsible menus
|
|
22257
22272
|
'font-bold [[role=menu]>li>&]:font-normal [[role=menu]>li>&]:pl-5',
|
|
22258
22273
|
// override styles to adjust icons included in menu links
|
|
@@ -22273,8 +22288,8 @@ const Link$3 = /*#__PURE__*/React__default.forwardRef(function Link(props, ref)
|
|
|
22273
22288
|
...attributes
|
|
22274
22289
|
} = props;
|
|
22275
22290
|
const [isDraggedOver, dropTargetProps] = useDropTarget(onDrop);
|
|
22276
|
-
const className =
|
|
22277
|
-
const listClassName =
|
|
22291
|
+
const className = cn__default(getNavigationLinkClasses(isDraggedOver), attributes.className);
|
|
22292
|
+
const listClassName = cn__default('[[role=menubar]>&]:px-3 border-grey-200', getAdjacentClasses(), {
|
|
22278
22293
|
'[&>*]:pointer-events-none': isDraggedOver
|
|
22279
22294
|
});
|
|
22280
22295
|
return /*#__PURE__*/React__default.createElement("li", Object.assign({}, dropTargetProps, {
|
|
@@ -22298,7 +22313,7 @@ const Link$3 = /*#__PURE__*/React__default.forwardRef(function Link(props, ref)
|
|
|
22298
22313
|
icon: "more",
|
|
22299
22314
|
"aria-label": "More",
|
|
22300
22315
|
rounded: true,
|
|
22301
|
-
className:
|
|
22316
|
+
className: cn__default('-mr-1.5 hidden flex-shrink-0 flex-grow-0 transition-none group-hover:flex aria-expanded:flex', {
|
|
22302
22317
|
'absolute right-0 !mr-0.5': total !== undefined
|
|
22303
22318
|
}),
|
|
22304
22319
|
menu: menu,
|
|
@@ -22307,7 +22322,7 @@ const Link$3 = /*#__PURE__*/React__default.forwardRef(function Link(props, ref)
|
|
|
22307
22322
|
event.stopPropagation();
|
|
22308
22323
|
}
|
|
22309
22324
|
})) : null, total !== undefined ? (/*#__PURE__*/React__default.createElement(Badge, {
|
|
22310
|
-
className:
|
|
22325
|
+
className: cn__default('flex-shrink-0 flex-grow-0 !font-normal', {
|
|
22311
22326
|
'group-hover:hidden [[aria-expanded="true"]+&]:hidden ': menu
|
|
22312
22327
|
}),
|
|
22313
22328
|
color: "transparent"
|
|
@@ -22320,7 +22335,7 @@ const Section = /*#__PURE__*/React__default.forwardRef(function Navigation2(prop
|
|
|
22320
22335
|
heading,
|
|
22321
22336
|
...attributes
|
|
22322
22337
|
} = props;
|
|
22323
|
-
const className =
|
|
22338
|
+
const className = cn__default('w-full overflow-auto px-3 py-2 flex-grow border-grey-200 bg-grey-50 [[role=menubar]>&:first-child]:pt-0', getAdjacentClasses(), props.className);
|
|
22324
22339
|
return /*#__PURE__*/React__default.createElement("li", Object.assign({}, attributes, {
|
|
22325
22340
|
className: className,
|
|
22326
22341
|
"data-taco": "navigation2-section",
|
|
@@ -22338,7 +22353,7 @@ const Content$a = /*#__PURE__*/React__default.forwardRef(function Navigation2(pr
|
|
|
22338
22353
|
children,
|
|
22339
22354
|
...attributes
|
|
22340
22355
|
} = props;
|
|
22341
|
-
const className =
|
|
22356
|
+
const className = cn__default('w-full overflow-auto p-3 mt-auto border-grey-200 flex-shrink-0 z-10 bg-grey-50 [[role=menubar]>&:last-child]:pb-0', getAdjacentClasses(), props.className);
|
|
22342
22357
|
return /*#__PURE__*/React__default.createElement("li", Object.assign({}, attributes, {
|
|
22343
22358
|
className: className,
|
|
22344
22359
|
"data-taco": "navigation2-content",
|
|
@@ -22352,7 +22367,7 @@ const Navigation2 = /*#__PURE__*/React__default.forwardRef(function Navigation2(
|
|
|
22352
22367
|
children,
|
|
22353
22368
|
...attributes
|
|
22354
22369
|
} = props;
|
|
22355
|
-
const className =
|
|
22370
|
+
const className = cn__default('m-0 py-2 flex flex-col gap-y-px overflow-auto h-full w-full bg-grey-50', props.className);
|
|
22356
22371
|
return /*#__PURE__*/React__default.createElement("ul", Object.assign({}, attributes, {
|
|
22357
22372
|
className: className,
|
|
22358
22373
|
"data-taco": "navigation2",
|
|
@@ -22476,7 +22491,8 @@ function useTableDataLoader2(fetchPage, fetchAll, options = {
|
|
|
22476
22491
|
length.current = response.length;
|
|
22477
22492
|
const pages = [];
|
|
22478
22493
|
const cache = {};
|
|
22479
|
-
|
|
22494
|
+
const pageCount = Math.ceil(response.length / pageSize);
|
|
22495
|
+
Array.from(Array(pageCount).keys()).forEach(index => {
|
|
22480
22496
|
pages.push(index);
|
|
22481
22497
|
const startIndex = index * pageSize;
|
|
22482
22498
|
cache[index] = response.data.slice(startIndex, startIndex + pageSize);
|