@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,12 +1,88 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow
|
|
3
|
-
|
|
4
|
-
component: Table
|
|
2
|
+
import { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow } from './Table';
|
|
3
|
+
var meta = {
|
|
4
|
+
component: Table
|
|
5
5
|
};
|
|
6
6
|
export default meta;
|
|
7
|
-
export
|
|
8
|
-
render: ()
|
|
9
|
-
return
|
|
10
|
-
|
|
7
|
+
export var TableTest = {
|
|
8
|
+
render: function render() {
|
|
9
|
+
return /*#__PURE__*/ _jsxs(Table, {
|
|
10
|
+
children: [
|
|
11
|
+
/*#__PURE__*/ _jsx(TableCaption, {
|
|
12
|
+
children: "Example Table Caption"
|
|
13
|
+
}),
|
|
14
|
+
/*#__PURE__*/ _jsx(TableHeader, {
|
|
15
|
+
children: /*#__PURE__*/ _jsxs(TableRow, {
|
|
16
|
+
children: [
|
|
17
|
+
/*#__PURE__*/ _jsx(TableHead, {}),
|
|
18
|
+
" ",
|
|
19
|
+
/*#__PURE__*/ _jsx(TableHead, {
|
|
20
|
+
children: "Heading 1"
|
|
21
|
+
}),
|
|
22
|
+
/*#__PURE__*/ _jsx(TableHead, {
|
|
23
|
+
children: "Heading 2"
|
|
24
|
+
}),
|
|
25
|
+
/*#__PURE__*/ _jsx(TableHead, {
|
|
26
|
+
children: "Heading 3"
|
|
27
|
+
})
|
|
28
|
+
]
|
|
29
|
+
})
|
|
30
|
+
}),
|
|
31
|
+
/*#__PURE__*/ _jsxs(TableBody, {
|
|
32
|
+
children: [
|
|
33
|
+
/*#__PURE__*/ _jsxs(TableRow, {
|
|
34
|
+
children: [
|
|
35
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
36
|
+
children: "Row 1"
|
|
37
|
+
}),
|
|
38
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
39
|
+
children: "Cell 1"
|
|
40
|
+
}),
|
|
41
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
42
|
+
children: "Cell 2"
|
|
43
|
+
}),
|
|
44
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
45
|
+
children: "Cell 3"
|
|
46
|
+
})
|
|
47
|
+
]
|
|
48
|
+
}),
|
|
49
|
+
/*#__PURE__*/ _jsxs(TableRow, {
|
|
50
|
+
children: [
|
|
51
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
52
|
+
children: "Row 2"
|
|
53
|
+
}),
|
|
54
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
55
|
+
children: "Cell 1"
|
|
56
|
+
}),
|
|
57
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
58
|
+
children: "Cell 2"
|
|
59
|
+
}),
|
|
60
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
61
|
+
children: "Cell 3"
|
|
62
|
+
})
|
|
63
|
+
]
|
|
64
|
+
})
|
|
65
|
+
]
|
|
66
|
+
}),
|
|
67
|
+
/*#__PURE__*/ _jsx(TableFooter, {
|
|
68
|
+
children: /*#__PURE__*/ _jsxs(TableRow, {
|
|
69
|
+
children: [
|
|
70
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
71
|
+
children: "Footer"
|
|
72
|
+
}),
|
|
73
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
74
|
+
children: "Footer 1"
|
|
75
|
+
}),
|
|
76
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
77
|
+
children: "Footer 2"
|
|
78
|
+
}),
|
|
79
|
+
/*#__PURE__*/ _jsx(TableCell, {
|
|
80
|
+
children: "Footer 3"
|
|
81
|
+
})
|
|
82
|
+
]
|
|
83
|
+
})
|
|
84
|
+
})
|
|
85
|
+
]
|
|
86
|
+
});
|
|
87
|
+
}
|
|
11
88
|
};
|
|
12
|
-
//# sourceMappingURL=Table.stories.js.map
|
package/dist/tabs/Tabs.js
CHANGED
|
@@ -1,22 +1,211 @@
|
|
|
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
|
+
}
|
|
10
|
+
function _define_property(obj, key, value) {
|
|
11
|
+
if (key in obj) {
|
|
12
|
+
Object.defineProperty(obj, key, {
|
|
13
|
+
value: value,
|
|
14
|
+
enumerable: true,
|
|
15
|
+
configurable: true,
|
|
16
|
+
writable: true
|
|
17
|
+
});
|
|
18
|
+
} else {
|
|
19
|
+
obj[key] = value;
|
|
20
|
+
}
|
|
21
|
+
return obj;
|
|
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
|
+
}
|
|
53
|
+
function _object_spread(target) {
|
|
54
|
+
for(var i = 1; i < arguments.length; i++){
|
|
55
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
56
|
+
var ownKeys = Object.keys(source);
|
|
57
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
58
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
59
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
60
|
+
}));
|
|
61
|
+
}
|
|
62
|
+
ownKeys.forEach(function(key) {
|
|
63
|
+
_define_property(target, key, source[key]);
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
return target;
|
|
67
|
+
}
|
|
68
|
+
function ownKeys(object, enumerableOnly) {
|
|
69
|
+
var keys = Object.keys(object);
|
|
70
|
+
if (Object.getOwnPropertySymbols) {
|
|
71
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
72
|
+
if (enumerableOnly) {
|
|
73
|
+
symbols = symbols.filter(function(sym) {
|
|
74
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
keys.push.apply(keys, symbols);
|
|
78
|
+
}
|
|
79
|
+
return keys;
|
|
80
|
+
}
|
|
81
|
+
function _object_spread_props(target, source) {
|
|
82
|
+
source = source != null ? source : {};
|
|
83
|
+
if (Object.getOwnPropertyDescriptors) {
|
|
84
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
85
|
+
} else {
|
|
86
|
+
ownKeys(Object(source)).forEach(function(key) {
|
|
87
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
return target;
|
|
91
|
+
}
|
|
92
|
+
function _object_without_properties(source, excluded) {
|
|
93
|
+
if (source == null) return {};
|
|
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);
|
|
106
|
+
if (Object.getOwnPropertySymbols) {
|
|
107
|
+
sourceKeys = Object.getOwnPropertySymbols(source);
|
|
108
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
109
|
+
key = sourceKeys[i];
|
|
110
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
111
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
112
|
+
target[key] = source[key];
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
return target;
|
|
116
|
+
}
|
|
117
|
+
function _object_without_properties_loose(source, excluded) {
|
|
118
|
+
if (source == null) return {};
|
|
119
|
+
var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
|
|
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
|
+
function _sliced_to_array(arr, i) {
|
|
129
|
+
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
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
|
+
}
|
|
134
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
135
|
+
if (!o) return;
|
|
136
|
+
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
137
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
138
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
139
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
|
140
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
141
|
+
}
|
|
2
142
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
143
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
4
144
|
import * as React from 'react';
|
|
5
145
|
import HStack from '../hstack/HStack';
|
|
6
146
|
import { cn } from '../utils';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
147
|
+
var Tabs = function Tabs(_0) {
|
|
148
|
+
var defaultValue = _0.defaultValue, props = _object_without_properties(_0, [
|
|
149
|
+
"defaultValue"
|
|
150
|
+
]);
|
|
151
|
+
var _React_Children_toArray_find_props_children_, _React_Children_toArray_find_props_children, _React_Children_toArray_find_props, _React_Children_toArray_find;
|
|
152
|
+
var firstTabValue = (_React_Children_toArray_find = React.Children.toArray(props.children).find(function(child) {
|
|
153
|
+
var _child_type;
|
|
154
|
+
return(// @ts-expect-error
|
|
155
|
+
/*#__PURE__*/ React.isValidElement(child) && (child === null || child === void 0 ? void 0 : (_child_type = child.type) === null || _child_type === void 0 ? void 0 : _child_type.displayName) === 'TabsList');
|
|
156
|
+
})) === null || _React_Children_toArray_find === void 0 ? void 0 : (_React_Children_toArray_find_props = _React_Children_toArray_find.props) === null || _React_Children_toArray_find_props === void 0 ? void 0 : (_React_Children_toArray_find_props_children = _React_Children_toArray_find_props.children) === null || _React_Children_toArray_find_props_children === void 0 ? void 0 : (_React_Children_toArray_find_props_children_ = _React_Children_toArray_find_props_children[0]) === null || _React_Children_toArray_find_props_children_ === void 0 ? void 0 : _React_Children_toArray_find_props_children_.props.value;
|
|
157
|
+
return /*#__PURE__*/ _jsx(TabsPrimitive.Root, _object_spread({
|
|
158
|
+
defaultValue: defaultValue || firstTabValue
|
|
159
|
+
}, props));
|
|
12
160
|
};
|
|
13
|
-
|
|
161
|
+
var TabsList = /*#__PURE__*/ React.forwardRef(function(_0, _1) {
|
|
162
|
+
var _ref = [
|
|
163
|
+
_0,
|
|
164
|
+
_1
|
|
165
|
+
], _ref1 = _to_array(_ref), _ref2 = _ref1[0], _rest = _ref1.slice(1), className = _ref2.className, props = _object_without_properties(_ref2, [
|
|
166
|
+
"className"
|
|
167
|
+
]), _rest1 = _sliced_to_array(_rest, 1), ref = _rest1[0];
|
|
168
|
+
return /*#__PURE__*/ _jsx(TabsPrimitive.List, _object_spread({
|
|
169
|
+
ref: ref,
|
|
170
|
+
className: cn('inline-flex items-center w-full text-black text-[12px] border-b border-b-primary1', className)
|
|
171
|
+
}, props));
|
|
172
|
+
});
|
|
14
173
|
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
15
174
|
// name of tab list
|
|
16
|
-
|
|
175
|
+
var Tab = /*#__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), className = _ref2.className, icon = _ref2.icon, props = _object_without_properties(_ref2, [
|
|
180
|
+
"className",
|
|
181
|
+
"icon"
|
|
182
|
+
]), _rest1 = _sliced_to_array(_rest, 1), ref = _rest1[0];
|
|
183
|
+
return /*#__PURE__*/ _jsx(TabsPrimitive.Trigger, _object_spread_props(_object_spread({
|
|
184
|
+
ref: ref,
|
|
185
|
+
className: cn('inline-flex items-center uppercase tracking-wider h-[32px] px-[16px] font-normal whitespace-nowrap', 'border-b border-primary2 -mb-px', 'data-[state=active]:font-bold data-[state=active]:border-b-2 data-[state=active]:border-b-[#50c8e8]', className)
|
|
186
|
+
}, props), {
|
|
187
|
+
children: /*#__PURE__*/ _jsxs(HStack, {
|
|
188
|
+
className: 'gap-2',
|
|
189
|
+
children: [
|
|
190
|
+
icon,
|
|
191
|
+
props.children
|
|
192
|
+
]
|
|
193
|
+
})
|
|
194
|
+
}));
|
|
195
|
+
});
|
|
17
196
|
Tab.displayName = TabsPrimitive.Trigger.displayName;
|
|
18
197
|
// the content for each tab
|
|
19
|
-
|
|
198
|
+
var TabsContent = /*#__PURE__*/ React.forwardRef(function(_0, _1) {
|
|
199
|
+
var _ref = [
|
|
200
|
+
_0,
|
|
201
|
+
_1
|
|
202
|
+
], _ref1 = _to_array(_ref), _ref2 = _ref1[0], _rest = _ref1.slice(1), className = _ref2.className, props = _object_without_properties(_ref2, [
|
|
203
|
+
"className"
|
|
204
|
+
]), _rest1 = _sliced_to_array(_rest, 1), ref = _rest1[0];
|
|
205
|
+
return /*#__PURE__*/ _jsx(TabsPrimitive.Content, _object_spread({
|
|
206
|
+
ref: ref,
|
|
207
|
+
className: cn('mt-2 ring-offset-white focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-zinc-950 focus-visible:ring-offset-2 dark:ring-offset-zinc-950 dark:focus-visible:ring-zinc-300', className)
|
|
208
|
+
}, props));
|
|
209
|
+
});
|
|
20
210
|
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
21
211
|
export { Tab, Tabs, TabsContent, TabsList };
|
|
22
|
-
//# sourceMappingURL=Tabs.js.map
|
|
@@ -1,29 +1,62 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import IconSort from '../icons/IconSort.js';
|
|
3
3
|
import Input from '../input/Input.js';
|
|
4
4
|
import Stack from '../stack/Stack.js';
|
|
5
5
|
import Text from '../text/Text.js';
|
|
6
6
|
import { Tab, Tabs, TabsContent, TabsList } from './Tabs.js';
|
|
7
|
-
|
|
8
|
-
component: Tabs
|
|
7
|
+
var meta = {
|
|
8
|
+
component: Tabs
|
|
9
9
|
};
|
|
10
10
|
export default meta;
|
|
11
|
-
export
|
|
12
|
-
render: ()
|
|
13
|
-
return
|
|
14
|
-
|
|
11
|
+
export var TabsTest = {
|
|
12
|
+
render: function render() {
|
|
13
|
+
return /*#__PURE__*/ _jsxs(Tabs, {
|
|
14
|
+
children: [
|
|
15
|
+
/*#__PURE__*/ _jsx(TabsList, {
|
|
16
|
+
children: tabs.map(function(tab) {
|
|
17
|
+
return /*#__PURE__*/ _jsxs(Tab, {
|
|
18
|
+
value: tab.key,
|
|
19
|
+
children: [
|
|
20
|
+
tab.icon,
|
|
21
|
+
tab.label
|
|
22
|
+
]
|
|
23
|
+
}, tab.key);
|
|
24
|
+
})
|
|
25
|
+
}),
|
|
26
|
+
tabs.map(function(tab) {
|
|
27
|
+
return /*#__PURE__*/ _jsx(TabsContent, {
|
|
28
|
+
value: tab.key,
|
|
29
|
+
children: tab.content
|
|
30
|
+
}, tab.key);
|
|
31
|
+
})
|
|
32
|
+
]
|
|
33
|
+
});
|
|
34
|
+
}
|
|
15
35
|
};
|
|
16
|
-
|
|
36
|
+
var tabs = [
|
|
17
37
|
{
|
|
18
|
-
icon: _jsx(IconSort, {
|
|
38
|
+
icon: /*#__PURE__*/ _jsx(IconSort, {
|
|
39
|
+
size: 16
|
|
40
|
+
}),
|
|
19
41
|
key: 'tab1',
|
|
20
42
|
label: 'tab 1',
|
|
21
|
-
content:
|
|
43
|
+
content: /*#__PURE__*/ _jsxs(Stack, {
|
|
44
|
+
children: [
|
|
45
|
+
/*#__PURE__*/ _jsx(Text, {
|
|
46
|
+
children: "this is content of tab1"
|
|
47
|
+
}),
|
|
48
|
+
/*#__PURE__*/ _jsx(Input, {
|
|
49
|
+
htmlFor: "firstName",
|
|
50
|
+
label: "first name"
|
|
51
|
+
})
|
|
52
|
+
]
|
|
53
|
+
})
|
|
22
54
|
},
|
|
23
55
|
{
|
|
24
56
|
key: 'tab2',
|
|
25
57
|
label: 'tab 2',
|
|
26
|
-
content: _jsx(Text, {
|
|
27
|
-
|
|
58
|
+
content: /*#__PURE__*/ _jsx(Text, {
|
|
59
|
+
children: "this is tab 2 content"
|
|
60
|
+
})
|
|
61
|
+
}
|
|
28
62
|
];
|
|
29
|
-
//# sourceMappingURL=Tabs.stories.js.map
|
package/dist/text/Text.js
CHANGED
|
@@ -1,12 +1,158 @@
|
|
|
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 _define_property(obj, key, value) {
|
|
10
|
+
if (key in obj) {
|
|
11
|
+
Object.defineProperty(obj, key, {
|
|
12
|
+
value: value,
|
|
13
|
+
enumerable: true,
|
|
14
|
+
configurable: true,
|
|
15
|
+
writable: true
|
|
16
|
+
});
|
|
17
|
+
} else {
|
|
18
|
+
obj[key] = value;
|
|
19
|
+
}
|
|
20
|
+
return obj;
|
|
21
|
+
}
|
|
22
|
+
function _iterable_to_array(iter) {
|
|
23
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
24
|
+
}
|
|
25
|
+
function _iterable_to_array_limit(arr, i) {
|
|
26
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
27
|
+
if (_i == null) return;
|
|
28
|
+
var _arr = [];
|
|
29
|
+
var _n = true;
|
|
30
|
+
var _d = false;
|
|
31
|
+
var _s, _e;
|
|
32
|
+
try {
|
|
33
|
+
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
|
34
|
+
_arr.push(_s.value);
|
|
35
|
+
if (i && _arr.length === i) break;
|
|
36
|
+
}
|
|
37
|
+
} catch (err) {
|
|
38
|
+
_d = true;
|
|
39
|
+
_e = err;
|
|
40
|
+
} finally{
|
|
41
|
+
try {
|
|
42
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
43
|
+
} finally{
|
|
44
|
+
if (_d) throw _e;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return _arr;
|
|
48
|
+
}
|
|
49
|
+
function _non_iterable_rest() {
|
|
50
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
51
|
+
}
|
|
52
|
+
function _object_spread(target) {
|
|
53
|
+
for(var i = 1; i < arguments.length; i++){
|
|
54
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
55
|
+
var ownKeys = Object.keys(source);
|
|
56
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
57
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
58
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
59
|
+
}));
|
|
60
|
+
}
|
|
61
|
+
ownKeys.forEach(function(key) {
|
|
62
|
+
_define_property(target, key, source[key]);
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
return target;
|
|
66
|
+
}
|
|
67
|
+
function ownKeys(object, enumerableOnly) {
|
|
68
|
+
var keys = Object.keys(object);
|
|
69
|
+
if (Object.getOwnPropertySymbols) {
|
|
70
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
71
|
+
if (enumerableOnly) {
|
|
72
|
+
symbols = symbols.filter(function(sym) {
|
|
73
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
keys.push.apply(keys, symbols);
|
|
77
|
+
}
|
|
78
|
+
return keys;
|
|
79
|
+
}
|
|
80
|
+
function _object_spread_props(target, source) {
|
|
81
|
+
source = source != null ? source : {};
|
|
82
|
+
if (Object.getOwnPropertyDescriptors) {
|
|
83
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
84
|
+
} else {
|
|
85
|
+
ownKeys(Object(source)).forEach(function(key) {
|
|
86
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
return target;
|
|
90
|
+
}
|
|
91
|
+
function _object_without_properties(source, excluded) {
|
|
92
|
+
if (source == null) return {};
|
|
93
|
+
var target = {}, sourceKeys, key, i;
|
|
94
|
+
if (typeof Reflect !== "undefined" && Reflect.ownKeys) {
|
|
95
|
+
sourceKeys = Reflect.ownKeys(Object(source));
|
|
96
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
97
|
+
key = sourceKeys[i];
|
|
98
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
99
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
100
|
+
target[key] = source[key];
|
|
101
|
+
}
|
|
102
|
+
return target;
|
|
103
|
+
}
|
|
104
|
+
target = _object_without_properties_loose(source, excluded);
|
|
105
|
+
if (Object.getOwnPropertySymbols) {
|
|
106
|
+
sourceKeys = Object.getOwnPropertySymbols(source);
|
|
107
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
108
|
+
key = sourceKeys[i];
|
|
109
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
110
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
111
|
+
target[key] = source[key];
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
return target;
|
|
115
|
+
}
|
|
116
|
+
function _object_without_properties_loose(source, excluded) {
|
|
117
|
+
if (source == null) return {};
|
|
118
|
+
var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
|
|
119
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
120
|
+
key = sourceKeys[i];
|
|
121
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
122
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
123
|
+
target[key] = source[key];
|
|
124
|
+
}
|
|
125
|
+
return target;
|
|
126
|
+
}
|
|
127
|
+
function _sliced_to_array(arr, i) {
|
|
128
|
+
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
129
|
+
}
|
|
130
|
+
function _to_array(arr) {
|
|
131
|
+
return _array_with_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_rest();
|
|
132
|
+
}
|
|
133
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
134
|
+
if (!o) return;
|
|
135
|
+
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
136
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
137
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
138
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
|
139
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
140
|
+
}
|
|
1
141
|
import * as React from 'react';
|
|
2
142
|
import { cn } from '../utils.js';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
143
|
+
var Text = /*#__PURE__*/ React.forwardRef(function(_0, _1) {
|
|
144
|
+
var _ref = [
|
|
145
|
+
_0,
|
|
146
|
+
_1
|
|
147
|
+
], _ref1 = _to_array(_ref), _ref2 = _ref1[0], _rest = _ref1.slice(1), _ref_as = _ref2.as, as = _ref_as === void 0 ? 'p' : _ref_as, className = _ref2.className, children = _ref2.children, props = _object_without_properties(_ref2, [
|
|
148
|
+
"as",
|
|
149
|
+
"className",
|
|
150
|
+
"children"
|
|
151
|
+
]), _rest1 = _sliced_to_array(_rest, 1), ref = _rest1[0];
|
|
152
|
+
return /*#__PURE__*/ React.createElement(as, _object_spread_props(_object_spread({}, props), {
|
|
6
153
|
className: cn('text-base leading-[19.6px]', as === 'h3' && 'text-xl tracking-wide', as === 'h2' && 'text-2xl tracking-wider', className),
|
|
7
|
-
ref
|
|
8
|
-
}, children);
|
|
154
|
+
ref: ref
|
|
155
|
+
}), children);
|
|
9
156
|
});
|
|
10
157
|
Text.displayName = 'Text';
|
|
11
158
|
export default Text;
|
|
12
|
-
//# sourceMappingURL=Text.js.map
|
|
@@ -1,13 +1,50 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import Stack from '../stack/Stack.js';
|
|
3
3
|
import Text from './Text.js';
|
|
4
|
-
|
|
5
|
-
component: Text
|
|
4
|
+
var meta = {
|
|
5
|
+
component: Text
|
|
6
6
|
};
|
|
7
7
|
export default meta;
|
|
8
|
-
export
|
|
9
|
-
render: ()
|
|
10
|
-
return
|
|
11
|
-
|
|
8
|
+
export var FirstStory = {
|
|
9
|
+
render: function render() {
|
|
10
|
+
return /*#__PURE__*/ _jsxs(Stack, {
|
|
11
|
+
children: [
|
|
12
|
+
/*#__PURE__*/ _jsx(Text, {
|
|
13
|
+
as: 'h1',
|
|
14
|
+
className: "text-black text-5xl",
|
|
15
|
+
children: "This is heading 1"
|
|
16
|
+
}),
|
|
17
|
+
/*#__PURE__*/ _jsx(Text, {
|
|
18
|
+
as: 'h2',
|
|
19
|
+
className: "text-primary4 text-4xl",
|
|
20
|
+
children: "This is heading 2"
|
|
21
|
+
}),
|
|
22
|
+
/*#__PURE__*/ _jsx(Text, {
|
|
23
|
+
as: 'h3',
|
|
24
|
+
className: "text-primary3 text-3xl",
|
|
25
|
+
children: "This is heading 3"
|
|
26
|
+
}),
|
|
27
|
+
/*#__PURE__*/ _jsx(Text, {
|
|
28
|
+
as: 'h4',
|
|
29
|
+
className: "text-primary2 text-2xl",
|
|
30
|
+
children: "This is heading 4"
|
|
31
|
+
}),
|
|
32
|
+
/*#__PURE__*/ _jsx(Text, {
|
|
33
|
+
as: 'h5',
|
|
34
|
+
className: "text-primary1 text-xl",
|
|
35
|
+
children: "This is heading 5"
|
|
36
|
+
}),
|
|
37
|
+
/*#__PURE__*/ _jsx(Text, {
|
|
38
|
+
as: 'strong',
|
|
39
|
+
className: "text-bold",
|
|
40
|
+
children: "This is strong"
|
|
41
|
+
}),
|
|
42
|
+
/*#__PURE__*/ _jsx(Text, {
|
|
43
|
+
as: 'i',
|
|
44
|
+
className: "text-medium italic",
|
|
45
|
+
children: "This is italic"
|
|
46
|
+
})
|
|
47
|
+
]
|
|
48
|
+
});
|
|
49
|
+
}
|
|
12
50
|
};
|
|
13
|
-
//# sourceMappingURL=Text.stories.js.map
|