@sumup-oss/icons 7.0.0-next.3 → 7.0.0
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/README.md +9 -13
- package/dist/AccountDetails.js +71 -0
- package/dist/Active.js +1 -1
- package/dist/AddItemsFilled.js +65 -0
- package/dist/Alert.js +6 -6
- package/dist/AndroidTerminal.js +73 -0
- package/dist/ArrowDown.js +17 -2
- package/dist/ArrowUp.js +17 -2
- package/dist/AutomaticPix.js +80 -0
- package/dist/BackOnline.js +86 -0
- package/dist/Bank.js +17 -2
- package/dist/Battery.js +3 -3
- package/dist/BatteryAlert.js +1 -1
- package/dist/BatteryCharging.js +80 -0
- package/dist/BluetoothConnecting.js +66 -0
- package/dist/BluetoothOff.js +65 -0
- package/dist/CafeRestaurant.js +65 -0
- package/dist/CalendarCoins.js +65 -0
- package/dist/CardUnknown.js +7 -41
- package/dist/CashDrawer.js +1 -1
- package/dist/Celery.js +65 -0
- package/dist/CheckoutAmount.js +65 -0
- package/dist/CheckoutAmountFilled.js +66 -0
- package/dist/CheckoutSettings.js +65 -0
- package/dist/Confirm.js +6 -6
- package/dist/Contractor.js +1 -1
- package/dist/Controls.js +19 -4
- package/dist/ControlsCustom.js +65 -0
- package/dist/CopyPaste.js +1 -3
- package/dist/CroppingHorizontal.js +66 -0
- package/dist/CroppingSquare.js +65 -0
- package/dist/CroppingVertical.js +65 -0
- package/dist/Crustaceans.js +65 -0
- package/dist/CustomerFacingDisplay.js +66 -0
- package/dist/Customise.js +1 -1
- package/dist/CustomiseFilled.js +65 -0
- package/dist/Cvv.js +71 -0
- package/dist/DayView.js +29 -2
- package/dist/Diamond.js +65 -0
- package/dist/DirectDebit.js +18 -6
- package/dist/DisableNfc.js +65 -0
- package/dist/Drag.js +8 -30
- package/dist/Eggs.js +65 -0
- package/dist/Employees.js +17 -2
- package/dist/Export.js +65 -0
- package/dist/Fish.js +65 -0
- package/dist/FloorPlan.js +65 -0
- package/dist/FloorPlanFilled.js +65 -0
- package/dist/Gauge.js +1 -1
- package/dist/GiftCards.js +1 -1
- package/dist/Gluten.js +65 -0
- package/dist/Headset.js +65 -0
- package/dist/Help.js +6 -6
- package/dist/History.js +1 -1
- package/dist/HomeFilled.js +6 -12
- package/dist/Hotel.js +65 -0
- package/dist/Import.js +65 -0
- package/dist/InterestOnBalance.js +17 -2
- package/dist/Invoice.js +1 -1
- package/dist/InvoiceFilled.js +1 -1
- package/dist/Legal.js +17 -2
- package/dist/LiveChat.js +1 -1
- package/dist/Location.js +1 -1
- package/dist/LoyaltyAdd.js +65 -0
- package/dist/LoyaltyLoggedIn.js +65 -0
- package/dist/Lupin.js +65 -0
- package/dist/MailFilled.js +65 -0
- package/dist/Milk.js +65 -0
- package/dist/Minus.js +1 -1
- package/dist/Molluscs.js +65 -0
- package/dist/MonthView.js +19 -2
- package/dist/More.js +3 -3
- package/dist/Move.js +2 -2
- package/dist/Mustard.js +65 -0
- package/dist/Notify.js +6 -6
- package/dist/Nuts.js +65 -0
- package/dist/Offline.js +88 -0
- package/dist/OnlineIntegrations.js +72 -0
- package/dist/Ordering.js +65 -0
- package/dist/Orders.js +1 -1
- package/dist/OrdersFilled.js +65 -0
- package/dist/Passkey.js +1 -1
- package/dist/Payouts.js +16 -6
- package/dist/Peanuts.js +65 -0
- package/dist/Percentage.js +8 -22
- package/dist/Pix.js +3 -61
- package/dist/Placeholder.js +80 -0
- package/dist/Play.js +1 -1
- package/dist/PowerOff.js +65 -0
- package/dist/Profile.js +1 -1
- package/dist/ReceiptUnreviewed.js +1 -1
- package/dist/RecurringTransfer.js +65 -0
- package/dist/Refunded.js +6 -6
- package/dist/Reports.js +1 -1
- package/dist/RequestHistory.js +80 -0
- package/dist/Restart.js +65 -0
- package/dist/ScamCall.js +65 -0
- package/dist/Send.js +1 -1
- package/dist/Sesame.js +65 -0
- package/dist/SignalFull.js +65 -0
- package/dist/SignalHigh.js +65 -0
- package/dist/SignalLow.js +65 -0
- package/dist/SignalMedium.js +65 -0
- package/dist/SignalNoSignal.js +65 -0
- package/dist/Sort.js +1 -1
- package/dist/Soy.js +65 -0
- package/dist/SubscriptionPlans.js +67 -0
- package/dist/Sulphites.js +65 -0
- package/dist/SumUpCard.js +17 -2
- package/dist/SumUpConnect.js +1 -1
- package/dist/SumUpPay.js +65 -0
- package/dist/SwitchAccount.js +80 -0
- package/dist/ThumbUp.js +1 -1
- package/dist/TillManagement.js +80 -0
- package/dist/Tipping.js +17 -2
- package/dist/TrackingNumber.js +65 -0
- package/dist/TrustedCompany.js +1 -1
- package/dist/TrustedIndividual.js +65 -0
- package/dist/Unfreeze.js +71 -0
- package/dist/Unlink.js +65 -0
- package/dist/Unsplash.js +1 -1
- package/dist/Video.js +65 -0
- package/dist/View.js +3 -3
- package/dist/WeekView.js +19 -2
- package/dist/Wifi.js +3 -3
- package/dist/WifiHigh.js +72 -0
- package/dist/WifiLow.js +72 -0
- package/dist/WifiMedium.js +72 -0
- package/dist/WifiNoIp.js +67 -0
- package/dist/WifiNoSignal.js +82 -0
- package/dist/components/CardScheme/CardScheme.d.ts +61 -0
- package/dist/components/CardScheme/CardScheme.js +30 -0
- package/dist/components/CardScheme/constants.d.ts +6 -0
- package/dist/components/CardScheme/constants.js +44 -0
- package/dist/components/Flag/Flag.d.ts +66 -0
- package/dist/components/Flag/Flag.js +64 -0
- package/dist/components/Flag/constants.d.ts +6 -0
- package/dist/components/Flag/constants.js +265 -0
- package/dist/components/PaymentMethod/PaymentMethod.d.ts +61 -0
- package/dist/components/PaymentMethod/PaymentMethod.js +23 -0
- package/dist/components/PaymentMethod/constants.d.ts +6 -0
- package/dist/components/PaymentMethod/constants.js +58 -0
- package/dist/helpers.d.ts +15 -0
- package/dist/icon-sizes.d.ts +15 -0
- package/dist/icon-sizes.js +19 -0
- package/dist/index.d.ts +407 -25
- package/dist/index.js +77 -0
- package/dist/logger.d.ts +19 -0
- package/dist/logger.js +27 -0
- package/manifest.json +478 -2
- package/package.json +13 -5
- package/web/v2/account_details_24.svg +4 -0
- package/web/v2/active_24.svg +1 -1
- package/web/v2/add_items_filled_24.svg +3 -0
- package/web/v2/alert_16.svg +2 -2
- package/web/v2/alert_24.svg +2 -2
- package/web/v2/android_terminal_24.svg +4 -0
- package/web/v2/arrow_down_16.svg +3 -0
- package/web/v2/arrow_up_16.svg +3 -0
- package/web/v2/automatic_pix_16.svg +3 -0
- package/web/v2/automatic_pix_24.svg +3 -0
- package/web/v2/back_online_16.svg +4 -0
- package/web/v2/back_online_24.svg +3 -0
- package/web/v2/bank_16.svg +3 -0
- package/web/v2/battery_16.svg +2 -2
- package/web/v2/battery_alert_16.svg +1 -1
- package/web/v2/battery_charging_16.svg +3 -0
- package/web/v2/battery_charging_24.svg +3 -0
- package/web/v2/bluetooth_connecting_24.svg +3 -0
- package/web/v2/bluetooth_off_24.svg +3 -0
- package/web/v2/cafe_restaurant_24.svg +3 -0
- package/web/v2/calendar_coins_24.svg +3 -0
- package/web/v2/card_unknown_24.svg +1 -2
- package/web/v2/cash_drawer_24.svg +2 -1
- package/web/v2/celery_24.svg +3 -0
- package/web/v2/checkout_amount_24.svg +3 -0
- package/web/v2/checkout_amount_filled_24.svg +3 -0
- package/web/v2/checkout_settings_24.svg +3 -0
- package/web/v2/confirm_16.svg +2 -2
- package/web/v2/confirm_24.svg +2 -2
- package/web/v2/contractor_16.svg +1 -1
- package/web/v2/controls_24.svg +3 -0
- package/web/v2/controls_custom_24.svg +3 -0
- package/web/v2/copy_paste_24.svg +1 -1
- package/web/v2/cropping_horizontal_24.svg +3 -0
- package/web/v2/cropping_square_24.svg +3 -0
- package/web/v2/cropping_vertical_24.svg +3 -0
- package/web/v2/crustaceans_24.svg +3 -0
- package/web/v2/customer_facing_display_24.svg +3 -0
- package/web/v2/customise_24.svg +1 -1
- package/web/v2/customise_filled_24.svg +3 -0
- package/web/v2/cvv_24.svg +4 -0
- package/web/v2/day_view_16.svg +5 -0
- package/web/v2/diamond_24.svg +3 -0
- package/web/v2/direct_debit_24.svg +3 -1
- package/web/v2/disable_nfc_24.svg +3 -0
- package/web/v2/drag_24.svg +2 -7
- package/web/v2/eggs_24.svg +3 -0
- package/web/v2/employees_16.svg +3 -0
- package/web/v2/export_24.svg +3 -0
- package/web/v2/fish_24.svg +3 -0
- package/web/v2/flag_rs_480.svg +187 -287
- package/web/v2/floor_plan_24.svg +3 -0
- package/web/v2/floor_plan_filled_24.svg +3 -0
- package/web/v2/gauge_24.svg +2 -1
- package/web/v2/gift_cards_24.svg +1 -1
- package/web/v2/gluten_24.svg +4 -0
- package/web/v2/headset_24.svg +3 -0
- package/web/v2/help_16.svg +2 -2
- package/web/v2/help_24.svg +2 -2
- package/web/v2/history_24.svg +1 -1
- package/web/v2/home_filled_24.svg +1 -2
- package/web/v2/hotel_24.svg +3 -0
- package/web/v2/import_24.svg +3 -0
- package/web/v2/interest_on_balance_16.svg +3 -0
- package/web/v2/invoice_24.svg +1 -1
- package/web/v2/invoice_filled_24.svg +2 -1
- package/web/v2/legal_16.svg +3 -0
- package/web/v2/live_chat_24.svg +1 -1
- package/web/v2/location_16.svg +1 -1
- package/web/v2/loyalty_add_24.svg +3 -0
- package/web/v2/loyalty_logged_in_24.svg +3 -0
- package/web/v2/lupin_24.svg +3 -0
- package/web/v2/mail_filled_24.svg +3 -0
- package/web/v2/milk_24.svg +3 -0
- package/web/v2/minus_24.svg +1 -1
- package/web/v2/molluscs_24.svg +3 -0
- package/web/v2/month_view_16.svg +3 -0
- package/web/v2/more_24.svg +2 -2
- package/web/v2/move_16.svg +1 -1
- package/web/v2/move_24.svg +1 -1
- package/web/v2/mustard_24.svg +3 -0
- package/web/v2/notify_16.svg +2 -2
- package/web/v2/notify_24.svg +2 -2
- package/web/v2/nuts_24.svg +3 -0
- package/web/v2/offline_16.svg +4 -0
- package/web/v2/offline_24.svg +3 -0
- package/web/v2/online_integrations_24.svg +4 -0
- package/web/v2/ordering_24.svg +3 -0
- package/web/v2/orders_24.svg +1 -1
- package/web/v2/orders_filled_24.svg +3 -0
- package/web/v2/passkey_24.svg +3 -1
- package/web/v2/payouts_24.svg +3 -1
- package/web/v2/peanuts_24.svg +3 -0
- package/web/v2/percentage_16.svg +2 -10
- package/web/v2/pix_24.svg +1 -1
- package/web/v2/placeholder_16.svg +3 -0
- package/web/v2/placeholder_24.svg +3 -0
- package/web/v2/play_16.svg +1 -1
- package/web/v2/power_off_24.svg +3 -0
- package/web/v2/profile_16.svg +1 -1
- package/web/v2/receipt_unreviewed_24.svg +1 -1
- package/web/v2/recurring_transfer_24.svg +3 -0
- package/web/v2/refunded_16.svg +2 -2
- package/web/v2/refunded_24.svg +2 -2
- package/web/v2/reports_24.svg +1 -1
- package/web/v2/request_history_16.svg +3 -0
- package/web/v2/request_history_24.svg +3 -0
- package/web/v2/restart_24.svg +3 -0
- package/web/v2/scam_call_24.svg +3 -0
- package/web/v2/send_24.svg +1 -1
- package/web/v2/sesame_24.svg +3 -0
- package/web/v2/signal_full_24.svg +3 -0
- package/web/v2/signal_high_24.svg +3 -0
- package/web/v2/signal_low_24.svg +3 -0
- package/web/v2/signal_medium_24.svg +3 -0
- package/web/v2/signal_no_signal_24.svg +3 -0
- package/web/v2/sort_16.svg +1 -1
- package/web/v2/soy_24.svg +3 -0
- package/web/v2/split_24.svg +1 -1
- package/web/v2/subscription_plans_24.svg +3 -0
- package/web/v2/sulphites_24.svg +3 -0
- package/web/v2/sum_up_card_16.svg +3 -0
- package/web/v2/sum_up_connect_24.svg +1 -1
- package/web/v2/sum_up_pay_24.svg +3 -0
- package/web/v2/switch_account_16.svg +3 -0
- package/web/v2/switch_account_24.svg +3 -0
- package/web/v2/thumb_up_24.svg +1 -1
- package/web/v2/till_management_16.svg +3 -0
- package/web/v2/till_management_24.svg +3 -0
- package/web/v2/tipping_16.svg +3 -0
- package/web/v2/tracking_number_24.svg +3 -0
- package/web/v2/trusted_company_24.svg +3 -1
- package/web/v2/trusted_individual_24.svg +3 -0
- package/web/v2/unfreeze_24.svg +4 -0
- package/web/v2/unlink_24.svg +3 -0
- package/web/v2/unlock_24.svg +3 -1
- package/web/v2/unsplash_24.svg +2 -1
- package/web/v2/video_24.svg +3 -0
- package/web/v2/view_16.svg +2 -2
- package/web/v2/week_view_16.svg +3 -0
- package/web/v2/wifi_24.svg +2 -2
- package/web/v2/wifi_high_24.svg +4 -0
- package/web/v2/wifi_low_24.svg +4 -0
- package/web/v2/wifi_medium_24.svg +4 -0
- package/web/v2/wifi_no_ip_24.svg +3 -0
- package/web/v2/wifi_no_signal_24.svg +6 -0
package/dist/WifiLow.js
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
const _excluded = ["size"];
|
|
2
|
+
function _objectWithoutProperties(e, t) {
|
|
3
|
+
if (null == e) return {};
|
|
4
|
+
var o,
|
|
5
|
+
r,
|
|
6
|
+
i = _objectWithoutPropertiesLoose(e, t);
|
|
7
|
+
if (Object.getOwnPropertySymbols) {
|
|
8
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
9
|
+
for (r = 0; r < n.length; r++)
|
|
10
|
+
(o = n[r]),
|
|
11
|
+
-1 === t.indexOf(o) &&
|
|
12
|
+
{}.propertyIsEnumerable.call(e, o) &&
|
|
13
|
+
(i[o] = e[o]);
|
|
14
|
+
}
|
|
15
|
+
return i;
|
|
16
|
+
}
|
|
17
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
|
18
|
+
if (null == r) return {};
|
|
19
|
+
var t = {};
|
|
20
|
+
for (var n in r)
|
|
21
|
+
if ({}.hasOwnProperty.call(r, n)) {
|
|
22
|
+
if (-1 !== e.indexOf(n)) continue;
|
|
23
|
+
t[n] = r[n];
|
|
24
|
+
}
|
|
25
|
+
return t;
|
|
26
|
+
}
|
|
27
|
+
import React from "react";
|
|
28
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
29
|
+
var WifiLow24 = function WifiLow24(props) {
|
|
30
|
+
return /*#__PURE__*/ _jsxs("svg", {
|
|
31
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
32
|
+
width: "24",
|
|
33
|
+
height: "24",
|
|
34
|
+
fill: "none",
|
|
35
|
+
viewBox: "0 0 24 24",
|
|
36
|
+
...props,
|
|
37
|
+
children: [
|
|
38
|
+
/*#__PURE__*/ _jsx("path", {
|
|
39
|
+
fill: "currentColor",
|
|
40
|
+
fillOpacity: ".5",
|
|
41
|
+
d: "M2.014 10.227a1 1 0 0 1-.717-.3 1.025 1.025 0 0 1 0-1.443 15.14 15.14 0 0 1 21.4-.11 1.026 1.026 0 0 1-.311 1.667 1.01 1.01 0 0 1-1.105-.205 13.12 13.12 0 0 0-18.544.095 1 1 0 0 1-.723.296m17.923 2.588a1.026 1.026 0 0 0 0-1.444 11.1 11.1 0 0 0-15.697-.072l-.075.077a1.026 1.026 0 0 0 0 1.444 1.01 1.01 0 0 0 1.427.005l.006-.005a9.086 9.086 0 0 1 12.849-.059l.057.059a1.01 1.01 0 0 0 1.426.006zM17.069 15.7a1.024 1.024 0 0 0 0-1.442 7.063 7.063 0 0 0-9.989-.05l-.048.05a1.024 1.024 0 0 0 .326 1.662 1.01 1.01 0 0 0 1.101-.213l.007-.008a5.046 5.046 0 0 1 7.135-.034l.034.035a1.01 1.01 0 0 0 1.427.007zm-5.07 1.3a1.5 1.5 0 1 0 .008 0z",
|
|
42
|
+
}),
|
|
43
|
+
/*#__PURE__*/ _jsx("path", {
|
|
44
|
+
fill: "currentColor",
|
|
45
|
+
d: "M12 17a1.5 1.5 0 1 0 .007 0z",
|
|
46
|
+
}),
|
|
47
|
+
],
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
const WifiLowSizeMap = {
|
|
51
|
+
24: WifiLow24,
|
|
52
|
+
};
|
|
53
|
+
export function WifiLow(_ref) {
|
|
54
|
+
let _ref$size = _ref.size,
|
|
55
|
+
size = _ref$size === void 0 ? "24" : _ref$size,
|
|
56
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
57
|
+
const Icon = WifiLowSizeMap[size] || WifiLowSizeMap["24"];
|
|
58
|
+
if (
|
|
59
|
+
process.env.NODE_ENV !== "production" &&
|
|
60
|
+
process.env.NODE_ENV !== "test" &&
|
|
61
|
+
!WifiLowSizeMap[size]
|
|
62
|
+
) {
|
|
63
|
+
console.warn(
|
|
64
|
+
new Error(
|
|
65
|
+
`The '${size}' size is not supported by the 'WifiLow' icon. Please use one of the available sizes: '24'.`,
|
|
66
|
+
),
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
return /*#__PURE__*/ _jsx(Icon, {
|
|
70
|
+
...props,
|
|
71
|
+
});
|
|
72
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
const _excluded = ["size"];
|
|
2
|
+
function _objectWithoutProperties(e, t) {
|
|
3
|
+
if (null == e) return {};
|
|
4
|
+
var o,
|
|
5
|
+
r,
|
|
6
|
+
i = _objectWithoutPropertiesLoose(e, t);
|
|
7
|
+
if (Object.getOwnPropertySymbols) {
|
|
8
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
9
|
+
for (r = 0; r < n.length; r++)
|
|
10
|
+
(o = n[r]),
|
|
11
|
+
-1 === t.indexOf(o) &&
|
|
12
|
+
{}.propertyIsEnumerable.call(e, o) &&
|
|
13
|
+
(i[o] = e[o]);
|
|
14
|
+
}
|
|
15
|
+
return i;
|
|
16
|
+
}
|
|
17
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
|
18
|
+
if (null == r) return {};
|
|
19
|
+
var t = {};
|
|
20
|
+
for (var n in r)
|
|
21
|
+
if ({}.hasOwnProperty.call(r, n)) {
|
|
22
|
+
if (-1 !== e.indexOf(n)) continue;
|
|
23
|
+
t[n] = r[n];
|
|
24
|
+
}
|
|
25
|
+
return t;
|
|
26
|
+
}
|
|
27
|
+
import React from "react";
|
|
28
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
29
|
+
var WifiMedium24 = function WifiMedium24(props) {
|
|
30
|
+
return /*#__PURE__*/ _jsxs("svg", {
|
|
31
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
32
|
+
width: "24",
|
|
33
|
+
height: "24",
|
|
34
|
+
fill: "none",
|
|
35
|
+
viewBox: "0 0 24 24",
|
|
36
|
+
...props,
|
|
37
|
+
children: [
|
|
38
|
+
/*#__PURE__*/ _jsx("path", {
|
|
39
|
+
fill: "currentColor",
|
|
40
|
+
fillOpacity: ".5",
|
|
41
|
+
d: "M2.014 10.227a1 1 0 0 1-.717-.3 1.025 1.025 0 0 1 0-1.443 15.14 15.14 0 0 1 21.4-.11 1.026 1.026 0 0 1-.311 1.667 1.01 1.01 0 0 1-1.105-.205 13.12 13.12 0 0 0-18.544.095 1 1 0 0 1-.723.296m17.923 2.588a1.026 1.026 0 0 0 0-1.444 11.1 11.1 0 0 0-15.697-.072l-.075.077a1.026 1.026 0 0 0 0 1.444 1.01 1.01 0 0 0 1.427.005l.006-.005a9.086 9.086 0 0 1 12.849-.059l.057.059a1.01 1.01 0 0 0 1.426.006zM17.069 15.7a1.024 1.024 0 0 0 0-1.442 7.063 7.063 0 0 0-9.989-.05l-.048.05a1.024 1.024 0 0 0 .326 1.662 1.01 1.01 0 0 0 1.101-.213l.007-.008a5.046 5.046 0 0 1 7.135-.034l.034.035a1.01 1.01 0 0 0 1.427.007zm-5.07 1.3a1.5 1.5 0 1 0 .008 0z",
|
|
42
|
+
}),
|
|
43
|
+
/*#__PURE__*/ _jsx("path", {
|
|
44
|
+
fill: "currentColor",
|
|
45
|
+
d: "M17.069 15.7a1.024 1.024 0 0 0 0-1.442 7.06 7.06 0 0 0-9.989-.049l-.048.05a1.024 1.024 0 0 0 .326 1.662 1.01 1.01 0 0 0 1.101-.214l.007-.007a5.046 5.046 0 0 1 7.135-.034l.034.034a1.01 1.01 0 0 0 1.427.007zM12 17a1.5 1.5 0 1 0 .007 0z",
|
|
46
|
+
}),
|
|
47
|
+
],
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
const WifiMediumSizeMap = {
|
|
51
|
+
24: WifiMedium24,
|
|
52
|
+
};
|
|
53
|
+
export function WifiMedium(_ref) {
|
|
54
|
+
let _ref$size = _ref.size,
|
|
55
|
+
size = _ref$size === void 0 ? "24" : _ref$size,
|
|
56
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
57
|
+
const Icon = WifiMediumSizeMap[size] || WifiMediumSizeMap["24"];
|
|
58
|
+
if (
|
|
59
|
+
process.env.NODE_ENV !== "production" &&
|
|
60
|
+
process.env.NODE_ENV !== "test" &&
|
|
61
|
+
!WifiMediumSizeMap[size]
|
|
62
|
+
) {
|
|
63
|
+
console.warn(
|
|
64
|
+
new Error(
|
|
65
|
+
`The '${size}' size is not supported by the 'WifiMedium' icon. Please use one of the available sizes: '24'.`,
|
|
66
|
+
),
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
return /*#__PURE__*/ _jsx(Icon, {
|
|
70
|
+
...props,
|
|
71
|
+
});
|
|
72
|
+
}
|
package/dist/WifiNoIp.js
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
const _excluded = ["size"];
|
|
2
|
+
function _objectWithoutProperties(e, t) {
|
|
3
|
+
if (null == e) return {};
|
|
4
|
+
var o,
|
|
5
|
+
r,
|
|
6
|
+
i = _objectWithoutPropertiesLoose(e, t);
|
|
7
|
+
if (Object.getOwnPropertySymbols) {
|
|
8
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
9
|
+
for (r = 0; r < n.length; r++)
|
|
10
|
+
(o = n[r]),
|
|
11
|
+
-1 === t.indexOf(o) &&
|
|
12
|
+
{}.propertyIsEnumerable.call(e, o) &&
|
|
13
|
+
(i[o] = e[o]);
|
|
14
|
+
}
|
|
15
|
+
return i;
|
|
16
|
+
}
|
|
17
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
|
18
|
+
if (null == r) return {};
|
|
19
|
+
var t = {};
|
|
20
|
+
for (var n in r)
|
|
21
|
+
if ({}.hasOwnProperty.call(r, n)) {
|
|
22
|
+
if (-1 !== e.indexOf(n)) continue;
|
|
23
|
+
t[n] = r[n];
|
|
24
|
+
}
|
|
25
|
+
return t;
|
|
26
|
+
}
|
|
27
|
+
import React from "react";
|
|
28
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
29
|
+
var WifiNoIp24 = function WifiNoIp24(props) {
|
|
30
|
+
return /*#__PURE__*/ _jsx("svg", {
|
|
31
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
32
|
+
width: "24",
|
|
33
|
+
height: "24",
|
|
34
|
+
fill: "none",
|
|
35
|
+
viewBox: "0 0 24 24",
|
|
36
|
+
...props,
|
|
37
|
+
children: /*#__PURE__*/ _jsx("path", {
|
|
38
|
+
fill: "currentColor",
|
|
39
|
+
fillRule: "evenodd",
|
|
40
|
+
d: "M12 17a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3m-3-2.5a3 3 0 0 0 .077.675q-.324.236-.611.525l-.007.007a1.01 1.01 0 0 1-1.427-.007 1.024 1.024 0 0 1 0-1.442l.048-.05A7 7 0 0 1 9 12.859zm6-1.69c.77.355 1.472.844 2.07 1.448a1.025 1.025 0 0 1 0 1.442l-.009.007a1.01 1.01 0 0 1-1.426-.007l-.034-.034a5 5 0 0 0-.665-.554q.063-.3.064-.612zM12 7.5a1 1 0 0 1 1 1v6a1 1 0 0 1-2 0v-6a1 1 0 0 1 1-1m3 .983a11.1 11.1 0 0 1 4.936 2.888 1.027 1.027 0 0 1 0 1.444l-.006.012a1.01 1.01 0 0 1-1.426-.007l-.057-.057A9.1 9.1 0 0 0 15 10.622zm-6 2.175a9.1 9.1 0 0 0-3.402 2.162l-.006.006a1.01 1.01 0 0 1-1.427-.006 1.026 1.026 0 0 1 0-1.444l.075-.076A11.1 11.1 0 0 1 9 8.513zM11.975 4a15.14 15.14 0 0 1 10.722 4.374 1.027 1.027 0 0 1-.311 1.668 1.01 1.01 0 0 1-1.105-.206 13.12 13.12 0 0 0-7.385-3.661 3 3 0 0 0-3.816.02 13.12 13.12 0 0 0-7.343 3.737 1 1 0 0 1-.723.295 1 1 0 0 1-.717-.3 1.025 1.025 0 0 1 0-1.443A15.14 15.14 0 0 1 11.975 4",
|
|
41
|
+
clipRule: "evenodd",
|
|
42
|
+
}),
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
const WifiNoIpSizeMap = {
|
|
46
|
+
24: WifiNoIp24,
|
|
47
|
+
};
|
|
48
|
+
export function WifiNoIp(_ref) {
|
|
49
|
+
let _ref$size = _ref.size,
|
|
50
|
+
size = _ref$size === void 0 ? "24" : _ref$size,
|
|
51
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
52
|
+
const Icon = WifiNoIpSizeMap[size] || WifiNoIpSizeMap["24"];
|
|
53
|
+
if (
|
|
54
|
+
process.env.NODE_ENV !== "production" &&
|
|
55
|
+
process.env.NODE_ENV !== "test" &&
|
|
56
|
+
!WifiNoIpSizeMap[size]
|
|
57
|
+
) {
|
|
58
|
+
console.warn(
|
|
59
|
+
new Error(
|
|
60
|
+
`The '${size}' size is not supported by the 'WifiNoIp' icon. Please use one of the available sizes: '24'.`,
|
|
61
|
+
),
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
return /*#__PURE__*/ _jsx(Icon, {
|
|
65
|
+
...props,
|
|
66
|
+
});
|
|
67
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
const _excluded = ["size"];
|
|
2
|
+
function _objectWithoutProperties(e, t) {
|
|
3
|
+
if (null == e) return {};
|
|
4
|
+
var o,
|
|
5
|
+
r,
|
|
6
|
+
i = _objectWithoutPropertiesLoose(e, t);
|
|
7
|
+
if (Object.getOwnPropertySymbols) {
|
|
8
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
9
|
+
for (r = 0; r < n.length; r++)
|
|
10
|
+
(o = n[r]),
|
|
11
|
+
-1 === t.indexOf(o) &&
|
|
12
|
+
{}.propertyIsEnumerable.call(e, o) &&
|
|
13
|
+
(i[o] = e[o]);
|
|
14
|
+
}
|
|
15
|
+
return i;
|
|
16
|
+
}
|
|
17
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
|
18
|
+
if (null == r) return {};
|
|
19
|
+
var t = {};
|
|
20
|
+
for (var n in r)
|
|
21
|
+
if ({}.hasOwnProperty.call(r, n)) {
|
|
22
|
+
if (-1 !== e.indexOf(n)) continue;
|
|
23
|
+
t[n] = r[n];
|
|
24
|
+
}
|
|
25
|
+
return t;
|
|
26
|
+
}
|
|
27
|
+
import React from "react";
|
|
28
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
29
|
+
var WifiNoSignal24 = function WifiNoSignal24(props) {
|
|
30
|
+
return /*#__PURE__*/ _jsxs("svg", {
|
|
31
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
32
|
+
width: "24",
|
|
33
|
+
height: "24",
|
|
34
|
+
fill: "none",
|
|
35
|
+
viewBox: "0 0 24 24",
|
|
36
|
+
...props,
|
|
37
|
+
children: [
|
|
38
|
+
/*#__PURE__*/ _jsx("path", {
|
|
39
|
+
fill: "currentColor",
|
|
40
|
+
d: "M21.71 21.71a1 1 0 0 1-1.41 0l-1.59-1.59-1.59 1.59a1 1 0 0 1-1.41-1.41l1.59-1.59-1.59-1.59a1 1 0 0 1 0-1.41 1 1 0 0 1 1.41 0l1.59 1.59 1.59-1.59a1 1 0 0 1 1.41 0 1 1 0 0 1 0 1.41l-1.59 1.59 1.59 1.59a1 1 0 0 1 0 1.41",
|
|
41
|
+
}),
|
|
42
|
+
/*#__PURE__*/ _jsx("path", {
|
|
43
|
+
fill: "currentColor",
|
|
44
|
+
fillOpacity: ".5",
|
|
45
|
+
d: "M1.625 10.149a1 1 0 0 0 .389.078 1 1 0 0 0 .723-.296 13.12 13.12 0 0 1 18.544-.095A1.012 1.012 0 0 0 23 9.093a1.03 1.03 0 0 0-.304-.72 15.14 15.14 0 0 0-21.4.11 1.025 1.025 0 0 0 .328 1.666",
|
|
46
|
+
}),
|
|
47
|
+
/*#__PURE__*/ _jsx("path", {
|
|
48
|
+
fill: "currentColor",
|
|
49
|
+
fillOpacity: ".5",
|
|
50
|
+
d: "M20.234 12.093c0 .27-.107.53-.297.722l-.007.011a1.01 1.01 0 0 1-1.426-.007l-.057-.058a9.086 9.086 0 0 0-12.849.059l-.006.005a1.01 1.01 0 0 1-1.427-.005 1.026 1.026 0 0 1 0-1.444l.075-.076a11.1 11.1 0 0 1 15.697.07c.19.193.297.452.297.723",
|
|
51
|
+
}),
|
|
52
|
+
/*#__PURE__*/ _jsx("path", {
|
|
53
|
+
fill: "currentColor",
|
|
54
|
+
fillOpacity: ".5",
|
|
55
|
+
d: "M14.021 14.606A5.04 5.04 0 0 0 8.466 15.7l-.007.007a1.01 1.01 0 0 1-1.427-.008 1.024 1.024 0 0 1 0-1.441l.048-.05a7.06 7.06 0 0 1 8.997-.784 3 3 0 0 0-2.056 1.182M10.94 17.44A1.5 1.5 0 0 1 12 17h.007a1.5 1.5 0 1 1-1.066.44",
|
|
56
|
+
}),
|
|
57
|
+
],
|
|
58
|
+
});
|
|
59
|
+
};
|
|
60
|
+
const WifiNoSignalSizeMap = {
|
|
61
|
+
24: WifiNoSignal24,
|
|
62
|
+
};
|
|
63
|
+
export function WifiNoSignal(_ref) {
|
|
64
|
+
let _ref$size = _ref.size,
|
|
65
|
+
size = _ref$size === void 0 ? "24" : _ref$size,
|
|
66
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
67
|
+
const Icon = WifiNoSignalSizeMap[size] || WifiNoSignalSizeMap["24"];
|
|
68
|
+
if (
|
|
69
|
+
process.env.NODE_ENV !== "production" &&
|
|
70
|
+
process.env.NODE_ENV !== "test" &&
|
|
71
|
+
!WifiNoSignalSizeMap[size]
|
|
72
|
+
) {
|
|
73
|
+
console.warn(
|
|
74
|
+
new Error(
|
|
75
|
+
`The '${size}' size is not supported by the 'WifiNoSignal' icon. Please use one of the available sizes: '24'.`,
|
|
76
|
+
),
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
return /*#__PURE__*/ _jsx(Icon, {
|
|
80
|
+
...props,
|
|
81
|
+
});
|
|
82
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026, SumUp Ltd.
|
|
3
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License.
|
|
5
|
+
* You may obtain a copy of the License at
|
|
6
|
+
*
|
|
7
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
*
|
|
9
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
* See the License for the specific language governing permissions and
|
|
13
|
+
* limitations under the License.
|
|
14
|
+
*/
|
|
15
|
+
import { type HTMLAttributes } from 'react';
|
|
16
|
+
import type { CARD_SCHEMES } from './constants.js';
|
|
17
|
+
type CardSchemeName = (typeof CARD_SCHEMES)[number];
|
|
18
|
+
export type CardSchemeProps = HTMLAttributes<HTMLImageElement> & {
|
|
19
|
+
/**
|
|
20
|
+
* The name of the card scheme.
|
|
21
|
+
*/
|
|
22
|
+
name: CardSchemeName;
|
|
23
|
+
/**
|
|
24
|
+
* The alt text for the card scheme logo. Pass an empty string to hide
|
|
25
|
+
* purely decorative logos from assistive technology.
|
|
26
|
+
*/
|
|
27
|
+
alt: string;
|
|
28
|
+
/**
|
|
29
|
+
* Choose from 3 sizes.
|
|
30
|
+
* @default m
|
|
31
|
+
*/
|
|
32
|
+
size?: 's' | 'm' | 'l';
|
|
33
|
+
/**
|
|
34
|
+
* Additional class name to apply to the image.
|
|
35
|
+
*/
|
|
36
|
+
className?: string;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Renders the logo of a card scheme as an image, loaded from a URL.
|
|
40
|
+
*/
|
|
41
|
+
export declare const CardScheme: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLImageElement> & {
|
|
42
|
+
/**
|
|
43
|
+
* The name of the card scheme.
|
|
44
|
+
*/
|
|
45
|
+
name: CardSchemeName;
|
|
46
|
+
/**
|
|
47
|
+
* The alt text for the card scheme logo. Pass an empty string to hide
|
|
48
|
+
* purely decorative logos from assistive technology.
|
|
49
|
+
*/
|
|
50
|
+
alt: string;
|
|
51
|
+
/**
|
|
52
|
+
* Choose from 3 sizes.
|
|
53
|
+
* @default m
|
|
54
|
+
*/
|
|
55
|
+
size?: "s" | "m" | "l";
|
|
56
|
+
/**
|
|
57
|
+
* Additional class name to apply to the image.
|
|
58
|
+
*/
|
|
59
|
+
className?: string;
|
|
60
|
+
} & import("react").RefAttributes<HTMLImageElement>>;
|
|
61
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright 2026, SumUp Ltd.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { forwardRef } from 'react';
|
|
17
|
+
import { getIconURL } from '../../helpers.js';
|
|
18
|
+
import { ICON_SIZES } from '../../icon-sizes.js';
|
|
19
|
+
/**
|
|
20
|
+
* Renders the logo of a card scheme as an image, loaded from a URL.
|
|
21
|
+
*/
|
|
22
|
+
export const CardScheme = forwardRef(({ name, alt, style, size = 'm', ...props }, ref) => {
|
|
23
|
+
const sizeValue = ICON_SIZES[size];
|
|
24
|
+
return (_jsx("img", { ref: ref, style: {
|
|
25
|
+
width: sizeValue,
|
|
26
|
+
height: `calc(${sizeValue} * 3 / 4)`,
|
|
27
|
+
...style,
|
|
28
|
+
}, src: getIconURL(name, '32'), ...props, alt: alt }));
|
|
29
|
+
});
|
|
30
|
+
CardScheme.displayName = 'CardScheme';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is auto-generated from manifest.json by `npm run build`.
|
|
3
|
+
* Do not edit it by hand, your changes will be overwritten.
|
|
4
|
+
* To add or remove an entry, edit manifest.json instead.
|
|
5
|
+
*/
|
|
6
|
+
export declare const CARD_SCHEMES: readonly ["alelo", "alternative_payment_method", "american_express", "apple_pay", "bancomat", "bancontact", "boleto", "card_unknown", "conecs", "diners_club", "discover", "eftpos", "elo", "elv", "girocard", "google_pay", "hipercard", "ideal", "interac", "jcb", "klarna", "maestro", "mastercard", "pay_pal", "pix", "pluxee", "sodexo", "sumup_card_scheme", "sumup_pay", "sumup_scheme", "swile", "ticket", "union_pay", "visa", "visa_electron", "vpay", "vr"];
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is auto-generated from manifest.json by `npm run build`.
|
|
3
|
+
* Do not edit it by hand, your changes will be overwritten.
|
|
4
|
+
* To add or remove an entry, edit manifest.json instead.
|
|
5
|
+
*/
|
|
6
|
+
export const CARD_SCHEMES = [
|
|
7
|
+
"alelo",
|
|
8
|
+
"alternative_payment_method",
|
|
9
|
+
"american_express",
|
|
10
|
+
"apple_pay",
|
|
11
|
+
"bancomat",
|
|
12
|
+
"bancontact",
|
|
13
|
+
"boleto",
|
|
14
|
+
"card_unknown",
|
|
15
|
+
"conecs",
|
|
16
|
+
"diners_club",
|
|
17
|
+
"discover",
|
|
18
|
+
"eftpos",
|
|
19
|
+
"elo",
|
|
20
|
+
"elv",
|
|
21
|
+
"girocard",
|
|
22
|
+
"google_pay",
|
|
23
|
+
"hipercard",
|
|
24
|
+
"ideal",
|
|
25
|
+
"interac",
|
|
26
|
+
"jcb",
|
|
27
|
+
"klarna",
|
|
28
|
+
"maestro",
|
|
29
|
+
"mastercard",
|
|
30
|
+
"pay_pal",
|
|
31
|
+
"pix",
|
|
32
|
+
"pluxee",
|
|
33
|
+
"sodexo",
|
|
34
|
+
"sumup_card_scheme",
|
|
35
|
+
"sumup_pay",
|
|
36
|
+
"sumup_scheme",
|
|
37
|
+
"swile",
|
|
38
|
+
"ticket",
|
|
39
|
+
"union_pay",
|
|
40
|
+
"visa",
|
|
41
|
+
"visa_electron",
|
|
42
|
+
"vpay",
|
|
43
|
+
"vr",
|
|
44
|
+
];
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026, SumUp Ltd.
|
|
3
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License.
|
|
5
|
+
* You may obtain a copy of the License at
|
|
6
|
+
*
|
|
7
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
*
|
|
9
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
* See the License for the specific language governing permissions and
|
|
13
|
+
* limitations under the License.
|
|
14
|
+
*/
|
|
15
|
+
import { type HTMLAttributes } from 'react';
|
|
16
|
+
import type { FLAGS } from './constants.js';
|
|
17
|
+
type CountryCode = (typeof FLAGS)[number];
|
|
18
|
+
type WithSize = {
|
|
19
|
+
/**
|
|
20
|
+
* Choose from 3 sizes.
|
|
21
|
+
*/
|
|
22
|
+
size?: 's' | 'm' | 'l';
|
|
23
|
+
width?: never;
|
|
24
|
+
height?: never;
|
|
25
|
+
};
|
|
26
|
+
type WithHeightWidth = {
|
|
27
|
+
/**
|
|
28
|
+
* The width of the flag image.
|
|
29
|
+
* @deprecated Use the `size` prop instead.
|
|
30
|
+
*/
|
|
31
|
+
width?: number;
|
|
32
|
+
height?: never;
|
|
33
|
+
size?: never;
|
|
34
|
+
} | {
|
|
35
|
+
/**
|
|
36
|
+
* The height of the flag image.
|
|
37
|
+
* @deprecated Use the `size` prop instead.
|
|
38
|
+
*/
|
|
39
|
+
height?: number;
|
|
40
|
+
width?: never;
|
|
41
|
+
size?: never;
|
|
42
|
+
};
|
|
43
|
+
export type FlagProps = HTMLAttributes<HTMLImageElement> & {
|
|
44
|
+
/**
|
|
45
|
+
* The code of the country flag to display, e.g. `'DE'`.
|
|
46
|
+
*/
|
|
47
|
+
countryCode: CountryCode;
|
|
48
|
+
/**
|
|
49
|
+
* The alt text for the flag image. Pass an empty string to hide purely
|
|
50
|
+
* decorative flags from assistive technology.
|
|
51
|
+
*/
|
|
52
|
+
alt: string;
|
|
53
|
+
/**
|
|
54
|
+
* Additional class name to apply to the flag wrapper.
|
|
55
|
+
*/
|
|
56
|
+
className?: string;
|
|
57
|
+
/**
|
|
58
|
+
* Additional class name to apply to the flag's inner image.
|
|
59
|
+
*/
|
|
60
|
+
imageClassName?: string;
|
|
61
|
+
} & (WithSize | WithHeightWidth);
|
|
62
|
+
/**
|
|
63
|
+
* Renders an SVG icon of a flag. Flags are sourced from: https://flagicons.lipis.dev/
|
|
64
|
+
*/
|
|
65
|
+
export declare const Flag: import("react").ForwardRefExoticComponent<FlagProps & import("react").RefAttributes<HTMLImageElement>>;
|
|
66
|
+
export {};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright 2026, SumUp Ltd.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { forwardRef } from 'react';
|
|
17
|
+
import { getIconURL } from '../../helpers.js';
|
|
18
|
+
import { ICON_SIZES } from '../../icon-sizes.js';
|
|
19
|
+
import { deprecate } from '../../logger.js';
|
|
20
|
+
const ASPECT_RATIO = 4 / 3;
|
|
21
|
+
// Inline styles can't use an `@supports` feature query, so `aspect-ratio`
|
|
22
|
+
// is applied as a progressive enhancement with no fallback for browsers
|
|
23
|
+
// that don't support it.
|
|
24
|
+
const WRAPPER_STYLE = {
|
|
25
|
+
display: 'flex',
|
|
26
|
+
alignItems: 'center',
|
|
27
|
+
justifyContent: 'center',
|
|
28
|
+
aspectRatio: '1 / 1',
|
|
29
|
+
};
|
|
30
|
+
const IMAGE_STYLE = {
|
|
31
|
+
border: '0.5px solid #ccc',
|
|
32
|
+
borderRadius: '2px',
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Renders an SVG icon of a flag. Flags are sourced from: https://flagicons.lipis.dev/
|
|
36
|
+
*/
|
|
37
|
+
export const Flag = forwardRef(({ countryCode, alt, className, imageClassName, style, size, width, height, ...props }, ref) => {
|
|
38
|
+
const flagName = `flag_${countryCode.toLowerCase()}`;
|
|
39
|
+
if (process.env.NODE_ENV !== 'production' && (width || height)) {
|
|
40
|
+
deprecate('Flag', 'The `width` and `height` props are deprecated. Use the `size` prop instead.');
|
|
41
|
+
}
|
|
42
|
+
if (size) {
|
|
43
|
+
const sizeValue = ICON_SIZES[size];
|
|
44
|
+
return (_jsx("div", { className: className, style: WRAPPER_STYLE, children: _jsx("img", { ref: ref, className: imageClassName, style: {
|
|
45
|
+
...IMAGE_STYLE,
|
|
46
|
+
width: sizeValue,
|
|
47
|
+
height: `calc(${sizeValue} * 3 / 4)`,
|
|
48
|
+
...style,
|
|
49
|
+
}, src: getIconURL(flagName), ...props, alt: alt }) }));
|
|
50
|
+
}
|
|
51
|
+
// default dimensions
|
|
52
|
+
const dimensions = { width: 16, height: 12 };
|
|
53
|
+
// for a consistent aspect ratio
|
|
54
|
+
if (height) {
|
|
55
|
+
dimensions.height = height;
|
|
56
|
+
dimensions.width = height * ASPECT_RATIO;
|
|
57
|
+
}
|
|
58
|
+
if (width) {
|
|
59
|
+
dimensions.width = width;
|
|
60
|
+
dimensions.height = width / ASPECT_RATIO;
|
|
61
|
+
}
|
|
62
|
+
return (_jsx("div", { className: className, style: WRAPPER_STYLE, children: _jsx("img", { ref: ref, className: imageClassName, style: { ...IMAGE_STYLE, ...style }, height: `${dimensions.height}px`, width: `${dimensions.width}px`, src: getIconURL(flagName), ...props, alt: alt }) }));
|
|
63
|
+
});
|
|
64
|
+
Flag.displayName = 'Flag';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is auto-generated from manifest.json by `npm run build`.
|
|
3
|
+
* Do not edit it by hand, your changes will be overwritten.
|
|
4
|
+
* To add or remove an entry, edit manifest.json instead.
|
|
5
|
+
*/
|
|
6
|
+
export declare const FLAGS: readonly ["AD", "AE", "AF", "AG", "AI", "AL", "AM", "AO", "AQ", "AR", "AS", "AT", "AU", "AW", "AX", "AZ", "BA", "BB", "BD", "BE", "BF", "BG", "BH", "BI", "BJ", "BL", "BM", "BN", "BO", "BQ", "BR", "BS", "BT", "BV", "BW", "BY", "BZ", "CA", "CC", "CD", "CF", "CG", "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CP", "CR", "CU", "CV", "CW", "CX", "CY", "CZ", "DE", "DG", "DJ", "DK", "DM", "DO", "DZ", "EC", "EE", "EG", "EH", "ER", "ES", "ES-CT", "ET", "EU", "FI", "FJ", "FK", "FM", "FO", "FR", "GA", "GB", "GD", "GE", "GF", "GG", "GH", "GI", "GL", "GM", "GN", "GP", "GQ", "GR", "GS", "GT", "GU", "GW", "GY", "HK", "HM", "HN", "HR", "HT", "HU", "IC", "ID", "IE", "IL", "IM", "IN", "IO", "IQ", "IR", "IS", "IT", "JE", "JM", "JO", "JP", "KE", "KG", "KH", "KI", "KM", "KN", "KP", "KR", "KW", "KY", "KZ", "LA", "LB", "LC", "LI", "LK", "LR", "LS", "LT", "LU", "LV", "LY", "MA", "MC", "MD", "ME", "MF", "MG", "MH", "MK", "ML", "MM", "MN", "MO", "MP", "MQ", "MR", "MS", "MT", "MU", "MV", "MW", "MX", "MY", "MZ", "NA", "NC", "NE", "NF", "NG", "NI", "NL", "NO", "NP", "NR", "NU", "NZ", "OM", "PA", "PC", "PE", "PF", "PG", "PH", "PK", "PL", "PM", "PN", "PR", "PS", "PT", "PW", "PY", "QA", "RE", "RO", "RS", "RU", "RW", "SA", "SB", "SC", "SD", "SE", "SG", "SH", "SI", "SJ", "SK", "SL", "SM", "SN", "SO", "SR", "SS", "ST", "SV", "SX", "SY", "SZ", "TC", "TD", "TF", "TG", "TH", "TJ", "TK", "TL", "TM", "TN", "TO", "TR", "TT", "TV", "TW", "TZ", "UA", "UG", "UM", "UN", "US", "UY", "UZ", "VA", "VC", "VE", "VG", "VI", "VN", "VU", "WF", "WS", "XK", "XX", "YE", "YT", "ZA", "ZM", "ZW"];
|