@economic/taco 2.51.2-alpha.3 → 2.51.3-alpha.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/Menu/components/Content.d.ts +1 -1
- package/dist/components/Menu/components/SubMenu.d.ts +1 -1
- package/dist/esm/packages/taco/src/components/Tooltip/Tooltip.js +8 -5
- package/dist/esm/packages/taco/src/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/Header.js +20 -6
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/Header.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/useTableManager/util/setup.js +2 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/setup.js.map +1 -1
- package/dist/primitives/Table/types.d.ts +1 -1
- package/dist/taco.cjs.development.js +209 -192
- 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,8 +6,7 @@ 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 = require('clsx');
|
10
|
-
var cn__default = _interopDefault(cn);
|
9
|
+
var cn = _interopDefault(require('clsx'));
|
11
10
|
var AlertDialogPrimitive = require('@radix-ui/react-alert-dialog');
|
12
11
|
var AccordionPrimitive = require('@radix-ui/react-accordion');
|
13
12
|
var TooltipPrimitive = require('@radix-ui/react-tooltip');
|
@@ -3846,7 +3845,7 @@ const Icon = /*#__PURE__*/React__default.forwardRef(function Icon(props, ref) {
|
|
3846
3845
|
} = props;
|
3847
3846
|
const Component = icons[name];
|
3848
3847
|
/* 24x24 _at the base body font_ - must be em so that they scale with font size - tailwind spacing uses rem */
|
3849
|
-
const className =
|
3848
|
+
const className = cn('inline-flex h-[1.715em] w-[1.715em] flex-shrink-0', props.className, {
|
3850
3849
|
'p-[3px]': (_props$className = props.className) === null || _props$className === void 0 ? void 0 : _props$className.includes('rounded-full')
|
3851
3850
|
});
|
3852
3851
|
return Component ? (/*#__PURE__*/React__default.createElement(Component, Object.assign({}, otherProps, {
|
@@ -3867,7 +3866,7 @@ const BadgeIcon = /*#__PURE__*/React.forwardRef(function Badge(props, ref) {
|
|
3867
3866
|
small,
|
3868
3867
|
...otherProps
|
3869
3868
|
} = props;
|
3870
|
-
const className =
|
3869
|
+
const className = cn(`rounded-full border overflow-hidden whitespace-nowrap inline-flex items-center justify-center border-transparent [&>*]:max-h-full shrink-0`, {
|
3871
3870
|
'w-5 h-5': !small
|
3872
3871
|
}, {
|
3873
3872
|
'w-4 h-4 text-xs': small
|
@@ -3914,7 +3913,7 @@ const Alert = /*#__PURE__*/React__default.forwardRef(function Alert(props, ref)
|
|
3914
3913
|
state,
|
3915
3914
|
onClose
|
3916
3915
|
} = props;
|
3917
|
-
const className =
|
3916
|
+
const className = cn(`flex w-full flex-row items-start gap-2 rounded-md border-transparent p-3 ${getSubtleColorShadeClasses(getColorByState(state))}`, props.className);
|
3918
3917
|
return /*#__PURE__*/React__default.createElement("div", Object.assign({}, props, {
|
3919
3918
|
ref: ref,
|
3920
3919
|
className: className,
|
@@ -3990,7 +3989,7 @@ const Action = /*#__PURE__*/React.forwardRef(function AlertDialogAction(props, r
|
|
3990
3989
|
});
|
3991
3990
|
|
3992
3991
|
const Backdrop = /*#__PURE__*/React.forwardRef(function Backdrop(props, ref) {
|
3993
|
-
const className =
|
3992
|
+
const className = cn('fixed inset-0 cursor-default overflow-y-auto bg-blue-900/[0.3] aria-hidden:invisible print:overflow-visible print:absolute', props.className);
|
3994
3993
|
return /*#__PURE__*/React.createElement("div", Object.assign({}, props, {
|
3995
3994
|
className: className,
|
3996
3995
|
"data-taco": "backdrop",
|
@@ -4042,14 +4041,14 @@ const Title = /*#__PURE__*/React.forwardRef(function AlertDialogTitle(props, ref
|
|
4042
4041
|
} = useCurrentAlertDialog();
|
4043
4042
|
const iconProps = iconPropsByVariant(parentProps.variant);
|
4044
4043
|
return /*#__PURE__*/React.createElement(AlertDialogPrimitive.Title, Object.assign({}, props, {
|
4045
|
-
className:
|
4044
|
+
className: cn('flex items-center', props.className),
|
4046
4045
|
ref: ref
|
4047
4046
|
}), iconProps ? /*#__PURE__*/React.createElement(BadgeIcon, Object.assign({}, iconProps, {
|
4048
4047
|
className: "mr-2"
|
4049
4048
|
})) : undefined, props.children);
|
4050
4049
|
});
|
4051
4050
|
const Content = /*#__PURE__*/React.forwardRef(function AlertDialogContent(props, ref) {
|
4052
|
-
const className =
|
4051
|
+
const className = cn('p-6', getDialogPositionClassnames(), getDialogStylingClassnames(), getDialogSizeClassnames('dialog'));
|
4053
4052
|
return /*#__PURE__*/React.createElement(AlertDialogPrimitive.Portal, null, /*#__PURE__*/React.createElement(AlertDialogPrimitive.Overlay, {
|
4054
4053
|
asChild: true
|
4055
4054
|
}, /*#__PURE__*/React.createElement(Backdrop, null, /*#__PURE__*/React.createElement(AlertDialogPrimitive.Content, Object.assign({}, props, {
|
@@ -4092,7 +4091,7 @@ const AccordionContext = /*#__PURE__*/React__default.createContext({
|
|
4092
4091
|
});
|
4093
4092
|
const StyledTrigger = /*#__PURE__*/React__default.forwardRef(function AccordionStyledTrigger(props, ref) {
|
4094
4093
|
const isExpanded = !!props['aria-expanded'];
|
4095
|
-
const className =
|
4094
|
+
const className = cn('w-full inline-flex justify-between items-center align-middle', 'focus:rounded-sm focus:border-blue-500 focus:yt-focus', props.className);
|
4096
4095
|
return /*#__PURE__*/React__default.createElement("button", Object.assign({}, props, {
|
4097
4096
|
ref: ref,
|
4098
4097
|
className: className
|
@@ -4153,7 +4152,7 @@ const Accordion = props => {
|
|
4153
4152
|
};
|
4154
4153
|
}
|
4155
4154
|
const type = typeof valueProps.defaultValue === 'string' || typeof valueProps.value === 'string' ? 'single' : 'multiple';
|
4156
|
-
const className =
|
4155
|
+
const className = cn('divide-y divide-grey-200', props.className);
|
4157
4156
|
return /*#__PURE__*/React__default.createElement(AccordionContext.Provider, {
|
4158
4157
|
value: context
|
4159
4158
|
}, /*#__PURE__*/React__default.createElement(AccordionPrimitive.Root, Object.assign({}, otherProps, valueProps, {
|
@@ -4185,7 +4184,7 @@ const Badge = /*#__PURE__*/React.forwardRef(function Badge(props, ref) {
|
|
4185
4184
|
...otherProps
|
4186
4185
|
} = props;
|
4187
4186
|
const isTransparent = color === 'transparent';
|
4188
|
-
const className =
|
4187
|
+
const className = cn('rounded-full border box-border overflow-hidden whitespace-nowrap inline-flex items-center justify-center', {
|
4189
4188
|
[`border ${getOutlineColorShadeClasses(color)}`]: outline,
|
4190
4189
|
[`border-none font-normal ${getSubtleColorShadeClasses(color)}`]: subtle,
|
4191
4190
|
[`border-none ${getColorShadeClasses(color)}`]: !outline && !subtle,
|
@@ -4205,7 +4204,7 @@ const Badge = /*#__PURE__*/React.forwardRef(function Badge(props, ref) {
|
|
4205
4204
|
}, children) : children;
|
4206
4205
|
if (status) {
|
4207
4206
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
4208
|
-
className:
|
4207
|
+
className: cn('mr-1 h-2 w-2 shrink-0 rounded-full', getColorShadeClasses(color))
|
4209
4208
|
}), contentToRender);
|
4210
4209
|
}
|
4211
4210
|
return contentToRender;
|
@@ -4472,7 +4471,7 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(props, ref) {
|
|
4472
4471
|
hide = false,
|
4473
4472
|
...otherProps
|
4474
4473
|
} = props;
|
4475
|
-
const className =
|
4474
|
+
const className = cn('break-words', otherProps.className);
|
4476
4475
|
if (hide) {
|
4477
4476
|
return children;
|
4478
4477
|
}
|
@@ -4482,16 +4481,19 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(props, ref) {
|
|
4482
4481
|
asChild: true,
|
4483
4482
|
ref: ref
|
4484
4483
|
}, children), /*#__PURE__*/React.createElement(TooltipPrimitive.Portal, null, /*#__PURE__*/React.createElement(TooltipPrimitive.Content, Object.assign({}, otherProps, {
|
4484
|
+
asChild: true,
|
4485
|
+
className: className,
|
4485
4486
|
side: placement,
|
4486
|
-
sideOffset: 3
|
4487
|
-
|
4487
|
+
sideOffset: 3
|
4488
|
+
}), /*#__PURE__*/React.createElement("div", {
|
4489
|
+
className: "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",
|
4488
4490
|
"data-taco": "tooltip",
|
4489
4491
|
style: {
|
4490
4492
|
transformOrigin: 'var(--radix-tooltip-content-transform-origin)'
|
4491
4493
|
}
|
4492
|
-
}
|
4494
|
+
}, /*#__PURE__*/React.createElement(TooltipPrimitive.Arrow, {
|
4493
4495
|
className: "-mt-px fill-blue-900 stroke-blue-900"
|
4494
|
-
}))));
|
4496
|
+
}), title))));
|
4495
4497
|
});
|
4496
4498
|
|
4497
4499
|
const getButtonClasses = () => {
|
@@ -4576,7 +4578,7 @@ const Base = /*#__PURE__*/React.forwardRef(function IconButtonBase(props, ref) {
|
|
4576
4578
|
rounded = false,
|
4577
4579
|
...otherProps
|
4578
4580
|
} = props;
|
4579
|
-
const className =
|
4581
|
+
const className = cn('w-8', getButtonClasses(), getAppearanceClasses(otherProps.appearance, true), {
|
4580
4582
|
'rounded-full': rounded,
|
4581
4583
|
rounded: !rounded
|
4582
4584
|
}, props.className);
|
@@ -4951,7 +4953,7 @@ const Banner = /*#__PURE__*/React.forwardRef(function Banner(props, ref) {
|
|
4951
4953
|
const {
|
4952
4954
|
texts
|
4953
4955
|
} = useLocalization();
|
4954
|
-
const className =
|
4956
|
+
const className = cn('bg-white relative flex items-center gap-2 py-2 px-4 leading-6 shadow-md z-10', props.className);
|
4955
4957
|
return /*#__PURE__*/React.createElement("div", {
|
4956
4958
|
className: className,
|
4957
4959
|
"data-taco": "banner",
|
@@ -4971,7 +4973,7 @@ const Base$1 = /*#__PURE__*/React.forwardRef(function ButtonBase(props, ref) {
|
|
4971
4973
|
fluid,
|
4972
4974
|
...otherProps
|
4973
4975
|
} = props;
|
4974
|
-
const className =
|
4976
|
+
const className = cn(getButtonClasses(), getAppearanceClasses(appearance), 'rounded px-3', {
|
4975
4977
|
'w-full': fluid
|
4976
4978
|
}, props.className);
|
4977
4979
|
return createButtonWithTooltip({
|
@@ -5122,7 +5124,7 @@ const Calendar$1 = props => {
|
|
5122
5124
|
}
|
5123
5125
|
handleChange(date, event);
|
5124
5126
|
};
|
5125
|
-
const className =
|
5127
|
+
const className = cn('flex bg-white text-xs p-2', otherProps.className);
|
5126
5128
|
return /*#__PURE__*/React.createElement("div", {
|
5127
5129
|
"data-taco": "calendar"
|
5128
5130
|
}, /*#__PURE__*/React.createElement(reactDayPicker.DayPicker, {
|
@@ -5189,7 +5191,7 @@ const Truncate = ({
|
|
5189
5191
|
}, []);
|
5190
5192
|
const clonedChildrenWithRef = /*#__PURE__*/React__default.cloneElement(React__default.Children.only(children), {
|
5191
5193
|
ref,
|
5192
|
-
className:
|
5194
|
+
className: cn(children.props.className, 'truncate', {
|
5193
5195
|
'hover:cursor-pointer': isTruncated
|
5194
5196
|
})
|
5195
5197
|
});
|
@@ -5206,7 +5208,7 @@ const Content$2 = /*#__PURE__*/React.forwardRef(function CardContent(externalPro
|
|
5206
5208
|
noPadding,
|
5207
5209
|
...props
|
5208
5210
|
} = externalProps;
|
5209
|
-
const className =
|
5211
|
+
const className = cn('flex-grow overflow-auto', {
|
5210
5212
|
'px-4 pb-4': !noPadding
|
5211
5213
|
}, props.className);
|
5212
5214
|
return /*#__PURE__*/React.createElement("div", Object.assign({}, props, {
|
@@ -5223,7 +5225,7 @@ const Card = /*#__PURE__*/React.forwardRef(function Card(props, ref) {
|
|
5223
5225
|
className,
|
5224
5226
|
...otherProps
|
5225
5227
|
} = props;
|
5226
|
-
const cardClassName =
|
5228
|
+
const cardClassName = cn('bg-white flex flex-col rounded-xl border border-solid border-radius-[12px] border-grey-300 hover:border-grey-500', className);
|
5227
5229
|
return /*#__PURE__*/React.createElement("div", Object.assign({}, otherProps, {
|
5228
5230
|
className: cardClassName,
|
5229
5231
|
"data-taco": "card",
|
@@ -5269,7 +5271,7 @@ const Spinner = /*#__PURE__*/React__default.forwardRef(function Spinner(props, r
|
|
5269
5271
|
if (!visible) {
|
5270
5272
|
return null;
|
5271
5273
|
}
|
5272
|
-
const className =
|
5274
|
+
const className = cn('inline-flex flex-col relative items-center', otherProps.className);
|
5273
5275
|
return /*#__PURE__*/React__default.createElement("div", Object.assign({}, otherProps, {
|
5274
5276
|
className: className,
|
5275
5277
|
"data-taco": "spinner",
|
@@ -5298,7 +5300,7 @@ const Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(props, ref) {
|
|
5298
5300
|
...otherProps
|
5299
5301
|
} = props;
|
5300
5302
|
const id = useId(props.id);
|
5301
|
-
const className =
|
5303
|
+
const className = cn('bg-white h-5 w-5 border rounded text-sm flex-shrink-0 focus-visible:yt-focus disabled:cursor-not-allowed text-white', {
|
5302
5304
|
'self-start': !!label,
|
5303
5305
|
'mt-[0.1rem]': !label
|
5304
5306
|
}, invalid ? {
|
@@ -5325,7 +5327,7 @@ const Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(props, ref) {
|
|
5325
5327
|
event.currentTarget.click();
|
5326
5328
|
}
|
5327
5329
|
};
|
5328
|
-
const spinnerClassname =
|
5330
|
+
const spinnerClassname = cn(
|
5329
5331
|
//Spinner is slightly bigger then 'line' and 'tick' icons, so making it 2px smaller from each side
|
5330
5332
|
"m-0.5 !h-[calc(100%-theme('spacing.1'))] !w-[calc(100%-theme('spacing.1'))]", {
|
5331
5333
|
'text-blue-500': !checked && !indeterminate
|
@@ -5347,7 +5349,7 @@ const Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(props, ref) {
|
|
5347
5349
|
className: "!h-full !w-full"
|
5348
5350
|
}))));
|
5349
5351
|
if (label) {
|
5350
|
-
const labelContainerClassName =
|
5352
|
+
const labelContainerClassName = cn('flex items-center cursor-pointer gap-2', {
|
5351
5353
|
'cursor-not-allowed text-grey-300': props.disabled
|
5352
5354
|
});
|
5353
5355
|
return /*#__PURE__*/React.createElement("span", {
|
@@ -5366,7 +5368,7 @@ const getInputClasses = props => {
|
|
5366
5368
|
const disabled = props.disabled || !!props['aria-disabled'];
|
5367
5369
|
const readOnly = props.readOnly || !!props['aria-readonly'];
|
5368
5370
|
const invalid = props.invalid || !!props['aria-invalid'];
|
5369
|
-
return
|
5371
|
+
return cn('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',
|
5370
5372
|
// hide the arrow controls on input[type=number]
|
5371
5373
|
'[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none', {
|
5372
5374
|
'bg-white': !props.highlighted && !readOnly,
|
@@ -5385,7 +5387,7 @@ const getInputClasses = props => {
|
|
5385
5387
|
};
|
5386
5388
|
const getButtonStateClasses = (invalid, disabled = false) => {
|
5387
5389
|
if (invalid) {
|
5388
|
-
return
|
5390
|
+
return cn('border border-red-500 group-peer-hover:enabled:border-red-700 transition-colors ease-in', {
|
5389
5391
|
'border-red-500/30': disabled
|
5390
5392
|
});
|
5391
5393
|
}
|
@@ -5495,7 +5497,7 @@ const InputWithoutDeprecatedFeatures = /*#__PURE__*/React.forwardRef(function In
|
|
5495
5497
|
const prefixRect = useBoundingClientRectListener(prefixRef);
|
5496
5498
|
const postfixRef = React.useRef(null);
|
5497
5499
|
const postfixRect = useBoundingClientRectListener(postfixRef, [postfix]);
|
5498
|
-
const className =
|
5500
|
+
const className = cn(getInputClasses(props), {
|
5499
5501
|
'pl-8': !!prefix,
|
5500
5502
|
'pr-8': !!postfix
|
5501
5503
|
}, attributes.className);
|
@@ -5550,7 +5552,7 @@ const Affix = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function Aff
|
|
5550
5552
|
type
|
5551
5553
|
} = props;
|
5552
5554
|
return /*#__PURE__*/React.createElement("div", {
|
5553
|
-
className:
|
5555
|
+
className: cn('group absolute top-0 flex h-full items-center justify-center px-2',
|
5554
5556
|
// icon
|
5555
5557
|
'[&_[data-taco="icon"]]:!h-5 [&_[data-taco="icon"]]:!w-5', {
|
5556
5558
|
'text-grey-300': disabled,
|
@@ -5572,7 +5574,7 @@ const Input = /*#__PURE__*/React.forwardRef(function LegacyInput(props, ref) {
|
|
5572
5574
|
let postfix;
|
5573
5575
|
if (button) {
|
5574
5576
|
const disabled = button.props.disabled || attributes.disabled;
|
5575
|
-
const buttonClassName =
|
5577
|
+
const buttonClassName = cn('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);
|
5576
5578
|
postfix = /*#__PURE__*/React.cloneElement(button, {
|
5577
5579
|
className: buttonClassName,
|
5578
5580
|
disabled
|
@@ -5748,7 +5750,7 @@ const ScrollableList = /*#__PURE__*/React.forwardRef(function ScrollableList(pro
|
|
5748
5750
|
'aria-selected': multiselect ? getOptionCheckedState(String(option.value), index) : currentIndex === index,
|
5749
5751
|
'data-focused': currentIndex === index,
|
5750
5752
|
children: option.text,
|
5751
|
-
className:
|
5753
|
+
className: cn('flex items-center px-3 w-full cursor-pointer bg-white flex-[0_0_2rem] focus:wcag-blue-500 focus:border-blue-500', {
|
5752
5754
|
'sticky top-0 font-bold': depth === 0 && !!option.hasChildren
|
5753
5755
|
}),
|
5754
5756
|
disabled: option.disabled,
|
@@ -5765,7 +5767,7 @@ const ScrollableList = /*#__PURE__*/React.forwardRef(function ScrollableList(pro
|
|
5765
5767
|
});
|
5766
5768
|
const list = {
|
5767
5769
|
...otherProps,
|
5768
|
-
className:
|
5770
|
+
className: cn('inline-flex flex-col list-none !p-0 m-0 overflow-y-auto h-auto', getInputClasses(props), {
|
5769
5771
|
'yt-list--multiselect': multiselect,
|
5770
5772
|
'pointer-events-none': disabled,
|
5771
5773
|
'cursor-not-allowed': disabled || readOnly
|
@@ -6246,7 +6248,7 @@ const Combobox = /*#__PURE__*/React.forwardRef(function Combobox(props, ref) {
|
|
6246
6248
|
texts
|
6247
6249
|
} = useLocalization();
|
6248
6250
|
const selectDimensions = useBoundingClientRectListener(internalRef);
|
6249
|
-
const className =
|
6251
|
+
const className = cn('inline-flex relative', {
|
6250
6252
|
'yt-combobox--inline': props.inline
|
6251
6253
|
}, externalClassName);
|
6252
6254
|
return /*#__PURE__*/React.createElement("span", {
|
@@ -6297,7 +6299,7 @@ const Combobox = /*#__PURE__*/React.forwardRef(function Combobox(props, ref) {
|
|
6297
6299
|
},
|
6298
6300
|
sideOffset: 4
|
6299
6301
|
}, /*#__PURE__*/React.createElement(ScrollableList, Object.assign({}, list, {
|
6300
|
-
className:
|
6302
|
+
className: cn('max-h-[calc(12rem+2px)] w-auto max-w-[theme(spacing.96)] !border-blue-500'),
|
6301
6303
|
style: {
|
6302
6304
|
minWidth: selectDimensions === null || selectDimensions === void 0 ? void 0 : selectDimensions.width
|
6303
6305
|
},
|
@@ -6528,7 +6530,7 @@ const Content$3 = /*#__PURE__*/React.forwardRef(function PopoverContent(props, r
|
|
6528
6530
|
placement: side,
|
6529
6531
|
...popoverContentProps
|
6530
6532
|
} = props;
|
6531
|
-
const className =
|
6533
|
+
const className = cn(getPopoverStyleClassnames(), props.className);
|
6532
6534
|
let output;
|
6533
6535
|
if (typeof props.children === 'function') {
|
6534
6536
|
output = /*#__PURE__*/React.createElement(PopoverPrimitive.Close, {
|
@@ -6597,7 +6599,7 @@ const Datepicker = /*#__PURE__*/React.forwardRef(function Datepicker(props, ref)
|
|
6597
6599
|
const {
|
6598
6600
|
texts
|
6599
6601
|
} = useLocalization();
|
6600
|
-
const className =
|
6602
|
+
const className = cn('inline-flex w-full text-black font-normal', externalClassName);
|
6601
6603
|
const popoverContentRef = React.useRef(null);
|
6602
6604
|
const handleOpenAutofocus = React.useCallback(e => {
|
6603
6605
|
var _popoverContentRef$cu, _popoverContentRef$cu2;
|
@@ -6759,14 +6761,14 @@ const useDraggable = ref => {
|
|
6759
6761
|
};
|
6760
6762
|
|
6761
6763
|
const Title$1 = /*#__PURE__*/React.forwardRef(function DialogTitle(props, ref) {
|
6762
|
-
const className =
|
6764
|
+
const className = cn('text-center', props.className);
|
6763
6765
|
return /*#__PURE__*/React.createElement(DialogPrimitive.Title, Object.assign({}, props, {
|
6764
6766
|
className: className,
|
6765
6767
|
ref: ref
|
6766
6768
|
}));
|
6767
6769
|
});
|
6768
6770
|
const Footer$1 = /*#__PURE__*/React.forwardRef(function DialogFooter(props, ref) {
|
6769
|
-
const className =
|
6771
|
+
const className = cn('mt-8 flex justify-end', props.className);
|
6770
6772
|
return /*#__PURE__*/React.createElement("div", Object.assign({}, props, {
|
6771
6773
|
className: className,
|
6772
6774
|
ref: ref
|
@@ -6806,8 +6808,8 @@ const Content$4 = /*#__PURE__*/React.forwardRef(function DialogContent(props, re
|
|
6806
6808
|
const {
|
6807
6809
|
texts
|
6808
6810
|
} = useLocalization();
|
6809
|
-
const className =
|
6810
|
-
const containerClassName =
|
6811
|
+
const className = cn('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');
|
6812
|
+
const containerClassName = cn('bg-white p-6 rounded relative z-10 shadow print:p-0',
|
6811
6813
|
// 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.
|
6812
6814
|
'print:overflow-visible print:h-max print:!transform-none print:!inset-0 print:!m-0', {
|
6813
6815
|
'rounded-b-none': !!dialog.elements.extra
|
@@ -6866,7 +6868,7 @@ const Content$4 = /*#__PURE__*/React.forwardRef(function DialogContent(props, re
|
|
6866
6868
|
const DialogDrawer = /*#__PURE__*/React.forwardRef(function DialogDrawer(props, ref) {
|
6867
6869
|
var _dialog$drawer, _dialog$drawer2;
|
6868
6870
|
const dialog = useCurrentDialog();
|
6869
|
-
const className =
|
6871
|
+
const className = cn('absolute top-0 -ml-[4px] hidden h-full w-full overflow-y-auto rounded-r bg-white p-6 text-left', props.className);
|
6870
6872
|
return /*#__PURE__*/React.createElement(framerMotion.motion.div, Object.assign({}, props, {
|
6871
6873
|
className: className,
|
6872
6874
|
"data-taco": "dialog-drawer",
|
@@ -6898,7 +6900,7 @@ const DialogDrawer = /*#__PURE__*/React.forwardRef(function DialogDrawer(props,
|
|
6898
6900
|
DialogDrawer.displayName = 'DialogDrawer';
|
6899
6901
|
|
6900
6902
|
const Extra = /*#__PURE__*/React.forwardRef(function DialogExtra(props, ref) {
|
6901
|
-
const className =
|
6903
|
+
const className = cn('wcag-grey-100 absolute top-full left-0 -mt-px w-full rounded-t-none rounded-b p-6 text-left', props.className);
|
6902
6904
|
return /*#__PURE__*/React.createElement("div", Object.assign({}, props, {
|
6903
6905
|
className: className,
|
6904
6906
|
"data-taco": "dialog-extra",
|
@@ -6980,7 +6982,7 @@ const Group = /*#__PURE__*/React.forwardRef(function Group(props, ref) {
|
|
6980
6982
|
orientation = 'horizontal',
|
6981
6983
|
...otherProps
|
6982
6984
|
} = props;
|
6983
|
-
const className =
|
6985
|
+
const className = cn('flex gap-2 [&:has([data-taco="tag"])]:!gap-1', {
|
6984
6986
|
'flex-col ': orientation === 'vertical'
|
6985
6987
|
}, props.className);
|
6986
6988
|
return /*#__PURE__*/React.createElement(Tag, Object.assign({}, otherProps, {
|
@@ -7021,7 +7023,7 @@ const getDrawerSizeClassnames = size => {
|
|
7021
7023
|
}
|
7022
7024
|
};
|
7023
7025
|
const getDrawerContentClassNames = (size, variant, open) => {
|
7024
|
-
return
|
7026
|
+
return cn('bg-white h-full bottom-0 top-0 right-0 transition-none', {
|
7025
7027
|
block: open,
|
7026
7028
|
hidden: !open,
|
7027
7029
|
fixed: variant === 'overlay',
|
@@ -7029,23 +7031,23 @@ const getDrawerContentClassNames = (size, variant, open) => {
|
|
7029
7031
|
}, getDrawerSizeClassnames(size));
|
7030
7032
|
};
|
7031
7033
|
const getDrawerContainerClassNames = variant => {
|
7032
|
-
return
|
7034
|
+
return cn('bg-white mx-auto absolute h-full w-full flex flex-col ', {
|
7033
7035
|
'shadow-[0_6px_9px_0_rgba(89,85,98,0.3),0_0_1px_0_rgba(89,85,98,0.2)]': variant === 'overlay',
|
7034
7036
|
'border-l border-grey-300 h-full': variant === 'embedded'
|
7035
7037
|
});
|
7036
7038
|
};
|
7037
7039
|
const getDrawerDragHandlerClassNames = () => {
|
7038
|
-
return
|
7040
|
+
return cn('border-[2px] absolute border-transparent top-0 w-2 h-full cursor-ew-resize left-0 hover:border-l-blue-500');
|
7039
7041
|
};
|
7040
7042
|
const getBackdropClassNames = open => {
|
7041
|
-
return
|
7043
|
+
return cn({
|
7042
7044
|
block: open,
|
7043
7045
|
hidden: !open
|
7044
7046
|
});
|
7045
7047
|
};
|
7046
7048
|
|
7047
7049
|
const Bar = props => {
|
7048
|
-
const className =
|
7050
|
+
const className = cn(`flex select-none touch-none transition-colors hover:bg-grey`, {
|
7049
7051
|
'w-[7px] hover:w-[14px] mr-[2px] hover:px-[2px] hover:mr-0': props.orientation === 'vertical',
|
7050
7052
|
'flex-col h-[7px] hover:h-[14px] mb-[2px] hover:py-[2px] hover:mb-0': props.orientation === 'horizontal'
|
7051
7053
|
});
|
@@ -7065,7 +7067,7 @@ const ScrollArea = props => {
|
|
7065
7067
|
...otherProps
|
7066
7068
|
} = props;
|
7067
7069
|
return /*#__PURE__*/React__default.createElement(ScrollAreaPrimitive.Root, Object.assign({}, otherProps, {
|
7068
|
-
className:
|
7070
|
+
className: cn('overflow-hidden', props.className),
|
7069
7071
|
"data-taco": "scrollarea"
|
7070
7072
|
}), /*#__PURE__*/React__default.createElement(ScrollAreaPrimitive.Viewport, {
|
7071
7073
|
className: "h-full w-full"
|
@@ -7116,7 +7118,7 @@ const Title$2 = /*#__PURE__*/React__default.forwardRef(function DrawerTitle(prop
|
|
7116
7118
|
* where we might want to hide the grey separator. For this reason separator was rendered with using of classNames,
|
7117
7119
|
* so it can be easily overriden in exceptional scenarios.
|
7118
7120
|
* */
|
7119
|
-
const cName =
|
7121
|
+
const cName = cn('grow-0 py-4 px-4 justify-self-start mb-0 border-b-[1px] border-grey-300 flex items-start', className);
|
7120
7122
|
React__default.useEffect(() => {
|
7121
7123
|
var _ref$current, _drawer$querySelector, _closeButton$offsetWi, _drawer$querySelector2, _actionsWrapper$offse;
|
7122
7124
|
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"]');
|
@@ -7156,7 +7158,7 @@ const Footer$2 = /*#__PURE__*/React__default.forwardRef(function DrawerFooter(pr
|
|
7156
7158
|
/**
|
7157
7159
|
* The same scenario as Title, grey separator rendered using classNames to have posibility to override it.
|
7158
7160
|
*/
|
7159
|
-
const cName =
|
7161
|
+
const cName = cn('mt-auto flex justify-end grow-0 p-4 border-t-[1px] border-grey-300', props.className);
|
7160
7162
|
return /*#__PURE__*/React__default.createElement("div", Object.assign({}, otherProps, {
|
7161
7163
|
className: cName,
|
7162
7164
|
ref: ref
|
@@ -7167,7 +7169,7 @@ const Actions = /*#__PURE__*/React__default.forwardRef(function Actions(props, r
|
|
7167
7169
|
className,
|
7168
7170
|
...otherProps
|
7169
7171
|
} = props;
|
7170
|
-
const cName =
|
7172
|
+
const cName = cn('absolute top-0 right-10 mr-[8px] mt-4', className);
|
7171
7173
|
// Id is added to identify the actions wrapper inside a useEffect in Dialog.Title
|
7172
7174
|
return /*#__PURE__*/React__default.createElement(Group, Object.assign({}, otherProps, {
|
7173
7175
|
className: cName,
|
@@ -7192,7 +7194,7 @@ const InnerContent = /*#__PURE__*/React__default.forwardRef(function InnerConten
|
|
7192
7194
|
children,
|
7193
7195
|
...otherProps
|
7194
7196
|
} = props;
|
7195
|
-
const cName =
|
7197
|
+
const cName = cn('grow flex flex-col', {
|
7196
7198
|
'overflow-y-hidden': isScrollable,
|
7197
7199
|
'p-4': !isScrollable
|
7198
7200
|
}, className);
|
@@ -7272,7 +7274,7 @@ const DrawerContent = /*#__PURE__*/React__default.forwardRef(function Content(pr
|
|
7272
7274
|
menu.close();
|
7273
7275
|
};
|
7274
7276
|
}
|
7275
|
-
const containerClassName = React__default.useMemo(() =>
|
7277
|
+
const containerClassName = React__default.useMemo(() => cn(getDrawerContainerClassNames(variant), className), [className]);
|
7276
7278
|
const {
|
7277
7279
|
contentClassName,
|
7278
7280
|
dragHandlerClassName
|
@@ -7393,7 +7395,7 @@ const Trigger$4 = /*#__PURE__*/React.forwardRef(function DrawerTrigger(props, re
|
|
7393
7395
|
const DEFAULT_OUTLET_NAME = 'default';
|
7394
7396
|
const Outlet = /*#__PURE__*/React.forwardRef(function Outlet(props, ref) {
|
7395
7397
|
var _props$name;
|
7396
|
-
const className =
|
7398
|
+
const className = cn('h-full ml-auto overflow-hidden flex-shrink-0', props.className);
|
7397
7399
|
return /*#__PURE__*/React.createElement("div", Object.assign({}, props, {
|
7398
7400
|
className: className,
|
7399
7401
|
"data-taco": "drawer-outlet",
|
@@ -7499,10 +7501,10 @@ const Field = /*#__PURE__*/React.forwardRef(function Field(props, ref) {
|
|
7499
7501
|
message,
|
7500
7502
|
...otherProps
|
7501
7503
|
} = props;
|
7502
|
-
const className =
|
7504
|
+
const className = cn('flex flex-col font-bold text-xs leading-loose pb-4 min-h-[theme(spacing.18)]', {
|
7503
7505
|
'text-grey-300': disabled
|
7504
7506
|
}, props.className);
|
7505
|
-
const messageClassName =
|
7507
|
+
const messageClassName = cn('h-4 text-xs text-left leading-normal font-normal truncate -mb-4', {
|
7506
7508
|
'text-grey-700': !invalid && !warning,
|
7507
7509
|
'text-red-500': invalid,
|
7508
7510
|
'text-yellow-700': warning && !invalid,
|
@@ -7527,7 +7529,7 @@ const Form = /*#__PURE__*/React.forwardRef(function Form(props, ref) {
|
|
7527
7529
|
horizontal = false,
|
7528
7530
|
...otherProps
|
7529
7531
|
} = props;
|
7530
|
-
const className =
|
7532
|
+
const className = cn('yt-form', {
|
7531
7533
|
'yt-form--horizontal flex flex-wrap': horizontal
|
7532
7534
|
}, props.className);
|
7533
7535
|
return /*#__PURE__*/React.createElement("form", Object.assign({}, otherProps, {
|
@@ -7560,7 +7562,7 @@ const Anchor$1 = /*#__PURE__*/React.forwardRef(function HangerAnchor(props, exte
|
|
7560
7562
|
}), children);
|
7561
7563
|
});
|
7562
7564
|
const Title$3 = /*#__PURE__*/React.forwardRef(function DialogTitle(props, ref) {
|
7563
|
-
const className =
|
7565
|
+
const className = cn('mb-1 text-base font-bold flex w-full', props.className);
|
7564
7566
|
return /*#__PURE__*/React.createElement("span", Object.assign({}, props, {
|
7565
7567
|
className: className,
|
7566
7568
|
ref: ref
|
@@ -7575,7 +7577,7 @@ const Content$6 = /*#__PURE__*/React.forwardRef(function HangerContent(props, re
|
|
7575
7577
|
const {
|
7576
7578
|
texts
|
7577
7579
|
} = useLocalization();
|
7578
|
-
const className =
|
7580
|
+
const className = cn('wcag-blue-500 border border-transparent rounded p-3 pr-12 yt-shadow focus:border-transparent max-w-sm', props.className);
|
7579
7581
|
const handleInteractOutside = event => {
|
7580
7582
|
event.preventDefault();
|
7581
7583
|
};
|
@@ -7662,7 +7664,7 @@ const Content$7 = /*#__PURE__*/React.forwardRef(function HoverCardContent(props,
|
|
7662
7664
|
const {
|
7663
7665
|
placement: side
|
7664
7666
|
} = props;
|
7665
|
-
const className =
|
7667
|
+
const className = cn(getPopoverStyleClassnames(), 'min-w-[theme(spacing.40)] max-w-[theme(spacing.96)]', props.className);
|
7666
7668
|
return /*#__PURE__*/React.createElement(HoverCardPrimitive.Portal, null, /*#__PURE__*/React.createElement(HoverCardPrimitive.Content, {
|
7667
7669
|
className: className,
|
7668
7670
|
"data-taco": "hover-card",
|
@@ -7700,7 +7702,7 @@ const Item$1 = /*#__PURE__*/React__default.forwardRef(function Item(props, ref)
|
|
7700
7702
|
title,
|
7701
7703
|
...attributes
|
7702
7704
|
} = props;
|
7703
|
-
const iconClassName =
|
7705
|
+
const iconClassName = cn('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'));
|
7704
7706
|
return /*#__PURE__*/React__default.createElement(Tag, Object.assign({}, attributes, {
|
7705
7707
|
"aria-disabled": disabled ? true : undefined,
|
7706
7708
|
"data-taco": "list-item",
|
@@ -7772,7 +7774,7 @@ const Switch = /*#__PURE__*/React.forwardRef(function Switch(props, ref) {
|
|
7772
7774
|
...otherProps
|
7773
7775
|
} = props;
|
7774
7776
|
const id = useId(props.id);
|
7775
|
-
const className =
|
7777
|
+
const className = cn('group h-5 w-9 flex flex-shrink-0 rounded-full inline-flex focus-visible:yt-focus', {
|
7776
7778
|
'mr-2': !!label,
|
7777
7779
|
'bg-grey-500 hover:bg-grey-700 aria-checked:bg-blue-500 aria-checked:hover:bg-blue-700': !props.disabled,
|
7778
7780
|
'bg-grey-500/50 aria-checked:bg-blue-500/50 cursor-not-allowed': props.disabled
|
@@ -7793,7 +7795,7 @@ const Switch = /*#__PURE__*/React.forwardRef(function Switch(props, ref) {
|
|
7793
7795
|
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]"
|
7794
7796
|
}));
|
7795
7797
|
if (label) {
|
7796
|
-
const labelContainerClassName =
|
7798
|
+
const labelContainerClassName = cn('flex self-start cursor-pointer', {
|
7797
7799
|
'cursor-not-allowed text-grey-300': props.disabled
|
7798
7800
|
});
|
7799
7801
|
return /*#__PURE__*/React.createElement("span", {
|
@@ -7842,7 +7844,7 @@ const ToggleItem = /*#__PURE__*/React__default.forwardRef(function Toggle(props,
|
|
7842
7844
|
return;
|
7843
7845
|
}
|
7844
7846
|
}
|
7845
|
-
const className =
|
7847
|
+
const className = cn('group/toggle', props.className);
|
7846
7848
|
return /*#__PURE__*/React__default.createElement(Item$1, Object.assign({}, attributes, {
|
7847
7849
|
className: className,
|
7848
7850
|
onClick: handleClick,
|
@@ -8288,7 +8290,7 @@ const Listbox = /*#__PURE__*/React.forwardRef(function Listbox(props, ref) {
|
|
8288
8290
|
list,
|
8289
8291
|
input
|
8290
8292
|
} = useListbox(otherProps, ref);
|
8291
|
-
const className =
|
8293
|
+
const className = cn('bg-white inline-flex relative w-full', externalClassName);
|
8292
8294
|
return /*#__PURE__*/React.createElement("span", {
|
8293
8295
|
"data-taco": "listbox",
|
8294
8296
|
className: className
|
@@ -8311,7 +8313,7 @@ const MultiListbox = /*#__PURE__*/React.forwardRef(function Listbox(props, ref)
|
|
8311
8313
|
list,
|
8312
8314
|
input
|
8313
8315
|
} = useMultiListbox(otherProps, ref);
|
8314
|
-
const className =
|
8316
|
+
const className = cn('bg-white inline-flex relative w-full', externalClassName);
|
8315
8317
|
return /*#__PURE__*/React.createElement("span", {
|
8316
8318
|
"data-taco": "listbox",
|
8317
8319
|
className: className
|
@@ -8335,7 +8337,7 @@ const Content$8 = /*#__PURE__*/React.forwardRef(function MenuContent(props, ref)
|
|
8335
8337
|
placement: side,
|
8336
8338
|
...otherProps
|
8337
8339
|
} = props;
|
8338
|
-
const className =
|
8340
|
+
const className = cn('border border-transparent rounded block outline-none p-1 yt-shadow wcag-white', props.className);
|
8339
8341
|
// attach refs to each child
|
8340
8342
|
const childrenRefs = React.useRef([]);
|
8341
8343
|
const childrenWithRefs = React.Children.toArray(props.children).filter(child => !!child) // remove falsey children
|
@@ -8425,7 +8427,7 @@ const Shortcut = ({
|
|
8425
8427
|
keys,
|
8426
8428
|
...props
|
8427
8429
|
}) => {
|
8428
|
-
const className =
|
8430
|
+
const className = cn('inline-flex gap-0.5', props.className);
|
8429
8431
|
const texts = getShortcutText(keys);
|
8430
8432
|
return /*#__PURE__*/React__default.createElement("span", Object.assign({}, props, {
|
8431
8433
|
className: className
|
@@ -8454,7 +8456,7 @@ const useItemStyling = ({
|
|
8454
8456
|
menu === null || menu === void 0 ? void 0 : menu.registerIndentation();
|
8455
8457
|
}
|
8456
8458
|
}, [indented]);
|
8457
|
-
return
|
8459
|
+
return cn('flex items-center justify-start h-8 pr-1.5 relative rounded w-full focus:outline-none group', {
|
8458
8460
|
'pl-7': menu === null || menu === void 0 ? void 0 : menu.indented,
|
8459
8461
|
'pl-1.5': !(menu !== null && menu !== void 0 && menu.indented),
|
8460
8462
|
'cursor-pointer text-black hover:wcag-grey-200 data-[highlighted]:wcag-grey-200': !disabled,
|
@@ -8613,7 +8615,7 @@ const Checkbox$2 = /*#__PURE__*/React.forwardRef(function MenuCheckboxItem(props
|
|
8613
8615
|
});
|
8614
8616
|
|
8615
8617
|
const getRadioClassnames = (disabled = false, invalid = false) => {
|
8616
|
-
return
|
8618
|
+
return cn('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 ? {
|
8617
8619
|
'border-red-500 hover:border-red-700 aria-checked:bg-red-500 aria-checked:border-red-500 hover:aria-checked:border-red-700': !disabled,
|
8618
8620
|
'border-red-500/50 aria-checked:bg-red-500/50 aria-checked:border-red-500/50': disabled
|
8619
8621
|
} : {
|
@@ -8636,8 +8638,8 @@ const RadioGroupItem = /*#__PURE__*/React.forwardRef(function RadioGroupItem(pro
|
|
8636
8638
|
...otherProps
|
8637
8639
|
} = props;
|
8638
8640
|
const isDisabled = context.disabled || props.disabled;
|
8639
|
-
const className =
|
8640
|
-
const labelClassName =
|
8641
|
+
const className = cn('self-start', getRadioClassnames(isDisabled, context.invalid));
|
8642
|
+
const labelClassName = cn('flex items-center gap-2', {
|
8641
8643
|
'cursor-pointer': !isDisabled,
|
8642
8644
|
'cursor-not-allowed text-grey-300': isDisabled
|
8643
8645
|
}, props.className);
|
@@ -8704,7 +8706,7 @@ const RadioGroup = /*#__PURE__*/React.forwardRef(function RadioGroup(props, ref)
|
|
8704
8706
|
context,
|
8705
8707
|
props: otherProps
|
8706
8708
|
} = useRadioGroup(props);
|
8707
|
-
const className =
|
8709
|
+
const className = cn('flex items-start gap-y-2', {
|
8708
8710
|
'flex-wrap gap-x-4 ': otherProps.orientation === 'horizontal',
|
8709
8711
|
'flex-col': otherProps.orientation === 'vertical'
|
8710
8712
|
}, otherProps.className);
|
@@ -8749,7 +8751,7 @@ const RadioGroup$1 = /*#__PURE__*/React.forwardRef(function MenuRadioItem(props,
|
|
8749
8751
|
context,
|
8750
8752
|
props: otherProps
|
8751
8753
|
} = useRadioGroup(props);
|
8752
|
-
const className =
|
8754
|
+
const className = cn('flex flex-col', props.className);
|
8753
8755
|
return /*#__PURE__*/React.createElement(MenuRadioGroupContext.Provider, {
|
8754
8756
|
value: context
|
8755
8757
|
}, /*#__PURE__*/React.createElement(DropdownMenuPrimitive.RadioGroup, Object.assign({}, otherProps, {
|
@@ -8769,7 +8771,7 @@ const Separator = /*#__PURE__*/React.forwardRef(function Separator(props, ref) {
|
|
8769
8771
|
|
8770
8772
|
const Header = /*#__PURE__*/React.forwardRef(function MenuHeader(props, ref) {
|
8771
8773
|
const menu = useCurrentMenu();
|
8772
|
-
const className =
|
8774
|
+
const className = cn('flex items-center justify-start h-7 pr-1.5 text-xs text-grey-700', {
|
8773
8775
|
'pl-7': menu === null || menu === void 0 ? void 0 : menu.indented,
|
8774
8776
|
'pl-1.5': !(menu !== null && menu !== void 0 && menu.indented)
|
8775
8777
|
}, props.className);
|
@@ -8785,7 +8787,7 @@ const SubMenu = /*#__PURE__*/React.forwardRef(function MenuSubMenu(props, ref) {
|
|
8785
8787
|
children,
|
8786
8788
|
...otherProps
|
8787
8789
|
} = props;
|
8788
|
-
const className =
|
8790
|
+
const className = cn('border border-transparent rounded block outline-none p-1 yt-shadow wcag-white', props.className);
|
8789
8791
|
return /*#__PURE__*/React.createElement(DropdownMenuPrimitive.Portal, null, /*#__PURE__*/React.createElement(DropdownMenuPrimitive.SubContent, Object.assign({}, otherProps, {
|
8790
8792
|
className: className,
|
8791
8793
|
"data-taco": "menu-submenu",
|
@@ -8845,7 +8847,7 @@ const ModeSwitch = /*#__PURE__*/React.forwardRef(function ModeSwitch(props, ref)
|
|
8845
8847
|
onChange,
|
8846
8848
|
...otherProps
|
8847
8849
|
} = props;
|
8848
|
-
const className =
|
8850
|
+
const className = cn('group w-14 h-8 flex flex-shrink-0 rounded-full inline-flex focus-visible:yt-focus p-1', {
|
8849
8851
|
'bg-grey-500 hover:bg-grey-700 aria-checked:bg-blue-500 aria-checked:hover:bg-blue-700': !props.disabled,
|
8850
8852
|
'bg-grey-500 aria-checked:bg-blue-500 cursor-not-allowed opacity-50': props.disabled
|
8851
8853
|
}, props.className);
|
@@ -8884,7 +8886,7 @@ const TreeviewGroup = /*#__PURE__*/React__default.forwardRef(function TreeviewGr
|
|
8884
8886
|
setExpanded(fixed || initialExpanded);
|
8885
8887
|
}
|
8886
8888
|
}, [fixed, initialExpanded]);
|
8887
|
-
const listClassName =
|
8889
|
+
const listClassName = cn('flex-col mb-0', {
|
8888
8890
|
flex: expanded,
|
8889
8891
|
hidden: !expanded
|
8890
8892
|
});
|
@@ -8973,7 +8975,7 @@ const Item$3 = /*#__PURE__*/React__default.forwardRef(function Item(props, ref)
|
|
8973
8975
|
const proxyRef = useMergedRef(ref);
|
8974
8976
|
const [isDraggedOver, dropTargetProps] = useDropTarget(onDrop);
|
8975
8977
|
const isTreeitem = role === 'treeitem';
|
8976
|
-
const className =
|
8978
|
+
const className = cn('yt-navigation__item cursor-pointer', {
|
8977
8979
|
'w-full mb-px py-1 px-3 flex items-center hover:bg-grey-300': isTreeitem,
|
8978
8980
|
'bg-white w-full h-10 px-3 flex-shrink-0 flex items-center justify-between cursor-pointer': !isTreeitem,
|
8979
8981
|
'yt-navigation__item--active': active && !isDraggedOver,
|
@@ -9003,16 +9005,16 @@ const Item$3 = /*#__PURE__*/React__default.forwardRef(function Item(props, ref)
|
|
9003
9005
|
});
|
9004
9006
|
const Panel = /*#__PURE__*/React__default.forwardRef(function Panel(props, ref) {
|
9005
9007
|
return /*#__PURE__*/React__default.createElement("div", Object.assign({}, props, {
|
9006
|
-
className:
|
9008
|
+
className: cn('w-full bg-white p-3', props.className),
|
9007
9009
|
ref: ref
|
9008
9010
|
}));
|
9009
9011
|
});
|
9010
9012
|
const MenuGroup = /*#__PURE__*/React__default.forwardRef(function MenuGroup(props, ref) {
|
9011
|
-
const className =
|
9013
|
+
const className = cn('flex-shrink-0 space-y-1 outline-none', {
|
9012
9014
|
'bg-white pb-2': props.fixed
|
9013
9015
|
}, typeof props.className === 'function' ? props.className(false) : props.className);
|
9014
9016
|
const title = expanded => {
|
9015
|
-
const className =
|
9017
|
+
const className = cn('bg-white h-10 pl-3 pr-1 flex items-center justify-between w-full', {
|
9016
9018
|
'mb-1': expanded,
|
9017
9019
|
'cursor-pointer hover:text-blue-500': !props.fixed
|
9018
9020
|
});
|
@@ -9047,7 +9049,7 @@ const Menu$2 = /*#__PURE__*/React__default.forwardRef(function Menu(props, ref)
|
|
9047
9049
|
return scrollableAreas;
|
9048
9050
|
}, [props.children]);
|
9049
9051
|
return /*#__PURE__*/React__default.createElement(Treeview, Object.assign({}, props, {
|
9050
|
-
className:
|
9052
|
+
className: cn('divide-grey-100 flex flex-grow flex-col divide-y-2 overflow-y-auto', props.className),
|
9051
9053
|
ref: ref
|
9052
9054
|
}), scrollableAreas.map((area, i) => Array.isArray(area) ? (/*#__PURE__*/React__default.createElement("div", {
|
9053
9055
|
className: "divide-grey-100 flex h-0 flex-auto flex-shrink-0 flex-grow flex-col divide-y-2 overflow-y-auto",
|
@@ -9060,7 +9062,7 @@ const Navigation = /*#__PURE__*/React__default.forwardRef(function Navigation(pr
|
|
9060
9062
|
children,
|
9061
9063
|
...otherProps
|
9062
9064
|
} = props;
|
9063
|
-
const className =
|
9065
|
+
const className = cn('h-full flex flex-col bg-grey-100 divide-y-2 divide-grey-100', props.className);
|
9064
9066
|
return /*#__PURE__*/React__default.createElement("div", Object.assign({}, otherProps, {
|
9065
9067
|
className: className,
|
9066
9068
|
"data-taco": "navigation",
|
@@ -9170,18 +9172,18 @@ const OverflowGroup = /*#__PURE__*/React__default.forwardRef(function OverflowGr
|
|
9170
9172
|
const MoreButton = (_moreButton = moreButton === null || moreButton === void 0 ? void 0 : moreButton(moreButtonText)) !== null && _moreButton !== void 0 ? _moreButton : /*#__PURE__*/React__default.createElement(IconButton, {
|
9171
9173
|
icon: "more"
|
9172
9174
|
});
|
9173
|
-
const className =
|
9175
|
+
const className = cn('flex overflow-hidden', props.className);
|
9174
9176
|
return /*#__PURE__*/React__default.createElement("div", Object.assign({}, attributes, {
|
9175
9177
|
className: className,
|
9176
9178
|
"data-taco": "overflow-group",
|
9177
9179
|
ref: internalRef
|
9178
9180
|
}), children.map((child, index) => /*#__PURE__*/React__default.cloneElement(child, {
|
9179
|
-
className:
|
9181
|
+
className: cn(child.props.className, {
|
9180
9182
|
visible: intersectedChildIndex === undefined || index < intersectedChildIndex,
|
9181
9183
|
'invisible order-[100] pointer-events-none': intersectedChildIndex !== undefined && index >= intersectedChildIndex
|
9182
9184
|
})
|
9183
9185
|
})), hiddenChildren.length ? /*#__PURE__*/React__default.cloneElement(MoreButton, {
|
9184
|
-
className:
|
9186
|
+
className: cn('sticky right-0 order-[99]', MoreButton.props.className),
|
9185
9187
|
'data-observer-ignore': true,
|
9186
9188
|
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, {
|
9187
9189
|
key: index
|
@@ -9337,7 +9339,7 @@ const useSelect = ({
|
|
9337
9339
|
const item = findByValue(flattenedData, value);
|
9338
9340
|
if (item) {
|
9339
9341
|
text = item.icon ? (/*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.cloneElement(item.icon, {
|
9340
|
-
className:
|
9342
|
+
className: cn(item.icon.props.className, 'mr-1 -mt-px')
|
9341
9343
|
}), item.text)) : item.text;
|
9342
9344
|
}
|
9343
9345
|
}
|
@@ -9447,10 +9449,10 @@ const BaseSelect = /*#__PURE__*/React.forwardRef(function BaseSelect(props, ref)
|
|
9447
9449
|
} = useSelect(otherProps, ref);
|
9448
9450
|
const internalRef = React.useRef(null);
|
9449
9451
|
const selectDimensions = useBoundingClientRectListener(internalRef);
|
9450
|
-
const className =
|
9452
|
+
const className = cn('inline-flex relative w-full', {
|
9451
9453
|
'yt-select--readonly': props.readOnly
|
9452
9454
|
}, externalClassName);
|
9453
|
-
const inputClassname =
|
9455
|
+
const inputClassname = cn(getInputClasses(props), 'h-8 text-left !pr-0', {
|
9454
9456
|
'border-blue-500': popover.open,
|
9455
9457
|
'select-text': otherProps.readOnly
|
9456
9458
|
});
|
@@ -9598,7 +9600,7 @@ const Pagination = /*#__PURE__*/React.forwardRef(function Pagination(props, ref)
|
|
9598
9600
|
const pageCount = Math.ceil(length / pageSize);
|
9599
9601
|
const canPreviousPage = pageIndex > 0;
|
9600
9602
|
const canNextPage = pageIndex < pageCount - 1;
|
9601
|
-
const className =
|
9603
|
+
const className = cn('inline-flex relative justify-between items-center', props.className);
|
9602
9604
|
return /*#__PURE__*/React.createElement("div", Object.assign({}, otherProps, {
|
9603
9605
|
className: className,
|
9604
9606
|
"data-taco": "pagination",
|
@@ -9665,8 +9667,8 @@ const Progress = ({
|
|
9665
9667
|
animationDuration: `${duration}ms`
|
9666
9668
|
};
|
9667
9669
|
}
|
9668
|
-
const className =
|
9669
|
-
const progressClassName =
|
9670
|
+
const className = cn('bg-grey-100 rounded block h-1 overflow-hidden w-full', props.className);
|
9671
|
+
const progressClassName = cn('yt-progress__bar block h-1', {
|
9670
9672
|
"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,
|
9671
9673
|
[`w-0 bg-grey-300 animate-[progress_linear]`]: duration
|
9672
9674
|
});
|
@@ -9731,7 +9733,7 @@ const Toast = ({
|
|
9731
9733
|
autoClose,
|
9732
9734
|
type = 'default'
|
9733
9735
|
} = options;
|
9734
|
-
const className =
|
9736
|
+
const className = cn('bg-white relative flex items-center py-1 px-2 mt-3 w-full rounded yt-shadow print:hidden', {
|
9735
9737
|
'border border-grey-200': type === 'default' || type === 'loading' || !type,
|
9736
9738
|
'border border-grey-500': type === 'success',
|
9737
9739
|
'border border-blue-500': type === 'information',
|
@@ -10449,7 +10451,8 @@ function processChildren(child, columns, defaultSizing, defaultSorting, defaultV
|
|
10449
10451
|
// To avoid errors caused by undefined row data values, we pass accessorFn as a preventive measure
|
10450
10452
|
// accessorKey can be dot notated strings, so we use lodash.get to access deeply nested children
|
10451
10453
|
accessorFn: row => get(row, accessorKey),
|
10452
|
-
header
|
10454
|
+
// 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
|
10455
|
+
header: () => header,
|
10453
10456
|
// features
|
10454
10457
|
enableColumnFilter,
|
10455
10458
|
enableGlobalFilter,
|
@@ -12645,7 +12648,7 @@ function Actions$1(props) {
|
|
12645
12648
|
const visibleActions = actions.map(action => action(data, rowId, tableMeta.rowActions.handlers['cleanup'], table)).filter(action => !!action);
|
12646
12649
|
const actionsOnRow = visibleActions.length === actionsLength ? visibleActions : visibleActions.slice(0, actionsLength - 1);
|
12647
12650
|
const actionsInMenu = visibleActions.slice(visibleActions.length === actionsLength ? actionsLength : actionsLength - 1);
|
12648
|
-
const className =
|
12651
|
+
const className = cn('flex justify-end text-right bg-[inherit] shadow-[-6px_0px_6px_var(--table-row-actions-shadow)] print:hidden');
|
12649
12652
|
return /*#__PURE__*/React__default.createElement("span", {
|
12650
12653
|
className: className
|
12651
12654
|
}, actionsOnRow.map((button, index) => {
|
@@ -12709,7 +12712,7 @@ const renderer = {
|
|
12709
12712
|
renderer: Cell,
|
12710
12713
|
meta: {
|
12711
12714
|
align: 'right',
|
12712
|
-
className: /*#__PURE__*/
|
12715
|
+
className: /*#__PURE__*/cn('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'),
|
12713
12716
|
// TODO: remove when table3 is migrated, this satisfies the legacy table3 type
|
12714
12717
|
enableSearch: false,
|
12715
12718
|
header: ''
|
@@ -12732,7 +12735,7 @@ function Cell$1() {
|
|
12732
12735
|
return /*#__PURE__*/React__default.createElement(Icon, {
|
12733
12736
|
"aria-label": texts.table.columns.drag.tooltip,
|
12734
12737
|
name: "drag",
|
12735
|
-
className:
|
12738
|
+
className: cn("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')
|
12736
12739
|
});
|
12737
12740
|
}
|
12738
12741
|
const renderer$1 = {
|
@@ -13272,7 +13275,7 @@ const DisplayRow = /*#__PURE__*/React__default.memo(function DisplayRow(props) {
|
|
13272
13275
|
const expansionRef = React__default.useRef(null);
|
13273
13276
|
const isExpanded = !!attributes['data-row-expanded'];
|
13274
13277
|
useSetVirtualisedRowHeight(measureRow, ref.current, expansionRef.current, isExpanded);
|
13275
|
-
const className =
|
13278
|
+
const className = cn('group/row', otherAttributes.className, {
|
13276
13279
|
'hover:cursor-grab': tableMeta.rowDrag.isEnabled && typeof attributes.onClick !== 'function',
|
13277
13280
|
'hover:cursor-pointer': typeof attributes.onClick === 'function'
|
13278
13281
|
});
|
@@ -13427,14 +13430,14 @@ function Resizer(props) {
|
|
13427
13430
|
}
|
13428
13431
|
};
|
13429
13432
|
const handle = /*#__PURE__*/React__default.createElement("div", {
|
13430
|
-
className:
|
13433
|
+
className: cn('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', {
|
13431
13434
|
'!visible': isResizing
|
13432
13435
|
}),
|
13433
13436
|
onClick: handleClick,
|
13434
13437
|
onMouseDown: handleResize,
|
13435
13438
|
onTouchStart: handleResize
|
13436
13439
|
}, /*#__PURE__*/React__default.createElement("div", {
|
13437
|
-
className:
|
13440
|
+
className: cn('h-full w-1 rounded', {
|
13438
13441
|
'!bg-blue-500': isResizing,
|
13439
13442
|
'bg-grey-500 hover:bg-grey-700': !isResizing
|
13440
13443
|
})
|
@@ -13652,7 +13655,7 @@ function HeaderMenu(props) {
|
|
13652
13655
|
}));
|
13653
13656
|
}, [canFilter, canGoto, canHide, canPin, canSort, customMenu, handleGoto, handleSortToggle, index, isFiltered, sortDirection]);
|
13654
13657
|
// can't use display: none because the button needs to be focusable
|
13655
|
-
const className =
|
13658
|
+
const className = cn(
|
13656
13659
|
// positioning
|
13657
13660
|
'justify-end overflow-hidden',
|
13658
13661
|
// sizing
|
@@ -13707,6 +13710,21 @@ function getIsPinned(header) {
|
|
13707
13710
|
return (_header$subHeaders = header.subHeaders) !== null && _header$subHeaders !== void 0 && _header$subHeaders.length ? (_header$subHeaders$fi = header.subHeaders.find(x => x.column.getIsPinned())) === null || _header$subHeaders$fi === void 0 ? void 0 : _header$subHeaders$fi.column.getIsPinned() : header.column.getIsPinned();
|
13708
13711
|
}
|
13709
13712
|
|
13713
|
+
const HeaderContent = ({
|
13714
|
+
children,
|
13715
|
+
tooltip,
|
13716
|
+
isInternalColumnHeader
|
13717
|
+
}) => {
|
13718
|
+
if (isInternalColumnHeader || typeof children !== 'string') {
|
13719
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, children);
|
13720
|
+
}
|
13721
|
+
return /*#__PURE__*/React__default.createElement(Tooltip, {
|
13722
|
+
title: String(tooltip !== null && tooltip !== void 0 ? tooltip : children),
|
13723
|
+
placement: "top"
|
13724
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
13725
|
+
className: "truncate"
|
13726
|
+
}, children));
|
13727
|
+
};
|
13710
13728
|
function Header$5(props) {
|
13711
13729
|
var _header$column$column;
|
13712
13730
|
const {
|
@@ -13744,7 +13762,7 @@ function Header$5(props) {
|
|
13744
13762
|
canPin,
|
13745
13763
|
canResize,
|
13746
13764
|
canSort,
|
13747
|
-
className:
|
13765
|
+
className: cn('group/header', columnMeta.headerClassName),
|
13748
13766
|
children: reactTable.flexRender(header.column.columnDef.header, header.getContext()),
|
13749
13767
|
colSpan: header.colSpan,
|
13750
13768
|
customMenu: columnMeta.menu,
|
@@ -13765,7 +13783,7 @@ function Header$5(props) {
|
|
13765
13783
|
};
|
13766
13784
|
if (header.isPlaceholder) {
|
13767
13785
|
const nextHeader = header.headerGroup.headers[header.index + 1];
|
13768
|
-
memoedProps.className =
|
13786
|
+
memoedProps.className = cn('!bg-white before:!content-none', memoedProps.className, {
|
13769
13787
|
'after:!content-none': nextHeader === null || nextHeader === void 0 ? void 0 : nextHeader.isPlaceholder
|
13770
13788
|
});
|
13771
13789
|
}
|
@@ -13876,12 +13894,11 @@ const MemoedHeader = /*#__PURE__*/React__default.memo(function MemoedHeader(prop
|
|
13876
13894
|
"data-cell-pinned": isPinned ? isPinned : undefined,
|
13877
13895
|
style: style,
|
13878
13896
|
ref: setRef
|
13879
|
-
}), isPlaceholder ?
|
13880
|
-
|
13881
|
-
|
13882
|
-
|
13883
|
-
|
13884
|
-
}, children))), sortDirection ? /*#__PURE__*/React__default.createElement(SortIndicator, {
|
13897
|
+
}), !isPlaceholder ? (/*#__PURE__*/React__default.createElement(HeaderContent, {
|
13898
|
+
children: children,
|
13899
|
+
tooltip: tooltip,
|
13900
|
+
isInternalColumnHeader: !!isInternalColumn(id)
|
13901
|
+
})) : null, sortDirection ? /*#__PURE__*/React__default.createElement(SortIndicator, {
|
13885
13902
|
direction: sortDirection
|
13886
13903
|
}) : null, hasMenu ? (/*#__PURE__*/React__default.createElement(HeaderMenu, {
|
13887
13904
|
canFilter: canFilter,
|
@@ -13889,7 +13906,7 @@ const MemoedHeader = /*#__PURE__*/React__default.memo(function MemoedHeader(prop
|
|
13889
13906
|
canHide: canHide,
|
13890
13907
|
canPin: canPin,
|
13891
13908
|
canSort: canSort,
|
13892
|
-
className:
|
13909
|
+
className: cn({
|
13893
13910
|
'ml-auto': align !== 'right',
|
13894
13911
|
'ml-0': align === 'right'
|
13895
13912
|
}),
|
@@ -14280,7 +14297,7 @@ const SearchInput2 = /*#__PURE__*/React__default.forwardRef(function SearchInput
|
|
14280
14297
|
}
|
14281
14298
|
});
|
14282
14299
|
}
|
14283
|
-
const className =
|
14300
|
+
const className = cn('!pl-7 group-focus-within:!w-72 group-focus-within:yt-focus', hasFind ? {
|
14284
14301
|
'!w-48': !value,
|
14285
14302
|
'!w-72': value
|
14286
14303
|
} : '!w-48', {
|
@@ -14310,9 +14327,9 @@ const SearchInput2 = /*#__PURE__*/React__default.forwardRef(function SearchInput
|
|
14310
14327
|
value: value !== null && value !== void 0 ? value : ''
|
14311
14328
|
}));
|
14312
14329
|
if (settingsContent) {
|
14313
|
-
const settingsClassname =
|
14330
|
+
const settingsClassname = cn('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]))]');
|
14314
14331
|
return /*#__PURE__*/React__default.createElement("div", {
|
14315
|
-
className:
|
14332
|
+
className: cn('group relative', {
|
14316
14333
|
'z-10 [&_[data-taco=input-container]]:z-10': focused
|
14317
14334
|
}),
|
14318
14335
|
ref: containerRef,
|
@@ -14594,7 +14611,7 @@ const Column = /*#__PURE__*/React__default.forwardRef(function Column(props, ref
|
|
14594
14611
|
...dragAttributes
|
14595
14612
|
} = props;
|
14596
14613
|
const canHide = column.getCanHide();
|
14597
|
-
const className =
|
14614
|
+
const className = cn('group/column flex items-center gap-x-2 rounded py-1 px-2', {
|
14598
14615
|
'hover:bg-grey-200': canHide || draggable,
|
14599
14616
|
'hover:cursor-pointer': canHide,
|
14600
14617
|
'active:cursor-move active:bg-grey-300': draggable
|
@@ -15128,7 +15145,7 @@ const Tag$1 = /*#__PURE__*/React__default.forwardRef((props, ref) => {
|
|
15128
15145
|
...otherProps
|
15129
15146
|
} = props;
|
15130
15147
|
const textRef = React__default.useRef(null);
|
15131
|
-
const className =
|
15148
|
+
const className = cn('inline-flex items-center rounded h-6 cursor-default', {
|
15132
15149
|
'opacity-50': disabled,
|
15133
15150
|
'hover:bg-opacity-75': !disabled,
|
15134
15151
|
'cursor-pointer': !!otherProps.onClick,
|
@@ -15145,7 +15162,7 @@ const Tag$1 = /*#__PURE__*/React__default.forwardRef((props, ref) => {
|
|
15145
15162
|
name: icon,
|
15146
15163
|
className: "-ml-1 mr-1 !h-5 !w-5"
|
15147
15164
|
})) : (/*#__PURE__*/React__default.cloneElement(icon, {
|
15148
|
-
className:
|
15165
|
+
className: cn(icon.props.className, 'mr-1 -ml-1')
|
15149
15166
|
})) : null, /*#__PURE__*/React__default.createElement("span", {
|
15150
15167
|
className: "truncate"
|
15151
15168
|
}, children)), onDelete ? (/*#__PURE__*/React__default.createElement(Icon, {
|
@@ -15155,7 +15172,7 @@ const Tag$1 = /*#__PURE__*/React__default.forwardRef((props, ref) => {
|
|
15155
15172
|
})) : null);
|
15156
15173
|
});
|
15157
15174
|
|
15158
|
-
const createOptionClassName = (shouldPauseHoverState = false) =>
|
15175
|
+
const createOptionClassName = (shouldPauseHoverState = false) => cn('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', {
|
15159
15176
|
'hover:wcag-grey-200': !shouldPauseHoverState
|
15160
15177
|
});
|
15161
15178
|
const createCollectionClassName = () => 'flex flex-col gap-px';
|
@@ -15305,7 +15322,7 @@ const EditPopover = props => {
|
|
15305
15322
|
}) => (/*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
15306
15323
|
className: "flex w-32 flex-col space-y-2"
|
15307
15324
|
}, onEdit ? (/*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Field, {
|
15308
|
-
className:
|
15325
|
+
className: cn('!min-h-fit', {
|
15309
15326
|
'!pb-0': !validationError
|
15310
15327
|
}),
|
15311
15328
|
invalid: !!validationError,
|
@@ -15353,7 +15370,7 @@ const Colours = props => {
|
|
15353
15370
|
value: color
|
15354
15371
|
}, AVAILABLE_COLORS.map(availableColor => (/*#__PURE__*/React__default.createElement(RadioGroupPrimitive.Item, {
|
15355
15372
|
"aria-label": color,
|
15356
|
-
className:
|
15373
|
+
className: cn('flex h-6 w-6 cursor-pointer items-center justify-center rounded', getSubtleColorShadeClasses(availableColor)),
|
15357
15374
|
key: availableColor,
|
15358
15375
|
onFocus: () => onChangeColor(availableColor),
|
15359
15376
|
value: availableColor
|
@@ -15391,7 +15408,7 @@ const Option$1 = /*#__PURE__*/React__default.forwardRef(function Select2Option(p
|
|
15391
15408
|
tags,
|
15392
15409
|
value
|
15393
15410
|
} = useSelect2Context();
|
15394
|
-
const className =
|
15411
|
+
const className = cn(createOptionClassName(shouldPauseHoverState), getFontSize(fontSize), cName);
|
15395
15412
|
const hasValue = Array.isArray(value) ? !!value.length : value !== undefined;
|
15396
15413
|
const isTag = tags && !!color;
|
15397
15414
|
const handleClick = () => {
|
@@ -15448,7 +15465,7 @@ const Option$1 = /*#__PURE__*/React__default.forwardRef(function Select2Option(p
|
|
15448
15465
|
})) : postfix : null)))), popover ? (/*#__PURE__*/React__default.createElement(IconButton, {
|
15449
15466
|
icon: "ellipsis-vertical",
|
15450
15467
|
appearance: "discrete",
|
15451
|
-
className:
|
15468
|
+
className: cn('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', {
|
15452
15469
|
'!visible': isMobileDevice((_window = window) === null || _window === void 0 ? void 0 : _window.navigator)
|
15453
15470
|
}),
|
15454
15471
|
onClick: event => {
|
@@ -15468,7 +15485,7 @@ const Group$3 = /*#__PURE__*/React__default.forwardRef(function Select2Group(pro
|
|
15468
15485
|
hasSeparator,
|
15469
15486
|
...attributes
|
15470
15487
|
} = props;
|
15471
|
-
const className =
|
15488
|
+
const className = cn(createCollectionClassName(), {
|
15472
15489
|
"last:after:content-none after:content-[''] after:bg-grey-300 after:mx-2 after:my-1 after:h-px": hasSeparator && children.length
|
15473
15490
|
}, props.className);
|
15474
15491
|
return /*#__PURE__*/React__default.createElement(Group$2, Object.assign({}, attributes, {
|
@@ -15480,7 +15497,7 @@ const Group$3 = /*#__PURE__*/React__default.forwardRef(function Select2Group(pro
|
|
15480
15497
|
});
|
15481
15498
|
|
15482
15499
|
const Title$5 = /*#__PURE__*/React__default.forwardRef(function Select2Title(props, ref) {
|
15483
|
-
const className =
|
15500
|
+
const className = cn('flex items-center text-xs pl-2 h-8', props.className);
|
15484
15501
|
return /*#__PURE__*/React__default.createElement(Title$4, Object.assign({}, props, {
|
15485
15502
|
className: className,
|
15486
15503
|
ref: ref
|
@@ -15496,7 +15513,7 @@ const Placeholder = ({
|
|
15496
15513
|
return null;
|
15497
15514
|
}
|
15498
15515
|
return /*#__PURE__*/React__default.createElement("div", Object.assign({}, props, {
|
15499
|
-
className:
|
15516
|
+
className: cn({
|
15500
15517
|
'text-grey-700': disabled,
|
15501
15518
|
'text-grey-500': !disabled
|
15502
15519
|
})
|
@@ -15537,7 +15554,7 @@ const Button$3 = /*#__PURE__*/React__default.forwardRef(function Select2TriggerB
|
|
15537
15554
|
open,
|
15538
15555
|
readOnly
|
15539
15556
|
} = useSelect2Context();
|
15540
|
-
const className =
|
15557
|
+
const className = cn('px-1.5 h-fit', getInputClasses({
|
15541
15558
|
...props,
|
15542
15559
|
disabled,
|
15543
15560
|
highlighted,
|
@@ -15611,7 +15628,7 @@ const Single = /*#__PURE__*/React__default.forwardRef(function Select2TriggerSin
|
|
15611
15628
|
readOnly,
|
15612
15629
|
tags
|
15613
15630
|
} = useSelect2Context();
|
15614
|
-
const contentClassName =
|
15631
|
+
const contentClassName = cn('truncate flex items-center gap-1');
|
15615
15632
|
const currentValue = children.find(matchesValue(value));
|
15616
15633
|
let output;
|
15617
15634
|
if (placeholder && currentValue === undefined) {
|
@@ -15669,7 +15686,7 @@ const Multiple = /*#__PURE__*/React__default.forwardRef(function Select2TriggerM
|
|
15669
15686
|
className
|
15670
15687
|
} = buttonProps;
|
15671
15688
|
if (open) {
|
15672
|
-
className =
|
15689
|
+
className = cn('!absolute z-20 !h-fit', buttonProps.className);
|
15673
15690
|
content = /*#__PURE__*/React__default.createElement(ScrollArea, {
|
15674
15691
|
className: "my-1 flex max-h-[5.5rem] flex-col",
|
15675
15692
|
onClick: forwardClick
|
@@ -15769,14 +15786,14 @@ const MultipleValue = ({
|
|
15769
15786
|
if (typeof child.props.children === 'string') {
|
15770
15787
|
output = /*#__PURE__*/React__default.createElement(Tag$1, {
|
15771
15788
|
key: String(child.props.value),
|
15772
|
-
className:
|
15789
|
+
className: cn('cursor-pointer', classNames),
|
15773
15790
|
color: tags ? child.props.color : undefined,
|
15774
15791
|
disabled: disabled,
|
15775
15792
|
icon: child.props.prefix,
|
15776
15793
|
readOnly: readOnly
|
15777
15794
|
}, child.props.children);
|
15778
15795
|
} else output = /*#__PURE__*/React__default.cloneElement(child.props.children, {
|
15779
|
-
className:
|
15796
|
+
className: cn('cursor-pointer', {
|
15780
15797
|
'shrink-0': index !== boundaryIndex
|
15781
15798
|
}, classNames),
|
15782
15799
|
key: String(child.props.value)
|
@@ -15914,7 +15931,7 @@ const Search$2 = /*#__PURE__*/React__default.forwardRef(function ListboxSearch(p
|
|
15914
15931
|
}
|
15915
15932
|
};
|
15916
15933
|
return /*#__PURE__*/React__default.createElement(Field, {
|
15917
|
-
className:
|
15934
|
+
className: cn('mx-1.5 mb-1.5 !min-h-fit', {
|
15918
15935
|
'!pb-0': !validationError
|
15919
15936
|
}),
|
15920
15937
|
invalid: !!validationError,
|
@@ -16051,7 +16068,7 @@ const Create = props => {
|
|
16051
16068
|
event.currentTarget.click();
|
16052
16069
|
}
|
16053
16070
|
};
|
16054
|
-
const className =
|
16071
|
+
const className = cn(createOptionClassName(), {
|
16055
16072
|
'!w-[calc(100%_-_theme(spacing.3))] ml-1.5': !createDialog,
|
16056
16073
|
'leading-normal border-grey-300 h-9 border-t py-2.5 px-4 !-mb-1.5': !!createDialog
|
16057
16074
|
});
|
@@ -16288,7 +16305,7 @@ const Select2 = /*#__PURE__*/React__default.forwardRef(function Select2(props, r
|
|
16288
16305
|
setValue(nextValue);
|
16289
16306
|
}
|
16290
16307
|
};
|
16291
|
-
const className =
|
16308
|
+
const className = cn('border-grey-300 rounded border bg-white py-1.5 shadow-md ', {
|
16292
16309
|
'focus-within:yt-focus': !hasSearch,
|
16293
16310
|
'outline-none': hasSearch
|
16294
16311
|
}, createCollectionClassName());
|
@@ -16328,10 +16345,10 @@ const Select2 = /*#__PURE__*/React__default.forwardRef(function Select2(props, r
|
|
16328
16345
|
}, selectAllText), /*#__PURE__*/React__default.createElement("div", {
|
16329
16346
|
className: "border-grey-300 mx-3 rounded border-t"
|
16330
16347
|
}))))) : null, loading ? (/*#__PURE__*/React__default.createElement("span", {
|
16331
|
-
className:
|
16348
|
+
className: cn('text-grey-700 flex items-center italic', fontSize && getFontSize(fontSize))
|
16332
16349
|
}, /*#__PURE__*/React__default.createElement("span", null, /*#__PURE__*/React__default.createElement(Spinner, {
|
16333
16350
|
delay: 0,
|
16334
|
-
className:
|
16351
|
+
className: cn('ml-3 mr-2 mt-1.5 h-5 w-5', {
|
16335
16352
|
'!mt-1 !h-3.5 !w-3.5': fontSize === exports.FontSizes.small,
|
16336
16353
|
'!h-4 !w-4': fontSize === exports.FontSizes.medium,
|
16337
16354
|
'!h-5 !w-5': fontSize === exports.FontSizes.large
|
@@ -18265,7 +18282,7 @@ const useTable$1 = (props, ref) => {
|
|
18265
18282
|
const renderCell = (cell, row) => {
|
18266
18283
|
const props = {
|
18267
18284
|
...cell.getCellProps(),
|
18268
|
-
className:
|
18285
|
+
className: cn('yt-table__cell flex-1 truncate p-2 align-middle', cell.column.className, {
|
18269
18286
|
'justify-start text-left': cell.column.align === 'left',
|
18270
18287
|
'justify-end text-right': cell.column.align === 'right',
|
18271
18288
|
'text-center': !cell.column.align
|
@@ -18305,7 +18322,7 @@ const Row$1 = /*#__PURE__*/React__default.forwardRef(function TableRow({
|
|
18305
18322
|
minHeight: rowHeight ? `${rowHeight}px` : undefined,
|
18306
18323
|
paddingLeft: row.depth ? `${row.depth * 2}rem` : undefined
|
18307
18324
|
},
|
18308
|
-
className:
|
18325
|
+
className: cn('yt-table__row border-grey-300 flex border-b min-h-[2.5rem] hover:bg-grey-100', {
|
18309
18326
|
'yt-table__row--active bg-grey-200 hover:bg-grey-200': activeIndex === index,
|
18310
18327
|
'yt-table__row--clickable': !!onRowClick,
|
18311
18328
|
'yt-table__row--dragging': !!row.isDragging,
|
@@ -18363,7 +18380,7 @@ const Column$2 = ({
|
|
18363
18380
|
...(cell.getSortByToggleProps && cell.getSortByToggleProps({
|
18364
18381
|
title: undefined
|
18365
18382
|
})),
|
18366
|
-
className:
|
18383
|
+
className: cn('yt-table__cell flex flex-1 truncate p-2 align-middle text-grey-700 hover:text-black', cell.className, {
|
18367
18384
|
'yt-table__cell__group': !!cell.columns,
|
18368
18385
|
'cursor-pointer': !cell.disableSorting,
|
18369
18386
|
'justify-start text-left': cell.align === 'left',
|
@@ -18406,7 +18423,7 @@ const BaseTable = /*#__PURE__*/React__default.forwardRef(function BaseTable(prop
|
|
18406
18423
|
tableRef.current.focus();
|
18407
18424
|
}
|
18408
18425
|
}, []);
|
18409
|
-
const className =
|
18426
|
+
const className = cn('yt-table flex flex-col focus:yt-focus focus:rounded-sm', props.className);
|
18410
18427
|
return /*#__PURE__*/React__default.createElement("div", Object.assign({}, otherProps, {
|
18411
18428
|
role: "table",
|
18412
18429
|
className: className,
|
@@ -18590,7 +18607,7 @@ const WindowedTable = /*#__PURE__*/React__default.forwardRef(function WindowedTa
|
|
18590
18607
|
}, [rows.length]);
|
18591
18608
|
const contentHeight = estimatedRowHeight * props.data.length || 0;
|
18592
18609
|
const isScrollbarVisible = height !== null ? contentHeight > height : false;
|
18593
|
-
const className =
|
18610
|
+
const className = cn(tableProps.className, 'yt-table--windowed', {
|
18594
18611
|
'table-with-scrollbar': isScrollbarVisible
|
18595
18612
|
});
|
18596
18613
|
let list;
|
@@ -19635,7 +19652,7 @@ const Textarea = /*#__PURE__*/React.forwardRef(function Textarea(props, ref) {
|
|
19635
19652
|
onKeyDown,
|
19636
19653
|
...otherProps
|
19637
19654
|
} = props;
|
19638
|
-
const classNames =
|
19655
|
+
const classNames = cn(getInputClasses(props), 'pt-[5px] pb-[7px] min-h-[75px] disabled:resize-none !leading-5', props.className);
|
19639
19656
|
// home and end keys only navigate to the start/end of textarea value if the textarea container does not scroll
|
19640
19657
|
// if it has scroll height then the browser reverts to native scrolling behaviour only
|
19641
19658
|
// so we manually override it to ensure _our_ desired behaviour remains intact
|
@@ -20138,7 +20155,7 @@ function SaveStatus(props) {
|
|
20138
20155
|
} = useLocalization();
|
20139
20156
|
const tableMeta = table.options.meta;
|
20140
20157
|
const status = tableMeta.editing.getRowStatus(rowId);
|
20141
|
-
const className =
|
20158
|
+
const className = cn('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)]', {
|
20142
20159
|
'mt-0.5': tableMeta.rowHeight.height === 'short',
|
20143
20160
|
'mt-1': tableMeta.rowHeight.height === 'medium',
|
20144
20161
|
'mt-1.5': tableMeta.rowHeight.height === 'tall',
|
@@ -20491,7 +20508,7 @@ function CreateNewRow(props) {
|
|
20491
20508
|
keys: shortcut
|
20492
20509
|
});
|
20493
20510
|
}
|
20494
|
-
const className =
|
20511
|
+
const className = cn('group/row border-grey-300 !sticky z-[21]', {
|
20495
20512
|
'bottom-10': tableMeta.footer.isEnabled,
|
20496
20513
|
'bottom-0': !tableMeta.footer.isEnabled,
|
20497
20514
|
'border-b': !isScrolled
|
@@ -20581,7 +20598,7 @@ function TemporaryRow(props) {
|
|
20581
20598
|
}
|
20582
20599
|
}
|
20583
20600
|
};
|
20584
|
-
const className =
|
20601
|
+
const className = cn('group/row border-grey-300 !sticky z-[22] print:hidden', {
|
20585
20602
|
'bottom-[calc(5rem_+_2px)] data-[row-editing-move]:bottom-[calc(5rem_+_2px)]': tableMeta.footer.isEnabled,
|
20586
20603
|
'bottom-[calc(2.5rem_+_2px)] data-[row-editing-move]:bottom-[calc(2.5rem_+_2px)]': !tableMeta.footer.isEnabled,
|
20587
20604
|
'border-t-2 shadow-[0px_-5px_20px_0px_rgba(0,0,0,0.1)] [&>td]:!border-b-0': isScrolled
|
@@ -20681,7 +20698,7 @@ const Tabs = /*#__PURE__*/React.forwardRef(function Tabs(props, ref) {
|
|
20681
20698
|
orientation = 'horizontal',
|
20682
20699
|
...otherProps
|
20683
20700
|
} = props;
|
20684
|
-
const className =
|
20701
|
+
const className = cn({
|
20685
20702
|
'flex w-full': orientation === 'vertical'
|
20686
20703
|
}, props.className);
|
20687
20704
|
return /*#__PURE__*/React.createElement(TabsPrimitive.Root, Object.assign({}, otherProps, {
|
@@ -20699,7 +20716,7 @@ const TabList = /*#__PURE__*/React.forwardRef(function Tab(props, ref) {
|
|
20699
20716
|
const {
|
20700
20717
|
children
|
20701
20718
|
} = props;
|
20702
|
-
const className =
|
20719
|
+
const className = cn('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);
|
20703
20720
|
return /*#__PURE__*/React.createElement(TabsPrimitive.List, Object.assign({}, props, {
|
20704
20721
|
className: className,
|
20705
20722
|
ref: ref
|
@@ -20722,13 +20739,13 @@ const TabTrigger = /*#__PURE__*/React.forwardRef(function Tab(props, ref) {
|
|
20722
20739
|
tooltip,
|
20723
20740
|
...otherProps
|
20724
20741
|
} = props;
|
20725
|
-
const triggerClassName =
|
20742
|
+
const triggerClassName = cn(props.className, 'group relative p-0.5 outline-none disabled:cursor-not-allowed disabled:text-black/50',
|
20726
20743
|
// horizontal
|
20727
20744
|
'[[aria-orientation="horizontal"]_&]:pb-1',
|
20728
20745
|
// horizontal
|
20729
20746
|
'[[aria-orientation="vertical"]_&]:pr-1');
|
20730
|
-
const buttonClassName =
|
20731
|
-
const activeClassName =
|
20747
|
+
const buttonClassName = cn(getButtonClasses(), 'group-focus-visible:yt-focus-inset group-enabled:group-hover:wcag-grey-200 pointer-events-none rounded px-3');
|
20748
|
+
const activeClassName = cn('pointer-events-none absolute hidden bg-blue-500 group-aria-selected:flex',
|
20732
20749
|
// horizontal
|
20733
20750
|
'[[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',
|
20734
20751
|
// vertical
|
@@ -20755,7 +20772,7 @@ const TabContent = /*#__PURE__*/React.forwardRef(function Tab(props, ref) {
|
|
20755
20772
|
id,
|
20756
20773
|
...otherProps
|
20757
20774
|
} = props;
|
20758
|
-
const className =
|
20775
|
+
const className = cn('[&[data-orientation="vertical"]]:grow outline-none', props.className);
|
20759
20776
|
return /*#__PURE__*/React.createElement(TabsPrimitive.Content, Object.assign({}, otherProps, {
|
20760
20777
|
className: className,
|
20761
20778
|
ref: ref,
|
@@ -21059,7 +21076,7 @@ function Legend(props) {
|
|
21059
21076
|
return /*#__PURE__*/React__default.createElement("div", {
|
21060
21077
|
className: "mx-auto w-auto max-w-full overflow-hidden"
|
21061
21078
|
}, /*#__PURE__*/React__default.createElement("div", {
|
21062
|
-
className:
|
21079
|
+
className: cn('mb-0 ml-0 flex justify-center', {
|
21063
21080
|
'flex-col': layout === 'vertical'
|
21064
21081
|
})
|
21065
21082
|
}, /*#__PURE__*/React__default.createElement(OverflowGroup, {
|
@@ -21067,7 +21084,7 @@ function Legend(props) {
|
|
21067
21084
|
moreButton: moreButton
|
21068
21085
|
}, payload.map((entry, index) => (/*#__PURE__*/React__default.createElement("span", {
|
21069
21086
|
key: `${entry.dataKey}-${index}`,
|
21070
|
-
className:
|
21087
|
+
className: cn(' hover:bg-grey-100 cursor-pointer px-[8px] py-[2px] hover:rounded-[4px]', {
|
21071
21088
|
'bg-grey-100 rounded': activeIndex === index
|
21072
21089
|
}),
|
21073
21090
|
onMouseEnter: () => handleMouseEnter(entry, index),
|
@@ -21076,7 +21093,7 @@ function Legend(props) {
|
|
21076
21093
|
}, /*#__PURE__*/React__default.createElement("span", {
|
21077
21094
|
className: "text-grey-700 flex items-center gap-[4px]"
|
21078
21095
|
}, /*#__PURE__*/React__default.createElement("span", {
|
21079
|
-
className:
|
21096
|
+
className: cn('-mt-px ml-1 flex h-3 w-3 rounded-sm', {
|
21080
21097
|
'border-grey-300 border !bg-white': !activeItems[entry.dataKey]
|
21081
21098
|
}),
|
21082
21099
|
style: {
|
@@ -21359,7 +21376,7 @@ const Legend$1 = ({
|
|
21359
21376
|
const isHovered = isTotal ? isTotalLegendHovered : hoveredItem.includes(itemData.id);
|
21360
21377
|
return /*#__PURE__*/React__default.createElement("li", {
|
21361
21378
|
key: isTotal ? 'total' : `${itemData.label}-${index}`,
|
21362
|
-
className:
|
21379
|
+
className: cn('mr-2 flex cursor-pointer gap-2 rounded pl-0 pr-1', {
|
21363
21380
|
'bg-grey-100': isHovered && (!isTotal || legendPosition === 'right'),
|
21364
21381
|
'bg-grey-200': isSelected && (!isTotal || legendPosition === 'right')
|
21365
21382
|
}),
|
@@ -21369,7 +21386,7 @@ const Legend$1 = ({
|
|
21369
21386
|
}, legendPosition === 'bottom' ? (/*#__PURE__*/React__default.createElement("div", {
|
21370
21387
|
className: "flex items-center gap-1"
|
21371
21388
|
}, /*#__PURE__*/React__default.createElement("span", {
|
21372
|
-
className:
|
21389
|
+
className: cn('ml-1 h-3 w-3 rounded-sm', {
|
21373
21390
|
'border-grey-300 border !bg-white': !visibleItems[itemData.id]
|
21374
21391
|
}),
|
21375
21392
|
style: {
|
@@ -21391,13 +21408,13 @@ const Legend$1 = ({
|
|
21391
21408
|
appearance: "transparent",
|
21392
21409
|
className: "text-grey-700"
|
21393
21410
|
}, moreButtonText));
|
21394
|
-
const className =
|
21411
|
+
const className = cn('flex-grow pl-4', {
|
21395
21412
|
'w-full': legendPosition === 'bottom'
|
21396
21413
|
});
|
21397
21414
|
return /*#__PURE__*/React__default.createElement("div", {
|
21398
21415
|
className: className
|
21399
21416
|
}, /*#__PURE__*/React__default.createElement("ul", {
|
21400
|
-
className:
|
21417
|
+
className: cn('mb-0 ml-0 mt-4 flex justify-center space-y-1', legendPosition === 'right' ? 'flex-col gap-1' : 'flex-row')
|
21401
21418
|
}, legendPosition === 'right' ? (/*#__PURE__*/React__default.createElement(React__default.Fragment, null, renderLegendItem(null), data.map(renderLegendItem))) : (/*#__PURE__*/React__default.createElement(OverflowGroup, {
|
21402
21419
|
className: "w-full items-center py-1",
|
21403
21420
|
moreButton: moreButton
|
@@ -21445,7 +21462,7 @@ const ActiveShape = props => {
|
|
21445
21462
|
} = props;
|
21446
21463
|
return /*#__PURE__*/React__default.createElement("g", {
|
21447
21464
|
onClick: () => onClick(id),
|
21448
|
-
className:
|
21465
|
+
className: cn({
|
21449
21466
|
'cursor-pointer': !!onClick
|
21450
21467
|
})
|
21451
21468
|
}, /*#__PURE__*/React__default.createElement(Recharts.Sector, {
|
@@ -21571,7 +21588,7 @@ const DonutChart = function DonutChart({
|
|
21571
21588
|
}));
|
21572
21589
|
};
|
21573
21590
|
return /*#__PURE__*/React__default.createElement("div", {
|
21574
|
-
className:
|
21591
|
+
className: cn('relative h-full w-full', {
|
21575
21592
|
[`flex `]: showLegend,
|
21576
21593
|
'flex-col items-center': legendPosition === 'bottom'
|
21577
21594
|
}),
|
@@ -21687,7 +21704,7 @@ const Button$4 = /*#__PURE__*/React__default.forwardRef(function Button(props, r
|
|
21687
21704
|
const {
|
21688
21705
|
...attributes
|
21689
21706
|
} = props;
|
21690
|
-
const className =
|
21707
|
+
const className = cn(getButtonClasses$1(), props.className);
|
21691
21708
|
return /*#__PURE__*/React__default.createElement(IconButton, Object.assign({}, attributes, {
|
21692
21709
|
appearance: "discrete",
|
21693
21710
|
className: className,
|
@@ -21695,7 +21712,7 @@ const Button$4 = /*#__PURE__*/React__default.forwardRef(function Button(props, r
|
|
21695
21712
|
ref: ref
|
21696
21713
|
}));
|
21697
21714
|
});
|
21698
|
-
const getButtonClasses$1 = (rounded = true) =>
|
21715
|
+
const getButtonClasses$1 = (rounded = true) => cn('!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', {
|
21699
21716
|
'!rounded-full': rounded
|
21700
21717
|
});
|
21701
21718
|
|
@@ -21710,7 +21727,7 @@ const Link$2 = /*#__PURE__*/React__default.forwardRef(function Link(props, ref)
|
|
21710
21727
|
const {
|
21711
21728
|
texts
|
21712
21729
|
} = useLocalization();
|
21713
|
-
const className =
|
21730
|
+
const className = cn(getLinkClasses(icon), 'relative', props.className);
|
21714
21731
|
const link = /*#__PURE__*/React__default.createElement("a", Object.assign({}, otherProps, {
|
21715
21732
|
className: className,
|
21716
21733
|
"data-taco": "header-link",
|
@@ -21730,13 +21747,13 @@ const Link$2 = /*#__PURE__*/React__default.forwardRef(function Link(props, ref)
|
|
21730
21747
|
}
|
21731
21748
|
return link;
|
21732
21749
|
});
|
21733
|
-
const getLinkClasses = (icon = undefined) =>
|
21750
|
+
const getLinkClasses = (icon = undefined) => cn('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', {
|
21734
21751
|
'!rounded-full !h-9 !w-9': icon,
|
21735
21752
|
'whitespace-nowrap px-3 rounded text-sm hidden lg:flex': !icon
|
21736
21753
|
});
|
21737
21754
|
|
21738
21755
|
const Logo = /*#__PURE__*/React__default.forwardRef(function Logo(props, ref) {
|
21739
|
-
const className =
|
21756
|
+
const className = cn('h-7 w-7 m-1 self-center justify-self-center flex-shrink-0 flex-grow-0', props.className);
|
21740
21757
|
return /*#__PURE__*/React__default.createElement("svg", Object.assign({}, props, {
|
21741
21758
|
className: className,
|
21742
21759
|
ref: ref,
|
@@ -21753,7 +21770,7 @@ const Logo = /*#__PURE__*/React__default.forwardRef(function Logo(props, ref) {
|
|
21753
21770
|
})));
|
21754
21771
|
});
|
21755
21772
|
const LogoLegacy = /*#__PURE__*/React__default.forwardRef(function Logo(props, ref) {
|
21756
|
-
const className =
|
21773
|
+
const className = cn('-mr-[156px] xs:-mr-14 md:!mr-0 h-9 shrink-0 w-[180px] px-1', props.className);
|
21757
21774
|
return /*#__PURE__*/React__default.createElement("svg", Object.assign({}, props, {
|
21758
21775
|
className: className,
|
21759
21776
|
ref: ref,
|
@@ -21825,9 +21842,9 @@ const PrimaryNavigation = /*#__PURE__*/React__default.forwardRef(function Primar
|
|
21825
21842
|
texts
|
21826
21843
|
} = useLocalization();
|
21827
21844
|
const internalRef = useMergedRef(ref);
|
21828
|
-
const className =
|
21845
|
+
const className = cn('flex h-full w-full flex-grow items-center overflow-hidden active:outline-none relative', props.className);
|
21829
21846
|
const moreButton = () => (/*#__PURE__*/React__default.createElement(Button$1, {
|
21830
|
-
className:
|
21847
|
+
className: cn(getLinkClasses(), '!bg-transparent aria-expanded:!bg-white/[.08]')
|
21831
21848
|
}, texts.header.more));
|
21832
21849
|
return /*#__PURE__*/React__default.createElement("nav", Object.assign({}, props, {
|
21833
21850
|
className: className,
|
@@ -21839,7 +21856,7 @@ const PrimaryNavigation = /*#__PURE__*/React__default.forwardRef(function Primar
|
|
21839
21856
|
});
|
21840
21857
|
|
21841
21858
|
const SecondaryNavigation = /*#__PURE__*/React__default.forwardRef(function SecondaryNavigation(props, ref) {
|
21842
|
-
const className =
|
21859
|
+
const className = cn('flex h-full items-center gap-2 mb-0 flex-shrink-0 mr-2', props.className);
|
21843
21860
|
return /*#__PURE__*/React__default.createElement("div", Object.assign({}, props, {
|
21844
21861
|
className: className,
|
21845
21862
|
ref: ref
|
@@ -21847,7 +21864,7 @@ const SecondaryNavigation = /*#__PURE__*/React__default.forwardRef(function Seco
|
|
21847
21864
|
});
|
21848
21865
|
|
21849
21866
|
const MenuButton = /*#__PURE__*/React__default.forwardRef(function MenuButton(props, ref) {
|
21850
|
-
const className =
|
21867
|
+
const className = cn(getButtonClasses$1(false), 'mr-1 !bg-transparent hover:!bg-white/[.08] focus:!bg-white/[.08]] lg:hidden z-[2] !text-white');
|
21851
21868
|
return /*#__PURE__*/React__default.createElement(IconButton, Object.assign({}, props, {
|
21852
21869
|
className: className,
|
21853
21870
|
"data-taco": "header-toggle-sidebar",
|
@@ -21867,7 +21884,7 @@ const AgreementAvatar = /*#__PURE__*/React__default.forwardRef(function Agreemen
|
|
21867
21884
|
const handleError = event => {
|
21868
21885
|
event.target.src = fallbackSrc;
|
21869
21886
|
};
|
21870
|
-
const className =
|
21887
|
+
const className = cn('h-9 w-9 rounded-full shrink-0 group-focus:yt-focus-dark xl:group-focus:shadow-none', {
|
21871
21888
|
visible: loaded
|
21872
21889
|
}, props.className);
|
21873
21890
|
return /*#__PURE__*/React__default.createElement("img", Object.assign({}, otherProps, {
|
@@ -21904,7 +21921,7 @@ const AgreementItem = props => {
|
|
21904
21921
|
fallbackImageSrc,
|
21905
21922
|
...agreement
|
21906
21923
|
} = props;
|
21907
|
-
const className =
|
21924
|
+
const className = cn('w-full rounded flex px-2 gap-2 overflow-hidden text-left items-center', customClassName);
|
21908
21925
|
return /*#__PURE__*/React__default.createElement("span", {
|
21909
21926
|
className: className
|
21910
21927
|
}, /*#__PURE__*/React__default.createElement(AgreementAvatar, {
|
@@ -21936,7 +21953,7 @@ const AgreementDisplay = props => {
|
|
21936
21953
|
} = props;
|
21937
21954
|
const isXlScreen = useMatchMedia('(min-width: 1280px)', window.innerWidth > 1280);
|
21938
21955
|
if (isXlScreen) {
|
21939
|
-
const className =
|
21956
|
+
const className = cn('h-12 flex-grow xl:[button>&]:hover:bg-white/[0.16]', props.className);
|
21940
21957
|
return /*#__PURE__*/React__default.createElement(AgreementItem, Object.assign({}, currentAgreement, {
|
21941
21958
|
children: children,
|
21942
21959
|
className: className,
|
@@ -22085,7 +22102,7 @@ function AgreementDisplay$1(props) {
|
|
22085
22102
|
}
|
22086
22103
|
|
22087
22104
|
const Header$6 = /*#__PURE__*/React__default.forwardRef(function Header(props, ref) {
|
22088
|
-
const className =
|
22105
|
+
const className = cn('bg-blue-900 flex h-16 w-full shrink-0 items-center gap-2 pl-4', '[&>*:focus-visible]:yt-focus-dark [&>*]:rounded',
|
22089
22106
|
// styles for logo wrapped inside an anchor
|
22090
22107
|
props.className);
|
22091
22108
|
return /*#__PURE__*/React__default.createElement("header", Object.assign({}, props, {
|
@@ -22109,7 +22126,7 @@ const LayoutContext = /*#__PURE__*/React__default.createContext({
|
|
22109
22126
|
});
|
22110
22127
|
|
22111
22128
|
const Content$9 = /*#__PURE__*/React__default.forwardRef(function LayoutContent(props, ref) {
|
22112
|
-
const className =
|
22129
|
+
const className = cn('flex-grow overflow-y-auto print:overflow-visible print:h-full print:!p-0 bg-white flex flex-shrink flex-col relative', props.className);
|
22113
22130
|
return /*#__PURE__*/React__default.createElement("main", Object.assign({}, props, {
|
22114
22131
|
className: className,
|
22115
22132
|
ref: ref
|
@@ -22151,7 +22168,7 @@ const Sidebar = /*#__PURE__*/React__default.forwardRef(function LayoutSidebar(pr
|
|
22151
22168
|
}, [isSmallScreen, sidebarOpen]);
|
22152
22169
|
const showBackdrop = isSmallScreen && sidebarOpen === true;
|
22153
22170
|
const [ready, setReady] = React__default.useState(isSmallScreen);
|
22154
|
-
const className =
|
22171
|
+
const className = cn('bg-grey-50 h-full w-64 flex-shrink-0 flex-grow-0 print:hidden', {
|
22155
22172
|
'absolute z-10 aria-hidden:-translate-x-64 ': isSmallScreen,
|
22156
22173
|
// prevent animation when crossing the boundary from large to small screen,
|
22157
22174
|
// this prevents awkward animation in the edge case (resizing the browser, instead of starting at a given size)
|
@@ -22205,7 +22222,7 @@ const Top = props => {
|
|
22205
22222
|
};
|
22206
22223
|
|
22207
22224
|
const Page = /*#__PURE__*/React__default.forwardRef(function LayoutPage(props, ref) {
|
22208
|
-
const className =
|
22225
|
+
const className = cn('flex flex-grow overflow-hidden print:overflow-visible print:h-full relative', props.className);
|
22209
22226
|
return /*#__PURE__*/React__default.createElement("div", Object.assign({}, props, {
|
22210
22227
|
className: className,
|
22211
22228
|
ref: ref
|
@@ -22214,7 +22231,7 @@ const Page = /*#__PURE__*/React__default.forwardRef(function LayoutPage(props, r
|
|
22214
22231
|
|
22215
22232
|
const Layout$1 = /*#__PURE__*/React__default.forwardRef(function Layout(props, ref) {
|
22216
22233
|
const [sidebarOpen, setSidebarOpen] = React__default.useState(false);
|
22217
|
-
const className =
|
22234
|
+
const className = cn('flex h-screen w-screen flex-col overflow-hidden print:overflow-visible print:h-full relative', props.className);
|
22218
22235
|
return /*#__PURE__*/React__default.createElement(LayoutContext.Provider, {
|
22219
22236
|
value: {
|
22220
22237
|
sidebarOpen,
|
@@ -22239,7 +22256,7 @@ const Group$6 = /*#__PURE__*/React__default.forwardRef(function Group(props, ref
|
|
22239
22256
|
...attributes
|
22240
22257
|
} = props;
|
22241
22258
|
const [expanded, setExpanded] = React__default.useState(defaultExpanded);
|
22242
|
-
const className =
|
22259
|
+
const className = cn('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);
|
22243
22260
|
const handleClick = event => {
|
22244
22261
|
setExpanded(!expanded);
|
22245
22262
|
if (onClick) {
|
@@ -22263,14 +22280,14 @@ const Group$6 = /*#__PURE__*/React__default.forwardRef(function Group(props, ref
|
|
22263
22280
|
}), /*#__PURE__*/React__default.createElement("span", {
|
22264
22281
|
className: "flex-grow truncate"
|
22265
22282
|
}, heading)), /*#__PURE__*/React__default.createElement("ul", {
|
22266
|
-
className:
|
22283
|
+
className: cn('mb-0 flex flex-col gap-y-px pt-px', {
|
22267
22284
|
hidden: !expanded
|
22268
22285
|
}),
|
22269
22286
|
role: "menu"
|
22270
22287
|
}, children));
|
22271
22288
|
});
|
22272
22289
|
|
22273
|
-
const getAdjacentClasses = () =>
|
22290
|
+
const getAdjacentClasses = () => cn(
|
22274
22291
|
// styling if the element is proceeded by a link item
|
22275
22292
|
'[[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 ",
|
22276
22293
|
// styling if the element is proceeded by content
|
@@ -22278,7 +22295,7 @@ const getAdjacentClasses = () => cn__default(
|
|
22278
22295
|
// styling if the element is proceeded by a section
|
22279
22296
|
"[[role=menubar]>[data-taco='navigation2-section']+&]:border-t-2", "[[role=menubar]>[data-taco='navigation2-section']+&]:pt-2");
|
22280
22297
|
|
22281
|
-
const getNavigationLinkClasses = (isDraggedOver = false) =>
|
22298
|
+
const getNavigationLinkClasses = (isDraggedOver = false) => cn('group relative flex w-full items-center rounded leading-8 !text-black px-2 focus-visible:yt-focus-dark',
|
22282
22299
|
// override styles for links that are children of collapsible menus
|
22283
22300
|
'font-bold [[role=menu]>li>&]:font-normal [[role=menu]>li>&]:pl-5',
|
22284
22301
|
// override styles to adjust icons included in menu links
|
@@ -22299,8 +22316,8 @@ const Link$3 = /*#__PURE__*/React__default.forwardRef(function Link(props, ref)
|
|
22299
22316
|
...attributes
|
22300
22317
|
} = props;
|
22301
22318
|
const [isDraggedOver, dropTargetProps] = useDropTarget(onDrop);
|
22302
|
-
const className =
|
22303
|
-
const listClassName =
|
22319
|
+
const className = cn(getNavigationLinkClasses(isDraggedOver), attributes.className);
|
22320
|
+
const listClassName = cn('[[role=menubar]>&]:px-3 border-grey-200', getAdjacentClasses(), {
|
22304
22321
|
'[&>*]:pointer-events-none': isDraggedOver
|
22305
22322
|
});
|
22306
22323
|
return /*#__PURE__*/React__default.createElement("li", Object.assign({}, dropTargetProps, {
|
@@ -22324,7 +22341,7 @@ const Link$3 = /*#__PURE__*/React__default.forwardRef(function Link(props, ref)
|
|
22324
22341
|
icon: "more",
|
22325
22342
|
"aria-label": "More",
|
22326
22343
|
rounded: true,
|
22327
|
-
className:
|
22344
|
+
className: cn('-mr-1.5 hidden flex-shrink-0 flex-grow-0 transition-none group-hover:flex aria-expanded:flex', {
|
22328
22345
|
'absolute right-0 !mr-0.5': total !== undefined
|
22329
22346
|
}),
|
22330
22347
|
menu: menu,
|
@@ -22333,7 +22350,7 @@ const Link$3 = /*#__PURE__*/React__default.forwardRef(function Link(props, ref)
|
|
22333
22350
|
event.stopPropagation();
|
22334
22351
|
}
|
22335
22352
|
})) : null, total !== undefined ? (/*#__PURE__*/React__default.createElement(Badge, {
|
22336
|
-
className:
|
22353
|
+
className: cn('flex-shrink-0 flex-grow-0 !font-normal', {
|
22337
22354
|
'group-hover:hidden [[aria-expanded="true"]+&]:hidden ': menu
|
22338
22355
|
}),
|
22339
22356
|
color: "transparent"
|
@@ -22346,7 +22363,7 @@ const Section = /*#__PURE__*/React__default.forwardRef(function Navigation2(prop
|
|
22346
22363
|
heading,
|
22347
22364
|
...attributes
|
22348
22365
|
} = props;
|
22349
|
-
const className =
|
22366
|
+
const className = cn('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);
|
22350
22367
|
return /*#__PURE__*/React__default.createElement("li", Object.assign({}, attributes, {
|
22351
22368
|
className: className,
|
22352
22369
|
"data-taco": "navigation2-section",
|
@@ -22364,7 +22381,7 @@ const Content$a = /*#__PURE__*/React__default.forwardRef(function Navigation2(pr
|
|
22364
22381
|
children,
|
22365
22382
|
...attributes
|
22366
22383
|
} = props;
|
22367
|
-
const className =
|
22384
|
+
const className = cn('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);
|
22368
22385
|
return /*#__PURE__*/React__default.createElement("li", Object.assign({}, attributes, {
|
22369
22386
|
className: className,
|
22370
22387
|
"data-taco": "navigation2-content",
|
@@ -22378,7 +22395,7 @@ const Navigation2 = /*#__PURE__*/React__default.forwardRef(function Navigation2(
|
|
22378
22395
|
children,
|
22379
22396
|
...attributes
|
22380
22397
|
} = props;
|
22381
|
-
const className =
|
22398
|
+
const className = cn('m-0 py-2 flex flex-col gap-y-px overflow-auto h-full w-full bg-grey-50', props.className);
|
22382
22399
|
return /*#__PURE__*/React__default.createElement("ul", Object.assign({}, attributes, {
|
22383
22400
|
className: className,
|
22384
22401
|
"data-taco": "navigation2",
|