@asdp/ferryui 0.1.22-dev.8918 → 0.1.22-dev.8945
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/index.d.mts +20 -7
- package/dist/index.d.ts +20 -7
- package/dist/index.js +56 -39
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +56 -39
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1681,28 +1681,40 @@ var DEFAULT_LABELS6 = {
|
|
|
1681
1681
|
serviceAriaLabel: "Service"
|
|
1682
1682
|
}
|
|
1683
1683
|
};
|
|
1684
|
-
var ALIAS_MENU_ITEMS =
|
|
1685
|
-
|
|
1686
|
-
id:
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
},
|
|
1693
|
-
|
|
1694
|
-
id:
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
},
|
|
1701
|
-
|
|
1702
|
-
id:
|
|
1703
|
-
|
|
1684
|
+
var ALIAS_MENU_ITEMS = [
|
|
1685
|
+
{
|
|
1686
|
+
"id": 1,
|
|
1687
|
+
"name": "Ferizy",
|
|
1688
|
+
"description": "Layanan penyeberangan ferry ASDP",
|
|
1689
|
+
"imageUrl": "https://mock-api.tryztech.com/images?name=ferry.svg",
|
|
1690
|
+
"linkUrl": "https://ferizy.apps.devtix.swamedia.xyz",
|
|
1691
|
+
"sortOrder": 1
|
|
1692
|
+
},
|
|
1693
|
+
{
|
|
1694
|
+
"id": 4,
|
|
1695
|
+
"name": "Hotel",
|
|
1696
|
+
"description": "Layanan pemesanan hotel",
|
|
1697
|
+
"imageUrl": "https://mock-api.tryztech.com/images?name=hotel.svg",
|
|
1698
|
+
"linkUrl": "https://hotel.apps.devtix.swamedia.xyz",
|
|
1699
|
+
"sortOrder": 2
|
|
1700
|
+
},
|
|
1701
|
+
{
|
|
1702
|
+
"id": 5,
|
|
1703
|
+
"name": "Travel",
|
|
1704
|
+
"description": "Layanan pemesanan travel",
|
|
1705
|
+
"imageUrl": "https://mock-api.tryztech.com/images?name=small-bus.webp",
|
|
1706
|
+
"linkUrl": "https://travel.apps.devtix.swamedia.xyz",
|
|
1707
|
+
"sortOrder": 3
|
|
1708
|
+
},
|
|
1709
|
+
{
|
|
1710
|
+
"id": 6,
|
|
1711
|
+
"name": "Food",
|
|
1712
|
+
"description": "Layanan pemesanan makanan",
|
|
1713
|
+
"imageUrl": "https://mock-api.tryztech.com/images?name=food.png",
|
|
1714
|
+
"linkUrl": "https://food.apps.devtix.swamedia.xyz",
|
|
1715
|
+
"sortOrder": 4
|
|
1704
1716
|
}
|
|
1705
|
-
|
|
1717
|
+
];
|
|
1706
1718
|
var useStyles6 = makeStyles({
|
|
1707
1719
|
card: {
|
|
1708
1720
|
width: "100%",
|
|
@@ -1796,37 +1808,33 @@ var useStyles6 = makeStyles({
|
|
|
1796
1808
|
}
|
|
1797
1809
|
});
|
|
1798
1810
|
var CardServiceMenu = ({
|
|
1799
|
-
activeServiceId =
|
|
1811
|
+
activeServiceId = 1,
|
|
1800
1812
|
language = "id",
|
|
1801
1813
|
onServiceClick,
|
|
1802
1814
|
showDescriptions = true,
|
|
1803
1815
|
className,
|
|
1804
|
-
labels
|
|
1816
|
+
labels,
|
|
1817
|
+
menuItems = ALIAS_MENU_ITEMS
|
|
1805
1818
|
}) => {
|
|
1806
1819
|
const styles = useStyles6();
|
|
1807
|
-
|
|
1820
|
+
({ ...DEFAULT_LABELS6[language], ...labels });
|
|
1808
1821
|
const getMenuItemClass = (serviceId) => {
|
|
1809
1822
|
const isActive = activeServiceId === serviceId;
|
|
1810
1823
|
return mergeClasses(styles.menuItem, isActive && styles.menuItemActive);
|
|
1811
1824
|
};
|
|
1812
|
-
const menuItems = Object.values(ALIAS_MENU_ITEMS);
|
|
1813
1825
|
return /* @__PURE__ */ jsx(Card, { className: mergeClasses(styles.card, className), children: /* @__PURE__ */ jsx("div", { className: styles.menuList, children: menuItems.map((item, index) => {
|
|
1814
|
-
const labelKey = `${item.id}Label`;
|
|
1815
|
-
const descriptionKey = `${item.id}Description`;
|
|
1816
|
-
const label = mergedLabels[labelKey];
|
|
1817
|
-
const description = mergedLabels[descriptionKey];
|
|
1818
1826
|
return /* @__PURE__ */ jsxs(React5.Fragment, { children: [
|
|
1819
1827
|
/* @__PURE__ */ jsxs(
|
|
1820
1828
|
Button,
|
|
1821
1829
|
{
|
|
1822
1830
|
className: getMenuItemClass(item.id),
|
|
1823
1831
|
onClick: () => onServiceClick?.(item.id),
|
|
1824
|
-
"aria-label":
|
|
1832
|
+
"aria-label": item.name,
|
|
1825
1833
|
children: [
|
|
1826
|
-
/* @__PURE__ */ jsx("img", { src: item.
|
|
1834
|
+
/* @__PURE__ */ jsx("img", { src: item.imageUrl, alt: item.name, className: styles.logo }),
|
|
1827
1835
|
/* @__PURE__ */ jsxs("div", { className: styles.textContent, children: [
|
|
1828
|
-
/* @__PURE__ */ jsx("span", { className: styles.label, children:
|
|
1829
|
-
showDescriptions && /* @__PURE__ */ jsx("span", { className: styles.description, children: description })
|
|
1836
|
+
/* @__PURE__ */ jsx("span", { className: styles.label, children: item.name }),
|
|
1837
|
+
showDescriptions && /* @__PURE__ */ jsx("span", { className: styles.description, children: item.description })
|
|
1830
1838
|
] })
|
|
1831
1839
|
]
|
|
1832
1840
|
}
|
|
@@ -3474,13 +3482,14 @@ var CardTicketSearch = ({
|
|
|
3474
3482
|
onSwitchClick,
|
|
3475
3483
|
onRoundTripChange,
|
|
3476
3484
|
onSubmit,
|
|
3477
|
-
activeServiceId =
|
|
3485
|
+
activeServiceId = 1,
|
|
3478
3486
|
labels: customLabels,
|
|
3479
3487
|
className,
|
|
3480
3488
|
isRotating = false,
|
|
3481
3489
|
showPassengerField = false,
|
|
3482
3490
|
showRoundTrip = true,
|
|
3483
|
-
onServiceClick
|
|
3491
|
+
onServiceClick,
|
|
3492
|
+
menuItems
|
|
3484
3493
|
}) => {
|
|
3485
3494
|
const styles = useStyles8();
|
|
3486
3495
|
const labels = React5.useMemo(
|
|
@@ -3574,7 +3583,8 @@ var CardTicketSearch = ({
|
|
|
3574
3583
|
className: styles.serviceMenuCard,
|
|
3575
3584
|
activeServiceId,
|
|
3576
3585
|
language,
|
|
3577
|
-
onServiceClick
|
|
3586
|
+
onServiceClick,
|
|
3587
|
+
menuItems
|
|
3578
3588
|
}
|
|
3579
3589
|
)
|
|
3580
3590
|
}
|
|
@@ -12801,9 +12811,12 @@ var FileUpload = React5.forwardRef(
|
|
|
12801
12811
|
action: /* @__PURE__ */ jsx(DialogTrigger, { action: "close", children: /* @__PURE__ */ jsx(
|
|
12802
12812
|
Button,
|
|
12803
12813
|
{
|
|
12804
|
-
appearance: "subtle",
|
|
12805
12814
|
"aria-label": "close",
|
|
12806
|
-
icon: /* @__PURE__ */ jsx(Dismiss24Regular, {})
|
|
12815
|
+
icon: /* @__PURE__ */ jsx(Dismiss24Regular, {}),
|
|
12816
|
+
style: {
|
|
12817
|
+
backgroundColor: tokens.colorNeutralForeground2,
|
|
12818
|
+
color: tokens.colorNeutralBackground1
|
|
12819
|
+
}
|
|
12807
12820
|
}
|
|
12808
12821
|
) })
|
|
12809
12822
|
}
|
|
@@ -13046,7 +13059,11 @@ var FileUpload = React5.forwardRef(
|
|
|
13046
13059
|
{
|
|
13047
13060
|
appearance: "subtle",
|
|
13048
13061
|
"aria-label": "close",
|
|
13049
|
-
icon: /* @__PURE__ */ jsx(Dismiss24Regular, {})
|
|
13062
|
+
icon: /* @__PURE__ */ jsx(Dismiss24Regular, {}),
|
|
13063
|
+
style: {
|
|
13064
|
+
backgroundColor: tokens.colorNeutralForeground2,
|
|
13065
|
+
color: tokens.colorNeutralBackground1
|
|
13066
|
+
}
|
|
13050
13067
|
}
|
|
13051
13068
|
) })
|
|
13052
13069
|
}
|