@autoguru/overdrive 4.44.4-next.1 → 4.44.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Actions/Actions.js +12 -15
- package/dist/components/Alert/Alert.js +8 -9
- package/dist/components/AutoSuggest/AutoSuggest.js +114 -126
- package/dist/components/Badge/Badge.js +8 -9
- package/dist/components/Box/useBox/useBox.d.ts +2 -2
- package/dist/components/Box/useBox/useBox.d.ts.map +1 -1
- package/dist/components/BulletList/Bullet.js +4 -5
- package/dist/components/BulletList/BulletList.js +4 -5
- package/dist/components/BulletText/BulletText.js +44 -47
- package/dist/components/Button/Button.js +23 -24
- package/dist/components/CheckBox/CheckBox.js +11 -12
- package/dist/components/DateTimePicker/CalendarGrid.js +7 -8
- package/dist/components/DateTimePicker/DateTimePicker.js +9 -10
- package/dist/components/DividerLine/DividerLine.js +16 -19
- package/dist/components/DropDown/DropDownOptionsList.js +15 -18
- package/dist/components/Flex/FlexInline.d.ts.map +1 -1
- package/dist/components/Flex/FlexInline.js +2 -2
- package/dist/components/Flex/FlexStack.d.ts.map +1 -1
- package/dist/components/Flex/FlexStack.js +2 -2
- package/dist/components/Flex/flex.d.ts +4 -4
- package/dist/components/Flex/flex.js +35 -41
- package/dist/components/HorizontalAutoScroller/HorizontalAutoScroller.js +12 -13
- package/dist/components/HorizontalAutoScroller/useHorizontalAutoScroller.js +7 -8
- package/dist/components/Icon/Icon.js +6 -7
- package/dist/components/Image/ImageServerProvider.js +17 -21
- package/dist/components/Inline/Inline.js +13 -15
- package/dist/components/IntentStripe/IntentStripe.js +10 -13
- package/dist/components/LinearProgressIndicator/LinearProgressIndicator.js +3 -4
- package/dist/components/Meta/Meta.js +18 -21
- package/dist/components/Modal/Modal.js +13 -14
- package/dist/components/NumberBubble/NumberBubble.d.ts.map +1 -1
- package/dist/components/NumberBubble/NumberBubble.js +2 -4
- package/dist/components/NumberInput/useNumberInputBehaviours.js +8 -9
- package/dist/components/OptionGrid/OptionGrid.js +53 -57
- package/dist/components/OptionList/OptionListItem.js +4 -5
- package/dist/components/OrderedList/OrderedList.js +14 -18
- package/dist/components/OutsideClick/OutsideClick.js +4 -5
- package/dist/components/OverdriveProvider/FallbackProvider.js +3 -4
- package/dist/components/OverdriveProvider/OverdriveProvider.js +8 -9
- package/dist/components/Pagination/Bubble.js +8 -9
- package/dist/components/Pagination/Pagination.js +56 -63
- package/dist/components/Portal/Portal.js +5 -6
- package/dist/components/ProgressBar/ProgressBar.js +16 -19
- package/dist/components/ProgressBarGroup/ProgressBarGroup.js +7 -8
- package/dist/components/ProgressSpinner/ProgressSpinner.js +23 -26
- package/dist/components/Radio/Radio.js +6 -7
- package/dist/components/Radio/RadioGroup.js +7 -8
- package/dist/components/Section/Section.js +12 -15
- package/dist/components/SimplePagination/SimplePagination.js +5 -6
- package/dist/components/SliderProgress/ProgressStep.js +9 -10
- package/dist/components/SliderProgress/SliderProgress.js +25 -28
- package/dist/components/Stack/Stack.js +9 -10
- package/dist/components/StandardModal/StandardModal.js +11 -12
- package/dist/components/StarRating/StarRating.js +32 -36
- package/dist/components/Stepper/Stepper.js +45 -50
- package/dist/components/Table/Table.js +20 -23
- package/dist/components/Table/TableCell.js +8 -9
- package/dist/components/Table/TableHeadCell.js +10 -11
- package/dist/components/Table/TableRow.js +10 -13
- package/dist/components/Table/TableRowGroup.js +8 -11
- package/dist/components/Table/context.js +5 -6
- package/dist/components/Tabs/Tab.js +6 -7
- package/dist/components/Tabs/TabList.js +5 -6
- package/dist/components/Tabs/TabPane.js +4 -5
- package/dist/components/Tabs/TabPanes.js +18 -21
- package/dist/components/Tabs/Tabs.js +7 -8
- package/dist/components/TextContainer/TextContainer.js +21 -24
- package/dist/components/Toaster/Toast.js +65 -98
- package/dist/components/Tooltip/Tooltip.js +10 -11
- package/dist/components/Tooltip/useTooltip/useTooltip.js +11 -13
- package/dist/components/private/CheckableBase/CheckableBase.js +12 -13
- package/dist/components/private/InputBase/HintText.js +7 -8
- package/dist/components/private/InputBase/NotchedBase.js +17 -18
- package/dist/components/private/InputBase/withEnhancedInput.js +182 -187
- package/dist/hooks/useAnimationEvents/useAnimationEvents.js +5 -6
- package/dist/hooks/useAttachedBoxes/useAttachedBoxes.js +9 -10
- package/dist/hooks/useMedia/useMedia.js +1 -2
- package/dist/hooks/useWindowHeightFill/useWindowHeightFill.js +8 -9
- package/dist/styles/sprinkles.css.d.ts +46 -46
- package/dist/styles/sprinkles.css.js +9 -18
- package/dist/styles/typography.js +28 -31
- package/dist/themes/helpers.js +13 -15
- package/dist/themes/makeTheme.js +8 -15
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/utils/css.js +1 -2
- package/dist/utils/dataAttrs.js +1 -2
- package/dist/utils/index.js +3 -9
- package/dist/utils/mapTokenToProperty.js +5 -14
- package/dist/utils/number.js +1 -2
- package/dist/utils/responsiveProps.css.js +1 -2
- package/dist/utils/sprinkles.js +1 -2
- package/package.json +2 -2
- package/dist/components/NumberBubble/NumberBubble.css.d.ts +0 -2
- package/dist/components/NumberBubble/NumberBubble.css.d.ts.map +0 -1
- package/dist/components/NumberBubble/NumberBubble.css.js +0 -14
|
@@ -5,19 +5,16 @@ import flattenChildren from 'react-keyed-flatten-children';
|
|
|
5
5
|
import { Column } from "../Columns/Column.js";
|
|
6
6
|
import { Columns } from "../Columns/Columns.js";
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
-
export const Actions =
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}))
|
|
21
|
-
});
|
|
22
|
-
};
|
|
8
|
+
export const Actions = ({
|
|
9
|
+
children,
|
|
10
|
+
noWrap,
|
|
11
|
+
wrappingDirection
|
|
12
|
+
}) => /*#__PURE__*/_jsx(Columns, {
|
|
13
|
+
space: "3",
|
|
14
|
+
noWrap: noWrap,
|
|
15
|
+
wrappingDirection: wrappingDirection,
|
|
16
|
+
children: Children.map(flattenChildren(children), child => /*#__PURE__*/_jsx(Column, {
|
|
17
|
+
children: child
|
|
18
|
+
}))
|
|
19
|
+
});
|
|
23
20
|
export default Actions;
|
|
@@ -18,15 +18,14 @@ const iconMapForIntent = {
|
|
|
18
18
|
success: CheckCircleIcon,
|
|
19
19
|
warning: AlertIcon
|
|
20
20
|
};
|
|
21
|
-
export const Alert =
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
} = _ref;
|
|
21
|
+
export const Alert = ({
|
|
22
|
+
children,
|
|
23
|
+
className = '',
|
|
24
|
+
intent = 'success',
|
|
25
|
+
inline = false,
|
|
26
|
+
onRequestClose,
|
|
27
|
+
dismissible = typeof onRequestClose === 'function'
|
|
28
|
+
}) => {
|
|
30
29
|
return /*#__PURE__*/_jsxs(Box, {
|
|
31
30
|
className: clsx(className, sprinklesLegacyText({
|
|
32
31
|
color: intent
|
|
@@ -383,74 +383,71 @@ const AutoSuggestInput = /*#__PURE__*/forwardRef(function AutoSuggestInput(_ref3
|
|
|
383
383
|
})]
|
|
384
384
|
});
|
|
385
385
|
});
|
|
386
|
-
const SuggestionsList =
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
onMouseMove: () => {
|
|
424
|
-
if (suggestion.skip) return;
|
|
386
|
+
const SuggestionsList = ({
|
|
387
|
+
className = '',
|
|
388
|
+
suggestionListId,
|
|
389
|
+
placeholder,
|
|
390
|
+
highlightIndex,
|
|
391
|
+
suggestions,
|
|
392
|
+
highlightRef,
|
|
393
|
+
itemRenderer,
|
|
394
|
+
onChange,
|
|
395
|
+
dispatch,
|
|
396
|
+
suggestionListRef
|
|
397
|
+
}) => /*#__PURE__*/_jsxs(Box, {
|
|
398
|
+
as: "ul",
|
|
399
|
+
ref: suggestionListRef,
|
|
400
|
+
backgroundColour: "white",
|
|
401
|
+
className: [styles.suggestionList.defaults, className],
|
|
402
|
+
id: suggestionListId,
|
|
403
|
+
"aria-label": placeholder,
|
|
404
|
+
role: "listbox",
|
|
405
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
406
|
+
className: styles.spacer
|
|
407
|
+
}), suggestions.map((suggestion, idx) => {
|
|
408
|
+
const highlight = highlightIndex === idx;
|
|
409
|
+
return /*#__PURE__*/_jsx(Box, {
|
|
410
|
+
as: "li",
|
|
411
|
+
ref: highlight ? highlightRef : undefined,
|
|
412
|
+
id: getSuggestionId(suggestionListId, idx),
|
|
413
|
+
role: "option",
|
|
414
|
+
"aria-selected": highlight,
|
|
415
|
+
"aria-label": suggestion.text,
|
|
416
|
+
className: clsx(styles.suggestionListItem.default, {
|
|
417
|
+
[styles.suggestionListItem.skipped]: suggestion.skip
|
|
418
|
+
}),
|
|
419
|
+
onMouseDown: event => /* This is so a blur doesnt fire from the input when you click */
|
|
420
|
+
event.preventDefault(),
|
|
421
|
+
onMouseMove: () => {
|
|
422
|
+
if (suggestion.skip) return;
|
|
425
423
|
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
const AutoSuggestInputPrimitive = withEnhancedInput(_ref5 => {
|
|
424
|
+
/*
|
|
425
|
+
This has to be mouse move, so if you're hovering an item, and then arrow keys, we =
|
|
426
|
+
dont want yo trigger a mouse enter and highlight it instead
|
|
427
|
+
*/
|
|
428
|
+
dispatch({
|
|
429
|
+
type: ActionTypes.SUGGESTION_MOUSE_ENTER,
|
|
430
|
+
index: idx
|
|
431
|
+
});
|
|
432
|
+
},
|
|
433
|
+
onClick: () => {
|
|
434
|
+
if (suggestion.skip) return;
|
|
435
|
+
if (typeof onChange === 'function') onChange(suggestion);
|
|
436
|
+
dispatch({
|
|
437
|
+
type: ActionTypes.SUGGESTION_MOUSE_CLICK
|
|
438
|
+
});
|
|
439
|
+
},
|
|
440
|
+
children: typeof itemRenderer === 'function' && itemRenderer({
|
|
441
|
+
suggestions,
|
|
442
|
+
highlight,
|
|
443
|
+
value: suggestion
|
|
444
|
+
})
|
|
445
|
+
}, suggestion.text.concat(String(idx)));
|
|
446
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
447
|
+
className: styles.spacer
|
|
448
|
+
})]
|
|
449
|
+
});
|
|
450
|
+
const AutoSuggestInputPrimitive = withEnhancedInput(_ref4 => {
|
|
454
451
|
let {
|
|
455
452
|
field: {
|
|
456
453
|
className: fieldClassName
|
|
@@ -464,9 +461,9 @@ const AutoSuggestInputPrimitive = withEnhancedInput(_ref5 => {
|
|
|
464
461
|
isFocused,
|
|
465
462
|
className,
|
|
466
463
|
size
|
|
467
|
-
} =
|
|
468
|
-
field = _objectWithoutProperties(
|
|
469
|
-
rest = _objectWithoutProperties(
|
|
464
|
+
} = _ref4,
|
|
465
|
+
field = _objectWithoutProperties(_ref4.field, _excluded4),
|
|
466
|
+
rest = _objectWithoutProperties(_ref4, _excluded5);
|
|
470
467
|
let focusTimeout;
|
|
471
468
|
const ref = useRef(null);
|
|
472
469
|
const focusHandler = useCallback(() => {
|
|
@@ -540,62 +537,53 @@ const AutoSuggestInputPrimitive = withEnhancedInput(_ref5 => {
|
|
|
540
537
|
withSuffixIcon: false
|
|
541
538
|
});
|
|
542
539
|
const getSuggestionId = (id, index) => `${id}-option-${index}`;
|
|
543
|
-
const SuggestionListFlyout =
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
}
|
|
589
|
-
|
|
590
|
-
className: clsx(styles.suggestion, {
|
|
591
|
-
[styles.suggestionHighlight]: highlight
|
|
592
|
-
}),
|
|
593
|
-
children: /*#__PURE__*/_jsx(Text, {
|
|
594
|
-
as: "span",
|
|
595
|
-
children: text
|
|
596
|
-
})
|
|
597
|
-
});
|
|
598
|
-
};
|
|
540
|
+
const SuggestionListFlyout = ({
|
|
541
|
+
id,
|
|
542
|
+
alignment,
|
|
543
|
+
isOpen,
|
|
544
|
+
triggerOffset,
|
|
545
|
+
triggerRef,
|
|
546
|
+
autoWidth,
|
|
547
|
+
children
|
|
548
|
+
}) => /*#__PURE__*/_jsx(Positioner, {
|
|
549
|
+
id: id,
|
|
550
|
+
triggerRef: triggerRef,
|
|
551
|
+
alignment: alignment,
|
|
552
|
+
isOpen: isOpen,
|
|
553
|
+
triggerOffset: triggerOffset,
|
|
554
|
+
role: "listbox",
|
|
555
|
+
children: /*#__PURE__*/_jsx(Box, {
|
|
556
|
+
borderWidth: "1",
|
|
557
|
+
borderColour: "gray",
|
|
558
|
+
borderRadius: "md",
|
|
559
|
+
backgroundColour: "white",
|
|
560
|
+
boxShadow: "4",
|
|
561
|
+
style: {
|
|
562
|
+
width: triggerRef.current && !autoWidth ? triggerRef.current.clientWidth : undefined
|
|
563
|
+
},
|
|
564
|
+
onMouseDown: event => event.preventDefault(),
|
|
565
|
+
children: children
|
|
566
|
+
})
|
|
567
|
+
});
|
|
568
|
+
const defaultItemRenderer = ({
|
|
569
|
+
value,
|
|
570
|
+
highlight
|
|
571
|
+
}) => /*#__PURE__*/_jsx(DefaultSuggestion, {
|
|
572
|
+
highlight: highlight,
|
|
573
|
+
text: value.text
|
|
574
|
+
});
|
|
575
|
+
const DefaultSuggestion = ({
|
|
576
|
+
text,
|
|
577
|
+
highlight
|
|
578
|
+
}) => /*#__PURE__*/_jsx("div", {
|
|
579
|
+
className: clsx(styles.suggestion, {
|
|
580
|
+
[styles.suggestionHighlight]: highlight
|
|
581
|
+
}),
|
|
582
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
583
|
+
as: "span",
|
|
584
|
+
children: text
|
|
585
|
+
})
|
|
586
|
+
});
|
|
599
587
|
const getNextIndex = (direction, currentIndex, suggestions) => {
|
|
600
588
|
if (!Array.isArray(suggestions) || suggestions.length === 0) return -1;
|
|
601
589
|
const maxIndex = suggestions.length - 1;
|
|
@@ -11,15 +11,14 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
11
11
|
*
|
|
12
12
|
* To apply badge styling to an element directly the `styledBadge` recipe can be used.
|
|
13
13
|
*/
|
|
14
|
-
export const Badge =
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
} = _ref;
|
|
14
|
+
export const Badge = ({
|
|
15
|
+
label,
|
|
16
|
+
colour = 'neutral',
|
|
17
|
+
look = 'standard',
|
|
18
|
+
size = 'standard',
|
|
19
|
+
className,
|
|
20
|
+
testId
|
|
21
|
+
}) => {
|
|
23
22
|
!['string', 'number'].includes(typeof label) ? process.env.NODE_ENV !== "production" ? invariant(false, 'Badge `label` can only contain strings or numbers') : invariant(false) : void 0;
|
|
24
23
|
const inverted = look === 'inverted';
|
|
25
24
|
return /*#__PURE__*/_jsx(Box, {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { AllHTMLAttributes, ElementType } from 'react';
|
|
2
2
|
import { type ElementStylesProps } from '../../../styles/elementStyles';
|
|
3
|
-
import type { ConsistentComponentProps, OdComponent } from '../../../types';
|
|
3
|
+
import type { ConsistentComponentProps, DataAttributes, OdComponent } from '../../../types';
|
|
4
4
|
type FilteredAttributes = Omit<AllHTMLAttributes<HTMLElement>, 'as' | 'className' | 'color' | 'height' | 'is' | 'size' | 'width'>;
|
|
5
|
-
export interface UseBoxProps extends FilteredAttributes, ConsistentComponentProps, OdComponent, ElementStylesProps {
|
|
5
|
+
export interface UseBoxProps extends FilteredAttributes, ConsistentComponentProps, OdComponent, ElementStylesProps, DataAttributes {
|
|
6
6
|
}
|
|
7
7
|
export declare const useBox: ({ as, className: incomingClassName, odComponent, testId, display, height, maxWidth, minWidth, overflow, overflowX, overflowY, pointerEvents, position, size, userSelect, useVar, width, bg, backgroundColor, backgroundColour, boxShadow, color, colour, fg, opacity, fontSize, fontWeight, lineHeight, text, textAlign, textTransform, textWrap, wordBreak, borderRadius, borderColor, borderColorX, borderColorY, borderStyle, borderWidth, borderWidthX, borderWidthY, borderBottomColor, borderBottomStyle, borderBottomWidth, borderLeftColor, borderLeftStyle, borderLeftWidth, borderRightColor, borderRightStyle, borderRightWidth, borderStyleBottom, borderStyleLeft, borderStyleRight, borderStyleTop, borderTopColor, borderTopStyle, borderTopWidth, borderWidthTop, borderWidthRight, borderWidthBottom, borderWidthLeft, borderColour, borderColourX, borderColourY, borderBottomColour, borderLeftColour, borderRightColour, borderTopColour, alignContent, alignItems, alignSelf, columnGap, flexDirection, flexGrow, flexShrink, flexWrap, gap, gridAutoColumns, gridAutoFlow, gridAutoRows, gridColumns, justifyContent, placeItems, rowGap, order, m, mb, ml, mr, mt, mx, my, margin, marginX, marginY, marginBottom, marginLeft, marginRight, marginTop, p, pb, pl, pr, pt, px, py, padding, paddingX, paddingY, paddingBottom, paddingLeft, paddingRight, paddingTop, ...elementProps }: UseBoxProps) => {
|
|
8
8
|
Component: ElementType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBox.d.ts","sourceRoot":"","sources":["../../../../lib/components/Box/useBox/useBox.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAE5D,OAAO,EAEN,KAAK,kBAAkB,EACvB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"useBox.d.ts","sourceRoot":"","sources":["../../../../lib/components/Box/useBox/useBox.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAE5D,OAAO,EAEN,KAAK,kBAAkB,EACvB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EACX,wBAAwB,EACxB,cAAc,EACd,WAAW,EACX,MAAM,gBAAgB,CAAC;AAGxB,KAAK,kBAAkB,GAAG,IAAI,CAC7B,iBAAiB,CAAC,WAAW,CAAC,EAC9B,IAAI,GAAG,WAAW,GAAG,OAAO,GAAG,QAAQ,GAAG,IAAI,GAAG,MAAM,GAAG,OAAO,CACjE,CAAC;AAEF,MAAM,WAAW,WAChB,SAAQ,kBAAkB,EACzB,wBAAwB,EACxB,WAAW,EACX,kBAAkB,EAClB,cAAc;CAAG;AAEnB,eAAO,MAAM,MAAM,GAAI,+0CA8HpB,WAAW;eAqIK,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAI7B,CAAC"}
|
|
@@ -27,12 +27,11 @@ const getBulletCls = (styles, type) => {
|
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
|
-
export const Bullet =
|
|
30
|
+
export const Bullet = ({
|
|
31
|
+
children,
|
|
32
|
+
className
|
|
33
|
+
}) => {
|
|
31
34
|
var _getBulletCls;
|
|
32
|
-
let {
|
|
33
|
-
children,
|
|
34
|
-
className
|
|
35
|
-
} = _ref;
|
|
36
35
|
return /*#__PURE__*/_jsx(Box, {
|
|
37
36
|
as: "li",
|
|
38
37
|
className: [styles.root.default, (_getBulletCls = getBulletCls(styles, bulletMap[useContext(BulletListContext)])) !== null && _getBulletCls !== void 0 ? _getBulletCls : '', {
|
|
@@ -7,11 +7,10 @@ import { Box } from "../Box/index.js";
|
|
|
7
7
|
import * as styles from "./BulletList.css.js";
|
|
8
8
|
import { BulletListContext, bulletMap } from "./context.js";
|
|
9
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
-
export const BulletList =
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
} = _ref;
|
|
10
|
+
export const BulletList = ({
|
|
11
|
+
children,
|
|
12
|
+
className
|
|
13
|
+
}) => {
|
|
15
14
|
const stack = useContext(BulletListContext);
|
|
16
15
|
return /*#__PURE__*/_jsx(Box, {
|
|
17
16
|
as: "ul",
|
|
@@ -6,51 +6,48 @@ import { Inline } from "../Inline/Inline.js";
|
|
|
6
6
|
import { Text } from "../Text/Text.js";
|
|
7
7
|
import * as styles from "./BulletText.css.js";
|
|
8
8
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
-
export const BulletText =
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
9
|
+
export const BulletText = ({
|
|
10
|
+
as,
|
|
11
|
+
variant = 'primary',
|
|
12
|
+
children,
|
|
13
|
+
bullet: Bullet = '•'
|
|
14
|
+
}) => /*#__PURE__*/_jsxs(Inline, {
|
|
15
|
+
as: as,
|
|
16
|
+
noWrap: true,
|
|
17
|
+
space: "3",
|
|
18
|
+
alignX: "start",
|
|
19
|
+
alignY: "center",
|
|
20
|
+
children: [/*#__PURE__*/isValidElement(Bullet) ? /*#__PURE__*/_jsx(Box, {
|
|
21
|
+
position: "relative",
|
|
22
|
+
flexShrink: 0,
|
|
23
|
+
children: Bullet
|
|
24
|
+
}) : /*#__PURE__*/_jsx(Box, {
|
|
25
|
+
position: "relative",
|
|
26
|
+
flexShrink: "0",
|
|
27
|
+
display: "flex",
|
|
28
|
+
alignItems: "center",
|
|
29
|
+
justifyContent: "center",
|
|
30
|
+
className: [styles.bullet, {
|
|
31
|
+
[styles.primary]: variant === 'primary',
|
|
32
|
+
[styles.secondary]: variant !== 'primary'
|
|
33
|
+
}],
|
|
34
|
+
borderRadius: "pill",
|
|
35
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
36
|
+
className: {
|
|
37
|
+
[styles.primaryText]: variant === 'primary',
|
|
38
|
+
[styles.secondaryText]: variant !== 'primary'
|
|
39
|
+
},
|
|
40
|
+
as: "span",
|
|
41
|
+
size: "2",
|
|
25
42
|
children: Bullet
|
|
26
|
-
})
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
children: /*#__PURE__*/_jsx(Text, {
|
|
38
|
-
className: {
|
|
39
|
-
[styles.primaryText]: variant === 'primary',
|
|
40
|
-
[styles.secondaryText]: variant !== 'primary'
|
|
41
|
-
},
|
|
42
|
-
as: "span",
|
|
43
|
-
size: "2",
|
|
44
|
-
children: Bullet
|
|
45
|
-
})
|
|
46
|
-
}), /*#__PURE__*/_jsx(Box, {
|
|
47
|
-
flexGrow: "1",
|
|
48
|
-
children: /*#__PURE__*/_jsx(Text, {
|
|
49
|
-
as: "span",
|
|
50
|
-
size: "4",
|
|
51
|
-
display: "block",
|
|
52
|
-
children: children
|
|
53
|
-
})
|
|
54
|
-
})]
|
|
55
|
-
});
|
|
56
|
-
};
|
|
43
|
+
})
|
|
44
|
+
}), /*#__PURE__*/_jsx(Box, {
|
|
45
|
+
flexGrow: "1",
|
|
46
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
47
|
+
as: "span",
|
|
48
|
+
size: "4",
|
|
49
|
+
display: "block",
|
|
50
|
+
children: children
|
|
51
|
+
})
|
|
52
|
+
})]
|
|
53
|
+
});
|
|
@@ -34,30 +34,29 @@ const fontWeight = {
|
|
|
34
34
|
small: 'semiBold',
|
|
35
35
|
medium: 'semiBold'
|
|
36
36
|
};
|
|
37
|
-
export const Button = /*#__PURE__*/forwardRef((
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
} = _ref;
|
|
37
|
+
export const Button = /*#__PURE__*/forwardRef(({
|
|
38
|
+
children,
|
|
39
|
+
className = '',
|
|
40
|
+
disabled = false,
|
|
41
|
+
id,
|
|
42
|
+
as: Component = 'button',
|
|
43
|
+
withDoubleClicks = false,
|
|
44
|
+
isLoading = false,
|
|
45
|
+
isFullWidth = false,
|
|
46
|
+
lang,
|
|
47
|
+
minimal = false,
|
|
48
|
+
onBlur,
|
|
49
|
+
onClick: incomingOnClick,
|
|
50
|
+
onFocus,
|
|
51
|
+
onMouseEnter,
|
|
52
|
+
onMouseLeave,
|
|
53
|
+
rounded = false,
|
|
54
|
+
size = 'medium',
|
|
55
|
+
type = 'button',
|
|
56
|
+
variant = 'secondary',
|
|
57
|
+
'aria-label': ariaLabel,
|
|
58
|
+
testId
|
|
59
|
+
}, ref) => {
|
|
61
60
|
const language = _objectSpread(_objectSpread({}, defaultEnglish), lang);
|
|
62
61
|
const {
|
|
63
62
|
isSingleIconChild,
|
|
@@ -14,18 +14,17 @@ import { CheckableBase } from "../private/CheckableBase/CheckableBase.js";
|
|
|
14
14
|
import { checkableIndicator } from "../private/CheckableBase/CheckableBase.css.js";
|
|
15
15
|
import * as styles from "./CheckBox.css.js";
|
|
16
16
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
|
-
export const CheckBox = /*#__PURE__*/forwardRef((
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
} = _ref;
|
|
17
|
+
export const CheckBox = /*#__PURE__*/forwardRef(({
|
|
18
|
+
value,
|
|
19
|
+
className = '',
|
|
20
|
+
name = '',
|
|
21
|
+
disabled = false,
|
|
22
|
+
checked = false,
|
|
23
|
+
isIndeterminate = false,
|
|
24
|
+
onClick = noop,
|
|
25
|
+
onChange = noop,
|
|
26
|
+
children
|
|
27
|
+
}, ref) => {
|
|
29
28
|
const internalRef = useRef(null);
|
|
30
29
|
useEffect(() => {
|
|
31
30
|
if (internalRef.current) {
|
|
@@ -12,11 +12,10 @@ import { useCalendarCell, useCalendarGrid, useLocale } from 'react-aria';
|
|
|
12
12
|
import { dataAttrs } from "../../utils/dataAttrs.js";
|
|
13
13
|
import { calendarGridStyle, styledCell, tdStyle, thStyle } from "./DateTimePicker.css.js";
|
|
14
14
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
|
-
const CalendarCell =
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
} = _ref;
|
|
15
|
+
const CalendarCell = ({
|
|
16
|
+
state,
|
|
17
|
+
date
|
|
18
|
+
}) => {
|
|
20
19
|
const ref = useRef(null);
|
|
21
20
|
const {
|
|
22
21
|
cellProps,
|
|
@@ -44,11 +43,11 @@ const CalendarCell = _ref => {
|
|
|
44
43
|
}))
|
|
45
44
|
}));
|
|
46
45
|
};
|
|
47
|
-
export const CalendarGrid =
|
|
46
|
+
export const CalendarGrid = _ref => {
|
|
48
47
|
let {
|
|
49
48
|
state
|
|
50
|
-
} =
|
|
51
|
-
props = _objectWithoutProperties(
|
|
49
|
+
} = _ref,
|
|
50
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
52
51
|
const {
|
|
53
52
|
locale
|
|
54
53
|
} = useLocale();
|
|
@@ -52,17 +52,16 @@ function createCalendar(identifier) {
|
|
|
52
52
|
* This component implements the react-aria `useCalendar` hook and supports controlled state as well
|
|
53
53
|
* ([docs](https://react-spectrum.adobe.com/react-aria/useCalendar.html))
|
|
54
54
|
*/
|
|
55
|
-
export const DateTimePicker =
|
|
55
|
+
export const DateTimePicker = ({
|
|
56
|
+
allowPastDate = false,
|
|
57
|
+
calendar,
|
|
58
|
+
lang,
|
|
59
|
+
onChange,
|
|
60
|
+
timeOptions,
|
|
61
|
+
title,
|
|
62
|
+
testId
|
|
63
|
+
}) => {
|
|
56
64
|
var _lang$dateLabel, _lang$prevLabel, _lang$nextLabel, _lang$timeLabel;
|
|
57
|
-
let {
|
|
58
|
-
allowPastDate = false,
|
|
59
|
-
calendar,
|
|
60
|
-
lang,
|
|
61
|
-
onChange,
|
|
62
|
-
timeOptions,
|
|
63
|
-
title,
|
|
64
|
-
testId
|
|
65
|
-
} = _ref;
|
|
66
65
|
const selectedDate = useRef(null);
|
|
67
66
|
const selectedTimeOption = useRef(null);
|
|
68
67
|
const handleChange = () => {
|