@driveflux/beam 3.0.16 → 3.0.18
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/accordion/Accordion.js +87 -17
- package/dist/accordion/Accordion.stories.js +1 -1
- package/dist/alert/Alert.d.ts +1 -1
- package/dist/alert/Alert.d.ts.map +1 -1
- package/dist/alert/Alert.js +94 -21
- package/dist/alert/Alert.js.map +1 -1
- package/dist/alert/Alert.stories.js +3 -3
- package/dist/animations/LoadingAnimation.js +1 -1
- package/dist/badge/Badge.js +19 -10
- package/dist/badge/Badge.stories.js +1 -1
- package/dist/base-styles.css +1 -1
- package/dist/box/Box.js +75 -11
- package/dist/box/Box.stories.js +1 -1
- package/dist/breadcrumbs/Breadcrumbs.d.ts +1 -1
- package/dist/breadcrumbs/Breadcrumbs.d.ts.map +1 -1
- package/dist/breadcrumbs/Breadcrumbs.js +94 -31
- package/dist/breadcrumbs/Breadcrumbs.js.map +1 -1
- package/dist/breadcrumbs/Breadcrumbs.stories.js +3 -3
- package/dist/button/Button.js +75 -11
- package/dist/button/Button.stories.js +1 -1
- package/dist/button/TextButton.js +75 -11
- package/dist/card/Card.js +105 -26
- package/dist/card/Card.stories.js +1 -1
- package/dist/carousel/Carousel.js +53 -26
- package/dist/carousel/Carousel.stories.js +1 -1
- package/dist/carousel/CarouselButton.js +75 -11
- package/dist/center/Center.js +75 -11
- package/dist/center/Center.stories.js +1 -1
- package/dist/checkbox/Checkbox.js +77 -13
- package/dist/checkbox/Checkbox.stories.js +1 -1
- package/dist/chip/Chip.js +75 -11
- package/dist/chip/Chip.stories.js +1 -1
- package/dist/circular-progress/CircularProgress.js +23 -14
- package/dist/circular-progress/CircularProgress.stories.js +4 -4
- package/dist/command/command.d.ts +1 -1
- package/dist/command/command.d.ts.map +1 -1
- package/dist/command/command.js +110 -31
- package/dist/command/command.js.map +1 -1
- package/dist/datepicker/DatePicker.d.ts.map +1 -1
- package/dist/datepicker/DatePicker.js +25 -16
- package/dist/datepicker/DatePicker.js.map +1 -1
- package/dist/datepicker/DatePicker.stories.js +12 -13
- package/dist/datepicker/DatePicker.stories.js.map +1 -1
- package/dist/datepicker/DatePickerDrawer.js +4 -4
- package/dist/datepicker/DatePickerPopover.js +7 -7
- package/dist/datepicker/utils.js +2 -2
- package/dist/dialog/index.js +97 -24
- package/dist/dialog/index.js.map +1 -1
- package/dist/divider/Divider.js +75 -11
- package/dist/divider/Divider.stories.js +1 -1
- package/dist/drawer/index.js +99 -26
- package/dist/dropdown/Dropdown.js +119 -34
- package/dist/dropdown/Dropdown.stories.js +3 -3
- package/dist/dropdown/Dropdown.stories.js.map +1 -1
- package/dist/field-wrapper/FieldWrapper.js +75 -11
- package/dist/field-wrapper/FieldWrapper.stories.js +5 -5
- package/dist/flex/Flex.js +75 -11
- package/dist/flex/Flex.stories.js +1 -1
- package/dist/grid/Grid.js +75 -11
- package/dist/grid/Grid.stories.js +1 -1
- package/dist/hooks/use-breakpoint-value.js +2 -2
- package/dist/hooks/use-media-query.js +4 -4
- package/dist/hstack/HStack.js +75 -11
- package/dist/hstack/HStack.stories.js +1 -1
- package/dist/icons/FluxLogo.js +22 -13
- package/dist/icons/FluxLogoTable.js +19 -10
- package/dist/icons/Icon.js +19 -10
- package/dist/icons/Icon.stories.js +1 -1
- package/dist/icons/Icon24Hours.js +19 -10
- package/dist/icons/IconAcceleration.js +19 -10
- package/dist/icons/IconAccount.js +19 -10
- package/dist/icons/IconApplicant.js +19 -10
- package/dist/icons/IconArrow.js +20 -11
- package/dist/icons/IconArrowBack.js +19 -10
- package/dist/icons/IconArrowForward.js +19 -10
- package/dist/icons/IconArrowTopLeft.js +19 -10
- package/dist/icons/IconBluesharkProductGuide.js +22 -13
- package/dist/icons/IconBolt.js +19 -10
- package/dist/icons/IconBriefcase.js +19 -10
- package/dist/icons/IconBulb.js +19 -10
- package/dist/icons/IconCalendar.js +19 -10
- package/dist/icons/IconCalendarArrowBack.js +19 -10
- package/dist/icons/IconCalendarArrowForward.js +19 -10
- package/dist/icons/IconCalendarDoubleArrowBack.js +19 -10
- package/dist/icons/IconCalendarDoubleArrowForward.js +19 -10
- package/dist/icons/IconCancel.js +19 -10
- package/dist/icons/IconCancelMark.js +19 -10
- package/dist/icons/IconCarSUV.js +19 -10
- package/dist/icons/IconCarSedan.js +23 -14
- package/dist/icons/IconChain.js +19 -10
- package/dist/icons/IconCheckmark.js +19 -10
- package/dist/icons/IconChevronRight.js +19 -10
- package/dist/icons/IconCircle.js +19 -10
- package/dist/icons/IconCircleCheckmark.js +19 -10
- package/dist/icons/IconCircleError.js +19 -10
- package/dist/icons/IconCircleExclamation.js +19 -10
- package/dist/icons/IconCircleMark.js +19 -10
- package/dist/icons/IconCircleOutline.js +19 -10
- package/dist/icons/IconClock.js +19 -10
- package/dist/icons/IconClose.js +19 -10
- package/dist/icons/IconCollapseAll.js +19 -10
- package/dist/icons/IconConcierge.js +19 -10
- package/dist/icons/IconConciergeService.js +19 -10
- package/dist/icons/IconCreditCard.js +19 -10
- package/dist/icons/IconDash.js +19 -10
- package/dist/icons/IconDeliver.js +19 -10
- package/dist/icons/IconDelivery.js +21 -12
- package/dist/icons/IconDetails.js +19 -10
- package/dist/icons/IconDot.js +19 -10
- package/dist/icons/IconDownload.js +19 -10
- package/dist/icons/IconEVCharging.js +19 -10
- package/dist/icons/IconElectricCarFuel.js +19 -10
- package/dist/icons/IconEllipsis.js +19 -10
- package/dist/icons/IconEnvelope.js +19 -10
- package/dist/icons/IconExpandAll.js +19 -10
- package/dist/icons/IconEye.js +22 -13
- package/dist/icons/IconFacebook.js +19 -10
- package/dist/icons/IconFilter.js +19 -10
- package/dist/icons/IconFlagMalaysia.js +19 -10
- package/dist/icons/IconGiveKey.js +19 -10
- package/dist/icons/IconGlobe.js +19 -10
- package/dist/icons/IconGoogle.js +22 -13
- package/dist/icons/IconHome.js +21 -12
- package/dist/icons/IconHostAdvertise.js +19 -10
- package/dist/icons/IconHostCar.js +19 -10
- package/dist/icons/IconHostCash.js +19 -10
- package/dist/icons/IconHostHandle.js +19 -10
- package/dist/icons/IconHostLocation.js +19 -10
- package/dist/icons/IconHostPayment.js +19 -10
- package/dist/icons/IconHostService.js +19 -10
- package/dist/icons/IconHotDeals.js +19 -10
- package/dist/icons/IconInfo.js +19 -10
- package/dist/icons/IconInstagram.js +19 -10
- package/dist/icons/IconInsurance.js +19 -10
- package/dist/icons/IconInternet.js +19 -10
- package/dist/icons/IconInventory.js +21 -12
- package/dist/icons/IconLaurel.js +19 -10
- package/dist/icons/IconLinkedIn.js +19 -10
- package/dist/icons/IconLoading.js +19 -10
- package/dist/icons/IconLocation.js +19 -10
- package/dist/icons/IconLock.js +19 -10
- package/dist/icons/IconLogistics.js +19 -10
- package/dist/icons/IconMail.js +25 -16
- package/dist/icons/IconMember.js +21 -12
- package/dist/icons/IconMobilePen.js +19 -10
- package/dist/icons/IconMotorcycleMoped.js +21 -12
- package/dist/icons/IconNoCost.js +21 -12
- package/dist/icons/IconPDF.js +19 -10
- package/dist/icons/IconPencil.js +19 -10
- package/dist/icons/IconPhone.js +19 -10
- package/dist/icons/IconPlus.js +19 -10
- package/dist/icons/IconPricing.js +19 -10
- package/dist/icons/IconProtected.js +20 -11
- package/dist/icons/IconPsychology.js +19 -10
- package/dist/icons/IconQuestionTooltip.js +75 -11
- package/dist/icons/IconQuote.js +19 -10
- package/dist/icons/IconRate.js +20 -11
- package/dist/icons/IconRegister.js +19 -10
- package/dist/icons/IconReport.js +21 -12
- package/dist/icons/IconReturn.js +19 -10
- package/dist/icons/IconSearch.js +19 -10
- package/dist/icons/IconSecure.js +20 -11
- package/dist/icons/IconSecurity.js +19 -10
- package/dist/icons/IconSedanOutline.js +19 -10
- package/dist/icons/IconSelectArrow.js +20 -11
- package/dist/icons/IconSort.js +19 -10
- package/dist/icons/IconSortListed.js +19 -10
- package/dist/icons/IconSortPriceAscending.js +19 -10
- package/dist/icons/IconSortPriceDescending.js +19 -10
- package/dist/icons/IconSortYear.js +19 -10
- package/dist/icons/IconSpan.js +20 -11
- package/dist/icons/IconSpeaker.js +19 -10
- package/dist/icons/IconSpecialCar.js +20 -11
- package/dist/icons/IconStar.js +19 -10
- package/dist/icons/IconStockPhoto.js +19 -10
- package/dist/icons/IconSubscription.js +19 -10
- package/dist/icons/IconSubscriptions.js +19 -10
- package/dist/icons/IconSwap.js +19 -10
- package/dist/icons/IconTax.js +19 -10
- package/dist/icons/IconThinArrow.js +20 -11
- package/dist/icons/IconThumbsdown.js +19 -10
- package/dist/icons/IconThumbsup.js +19 -10
- package/dist/icons/IconTool.js +20 -11
- package/dist/icons/IconTooltip.js +75 -11
- package/dist/icons/IconTrash.js +19 -10
- package/dist/icons/IconTriangleExclamation.js +19 -10
- package/dist/icons/IconTyersBrakes.js +19 -10
- package/dist/icons/IconTyre.js +19 -10
- package/dist/icons/IconVacancy.js +19 -10
- package/dist/icons/IconVolunteer.js +19 -10
- package/dist/icons/IconWhatsapp.js +19 -10
- package/dist/icons/IconXPlatform.js +19 -10
- package/dist/icons/IconZeroEffort.js +21 -12
- package/dist/icons/Logo.js +19 -10
- package/dist/input/Input.js +17 -8
- package/dist/input-mask/InputMask.js +19 -10
- package/dist/input-mask/mask-trackers.js +1 -1
- package/dist/input-select/InputSelect.js +74 -41
- package/dist/input-select/InputSelect.stories.js +1 -1
- package/dist/popover/popover.d.ts +1 -1
- package/dist/popover/popover.js +76 -12
- package/dist/progress/Progress.js +75 -11
- package/dist/radio/Radio.js +75 -11
- package/dist/scroll-area/scroll-area.js +81 -14
- package/dist/search-input-select/SearchInputSelect.js +72 -39
- package/dist/select/Select.js +73 -34
- package/dist/skeleton/Skeleton.js +19 -10
- package/dist/skeleton/Skeleton.stories.js +1 -1
- package/dist/slider/Slider.js +75 -11
- package/dist/slider/Slider.stories.js +1 -1
- package/dist/stack/Stack.js +75 -11
- package/dist/stack/Stack.stories.js +1 -1
- package/dist/styles.css +1 -7
- package/dist/table/Table.d.ts +1 -1
- package/dist/table/Table.d.ts.map +1 -1
- package/dist/table/Table.js +118 -33
- package/dist/table/Table.js.map +1 -1
- package/dist/table/Table.stories.js +1 -1
- package/dist/tabs/Tabs.js +89 -19
- package/dist/tabs/Tabs.stories.js +1 -1
- package/dist/text/Text.js +75 -11
- package/dist/text/Text.stories.js +1 -1
- package/dist/toast/Toast.stories.js +4 -4
- package/dist/toast/ToastBox.js +4 -4
- package/dist/toast/sonner.js +3 -3
- package/dist/toggle/Toggle.js +78 -14
- package/dist/toggle/Toggle.stories.js +1 -1
- package/dist/tooltip/Tooltip.js +32 -14
- package/dist/tooltip/Tooltip.stories.js +2 -2
- package/dist/vstack/VStack.js +75 -11
- package/dist/vstack/VStack.stories.js +1 -1
- package/package.json +29 -29
package/dist/icons/Logo.js
CHANGED
|
@@ -52,12 +52,22 @@ function _object_spread_props(target, source) {
|
|
|
52
52
|
}
|
|
53
53
|
function _object_without_properties(source, excluded) {
|
|
54
54
|
if (source == null) return {};
|
|
55
|
-
var target =
|
|
56
|
-
|
|
55
|
+
var target = {}, sourceKeys, key, i;
|
|
56
|
+
if (typeof Reflect !== "undefined" && Reflect.ownKeys) {
|
|
57
|
+
sourceKeys = Reflect.ownKeys(Object(source));
|
|
58
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
59
|
+
key = sourceKeys[i];
|
|
60
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
61
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
62
|
+
target[key] = source[key];
|
|
63
|
+
}
|
|
64
|
+
return target;
|
|
65
|
+
}
|
|
66
|
+
target = _object_without_properties_loose(source, excluded);
|
|
57
67
|
if (Object.getOwnPropertySymbols) {
|
|
58
|
-
|
|
59
|
-
for(i = 0; i <
|
|
60
|
-
key =
|
|
68
|
+
sourceKeys = Object.getOwnPropertySymbols(source);
|
|
69
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
70
|
+
key = sourceKeys[i];
|
|
61
71
|
if (excluded.indexOf(key) >= 0) continue;
|
|
62
72
|
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
63
73
|
target[key] = source[key];
|
|
@@ -67,12 +77,11 @@ function _object_without_properties(source, excluded) {
|
|
|
67
77
|
}
|
|
68
78
|
function _object_without_properties_loose(source, excluded) {
|
|
69
79
|
if (source == null) return {};
|
|
70
|
-
var target = {};
|
|
71
|
-
var sourceKeys = Object.keys(source);
|
|
72
|
-
var key, i;
|
|
80
|
+
var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
|
|
73
81
|
for(i = 0; i < sourceKeys.length; i++){
|
|
74
82
|
key = sourceKeys[i];
|
|
75
83
|
if (excluded.indexOf(key) >= 0) continue;
|
|
84
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
76
85
|
target[key] = source[key];
|
|
77
86
|
}
|
|
78
87
|
return target;
|
|
@@ -81,8 +90,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
81
90
|
import Box from '../box/Box';
|
|
82
91
|
import FluxLogo from '../icons/FluxLogo';
|
|
83
92
|
import { cn } from '../utils';
|
|
84
|
-
var Logo = function(
|
|
85
|
-
var colorScheme =
|
|
93
|
+
var Logo = function Logo(_0) {
|
|
94
|
+
var colorScheme = _0.colorScheme, _0_size = _0.size, size = _0_size === void 0 ? '29px' : _0_size, className = _0.className, style = _0.style, props = _object_without_properties(_0, [
|
|
86
95
|
"colorScheme",
|
|
87
96
|
"size",
|
|
88
97
|
"className",
|
package/dist/input/Input.js
CHANGED
|
@@ -52,12 +52,22 @@ function _object_spread_props(target, source) {
|
|
|
52
52
|
}
|
|
53
53
|
function _object_without_properties(source, excluded) {
|
|
54
54
|
if (source == null) return {};
|
|
55
|
-
var target =
|
|
56
|
-
|
|
55
|
+
var target = {}, sourceKeys, key, i;
|
|
56
|
+
if (typeof Reflect !== "undefined" && Reflect.ownKeys) {
|
|
57
|
+
sourceKeys = Reflect.ownKeys(Object(source));
|
|
58
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
59
|
+
key = sourceKeys[i];
|
|
60
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
61
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
62
|
+
target[key] = source[key];
|
|
63
|
+
}
|
|
64
|
+
return target;
|
|
65
|
+
}
|
|
66
|
+
target = _object_without_properties_loose(source, excluded);
|
|
57
67
|
if (Object.getOwnPropertySymbols) {
|
|
58
|
-
|
|
59
|
-
for(i = 0; i <
|
|
60
|
-
key =
|
|
68
|
+
sourceKeys = Object.getOwnPropertySymbols(source);
|
|
69
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
70
|
+
key = sourceKeys[i];
|
|
61
71
|
if (excluded.indexOf(key) >= 0) continue;
|
|
62
72
|
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
63
73
|
target[key] = source[key];
|
|
@@ -67,12 +77,11 @@ function _object_without_properties(source, excluded) {
|
|
|
67
77
|
}
|
|
68
78
|
function _object_without_properties_loose(source, excluded) {
|
|
69
79
|
if (source == null) return {};
|
|
70
|
-
var target = {};
|
|
71
|
-
var sourceKeys = Object.keys(source);
|
|
72
|
-
var key, i;
|
|
80
|
+
var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
|
|
73
81
|
for(i = 0; i < sourceKeys.length; i++){
|
|
74
82
|
key = sourceKeys[i];
|
|
75
83
|
if (excluded.indexOf(key) >= 0) continue;
|
|
84
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
76
85
|
target[key] = source[key];
|
|
77
86
|
}
|
|
78
87
|
return target;
|
|
@@ -87,12 +87,22 @@ function _object_spread_props(target, source) {
|
|
|
87
87
|
}
|
|
88
88
|
function _object_without_properties(source, excluded) {
|
|
89
89
|
if (source == null) return {};
|
|
90
|
-
var target =
|
|
91
|
-
|
|
90
|
+
var target = {}, sourceKeys, key, i;
|
|
91
|
+
if (typeof Reflect !== "undefined" && Reflect.ownKeys) {
|
|
92
|
+
sourceKeys = Reflect.ownKeys(Object(source));
|
|
93
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
94
|
+
key = sourceKeys[i];
|
|
95
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
96
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
97
|
+
target[key] = source[key];
|
|
98
|
+
}
|
|
99
|
+
return target;
|
|
100
|
+
}
|
|
101
|
+
target = _object_without_properties_loose(source, excluded);
|
|
92
102
|
if (Object.getOwnPropertySymbols) {
|
|
93
|
-
|
|
94
|
-
for(i = 0; i <
|
|
95
|
-
key =
|
|
103
|
+
sourceKeys = Object.getOwnPropertySymbols(source);
|
|
104
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
105
|
+
key = sourceKeys[i];
|
|
96
106
|
if (excluded.indexOf(key) >= 0) continue;
|
|
97
107
|
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
98
108
|
target[key] = source[key];
|
|
@@ -102,12 +112,11 @@ function _object_without_properties(source, excluded) {
|
|
|
102
112
|
}
|
|
103
113
|
function _object_without_properties_loose(source, excluded) {
|
|
104
114
|
if (source == null) return {};
|
|
105
|
-
var target = {};
|
|
106
|
-
var sourceKeys = Object.keys(source);
|
|
107
|
-
var key, i;
|
|
115
|
+
var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
|
|
108
116
|
for(i = 0; i < sourceKeys.length; i++){
|
|
109
117
|
key = sourceKeys[i];
|
|
110
118
|
if (excluded.indexOf(key) >= 0) continue;
|
|
119
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
111
120
|
target[key] = source[key];
|
|
112
121
|
}
|
|
113
122
|
return target;
|
|
@@ -147,10 +156,10 @@ var InputMask = /*#__PURE__*/ React.forwardRef(function(props, ref) {
|
|
|
147
156
|
ref: ref,
|
|
148
157
|
inputRef: inputRef
|
|
149
158
|
}, inputProps), {
|
|
150
|
-
onFocus: function() {
|
|
159
|
+
onFocus: function onFocus() {
|
|
151
160
|
return setIsFocused(true);
|
|
152
161
|
},
|
|
153
|
-
onBlur: function() {
|
|
162
|
+
onBlur: function onBlur() {
|
|
154
163
|
return setIsFocused(false);
|
|
155
164
|
},
|
|
156
165
|
placeholder: mask
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @param data assuming `value` format is `"dd/mm/yyyy"`
|
|
4
4
|
* @param isRange assuming `value` format will be `"dd/mm/yyyy - dd/mm/yyyy"`
|
|
5
5
|
* @returns {boolean | string} returns `true` to accept new data, returns `false` to reject new data, returns string to replace new data
|
|
6
|
-
*/ export var maskTrackDate = function(data) {
|
|
6
|
+
*/ export var maskTrackDate = function maskTrackDate(data) {
|
|
7
7
|
var isRange = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
|
|
8
8
|
var inputType = data.inputType, value = data.value, selectionStart = data.selectionStart;
|
|
9
9
|
if (inputType !== 'insert') {
|
|
@@ -20,6 +20,9 @@ function _define_property(obj, key, value) {
|
|
|
20
20
|
}
|
|
21
21
|
return obj;
|
|
22
22
|
}
|
|
23
|
+
function _iterable_to_array(iter) {
|
|
24
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
25
|
+
}
|
|
23
26
|
function _iterable_to_array_limit(arr, i) {
|
|
24
27
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
25
28
|
if (_i == null) return;
|
|
@@ -88,12 +91,22 @@ function _object_spread_props(target, source) {
|
|
|
88
91
|
}
|
|
89
92
|
function _object_without_properties(source, excluded) {
|
|
90
93
|
if (source == null) return {};
|
|
91
|
-
var target =
|
|
92
|
-
|
|
94
|
+
var target = {}, sourceKeys, key, i;
|
|
95
|
+
if (typeof Reflect !== "undefined" && Reflect.ownKeys) {
|
|
96
|
+
sourceKeys = Reflect.ownKeys(Object(source));
|
|
97
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
98
|
+
key = sourceKeys[i];
|
|
99
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
100
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
101
|
+
target[key] = source[key];
|
|
102
|
+
}
|
|
103
|
+
return target;
|
|
104
|
+
}
|
|
105
|
+
target = _object_without_properties_loose(source, excluded);
|
|
93
106
|
if (Object.getOwnPropertySymbols) {
|
|
94
|
-
|
|
95
|
-
for(i = 0; i <
|
|
96
|
-
key =
|
|
107
|
+
sourceKeys = Object.getOwnPropertySymbols(source);
|
|
108
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
109
|
+
key = sourceKeys[i];
|
|
97
110
|
if (excluded.indexOf(key) >= 0) continue;
|
|
98
111
|
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
99
112
|
target[key] = source[key];
|
|
@@ -103,12 +116,11 @@ function _object_without_properties(source, excluded) {
|
|
|
103
116
|
}
|
|
104
117
|
function _object_without_properties_loose(source, excluded) {
|
|
105
118
|
if (source == null) return {};
|
|
106
|
-
var target = {};
|
|
107
|
-
var sourceKeys = Object.keys(source);
|
|
108
|
-
var key, i;
|
|
119
|
+
var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
|
|
109
120
|
for(i = 0; i < sourceKeys.length; i++){
|
|
110
121
|
key = sourceKeys[i];
|
|
111
122
|
if (excluded.indexOf(key) >= 0) continue;
|
|
123
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
112
124
|
target[key] = source[key];
|
|
113
125
|
}
|
|
114
126
|
return target;
|
|
@@ -116,6 +128,9 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
116
128
|
function _sliced_to_array(arr, i) {
|
|
117
129
|
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
118
130
|
}
|
|
131
|
+
function _to_array(arr) {
|
|
132
|
+
return _array_with_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_rest();
|
|
133
|
+
}
|
|
119
134
|
function _unsupported_iterable_to_array(o, minLen) {
|
|
120
135
|
if (!o) return;
|
|
121
136
|
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
@@ -132,18 +147,24 @@ import FieldWrapper from '../field-wrapper/FieldWrapper';
|
|
|
132
147
|
import IconClose from '../icons/IconClose';
|
|
133
148
|
import IconSelectArrow from '../icons/IconSelectArrow';
|
|
134
149
|
import { cn } from '../utils';
|
|
135
|
-
var Command = /*#__PURE__*/ React.forwardRef(function(
|
|
136
|
-
var
|
|
150
|
+
var Command = /*#__PURE__*/ React.forwardRef(function(_0, _1) {
|
|
151
|
+
var _ref = [
|
|
152
|
+
_0,
|
|
153
|
+
_1
|
|
154
|
+
], _ref1 = _to_array(_ref), _ref2 = _ref1[0], _rest = _ref1.slice(1), className = _ref2.className, props = _object_without_properties(_ref2, [
|
|
137
155
|
"className"
|
|
138
|
-
]);
|
|
156
|
+
]), _rest1 = _sliced_to_array(_rest, 1), ref = _rest1[0];
|
|
139
157
|
return /*#__PURE__*/ _jsx(CommandPrimitive, _object_spread({
|
|
140
158
|
ref: ref,
|
|
141
159
|
className: cn('flex relative w-full', className)
|
|
142
160
|
}, props));
|
|
143
161
|
});
|
|
144
162
|
Command.displayName = CommandPrimitive.displayName;
|
|
145
|
-
var CommandInput = /*#__PURE__*/ React.forwardRef(function(
|
|
146
|
-
var
|
|
163
|
+
var CommandInput = /*#__PURE__*/ React.forwardRef(function(_0, _1) {
|
|
164
|
+
var _ref = [
|
|
165
|
+
_0,
|
|
166
|
+
_1
|
|
167
|
+
], _ref1 = _to_array(_ref), _ref2 = _ref1[0], _rest = _ref1.slice(1), className = _ref2.className, error = _ref2.error, prefix = _ref2.prefix, isFocused = _ref2.isFocused, isSelected = _ref2.isSelected, handleToggle = _ref2.handleToggle, handleClear = _ref2.handleClear, props = _object_without_properties(_ref2, [
|
|
147
168
|
"className",
|
|
148
169
|
"error",
|
|
149
170
|
"prefix",
|
|
@@ -151,7 +172,7 @@ var CommandInput = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
|
|
|
151
172
|
"isSelected",
|
|
152
173
|
"handleToggle",
|
|
153
174
|
"handleClear"
|
|
154
|
-
]);
|
|
175
|
+
]), _rest1 = _sliced_to_array(_rest, 1), ref = _rest1[0];
|
|
155
176
|
return /*#__PURE__*/ _jsxs("div", {
|
|
156
177
|
ref: ref,
|
|
157
178
|
className: cn('flex items-center gap-2 h-10 w-full border border-primary2 bg-white text-sm cursor-pointer outline-none file:border-0 file:bg-transparent file:text-sm file:font-medium hover:border-black focus-within:border-black focus-within:outline-none rounded-lg', error && 'border-alert4 hover:border-alert4 focus-within:border-alert4', className),
|
|
@@ -161,7 +182,7 @@ var CommandInput = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
|
|
|
161
182
|
className: cn('border-none h-full px-3 outline-hidden text-ellipsis placeholder:text-primary2 placeholder:tracking-normal w-full cursor-pointer disabled:cursor-not-allowed disabled:bg-primary1 disabled:text-primary3 rounded-lg'),
|
|
162
183
|
disabled: props.disabled
|
|
163
184
|
}, props), {
|
|
164
|
-
onClick: function(_e) {
|
|
185
|
+
onClick: function onClick(_e) {
|
|
165
186
|
if (isSelected) {
|
|
166
187
|
isFocused = true;
|
|
167
188
|
} else if (!isFocused) {
|
|
@@ -176,14 +197,14 @@ var CommandInput = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
|
|
|
176
197
|
},
|
|
177
198
|
children: isSelected ? /*#__PURE__*/ _jsx(IconClose, {
|
|
178
199
|
className: "text-black",
|
|
179
|
-
onClick: function(e) {
|
|
200
|
+
onClick: function onClick(e) {
|
|
180
201
|
e.preventDefault();
|
|
181
202
|
e.stopPropagation();
|
|
182
203
|
handleClear(e);
|
|
183
204
|
}
|
|
184
205
|
}) : /*#__PURE__*/ _jsx(IconSelectArrow, {
|
|
185
206
|
variant: isFocused ? 'up' : 'down',
|
|
186
|
-
onClick: function() {
|
|
207
|
+
onClick: function onClick() {
|
|
187
208
|
return handleToggle();
|
|
188
209
|
}
|
|
189
210
|
})
|
|
@@ -192,11 +213,14 @@ var CommandInput = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
|
|
|
192
213
|
});
|
|
193
214
|
});
|
|
194
215
|
CommandInput.displayName = CommandPrimitive.Input.displayName;
|
|
195
|
-
var CommandList = /*#__PURE__*/ React.forwardRef(function(
|
|
196
|
-
var
|
|
216
|
+
var CommandList = /*#__PURE__*/ React.forwardRef(function(_0, _1) {
|
|
217
|
+
var _ref = [
|
|
218
|
+
_0,
|
|
219
|
+
_1
|
|
220
|
+
], _ref1 = _to_array(_ref), _ref2 = _ref1[0], _rest = _ref1.slice(1), className = _ref2.className, position = _ref2.position, props = _object_without_properties(_ref2, [
|
|
197
221
|
"className",
|
|
198
222
|
"position"
|
|
199
|
-
]);
|
|
223
|
+
]), _rest1 = _sliced_to_array(_rest, 1), ref = _rest1[0];
|
|
200
224
|
return /*#__PURE__*/ _jsx(CommandPrimitive.List, _object_spread({
|
|
201
225
|
ref: ref,
|
|
202
226
|
className: cn('max-h-80 absolute left-0 right-0 mt-1 shadow-md overflow-y-auto overflow-x-hidden z-50 bg-white rounded-lg', position === 'top' ? 'bottom-full mb-1' : 'top-full mt-1', className)
|
|
@@ -210,38 +234,47 @@ var CommandEmpty = /*#__PURE__*/ React.forwardRef(function(props, ref) {
|
|
|
210
234
|
}, props));
|
|
211
235
|
});
|
|
212
236
|
CommandEmpty.displayName = CommandPrimitive.Empty.displayName;
|
|
213
|
-
var CommandGroup = /*#__PURE__*/ React.forwardRef(function(
|
|
214
|
-
var
|
|
237
|
+
var CommandGroup = /*#__PURE__*/ React.forwardRef(function(_0, _1) {
|
|
238
|
+
var _ref = [
|
|
239
|
+
_0,
|
|
240
|
+
_1
|
|
241
|
+
], _ref1 = _to_array(_ref), _ref2 = _ref1[0], _rest = _ref1.slice(1), className = _ref2.className, props = _object_without_properties(_ref2, [
|
|
215
242
|
"className"
|
|
216
|
-
]);
|
|
243
|
+
]), _rest1 = _sliced_to_array(_rest, 1), ref = _rest1[0];
|
|
217
244
|
return /*#__PURE__*/ _jsx(CommandPrimitive.Group, _object_spread({
|
|
218
245
|
ref: ref,
|
|
219
246
|
className: cn('overflow-hidden p-1 text-zinc-950 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-zinc-500 dark:text-zinc-50 dark:[&_[cmdk-group-heading]]:text-zinc-400', className)
|
|
220
247
|
}, props));
|
|
221
248
|
});
|
|
222
249
|
CommandGroup.displayName = CommandPrimitive.Group.displayName;
|
|
223
|
-
var CommandSeparator = /*#__PURE__*/ React.forwardRef(function(
|
|
224
|
-
var
|
|
250
|
+
var CommandSeparator = /*#__PURE__*/ React.forwardRef(function(_0, _1) {
|
|
251
|
+
var _ref = [
|
|
252
|
+
_0,
|
|
253
|
+
_1
|
|
254
|
+
], _ref1 = _to_array(_ref), _ref2 = _ref1[0], _rest = _ref1.slice(1), className = _ref2.className, props = _object_without_properties(_ref2, [
|
|
225
255
|
"className"
|
|
226
|
-
]);
|
|
256
|
+
]), _rest1 = _sliced_to_array(_rest, 1), ref = _rest1[0];
|
|
227
257
|
return /*#__PURE__*/ _jsx(CommandPrimitive.Separator, _object_spread({
|
|
228
258
|
ref: ref,
|
|
229
259
|
className: cn('-mx-1 h-px bg-zinc-200 dark:bg-zinc-800', className)
|
|
230
260
|
}, props));
|
|
231
261
|
});
|
|
232
262
|
CommandSeparator.displayName = CommandPrimitive.Separator.displayName;
|
|
233
|
-
var CommandItem = /*#__PURE__*/ React.forwardRef(function(
|
|
234
|
-
var
|
|
263
|
+
var CommandItem = /*#__PURE__*/ React.forwardRef(function(_0, _1) {
|
|
264
|
+
var _ref = [
|
|
265
|
+
_0,
|
|
266
|
+
_1
|
|
267
|
+
], _ref1 = _to_array(_ref), _ref2 = _ref1[0], _rest = _ref1.slice(1), className = _ref2.className, props = _object_without_properties(_ref2, [
|
|
235
268
|
"className"
|
|
236
|
-
]);
|
|
269
|
+
]), _rest1 = _sliced_to_array(_rest, 1), ref = _rest1[0];
|
|
237
270
|
return /*#__PURE__*/ _jsx(CommandPrimitive.Item, _object_spread({
|
|
238
271
|
ref: ref,
|
|
239
272
|
className: cn('relative flex cursor-pointer select-none items-center rounded-xs px-4 h-10 text-sm outline-hidden data-[disabled=true]:pointer-events-none data-[disabled=true]:bg-primary1 data-[disabled=true]:text-primary2 data-[selected=true]:bg-zinc-100 data-[selected=true]:text-zinc-900 dark:data-[selected=true]:bg-zinc-800 dark:data-[selected=true]:text-zinc-50', className)
|
|
240
273
|
}, props));
|
|
241
274
|
});
|
|
242
275
|
CommandItem.displayName = CommandPrimitive.Item.displayName;
|
|
243
|
-
var CommandShortcut = function(
|
|
244
|
-
var className =
|
|
276
|
+
var CommandShortcut = function CommandShortcut(_0) {
|
|
277
|
+
var className = _0.className, props = _object_without_properties(_0, [
|
|
245
278
|
"className"
|
|
246
279
|
]);
|
|
247
280
|
return /*#__PURE__*/ _jsx("span", _object_spread({
|
|
@@ -278,22 +311,22 @@ var InputSelect = /*#__PURE__*/ React.forwardRef(function(props, _ref) {
|
|
|
278
311
|
var _listRef = React.useRef(null);
|
|
279
312
|
var wrapperRef = React.useRef(null);
|
|
280
313
|
var _React_useState3 = _sliced_to_array(React.useState('bottom'), 2), position = _React_useState3[0], setPosition = _React_useState3[1];
|
|
281
|
-
var handleFocus = function() {
|
|
314
|
+
var handleFocus = function handleFocus() {
|
|
282
315
|
if (!isDisabled) {
|
|
283
316
|
setIsFocused(true);
|
|
284
317
|
}
|
|
285
318
|
};
|
|
286
|
-
var handleBlur = function(e) {
|
|
319
|
+
var handleBlur = function handleBlur(e) {
|
|
287
320
|
if (e.relatedTarget === null) {
|
|
288
321
|
var _inputRef_current;
|
|
289
322
|
setIsFocused(false);
|
|
290
323
|
(_inputRef_current = inputRef.current) === null || _inputRef_current === void 0 ? void 0 : _inputRef_current.blur();
|
|
291
324
|
}
|
|
292
325
|
};
|
|
293
|
-
var handleChange = function(value) {
|
|
326
|
+
var handleChange = function handleChange(value) {
|
|
294
327
|
setSearch(value);
|
|
295
328
|
};
|
|
296
|
-
var handleSelect = function(option) {
|
|
329
|
+
var handleSelect = function handleSelect(option) {
|
|
297
330
|
var _inputRef_current;
|
|
298
331
|
setSearch(option.label);
|
|
299
332
|
onChange === null || onChange === void 0 ? void 0 : onChange(option.value);
|
|
@@ -301,7 +334,7 @@ var InputSelect = /*#__PURE__*/ React.forwardRef(function(props, _ref) {
|
|
|
301
334
|
setIsFocused(false);
|
|
302
335
|
(_inputRef_current = inputRef.current) === null || _inputRef_current === void 0 ? void 0 : _inputRef_current.focus();
|
|
303
336
|
};
|
|
304
|
-
var handleToggle = function() {
|
|
337
|
+
var handleToggle = function handleToggle() {
|
|
305
338
|
if (!isDisabled) {
|
|
306
339
|
setIsFocused(function(isFocused) {
|
|
307
340
|
var _inputRef_current;
|
|
@@ -310,7 +343,7 @@ var InputSelect = /*#__PURE__*/ React.forwardRef(function(props, _ref) {
|
|
|
310
343
|
});
|
|
311
344
|
}
|
|
312
345
|
};
|
|
313
|
-
var handleClear = function(event) {
|
|
346
|
+
var handleClear = function handleClear(event) {
|
|
314
347
|
if (!isDisabled) {
|
|
315
348
|
event.preventDefault();
|
|
316
349
|
event.stopPropagation();
|
|
@@ -320,7 +353,7 @@ var InputSelect = /*#__PURE__*/ React.forwardRef(function(props, _ref) {
|
|
|
320
353
|
setValue(undefined);
|
|
321
354
|
}
|
|
322
355
|
};
|
|
323
|
-
var handleClickOutside = function(event) {
|
|
356
|
+
var handleClickOutside = function handleClickOutside(event) {
|
|
324
357
|
if (wrapperRef.current && !wrapperRef.current.contains(event.target)) {
|
|
325
358
|
setIsFocused(false);
|
|
326
359
|
}
|
|
@@ -333,7 +366,7 @@ var InputSelect = /*#__PURE__*/ React.forwardRef(function(props, _ref) {
|
|
|
333
366
|
};
|
|
334
367
|
}, []);
|
|
335
368
|
React.useEffect(function() {
|
|
336
|
-
var handlePosition = function() {
|
|
369
|
+
var handlePosition = function handlePosition() {
|
|
337
370
|
if (inputRef && 'current' in inputRef && inputRef.current) {
|
|
338
371
|
var rect = inputRef.current.getBoundingClientRect();
|
|
339
372
|
var spaceBelow = window.innerHeight - rect.bottom;
|
|
@@ -395,7 +428,7 @@ var InputSelect = /*#__PURE__*/ React.forwardRef(function(props, _ref) {
|
|
|
395
428
|
return /*#__PURE__*/ _jsx(CommandItem, {
|
|
396
429
|
value: JSON.stringify(option.value),
|
|
397
430
|
disabled: option.isDisabled,
|
|
398
|
-
onSelect: function() {
|
|
431
|
+
onSelect: function onSelect() {
|
|
399
432
|
return handleSelect(option);
|
|
400
433
|
},
|
|
401
434
|
className: "tracking-normal text-primary3 w-full",
|
|
@@ -405,7 +438,7 @@ var InputSelect = /*#__PURE__*/ React.forwardRef(function(props, _ref) {
|
|
|
405
438
|
return /*#__PURE__*/ _jsx(CommandItem, {
|
|
406
439
|
value: JSON.stringify(option.value),
|
|
407
440
|
disabled: option.isDisabled,
|
|
408
|
-
onSelect: function() {
|
|
441
|
+
onSelect: function onSelect() {
|
|
409
442
|
return handleSelect(option);
|
|
410
443
|
},
|
|
411
444
|
className: "tracking-normal text-primary3 w-full",
|
|
@@ -103,7 +103,7 @@ export var Empty = {
|
|
|
103
103
|
};
|
|
104
104
|
export var FluidPosition = {
|
|
105
105
|
args: _object_spread({}, Long.args),
|
|
106
|
-
render: function(args) {
|
|
106
|
+
render: function render(args) {
|
|
107
107
|
return /*#__PURE__*/ _jsxs("div", {
|
|
108
108
|
className: "flex flex-col gap-4",
|
|
109
109
|
children: [
|
|
@@ -3,5 +3,5 @@ import * as React from 'react';
|
|
|
3
3
|
declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
|
|
4
4
|
declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
5
|
declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
-
export { Popover,
|
|
6
|
+
export { Popover, PopoverContent, PopoverTrigger };
|
|
7
7
|
//# sourceMappingURL=popover.d.ts.map
|
package/dist/popover/popover.js
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
'use client';
|
|
2
|
+
function _array_like_to_array(arr, len) {
|
|
3
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
4
|
+
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
5
|
+
return arr2;
|
|
6
|
+
}
|
|
7
|
+
function _array_with_holes(arr) {
|
|
8
|
+
if (Array.isArray(arr)) return arr;
|
|
9
|
+
}
|
|
2
10
|
function _define_property(obj, key, value) {
|
|
3
11
|
if (key in obj) {
|
|
4
12
|
Object.defineProperty(obj, key, {
|
|
@@ -12,6 +20,36 @@ function _define_property(obj, key, value) {
|
|
|
12
20
|
}
|
|
13
21
|
return obj;
|
|
14
22
|
}
|
|
23
|
+
function _iterable_to_array(iter) {
|
|
24
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
25
|
+
}
|
|
26
|
+
function _iterable_to_array_limit(arr, i) {
|
|
27
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
28
|
+
if (_i == null) return;
|
|
29
|
+
var _arr = [];
|
|
30
|
+
var _n = true;
|
|
31
|
+
var _d = false;
|
|
32
|
+
var _s, _e;
|
|
33
|
+
try {
|
|
34
|
+
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
|
35
|
+
_arr.push(_s.value);
|
|
36
|
+
if (i && _arr.length === i) break;
|
|
37
|
+
}
|
|
38
|
+
} catch (err) {
|
|
39
|
+
_d = true;
|
|
40
|
+
_e = err;
|
|
41
|
+
} finally{
|
|
42
|
+
try {
|
|
43
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
44
|
+
} finally{
|
|
45
|
+
if (_d) throw _e;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return _arr;
|
|
49
|
+
}
|
|
50
|
+
function _non_iterable_rest() {
|
|
51
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
52
|
+
}
|
|
15
53
|
function _object_spread(target) {
|
|
16
54
|
for(var i = 1; i < arguments.length; i++){
|
|
17
55
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
@@ -29,12 +67,22 @@ function _object_spread(target) {
|
|
|
29
67
|
}
|
|
30
68
|
function _object_without_properties(source, excluded) {
|
|
31
69
|
if (source == null) return {};
|
|
32
|
-
var target =
|
|
33
|
-
|
|
70
|
+
var target = {}, sourceKeys, key, i;
|
|
71
|
+
if (typeof Reflect !== "undefined" && Reflect.ownKeys) {
|
|
72
|
+
sourceKeys = Reflect.ownKeys(Object(source));
|
|
73
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
74
|
+
key = sourceKeys[i];
|
|
75
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
76
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
77
|
+
target[key] = source[key];
|
|
78
|
+
}
|
|
79
|
+
return target;
|
|
80
|
+
}
|
|
81
|
+
target = _object_without_properties_loose(source, excluded);
|
|
34
82
|
if (Object.getOwnPropertySymbols) {
|
|
35
|
-
|
|
36
|
-
for(i = 0; i <
|
|
37
|
-
key =
|
|
83
|
+
sourceKeys = Object.getOwnPropertySymbols(source);
|
|
84
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
85
|
+
key = sourceKeys[i];
|
|
38
86
|
if (excluded.indexOf(key) >= 0) continue;
|
|
39
87
|
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
40
88
|
target[key] = source[key];
|
|
@@ -44,28 +92,44 @@ function _object_without_properties(source, excluded) {
|
|
|
44
92
|
}
|
|
45
93
|
function _object_without_properties_loose(source, excluded) {
|
|
46
94
|
if (source == null) return {};
|
|
47
|
-
var target = {};
|
|
48
|
-
var sourceKeys = Object.keys(source);
|
|
49
|
-
var key, i;
|
|
95
|
+
var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
|
|
50
96
|
for(i = 0; i < sourceKeys.length; i++){
|
|
51
97
|
key = sourceKeys[i];
|
|
52
98
|
if (excluded.indexOf(key) >= 0) continue;
|
|
99
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
53
100
|
target[key] = source[key];
|
|
54
101
|
}
|
|
55
102
|
return target;
|
|
56
103
|
}
|
|
104
|
+
function _sliced_to_array(arr, i) {
|
|
105
|
+
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
106
|
+
}
|
|
107
|
+
function _to_array(arr) {
|
|
108
|
+
return _array_with_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_rest();
|
|
109
|
+
}
|
|
110
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
111
|
+
if (!o) return;
|
|
112
|
+
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
113
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
114
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
115
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
|
116
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
117
|
+
}
|
|
57
118
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
58
119
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
59
120
|
import * as React from 'react';
|
|
60
121
|
import { cn } from '../utils';
|
|
61
122
|
var Popover = PopoverPrimitive.Root;
|
|
62
123
|
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
63
|
-
var PopoverContent = /*#__PURE__*/ React.forwardRef(function(
|
|
64
|
-
var
|
|
124
|
+
var PopoverContent = /*#__PURE__*/ React.forwardRef(function(_0, _1) {
|
|
125
|
+
var _ref = [
|
|
126
|
+
_0,
|
|
127
|
+
_1
|
|
128
|
+
], _ref1 = _to_array(_ref), _ref2 = _ref1[0], _rest = _ref1.slice(1), className = _ref2.className, _ref_align = _ref2.align, align = _ref_align === void 0 ? 'center' : _ref_align, _ref_sideOffset = _ref2.sideOffset, sideOffset = _ref_sideOffset === void 0 ? 4 : _ref_sideOffset, props = _object_without_properties(_ref2, [
|
|
65
129
|
"className",
|
|
66
130
|
"align",
|
|
67
131
|
"sideOffset"
|
|
68
|
-
]);
|
|
132
|
+
]), _rest1 = _sliced_to_array(_rest, 1), ref = _rest1[0];
|
|
69
133
|
return /*#__PURE__*/ _jsx(PopoverPrimitive.Portal, {
|
|
70
134
|
children: /*#__PURE__*/ _jsx(PopoverPrimitive.Content, _object_spread({
|
|
71
135
|
ref: ref,
|
|
@@ -76,4 +140,4 @@ var PopoverContent = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
|
|
|
76
140
|
});
|
|
77
141
|
});
|
|
78
142
|
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
79
|
-
export { Popover,
|
|
143
|
+
export { Popover, PopoverContent, PopoverTrigger };
|