@driveflux/beam 3.0.19 → 3.0.20
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 +203 -7
- package/dist/accordion/Accordion.stories.js +31 -11
- package/dist/alert/Alert.js +193 -19
- package/dist/alert/Alert.stories.js +50 -15
- package/dist/animations/LoadingAnimation.js +34 -21
- package/dist/badge/Badge.js +105 -7
- package/dist/badge/Badge.stories.js +28 -7
- package/dist/box/Box.js +151 -3
- package/dist/box/Box.stories.js +8 -7
- package/dist/breadcrumbs/Breadcrumbs.js +351 -26
- package/dist/breadcrumbs/Breadcrumbs.stories.js +51 -27
- package/dist/button/Button.js +190 -12
- package/dist/button/Button.stories.js +35 -7
- package/dist/button/TextButton.js +168 -9
- package/dist/card/Card.js +188 -7
- package/dist/card/Card.stories.js +10 -7
- package/dist/carousel/Carousel.js +308 -58
- package/dist/carousel/Carousel.stories.js +39 -7
- package/dist/carousel/CarouselButton.js +132 -7
- package/dist/center/Center.js +127 -3
- package/dist/center/Center.stories.js +19 -7
- package/dist/checkbox/Checkbox.js +188 -4
- package/dist/checkbox/Checkbox.stories.js +10 -8
- package/dist/chip/Chip.js +168 -3
- package/dist/chip/Chip.stories.js +19 -7
- package/dist/circular-progress/CircularProgress.js +159 -11
- package/dist/circular-progress/CircularProgress.stories.js +54 -14
- package/dist/command/command.js +249 -13
- package/dist/datepicker/DatePicker.js +245 -90
- package/dist/datepicker/DatePicker.stories.js +162 -58
- package/dist/datepicker/DatePickerDrawer.js +115 -17
- package/dist/datepicker/DatePickerPopover.js +208 -35
- package/dist/datepicker/constants.js +3 -4
- package/dist/datepicker/utils.js +4 -11
- package/dist/dialog/index.js +253 -12
- package/dist/divider/Divider.js +127 -3
- package/dist/divider/Divider.stories.js +13 -7
- package/dist/drawer/index.js +230 -12
- package/dist/dropdown/Dropdown.js +297 -26
- package/dist/dropdown/Dropdown.stories.js +109 -22
- package/dist/field-wrapper/FieldWrapper.js +203 -3
- package/dist/field-wrapper/FieldWrapper.stories.js +124 -28
- package/dist/flex/Flex.js +127 -3
- package/dist/flex/Flex.stories.js +19 -7
- package/dist/grid/Grid.js +127 -3
- package/dist/grid/Grid.stories.js +28 -7
- package/dist/hooks/use-breakpoint-value.js +77 -14
- package/dist/hooks/use-media-query.js +61 -12
- package/dist/hstack/HStack.js +127 -3
- package/dist/hstack/HStack.stories.js +19 -7
- package/dist/icons/FluxLogo.js +222 -9
- package/dist/icons/FluxLogoTable.js +118 -5
- package/dist/icons/Icon.js +117 -7
- package/dist/icons/Icon.stories.js +12 -7
- package/dist/icons/Icon24Hours.js +92 -5
- package/dist/icons/IconAcceleration.js +81 -4
- package/dist/icons/IconAccount.js +81 -4
- package/dist/icons/IconApplicant.js +87 -5
- package/dist/icons/IconArrow.js +87 -6
- package/dist/icons/IconArrowBack.js +81 -4
- package/dist/icons/IconArrowForward.js +81 -4
- package/dist/icons/IconArrowTopLeft.js +79 -4
- package/dist/icons/IconBluesharkProductGuide.js +89 -5
- package/dist/icons/IconBolt.js +81 -4
- package/dist/icons/IconBriefcase.js +81 -4
- package/dist/icons/IconBulb.js +81 -4
- package/dist/icons/IconCalendar.js +81 -4
- package/dist/icons/IconCalendarArrowBack.js +81 -4
- package/dist/icons/IconCalendarArrowForward.js +81 -4
- package/dist/icons/IconCalendarDoubleArrowBack.js +81 -4
- package/dist/icons/IconCalendarDoubleArrowForward.js +81 -4
- package/dist/icons/IconCancel.js +86 -5
- package/dist/icons/IconCancelMark.js +81 -4
- package/dist/icons/IconCarSUV.js +81 -4
- package/dist/icons/IconCarSedan.js +156 -7
- package/dist/icons/IconChain.js +88 -5
- package/dist/icons/IconCheckmark.js +81 -4
- package/dist/icons/IconChevronRight.js +81 -4
- package/dist/icons/IconCircle.js +123 -11
- package/dist/icons/IconCircleCheckmark.js +86 -5
- package/dist/icons/IconCircleError.js +81 -4
- package/dist/icons/IconCircleExclamation.js +113 -6
- package/dist/icons/IconCircleMark.js +87 -5
- package/dist/icons/IconCircleOutline.js +148 -5
- package/dist/icons/IconClock.js +89 -5
- package/dist/icons/IconClose.js +81 -4
- package/dist/icons/IconCollapseAll.js +103 -5
- package/dist/icons/IconConcierge.js +88 -5
- package/dist/icons/IconConciergeService.js +96 -5
- package/dist/icons/IconCreditCard.js +87 -5
- package/dist/icons/IconDash.js +81 -4
- package/dist/icons/IconDeliver.js +81 -4
- package/dist/icons/IconDelivery.js +96 -5
- package/dist/icons/IconDetails.js +81 -4
- package/dist/icons/IconDot.js +96 -6
- package/dist/icons/IconDownload.js +88 -5
- package/dist/icons/IconEVCharging.js +88 -5
- package/dist/icons/IconElectricCarFuel.js +89 -5
- package/dist/icons/IconEllipsis.js +87 -5
- package/dist/icons/IconEnvelope.js +81 -4
- package/dist/icons/IconExpandAll.js +103 -5
- package/dist/icons/IconEye.js +88 -5
- package/dist/icons/IconFacebook.js +103 -6
- package/dist/icons/IconFilter.js +92 -5
- package/dist/icons/IconFlagMalaysia.js +150 -5
- package/dist/icons/IconGiveKey.js +88 -5
- package/dist/icons/IconGlobe.js +79 -4
- package/dist/icons/IconGoogle.js +96 -5
- package/dist/icons/IconHome.js +87 -5
- package/dist/icons/IconHostAdvertise.js +81 -4
- package/dist/icons/IconHostCar.js +84 -4
- package/dist/icons/IconHostCash.js +100 -5
- package/dist/icons/IconHostHandle.js +79 -4
- package/dist/icons/IconHostLocation.js +79 -4
- package/dist/icons/IconHostPayment.js +100 -5
- package/dist/icons/IconHostService.js +88 -5
- package/dist/icons/IconHotDeals.js +81 -4
- package/dist/icons/IconInfo.js +86 -5
- package/dist/icons/IconInstagram.js +81 -4
- package/dist/icons/IconInsurance.js +108 -5
- package/dist/icons/IconInternet.js +82 -4
- package/dist/icons/IconInventory.js +87 -5
- package/dist/icons/IconLaurel.js +110 -5
- package/dist/icons/IconLinkedIn.js +81 -4
- package/dist/icons/IconLoading.js +87 -4
- package/dist/icons/IconLocation.js +89 -5
- package/dist/icons/IconLock.js +82 -4
- package/dist/icons/IconLogistics.js +81 -4
- package/dist/icons/IconMail.js +103 -5
- package/dist/icons/IconMember.js +87 -5
- package/dist/icons/IconMobilePen.js +92 -5
- package/dist/icons/IconMotorcycleMoped.js +87 -5
- package/dist/icons/IconNoCost.js +101 -5
- package/dist/icons/IconPDF.js +89 -5
- package/dist/icons/IconPencil.js +79 -4
- package/dist/icons/IconPhone.js +79 -4
- package/dist/icons/IconPlus.js +81 -4
- package/dist/icons/IconPricing.js +81 -4
- package/dist/icons/IconProtected.js +80 -4
- package/dist/icons/IconPsychology.js +81 -4
- package/dist/icons/IconQuestionTooltip.js +137 -4
- package/dist/icons/IconQuote.js +81 -4
- package/dist/icons/IconRate.js +80 -4
- package/dist/icons/IconRegister.js +108 -5
- package/dist/icons/IconReport.js +98 -6
- package/dist/icons/IconReturn.js +81 -4
- package/dist/icons/IconSearch.js +79 -4
- package/dist/icons/IconSecure.js +80 -4
- package/dist/icons/IconSecurity.js +82 -4
- package/dist/icons/IconSedanOutline.js +168 -5
- package/dist/icons/IconSelectArrow.js +87 -6
- package/dist/icons/IconSort.js +88 -5
- package/dist/icons/IconSortListed.js +104 -5
- package/dist/icons/IconSortPriceAscending.js +92 -5
- package/dist/icons/IconSortPriceDescending.js +92 -5
- package/dist/icons/IconSortYear.js +88 -5
- package/dist/icons/IconSpan.js +80 -4
- package/dist/icons/IconSpeaker.js +88 -4
- package/dist/icons/IconSpecialCar.js +104 -5
- package/dist/icons/IconStar.js +101 -7
- package/dist/icons/IconStockPhoto.js +104 -5
- package/dist/icons/IconSubscription.js +122 -6
- package/dist/icons/IconSubscriptions.js +122 -6
- package/dist/icons/IconSwap.js +88 -5
- package/dist/icons/IconTax.js +81 -4
- package/dist/icons/IconThinArrow.js +87 -6
- package/dist/icons/IconThumbsdown.js +87 -5
- package/dist/icons/IconThumbsup.js +87 -5
- package/dist/icons/IconTool.js +81 -4
- package/dist/icons/IconTooltip.js +137 -4
- package/dist/icons/IconTrash.js +81 -4
- package/dist/icons/IconTriangleExclamation.js +81 -4
- package/dist/icons/IconTyersBrakes.js +92 -5
- package/dist/icons/IconTyre.js +92 -5
- package/dist/icons/IconVacancy.js +87 -5
- package/dist/icons/IconVolunteer.js +81 -4
- package/dist/icons/IconWhatsapp.js +82 -4
- package/dist/icons/IconXPlatform.js +81 -4
- package/dist/icons/IconZeroEffort.js +86 -5
- package/dist/icons/Logo.js +108 -3
- package/dist/input/Input.js +134 -11
- package/dist/input/Input.stories.js +17 -18
- package/dist/input-mask/InputMask.js +158 -11
- package/dist/input-mask/InputMask.stories.js +5 -6
- package/dist/input-mask/mask-trackers.js +4 -5
- package/dist/input-select/InputSelect.js +390 -68
- package/dist/input-select/InputSelect.stories.js +98 -25
- package/dist/popover/popover.js +136 -4
- package/dist/progress/Progress.js +160 -2
- package/dist/progress/Progress.stories.js +13 -14
- package/dist/radio/Radio.js +227 -4
- package/dist/scroll-area/scroll-area.js +180 -5
- package/dist/search-input-select/SearchInputSelect.js +379 -69
- package/dist/select/Select.js +354 -29
- package/dist/select/Select.stories.js +55 -19
- package/dist/skeleton/Skeleton.js +71 -3
- package/dist/skeleton/Skeleton.stories.js +8 -7
- package/dist/slider/Slider.js +170 -5
- package/dist/slider/Slider.stories.js +12 -11
- package/dist/stack/Stack.js +127 -3
- package/dist/stack/Stack.stories.js +19 -7
- package/dist/table/Table.js +216 -10
- package/dist/table/Table.stories.js +84 -8
- package/dist/tabs/Tabs.js +198 -9
- package/dist/tabs/Tabs.stories.js +46 -13
- package/dist/text/Text.js +152 -6
- package/dist/text/Text.stories.js +44 -7
- package/dist/toast/Toast.stories.js +66 -14
- package/dist/toast/ToastBox.js +77 -29
- package/dist/toast/index.js +0 -1
- package/dist/toast/sonner.js +66 -6
- package/dist/toggle/Toggle.js +180 -7
- package/dist/toggle/Toggle.stories.js +10 -8
- package/dist/tooltip/Tooltip.js +169 -12
- package/dist/tooltip/Tooltip.stories.js +71 -13
- package/dist/utils.js +4 -2
- package/dist/vstack/VStack.js +127 -3
- package/dist/vstack/VStack.stories.js +19 -7
- package/package.json +11 -11
|
@@ -1,42 +1,367 @@
|
|
|
1
|
+
function _array_like_to_array(arr, len) {
|
|
2
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
3
|
+
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
4
|
+
return arr2;
|
|
5
|
+
}
|
|
6
|
+
function _array_with_holes(arr) {
|
|
7
|
+
if (Array.isArray(arr)) return arr;
|
|
8
|
+
}
|
|
9
|
+
function _array_without_holes(arr) {
|
|
10
|
+
if (Array.isArray(arr)) return _array_like_to_array(arr);
|
|
11
|
+
}
|
|
12
|
+
function _define_property(obj, key, value) {
|
|
13
|
+
if (key in obj) {
|
|
14
|
+
Object.defineProperty(obj, key, {
|
|
15
|
+
value: value,
|
|
16
|
+
enumerable: true,
|
|
17
|
+
configurable: true,
|
|
18
|
+
writable: true
|
|
19
|
+
});
|
|
20
|
+
} else {
|
|
21
|
+
obj[key] = value;
|
|
22
|
+
}
|
|
23
|
+
return obj;
|
|
24
|
+
}
|
|
25
|
+
function _extends() {
|
|
26
|
+
_extends = Object.assign || function(target) {
|
|
27
|
+
for(var i = 1; i < arguments.length; i++){
|
|
28
|
+
var source = arguments[i];
|
|
29
|
+
for(var key in source){
|
|
30
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
31
|
+
target[key] = source[key];
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return target;
|
|
36
|
+
};
|
|
37
|
+
return _extends.apply(this, arguments);
|
|
38
|
+
}
|
|
39
|
+
function _iterable_to_array(iter) {
|
|
40
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
41
|
+
}
|
|
42
|
+
function _iterable_to_array_limit(arr, i) {
|
|
43
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
44
|
+
if (_i == null) return;
|
|
45
|
+
var _arr = [];
|
|
46
|
+
var _n = true;
|
|
47
|
+
var _d = false;
|
|
48
|
+
var _s, _e;
|
|
49
|
+
try {
|
|
50
|
+
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
|
51
|
+
_arr.push(_s.value);
|
|
52
|
+
if (i && _arr.length === i) break;
|
|
53
|
+
}
|
|
54
|
+
} catch (err) {
|
|
55
|
+
_d = true;
|
|
56
|
+
_e = err;
|
|
57
|
+
} finally{
|
|
58
|
+
try {
|
|
59
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
60
|
+
} finally{
|
|
61
|
+
if (_d) throw _e;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
return _arr;
|
|
65
|
+
}
|
|
66
|
+
function _non_iterable_rest() {
|
|
67
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
68
|
+
}
|
|
69
|
+
function _non_iterable_spread() {
|
|
70
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
71
|
+
}
|
|
72
|
+
function _object_destructuring_empty(o) {
|
|
73
|
+
if (o === null || o === void 0) throw new TypeError("Cannot destructure " + o);
|
|
74
|
+
return o;
|
|
75
|
+
}
|
|
76
|
+
function _object_spread(target) {
|
|
77
|
+
for(var i = 1; i < arguments.length; i++){
|
|
78
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
79
|
+
var ownKeys = Object.keys(source);
|
|
80
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
81
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
82
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
83
|
+
}));
|
|
84
|
+
}
|
|
85
|
+
ownKeys.forEach(function(key) {
|
|
86
|
+
_define_property(target, key, source[key]);
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
return target;
|
|
90
|
+
}
|
|
91
|
+
function ownKeys(object, enumerableOnly) {
|
|
92
|
+
var keys = Object.keys(object);
|
|
93
|
+
if (Object.getOwnPropertySymbols) {
|
|
94
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
95
|
+
if (enumerableOnly) {
|
|
96
|
+
symbols = symbols.filter(function(sym) {
|
|
97
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
keys.push.apply(keys, symbols);
|
|
101
|
+
}
|
|
102
|
+
return keys;
|
|
103
|
+
}
|
|
104
|
+
function _object_spread_props(target, source) {
|
|
105
|
+
source = source != null ? source : {};
|
|
106
|
+
if (Object.getOwnPropertyDescriptors) {
|
|
107
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
108
|
+
} else {
|
|
109
|
+
ownKeys(Object(source)).forEach(function(key) {
|
|
110
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
return target;
|
|
114
|
+
}
|
|
115
|
+
function _object_without_properties(source, excluded) {
|
|
116
|
+
if (source == null) return {};
|
|
117
|
+
var target = {}, sourceKeys, key, i;
|
|
118
|
+
if (typeof Reflect !== "undefined" && Reflect.ownKeys) {
|
|
119
|
+
sourceKeys = Reflect.ownKeys(Object(source));
|
|
120
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
121
|
+
key = sourceKeys[i];
|
|
122
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
123
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
124
|
+
target[key] = source[key];
|
|
125
|
+
}
|
|
126
|
+
return target;
|
|
127
|
+
}
|
|
128
|
+
target = _object_without_properties_loose(source, excluded);
|
|
129
|
+
if (Object.getOwnPropertySymbols) {
|
|
130
|
+
sourceKeys = Object.getOwnPropertySymbols(source);
|
|
131
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
132
|
+
key = sourceKeys[i];
|
|
133
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
134
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
135
|
+
target[key] = source[key];
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
return target;
|
|
139
|
+
}
|
|
140
|
+
function _object_without_properties_loose(source, excluded) {
|
|
141
|
+
if (source == null) return {};
|
|
142
|
+
var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
|
|
143
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
144
|
+
key = sourceKeys[i];
|
|
145
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
146
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
147
|
+
target[key] = source[key];
|
|
148
|
+
}
|
|
149
|
+
return target;
|
|
150
|
+
}
|
|
151
|
+
function _sliced_to_array(arr, i) {
|
|
152
|
+
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
153
|
+
}
|
|
154
|
+
function _to_array(arr) {
|
|
155
|
+
return _array_with_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_rest();
|
|
156
|
+
}
|
|
157
|
+
function _to_consumable_array(arr) {
|
|
158
|
+
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
|
|
159
|
+
}
|
|
160
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
161
|
+
if (!o) return;
|
|
162
|
+
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
163
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
164
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
165
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
|
166
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
167
|
+
}
|
|
1
168
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
169
|
import { Slot } from '@radix-ui/react-slot';
|
|
3
170
|
import * as React from 'react';
|
|
4
|
-
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger
|
|
171
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from '../dropdown/Dropdown';
|
|
5
172
|
import IconEllipsis from '../icons/IconEllipsis';
|
|
6
173
|
import IconThinArrow from '../icons/IconThinArrow';
|
|
7
174
|
import { cn } from '../utils';
|
|
8
|
-
|
|
175
|
+
var BreadcrumbRoot = /*#__PURE__*/ React.forwardRef(function(_0, _1) {
|
|
176
|
+
var _ref = [
|
|
177
|
+
_0,
|
|
178
|
+
_1
|
|
179
|
+
], _ref1 = _to_array(_ref), _ref2 = _ref1[0], _rest = _ref1.slice(1), ref = _object_destructuring_empty(_ref2), props = _extends({}, _ref2), _rest1 = _sliced_to_array(_rest, 1), ref1 = _rest1[0];
|
|
180
|
+
return /*#__PURE__*/ _jsx("nav", _object_spread({
|
|
181
|
+
ref: ref1,
|
|
182
|
+
"aria-label": "breadcrumb"
|
|
183
|
+
}, props));
|
|
184
|
+
});
|
|
9
185
|
BreadcrumbRoot.displayName = 'BreadcrumbRoot';
|
|
10
|
-
|
|
186
|
+
var BreadcrumbList = /*#__PURE__*/ React.forwardRef(function(_0, _1) {
|
|
187
|
+
var _ref = [
|
|
188
|
+
_0,
|
|
189
|
+
_1
|
|
190
|
+
], _ref1 = _to_array(_ref), _ref2 = _ref1[0], _rest = _ref1.slice(1), className = _ref2.className, props = _object_without_properties(_ref2, [
|
|
191
|
+
"className"
|
|
192
|
+
]), _rest1 = _sliced_to_array(_rest, 1), ref = _rest1[0];
|
|
193
|
+
return /*#__PURE__*/ _jsx("ol", _object_spread({
|
|
194
|
+
ref: ref,
|
|
195
|
+
className: cn('flex flex-wrap items-center gap-2 break-words text-sm tracking-wide uppercase text-primary3 sm:gap-2.5 dark:text-zinc-400', className)
|
|
196
|
+
}, props));
|
|
197
|
+
});
|
|
11
198
|
BreadcrumbList.displayName = 'BreadcrumbList';
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
199
|
+
var BreadcrumbItem = /*#__PURE__*/ React.forwardRef(function(_0, _1) {
|
|
200
|
+
var _ref = [
|
|
201
|
+
_0,
|
|
202
|
+
_1
|
|
203
|
+
], _ref1 = _to_array(_ref), _ref2 = _ref1[0], _rest = _ref1.slice(1), className = _ref2.className, props = _object_without_properties(_ref2, [
|
|
204
|
+
"className"
|
|
205
|
+
]), _rest1 = _sliced_to_array(_rest, 1), ref = _rest1[0];
|
|
206
|
+
return /*#__PURE__*/ _jsx("li", _object_spread({
|
|
207
|
+
ref: ref,
|
|
208
|
+
//* ml-0 is to avoid padding left getting amended by global
|
|
209
|
+
className: cn('inline-flex items-center gap-2 ml-0', className)
|
|
210
|
+
}, props));
|
|
211
|
+
});
|
|
15
212
|
BreadcrumbItem.displayName = 'BreadcrumbItem';
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
213
|
+
var BreadcrumbLink = /*#__PURE__*/ React.forwardRef(function(_0, _1) {
|
|
214
|
+
var _ref = [
|
|
215
|
+
_0,
|
|
216
|
+
_1
|
|
217
|
+
], _ref1 = _to_array(_ref), _ref2 = _ref1[0], _rest = _ref1.slice(1), className = _ref2.className, asChild = _ref2.asChild, props = _object_without_properties(_ref2, [
|
|
218
|
+
"className",
|
|
219
|
+
"asChild"
|
|
220
|
+
]), _rest1 = _sliced_to_array(_rest, 1), ref = _rest1[0];
|
|
221
|
+
var Comp = asChild ? Slot : 'a';
|
|
222
|
+
return /*#__PURE__*/ _jsx(Comp, _object_spread({
|
|
223
|
+
ref: ref,
|
|
224
|
+
className: cn('text-primary3 hover:text-black dark:hover:text-zinc-50', className)
|
|
225
|
+
}, props));
|
|
19
226
|
});
|
|
20
227
|
BreadcrumbLink.displayName = 'BreadcrumbLink';
|
|
21
|
-
|
|
228
|
+
var BreadcrumbPage = /*#__PURE__*/ React.forwardRef(function(_0, _1) {
|
|
229
|
+
var _ref = [
|
|
230
|
+
_0,
|
|
231
|
+
_1
|
|
232
|
+
], _ref1 = _to_array(_ref), _ref2 = _ref1[0], _rest = _ref1.slice(1), className = _ref2.className, props = _object_without_properties(_ref2, [
|
|
233
|
+
"className"
|
|
234
|
+
]), _rest1 = _sliced_to_array(_rest, 1), ref = _rest1[0];
|
|
235
|
+
return(// biome-ignore lint/a11y/useFocusableInteractive: Element is intentionally not focusable
|
|
236
|
+
/*#__PURE__*/ _jsx("span", _object_spread({
|
|
237
|
+
ref: ref,
|
|
238
|
+
role: "link",
|
|
239
|
+
"aria-disabled": "true",
|
|
240
|
+
"aria-current": "page",
|
|
241
|
+
className: cn('font-bold dark:text-zinc-50', className)
|
|
242
|
+
}, props)));
|
|
243
|
+
});
|
|
22
244
|
BreadcrumbPage.displayName = 'BreadcrumbPage';
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
245
|
+
var BreadcrumbSeparator = function BreadcrumbSeparator(_0) {
|
|
246
|
+
var children = _0.children, className = _0.className, props = _object_without_properties(_0, [
|
|
247
|
+
"children",
|
|
248
|
+
"className"
|
|
249
|
+
]);
|
|
250
|
+
return /*#__PURE__*/ _jsx("li", _object_spread_props(_object_spread({
|
|
251
|
+
role: "presentation",
|
|
252
|
+
"aria-hidden": "true",
|
|
253
|
+
//* ml-0 is to avoid padding left getting amended by global
|
|
254
|
+
className: cn('[&>svg]:w-3.5 [&>svg]:h-3.5 ml-0 text-black', className)
|
|
255
|
+
}, props), {
|
|
256
|
+
children: children !== null && children !== void 0 ? children : /*#__PURE__*/ _jsx(IconThinArrow, {
|
|
257
|
+
variant: "right",
|
|
258
|
+
size: "16px"
|
|
259
|
+
})
|
|
260
|
+
}));
|
|
261
|
+
};
|
|
26
262
|
BreadcrumbSeparator.displayName = 'BreadcrumbSeparator';
|
|
27
|
-
|
|
263
|
+
var BreadcrumbEllipsis = function BreadcrumbEllipsis(_0) {
|
|
264
|
+
var className = _0.className, props = _object_without_properties(_0, [
|
|
265
|
+
"className"
|
|
266
|
+
]);
|
|
267
|
+
return /*#__PURE__*/ _jsxs("span", _object_spread_props(_object_spread({
|
|
268
|
+
role: "presentation",
|
|
269
|
+
"aria-hidden": "true",
|
|
270
|
+
className: cn('flex h-9 w-9 items-center justify-center', className)
|
|
271
|
+
}, props), {
|
|
272
|
+
children: [
|
|
273
|
+
/*#__PURE__*/ _jsx(IconEllipsis, {
|
|
274
|
+
size: "16px",
|
|
275
|
+
className: "rotate-90"
|
|
276
|
+
}),
|
|
277
|
+
/*#__PURE__*/ _jsx("span", {
|
|
278
|
+
className: "sr-only",
|
|
279
|
+
children: "More"
|
|
280
|
+
})
|
|
281
|
+
]
|
|
282
|
+
}));
|
|
283
|
+
};
|
|
28
284
|
BreadcrumbEllipsis.displayName = 'BreadcrumbElipssis';
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
285
|
+
var Breadcrumbs = /*#__PURE__*/ React.forwardRef(function(_0, _1) {
|
|
286
|
+
var _ref = [
|
|
287
|
+
_0,
|
|
288
|
+
_1
|
|
289
|
+
], _ref1 = _to_array(_ref), _ref2 = _ref1[0], _rest = _ref1.slice(1), crumbs = _ref2.crumbs, LinkComponent = _ref2.LinkComponent, tmp = _ref2.defaultCrumbsLength, providedCrumbsLength = tmp === void 0 ? 3 : tmp, props = _object_without_properties(_ref2, [
|
|
290
|
+
"crumbs",
|
|
291
|
+
"LinkComponent",
|
|
292
|
+
"defaultCrumbsLength"
|
|
293
|
+
]), _rest1 = _sliced_to_array(_rest, 1), ref = _rest1[0];
|
|
294
|
+
var defaultCrumbsLength = Math.max(2, providedCrumbsLength);
|
|
295
|
+
var tooManyCrumbs = crumbs.length > defaultCrumbsLength;
|
|
296
|
+
var trimmedCrumbs = tooManyCrumbs ? [
|
|
297
|
+
crumbs[0]
|
|
298
|
+
].concat(_to_consumable_array(crumbs.slice(-(defaultCrumbsLength - 1)))) : crumbs;
|
|
299
|
+
var FinalLinkComponent = LinkComponent !== null && LinkComponent !== void 0 ? LinkComponent : 'a';
|
|
300
|
+
return /*#__PURE__*/ _jsx(BreadcrumbRoot, _object_spread_props(_object_spread({
|
|
301
|
+
ref: ref
|
|
302
|
+
}, props), {
|
|
303
|
+
children: /*#__PURE__*/ _jsx(BreadcrumbList, {
|
|
304
|
+
children: trimmedCrumbs.map(function(crumb, i, trimmedCrumbs) {
|
|
305
|
+
var _crumb_label;
|
|
306
|
+
return /*#__PURE__*/ _jsxs(React.Fragment, {
|
|
307
|
+
children: [
|
|
308
|
+
/*#__PURE__*/ _jsx(BreadcrumbItem, {
|
|
309
|
+
children: crumb.href ? /*#__PURE__*/ _jsx(BreadcrumbLink, {
|
|
310
|
+
href: crumb.href,
|
|
311
|
+
className: cn(i === trimmedCrumbs.length - 1 && 'text-black font-bold'),
|
|
312
|
+
asChild: !!LinkComponent,
|
|
313
|
+
children: LinkComponent ? /*#__PURE__*/ _jsx(LinkComponent, {
|
|
314
|
+
href: crumb.href,
|
|
315
|
+
children: crumb.label
|
|
316
|
+
}) : crumb.label
|
|
317
|
+
}) : /*#__PURE__*/ _jsx(BreadcrumbPage, {
|
|
318
|
+
className: cn(i === trimmedCrumbs.length - 1 && 'text-black font-bold'),
|
|
319
|
+
children: crumb.label
|
|
320
|
+
})
|
|
321
|
+
}),
|
|
322
|
+
i < trimmedCrumbs.length - 1 && /*#__PURE__*/ _jsx(BreadcrumbSeparator, {}),
|
|
323
|
+
tooManyCrumbs && i === 0 && /*#__PURE__*/ _jsxs(React.Fragment, {
|
|
324
|
+
children: [
|
|
325
|
+
/*#__PURE__*/ _jsxs(DropdownMenu, {
|
|
326
|
+
children: [
|
|
327
|
+
/*#__PURE__*/ _jsxs(DropdownMenuTrigger, {
|
|
328
|
+
className: "flex items-center gap-1 rounded-full hover:bg-primary1",
|
|
329
|
+
children: [
|
|
330
|
+
/*#__PURE__*/ _jsx(BreadcrumbEllipsis, {
|
|
331
|
+
className: "hover:text-black cursor-pointer"
|
|
332
|
+
}),
|
|
333
|
+
/*#__PURE__*/ _jsx("span", {
|
|
334
|
+
className: "sr-only",
|
|
335
|
+
children: "Toggle menu"
|
|
336
|
+
})
|
|
337
|
+
]
|
|
338
|
+
}),
|
|
339
|
+
/*#__PURE__*/ _jsx(DropdownMenuContent, {
|
|
340
|
+
align: "start",
|
|
341
|
+
className: "tracking-wide uppercase text-sm text-primary3",
|
|
342
|
+
children: crumbs.slice(1, -(defaultCrumbsLength - 1)).map(function(leftoverCrumb) {
|
|
343
|
+
var _leftoverCrumb_label, _leftoverCrumb_label1;
|
|
344
|
+
return leftoverCrumb.href ? /*#__PURE__*/ _jsx(FinalLinkComponent, {
|
|
345
|
+
href: leftoverCrumb.href,
|
|
346
|
+
children: /*#__PURE__*/ _jsx(DropdownMenuItem, {
|
|
347
|
+
className: "text-primary3 cursor-pointer",
|
|
348
|
+
children: leftoverCrumb.label
|
|
349
|
+
})
|
|
350
|
+
}, (_leftoverCrumb_label = leftoverCrumb.label) === null || _leftoverCrumb_label === void 0 ? void 0 : _leftoverCrumb_label.toString()) : /*#__PURE__*/ _jsx(DropdownMenuItem, {
|
|
351
|
+
children: leftoverCrumb.label
|
|
352
|
+
}, (_leftoverCrumb_label1 = leftoverCrumb.label) === null || _leftoverCrumb_label1 === void 0 ? void 0 : _leftoverCrumb_label1.toString());
|
|
353
|
+
})
|
|
354
|
+
})
|
|
355
|
+
]
|
|
356
|
+
}),
|
|
357
|
+
/*#__PURE__*/ _jsx(BreadcrumbSeparator, {})
|
|
358
|
+
]
|
|
359
|
+
})
|
|
360
|
+
]
|
|
361
|
+
}, (_crumb_label = crumb.label) === null || _crumb_label === void 0 ? void 0 : _crumb_label.toString());
|
|
362
|
+
})
|
|
363
|
+
})
|
|
364
|
+
}));
|
|
39
365
|
});
|
|
40
366
|
export default Breadcrumbs;
|
|
41
|
-
export { BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator,
|
|
42
|
-
//# sourceMappingURL=Breadcrumbs.js.map
|
|
367
|
+
export { BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, };
|
|
@@ -1,41 +1,65 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import Breadcrumbs from './Breadcrumbs.js';
|
|
3
|
-
|
|
3
|
+
var meta = {
|
|
4
4
|
component: Breadcrumbs,
|
|
5
5
|
args: {
|
|
6
|
-
crumbs: []
|
|
7
|
-
}
|
|
6
|
+
crumbs: []
|
|
7
|
+
}
|
|
8
8
|
};
|
|
9
9
|
export default meta;
|
|
10
|
-
export
|
|
11
|
-
render: ()
|
|
12
|
-
return
|
|
13
|
-
|
|
14
|
-
{
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
export var FirstStory = {
|
|
11
|
+
render: function render() {
|
|
12
|
+
return /*#__PURE__*/ _jsx(Breadcrumbs, {
|
|
13
|
+
crumbs: [
|
|
14
|
+
{
|
|
15
|
+
href: '/',
|
|
16
|
+
label: 'Home'
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
href: '/account',
|
|
20
|
+
label: 'Account'
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
label: 'Settings'
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
});
|
|
27
|
+
}
|
|
18
28
|
};
|
|
19
|
-
|
|
20
|
-
{ href: '/', label: 'Home' },
|
|
21
|
-
{ href: '/cars/malaysia', label: 'Browse Car Page' },
|
|
22
|
-
{ href: '/cars/malaysia/proton-saga', label: 'Proton Saga' },
|
|
29
|
+
var longCrumbs = [
|
|
23
30
|
{
|
|
24
|
-
href: '/
|
|
25
|
-
label: '
|
|
31
|
+
href: '/',
|
|
32
|
+
label: 'Home'
|
|
26
33
|
},
|
|
27
34
|
{
|
|
28
|
-
|
|
35
|
+
href: '/cars/malaysia',
|
|
36
|
+
label: 'Browse Car Page'
|
|
29
37
|
},
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
return _jsx(Breadcrumbs, { crumbs: longCrumbs, defaultCrumbsLength: 4 });
|
|
38
|
+
{
|
|
39
|
+
href: '/cars/malaysia/proton-saga',
|
|
40
|
+
label: 'Proton Saga'
|
|
34
41
|
},
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
return _jsx(Breadcrumbs, { crumbs: longCrumbs, defaultCrumbsLength: -20 });
|
|
42
|
+
{
|
|
43
|
+
href: '/cars/malaysia/proton-saga/checkout',
|
|
44
|
+
label: 'Checkout Proton Saga'
|
|
39
45
|
},
|
|
46
|
+
{
|
|
47
|
+
label: 'Checkout Proton Saga Supplementary Documents'
|
|
48
|
+
}
|
|
49
|
+
];
|
|
50
|
+
export var LongStory = {
|
|
51
|
+
render: function render() {
|
|
52
|
+
return /*#__PURE__*/ _jsx(Breadcrumbs, {
|
|
53
|
+
crumbs: longCrumbs,
|
|
54
|
+
defaultCrumbsLength: 4
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
export var MischievousStory = {
|
|
59
|
+
render: function render() {
|
|
60
|
+
return /*#__PURE__*/ _jsx(Breadcrumbs, {
|
|
61
|
+
crumbs: longCrumbs,
|
|
62
|
+
defaultCrumbsLength: -20
|
|
63
|
+
});
|
|
64
|
+
}
|
|
40
65
|
};
|
|
41
|
-
//# sourceMappingURL=Breadcrumbs.stories.js.map
|