@oanda/labs-widget-common 1.0.252 → 1.0.254
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/CHANGELOG.md +774 -62520
- package/dist/main/components/style.css +1 -1
- package/dist/module/chart/BaseChart.js +15 -7
- package/dist/module/chart/BaseChart.js.map +1 -1
- package/dist/module/chart/formatters.js +12 -3
- package/dist/module/chart/formatters.js.map +1 -1
- package/dist/module/chart/getGridLines.js +16 -9
- package/dist/module/chart/getGridLines.js.map +1 -1
- package/dist/module/chart/getTheme.js +38 -31
- package/dist/module/chart/getTheme.js.map +1 -1
- package/dist/module/chart/getZoomControls.js +12 -5
- package/dist/module/chart/getZoomControls.js.map +1 -1
- package/dist/module/chart/index.js +82 -7
- package/dist/module/chart/index.js.map +1 -1
- package/dist/module/chart/sharedOptions.js +11 -4
- package/dist/module/chart/sharedOptions.js.map +1 -1
- package/dist/module/chart/types.js +5 -1
- package/dist/module/components/Button/Button.js +18 -11
- package/dist/module/components/Button/Button.js.map +1 -1
- package/dist/module/components/Button/index.js +27 -2
- package/dist/module/components/Button/index.js.map +1 -1
- package/dist/module/components/Button/types.js +8 -2
- package/dist/module/components/Button/types.js.map +1 -1
- package/dist/module/components/Card/Card.js +24 -16
- package/dist/module/components/Card/Card.js.map +1 -1
- package/dist/module/components/Card/CardHeader.js +21 -14
- package/dist/module/components/Card/CardHeader.js.map +1 -1
- package/dist/module/components/Card/index.js +38 -3
- package/dist/module/components/Card/index.js.map +1 -1
- package/dist/module/components/Card/rows/DailyChangeCardRow.js +15 -7
- package/dist/module/components/Card/rows/DailyChangeCardRow.js.map +1 -1
- package/dist/module/components/Card/rows/LineChartCardRow.js +17 -10
- package/dist/module/components/Card/rows/LineChartCardRow.js.map +1 -1
- package/dist/module/components/Card/rows/PriceCardRow.js +16 -8
- package/dist/module/components/Card/rows/PriceCardRow.js.map +1 -1
- package/dist/module/components/Card/rows/SentimentCardRow.js +18 -10
- package/dist/module/components/Card/rows/SentimentCardRow.js.map +1 -1
- package/dist/module/components/Card/rows/SpreadCardRow.js +15 -7
- package/dist/module/components/Card/rows/SpreadCardRow.js.map +1 -1
- package/dist/module/components/Card/rows/index.js +60 -5
- package/dist/module/components/Card/rows/index.js.map +1 -1
- package/dist/module/components/Card/types.js +5 -1
- package/dist/module/components/Disclaimer/Disclaimer.js +32 -24
- package/dist/module/components/Disclaimer/Disclaimer.js.map +1 -1
- package/dist/module/components/Disclaimer/index.js +16 -1
- package/dist/module/components/Disclaimer/index.js.map +1 -1
- package/dist/module/components/Error/Error.js +27 -18
- package/dist/module/components/Error/Error.js.map +1 -1
- package/dist/module/components/Error/index.js +16 -1
- package/dist/module/components/Error/index.js.map +1 -1
- package/dist/module/components/InfoBox/InfoBox.js +10 -3
- package/dist/module/components/InfoBox/InfoBox.js.map +1 -1
- package/dist/module/components/InfoBox/index.js +27 -2
- package/dist/module/components/InfoBox/index.js.map +1 -1
- package/dist/module/components/InfoBox/types.js +5 -1
- package/dist/module/components/Input/NumberInput.js +21 -13
- package/dist/module/components/Input/NumberInput.js.map +1 -1
- package/dist/module/components/Input/index.js +38 -3
- package/dist/module/components/Input/index.js.map +1 -1
- package/dist/module/components/Input/types.js +5 -1
- package/dist/module/components/Input/useNumberFormat.js +11 -4
- package/dist/module/components/Input/useNumberFormat.js.map +1 -1
- package/dist/module/components/InstrumentRate/InstrumentRate.js +37 -30
- package/dist/module/components/InstrumentRate/InstrumentRate.js.map +1 -1
- package/dist/module/components/InstrumentRate/InstrumentRateWithChart.js +19 -13
- package/dist/module/components/InstrumentRate/InstrumentRateWithChart.js.map +1 -1
- package/dist/module/components/InstrumentRate/index.js +38 -3
- package/dist/module/components/InstrumentRate/index.js.map +1 -1
- package/dist/module/components/InstrumentRate/types.js +5 -1
- package/dist/module/components/InstrumentRate/utils.js +13 -6
- package/dist/module/components/InstrumentRate/utils.js.map +1 -1
- package/dist/module/components/Label/Label.js +12 -6
- package/dist/module/components/Label/Label.js.map +1 -1
- package/dist/module/components/Label/index.js +16 -1
- package/dist/module/components/Label/index.js.map +1 -1
- package/dist/module/components/LabelWrapper/LabelWrapper.js +24 -17
- package/dist/module/components/LabelWrapper/LabelWrapper.js.map +1 -1
- package/dist/module/components/LabelWrapper/index.js +27 -2
- package/dist/module/components/LabelWrapper/index.js.map +1 -1
- package/dist/module/components/LabelWrapper/types.js +7 -1
- package/dist/module/components/LabelWrapper/types.js.map +1 -1
- package/dist/module/components/LastUpdated/LastUpdated.js +13 -6
- package/dist/module/components/LastUpdated/LastUpdated.js.map +1 -1
- package/dist/module/components/LastUpdated/index.js +27 -2
- package/dist/module/components/LastUpdated/index.js.map +1 -1
- package/dist/module/components/LastUpdated/types.js +5 -1
- package/dist/module/components/LineChart/LineChart.js +18 -11
- package/dist/module/components/LineChart/LineChart.js.map +1 -1
- package/dist/module/components/LineChart/LineChartWithData.js +14 -8
- package/dist/module/components/LineChart/LineChartWithData.js.map +1 -1
- package/dist/module/components/LineChart/index.js +49 -4
- package/dist/module/components/LineChart/index.js.map +1 -1
- package/dist/module/components/LineChart/types.js +7 -1
- package/dist/module/components/LineChart/types.js.map +1 -1
- package/dist/module/components/LineChart/utils.js +16 -8
- package/dist/module/components/LineChart/utils.js.map +1 -1
- package/dist/module/components/Loader/Loader.js +18 -11
- package/dist/module/components/Loader/Loader.js.map +1 -1
- package/dist/module/components/Loader/index.js +27 -2
- package/dist/module/components/Loader/index.js.map +1 -1
- package/dist/module/components/Loader/types.js +7 -1
- package/dist/module/components/Loader/types.js.map +1 -1
- package/dist/module/components/Pagination/Pagination.js +40 -33
- package/dist/module/components/Pagination/Pagination.js.map +1 -1
- package/dist/module/components/Pagination/index.js +27 -2
- package/dist/module/components/Pagination/index.js.map +1 -1
- package/dist/module/components/Pagination/types.js +5 -1
- package/dist/module/components/Pagination/utils.js +8 -1
- package/dist/module/components/Pagination/utils.js.map +1 -1
- package/dist/module/components/Price/Price.js +23 -15
- package/dist/module/components/Price/Price.js.map +1 -1
- package/dist/module/components/Price/index.js +27 -2
- package/dist/module/components/Price/index.js.map +1 -1
- package/dist/module/components/Price/types.js +7 -1
- package/dist/module/components/Price/types.js.map +1 -1
- package/dist/module/components/SearchInput/SearchInput.js +12 -5
- package/dist/module/components/SearchInput/SearchInput.js.map +1 -1
- package/dist/module/components/SearchInput/index.js +27 -2
- package/dist/module/components/SearchInput/index.js.map +1 -1
- package/dist/module/components/SearchInput/types.js +5 -1
- package/dist/module/components/Select/Select.js +44 -36
- package/dist/module/components/Select/Select.js.map +1 -1
- package/dist/module/components/Select/index.js +27 -2
- package/dist/module/components/Select/index.js.map +1 -1
- package/dist/module/components/Select/types.js +5 -1
- package/dist/module/components/Sentiment/Sentiment.js +28 -20
- package/dist/module/components/Sentiment/Sentiment.js.map +1 -1
- package/dist/module/components/Sentiment/SentimentError.js +17 -10
- package/dist/module/components/Sentiment/SentimentError.js.map +1 -1
- package/dist/module/components/Sentiment/SentimentLoader.js +17 -10
- package/dist/module/components/Sentiment/SentimentLoader.js.map +1 -1
- package/dist/module/components/Sentiment/index.js +38 -3
- package/dist/module/components/Sentiment/index.js.map +1 -1
- package/dist/module/components/Sentiment/types.js +7 -1
- package/dist/module/components/Sentiment/types.js.map +1 -1
- package/dist/module/components/Sentiment/utils.js +7 -1
- package/dist/module/components/Sentiment/utils.js.map +1 -1
- package/dist/module/components/Spinner/Spinner.js +18 -10
- package/dist/module/components/Spinner/Spinner.js.map +1 -1
- package/dist/module/components/Spinner/index.js +27 -2
- package/dist/module/components/Spinner/index.js.map +1 -1
- package/dist/module/components/Spinner/types.js +7 -1
- package/dist/module/components/Spinner/types.js.map +1 -1
- package/dist/module/components/Switch/Switch.js +26 -18
- package/dist/module/components/Switch/Switch.js.map +1 -1
- package/dist/module/components/Switch/SwitchItem.js +18 -10
- package/dist/module/components/Switch/SwitchItem.js.map +1 -1
- package/dist/module/components/Switch/constants.js +7 -1
- package/dist/module/components/Switch/constants.js.map +1 -1
- package/dist/module/components/Switch/index.js +16 -1
- package/dist/module/components/Switch/index.js.map +1 -1
- package/dist/module/components/Switch/types.js +5 -1
- package/dist/module/components/Table/Table.js +21 -14
- package/dist/module/components/Table/Table.js.map +1 -1
- package/dist/module/components/Table/TableCell.js +19 -12
- package/dist/module/components/Table/TableCell.js.map +1 -1
- package/dist/module/components/Table/TableHeader.js +20 -13
- package/dist/module/components/Table/TableHeader.js.map +1 -1
- package/dist/module/components/Table/TableRow.js +15 -8
- package/dist/module/components/Table/TableRow.js.map +1 -1
- package/dist/module/components/Table/columns/ChartColumn.js +20 -12
- package/dist/module/components/Table/columns/ChartColumn.js.map +1 -1
- package/dist/module/components/Table/columns/DailyChangeColumn.js +15 -7
- package/dist/module/components/Table/columns/DailyChangeColumn.js.map +1 -1
- package/dist/module/components/Table/columns/InstrumentColumn.js +19 -11
- package/dist/module/components/Table/columns/InstrumentColumn.js.map +1 -1
- package/dist/module/components/Table/columns/PriceColumn.js +16 -8
- package/dist/module/components/Table/columns/PriceColumn.js.map +1 -1
- package/dist/module/components/Table/columns/SentimentColumn.js +16 -8
- package/dist/module/components/Table/columns/SentimentColumn.js.map +1 -1
- package/dist/module/components/Table/columns/SpreadColumn.js +17 -9
- package/dist/module/components/Table/columns/SpreadColumn.js.map +1 -1
- package/dist/module/components/Table/columns/index.js +71 -6
- package/dist/module/components/Table/columns/index.js.map +1 -1
- package/dist/module/components/Table/index.js +60 -5
- package/dist/module/components/Table/index.js.map +1 -1
- package/dist/module/components/Table/types.js +5 -1
- package/dist/module/components/TableWidget/CardRecordRow.js +22 -14
- package/dist/module/components/TableWidget/CardRecordRow.js.map +1 -1
- package/dist/module/components/TableWidget/CardRenderer.js +20 -12
- package/dist/module/components/TableWidget/CardRenderer.js.map +1 -1
- package/dist/module/components/TableWidget/Cards.js +14 -6
- package/dist/module/components/TableWidget/Cards.js.map +1 -1
- package/dist/module/components/TableWidget/ColumnRenderer.js +42 -34
- package/dist/module/components/TableWidget/ColumnRenderer.js.map +1 -1
- package/dist/module/components/TableWidget/DataRecordRow.js +20 -12
- package/dist/module/components/TableWidget/DataRecordRow.js.map +1 -1
- package/dist/module/components/TableWidget/TableWidget.js +34 -26
- package/dist/module/components/TableWidget/TableWidget.js.map +1 -1
- package/dist/module/components/TableWidget/index.js +27 -2
- package/dist/module/components/TableWidget/index.js.map +1 -1
- package/dist/module/components/TableWidget/types.js +5 -1
- package/dist/module/components/TableWidget/utils.js +12 -4
- package/dist/module/components/TableWidget/utils.js.map +1 -1
- package/dist/module/components/Tabs/Tab.js +16 -10
- package/dist/module/components/Tabs/Tab.js.map +1 -1
- package/dist/module/components/Tabs/Tabs.js +11 -5
- package/dist/module/components/Tabs/Tabs.js.map +1 -1
- package/dist/module/components/Tabs/index.js +16 -1
- package/dist/module/components/Tabs/index.js.map +1 -1
- package/dist/module/components/Tabs/types.js +5 -1
- package/dist/module/components/TextInput/TextInput.js +17 -10
- package/dist/module/components/TextInput/TextInput.js.map +1 -1
- package/dist/module/components/TextInput/index.js +16 -1
- package/dist/module/components/TextInput/index.js.map +1 -1
- package/dist/module/components/TimeUnitSwitch/TimeUnitSelect.js +14 -7
- package/dist/module/components/TimeUnitSwitch/TimeUnitSelect.js.map +1 -1
- package/dist/module/components/TimeUnitSwitch/TimeUnitSwitch.js +22 -15
- package/dist/module/components/TimeUnitSwitch/TimeUnitSwitch.js.map +1 -1
- package/dist/module/components/TimeUnitSwitch/index.js +16 -1
- package/dist/module/components/TimeUnitSwitch/index.js.map +1 -1
- package/dist/module/components/TimeUnitSwitch/types.js +5 -1
- package/dist/module/components/Tooltip/Tooltip.js +11 -4
- package/dist/module/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/module/components/Tooltip/index.js +27 -2
- package/dist/module/components/Tooltip/index.js.map +1 -1
- package/dist/module/components/Tooltip/types.js +5 -1
- package/dist/module/components/Truncate/Truncate.js +18 -11
- package/dist/module/components/Truncate/Truncate.js.map +1 -1
- package/dist/module/components/Truncate/index.js +27 -2
- package/dist/module/components/Truncate/index.js.map +1 -1
- package/dist/module/components/Truncate/types.js +5 -1
- package/dist/module/components/WidgetWrapper/WidgetWrapper.js +14 -6
- package/dist/module/components/WidgetWrapper/WidgetWrapper.js.map +1 -1
- package/dist/module/components/WidgetWrapper/index.js +16 -1
- package/dist/module/components/WidgetWrapper/index.js.map +1 -1
- package/dist/module/components/constant.js +8 -2
- package/dist/module/components/constant.js.map +1 -1
- package/dist/module/components/index.js +292 -27
- package/dist/module/components/index.js.map +1 -1
- package/dist/module/components/style.css +1 -1
- package/dist/module/constants/index.js +13 -7
- package/dist/module/constants/index.js.map +1 -1
- package/dist/module/fonts/index.js +27 -4
- package/dist/module/fonts/index.js.map +1 -1
- package/dist/module/hooks/index.js +71 -6
- package/dist/module/hooks/index.js.map +1 -1
- package/dist/module/hooks/useFetchCombinedDataRecords.js +14 -7
- package/dist/module/hooks/useFetchCombinedDataRecords.js.map +1 -1
- package/dist/module/hooks/useLiveRates.js +12 -5
- package/dist/module/hooks/useLiveRates.js.map +1 -1
- package/dist/module/hooks/useLiveRatesMessage.js +26 -19
- package/dist/module/hooks/useLiveRatesMessage.js.map +1 -1
- package/dist/module/hooks/useLiveRatesQuery.js +12 -5
- package/dist/module/hooks/useLiveRatesQuery.js.map +1 -1
- package/dist/module/hooks/useRecords.js +13 -7
- package/dist/module/hooks/useRecords.js.map +1 -1
- package/dist/module/hooks/useVisibleLiveDataRecord.js +16 -9
- package/dist/module/hooks/useVisibleLiveDataRecord.js.map +1 -1
- package/dist/module/images/index.js +111 -16
- package/dist/module/images/index.js.map +1 -1
- package/dist/module/index.js +126 -11
- package/dist/module/index.js.map +1 -1
- package/dist/module/providers/ConditionalProvider.js +11 -3
- package/dist/module/providers/ConditionalProvider.js.map +1 -1
- package/dist/module/providers/Layout/LayoutContext.js +12 -4
- package/dist/module/providers/Layout/LayoutContext.js.map +1 -1
- package/dist/module/providers/Layout/LayoutProvider.js +30 -22
- package/dist/module/providers/Layout/LayoutProvider.js.map +1 -1
- package/dist/module/providers/Layout/LayoutProvider.test.js +61 -58
- package/dist/module/providers/Layout/LayoutProvider.test.js.map +1 -1
- package/dist/module/providers/Layout/index.js +27 -2
- package/dist/module/providers/Layout/index.js.map +1 -1
- package/dist/module/providers/LiveRates/LiveRatesContext.js +11 -4
- package/dist/module/providers/LiveRates/LiveRatesContext.js.map +1 -1
- package/dist/module/providers/LiveRates/LiveRatesProvider.js +37 -29
- package/dist/module/providers/LiveRates/LiveRatesProvider.js.map +1 -1
- package/dist/module/providers/LiveRates/index.js +27 -2
- package/dist/module/providers/LiveRates/index.js.map +1 -1
- package/dist/module/providers/Widget/WidgetProvider.js +26 -18
- package/dist/module/providers/Widget/WidgetProvider.js.map +1 -1
- package/dist/module/providers/Widget/index.js +16 -1
- package/dist/module/providers/Widget/index.js.map +1 -1
- package/dist/module/providers/index.js +38 -3
- package/dist/module/providers/index.js.map +1 -1
- package/dist/module/tailwind/cn.js +11 -4
- package/dist/module/tailwind/cn.js.map +1 -1
- package/dist/module/tailwind/colors.js +9 -3
- package/dist/module/tailwind/colors.js.map +1 -1
- package/dist/module/tailwind/index.js +39 -3
- package/dist/module/tailwind/index.js.map +1 -1
- package/dist/module/tailwind/preset.js +11 -5
- package/dist/module/tailwind/preset.js.map +1 -1
- package/dist/module/tailwind/themes/background.js +14 -8
- package/dist/module/tailwind/themes/background.js.map +1 -1
- package/dist/module/tailwind/themes/border.js +10 -4
- package/dist/module/tailwind/themes/border.js.map +1 -1
- package/dist/module/tailwind/themes/index.js +12 -6
- package/dist/module/tailwind/themes/index.js.map +1 -1
- package/dist/module/tailwind/themes/text.js +18 -12
- package/dist/module/tailwind/themes/text.js.map +1 -1
- package/dist/module/tailwind/themes/themeColors.js +26 -20
- package/dist/module/tailwind/themes/themeColors.js.map +1 -1
- package/dist/module/tailwind/types.js +5 -1
- package/dist/module/tailwind/utils.js +8 -1
- package/dist/module/tailwind/utils.js.map +1 -1
- package/dist/module/testUtils/index.js +15 -7
- package/dist/module/testUtils/index.js.map +1 -1
- package/dist/module/translations/index.js +15 -8
- package/dist/module/translations/index.js.map +1 -1
- package/dist/module/translations/translations.js +7 -1
- package/dist/module/translations/translations.js.map +1 -1
- package/dist/module/types/dataTypes.js +7 -1
- package/dist/module/types/dataTypes.js.map +1 -1
- package/dist/module/types/index.js +36 -4
- package/dist/module/types/index.js.map +1 -1
- package/dist/module/types/liveRatesTypes.js +5 -1
- package/dist/module/utils/dateUtils.js +9 -1
- package/dist/module/utils/dateUtils.js.map +1 -1
- package/dist/module/utils/getLocale.js +20 -13
- package/dist/module/utils/getLocale.js.map +1 -1
- package/dist/module/utils/index.js +38 -3
- package/dist/module/utils/index.js.map +1 -1
- package/dist/module/utils/liveRates/buildUrl.js +8 -1
- package/dist/module/utils/liveRates/buildUrl.js.map +1 -1
- package/dist/module/utils/liveRates/calculatePipsChangeFromOpen.js +7 -1
- package/dist/module/utils/liveRates/calculatePipsChangeFromOpen.js.map +1 -1
- package/dist/module/utils/liveRates/calculatePriceChange.js +8 -1
- package/dist/module/utils/liveRates/calculatePriceChange.js.map +1 -1
- package/dist/module/utils/liveRates/calculatePriceChangeFromOpen.js +8 -1
- package/dist/module/utils/liveRates/calculatePriceChangeFromOpen.js.map +1 -1
- package/dist/module/utils/liveRates/calculateSpread.js +8 -1
- package/dist/module/utils/liveRates/calculateSpread.js.map +1 -1
- package/dist/module/utils/liveRates/decodeLiveRateMessage.js +9 -2
- package/dist/module/utils/liveRates/decodeLiveRateMessage.js.map +1 -1
- package/dist/module/utils/liveRates/decodeUtilities.js +18 -6
- package/dist/module/utils/liveRates/decodeUtilities.js.map +1 -1
- package/dist/module/utils/liveRates/index.js +82 -7
- package/dist/module/utils/liveRates/index.js.map +1 -1
- package/dist/module/utils/validateToolParams.js +7 -1
- package/dist/module/utils/validateToolParams.js.map +1 -1
- package/package.json +9 -4
- package/src/components/style.css +1 -1
- package/tsconfig.types.json +2 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SentimentCardRow.js","names":["
|
|
1
|
+
{"version":3,"file":"SentimentCardRow.js","names":["_react","_interopRequireDefault","require","_types","_Sentiment","_Card","e","__esModule","default","SentimentCardRow","_ref","label","isLoading","sentiment","createElement","CardRow","key","DataRecordType","SENTIMENT","withoutContentLoading","undefined","className","Sentiment","compactMode","height","SentimentHeight","sm","exports"],"sources":["../../../../../src/components/Card/rows/SentimentCardRow.tsx"],"sourcesContent":["import React from 'react';\n\nimport { DataRecordType } from '../../../types';\nimport type { SentimentPercentage } from '../../Sentiment';\nimport { Sentiment, SentimentHeight } from '../../Sentiment';\nimport { CardRow } from '../Card';\n\ninterface SentimentCardRowProps {\n label: string;\n isLoading?: boolean;\n sentiment?: SentimentPercentage;\n}\n\nexport const SentimentCardRow = ({\n label,\n isLoading,\n sentiment,\n}: SentimentCardRowProps) => (\n <CardRow\n key={DataRecordType.SENTIMENT}\n withoutContentLoading\n isLoading={isLoading || sentiment === undefined}\n label={label}\n >\n <div className=\"lw-w-full lw-max-w-[200px]\">\n <Sentiment\n compactMode\n height={SentimentHeight.sm}\n isLoading={isLoading || sentiment === undefined}\n sentiment={sentiment}\n />\n </div>\n </CardRow>\n);\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AAEA,IAAAE,UAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AAAkC,SAAAD,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAQ3B,MAAMG,gBAAgB,GAAGC,IAAA;EAAA,IAAC;IAC/BC,KAAK;IACLC,SAAS;IACTC;EACqB,CAAC,GAAAH,IAAA;EAAA,OACtBV,MAAA,CAAAQ,OAAA,CAAAM,aAAA,CAACT,KAAA,CAAAU,OAAO;IACNC,GAAG,EAAEC,qBAAc,CAACC,SAAU;IAC9BC,qBAAqB;IACrBP,SAAS,EAAEA,SAAS,IAAIC,SAAS,KAAKO,SAAU;IAChDT,KAAK,EAAEA;EAAM,GAEbX,MAAA,CAAAQ,OAAA,CAAAM,aAAA;IAAKO,SAAS,EAAC;EAA4B,GACzCrB,MAAA,CAAAQ,OAAA,CAAAM,aAAA,CAACV,UAAA,CAAAkB,SAAS;IACRC,WAAW;IACXC,MAAM,EAAEC,0BAAe,CAACC,EAAG;IAC3Bd,SAAS,EAAEA,SAAS,IAAIC,SAAS,KAAKO,SAAU;IAChDP,SAAS,EAAEA;EAAU,CACtB,CACE,CACE,CAAC;AAAA,CACX;AAACc,OAAA,CAAAlB,gBAAA,GAAAA,gBAAA","ignoreList":[]}
|
|
@@ -1,20 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.SpreadCardRow = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _types = require("../../../types");
|
|
9
|
+
var _Card = require("../Card");
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
const SpreadCardRow = _ref => {
|
|
5
12
|
let {
|
|
6
13
|
label,
|
|
7
14
|
isLoading,
|
|
8
15
|
isError,
|
|
9
16
|
value
|
|
10
17
|
} = _ref;
|
|
11
|
-
return
|
|
12
|
-
key: DataRecordType.SPREAD,
|
|
18
|
+
return _react.default.createElement(_Card.CardRow, {
|
|
19
|
+
key: _types.DataRecordType.SPREAD,
|
|
13
20
|
isError: isError,
|
|
14
21
|
isLoading: isLoading || value === undefined && !isError,
|
|
15
22
|
label: label
|
|
16
|
-
},
|
|
23
|
+
}, _react.default.createElement("span", {
|
|
17
24
|
"data-testid": "spread-value"
|
|
18
25
|
}, value));
|
|
19
26
|
};
|
|
27
|
+
exports.SpreadCardRow = SpreadCardRow;
|
|
20
28
|
//# sourceMappingURL=SpreadCardRow.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpreadCardRow.js","names":["
|
|
1
|
+
{"version":3,"file":"SpreadCardRow.js","names":["_react","_interopRequireDefault","require","_types","_Card","e","__esModule","default","SpreadCardRow","_ref","label","isLoading","isError","value","createElement","CardRow","key","DataRecordType","SPREAD","undefined","exports"],"sources":["../../../../../src/components/Card/rows/SpreadCardRow.tsx"],"sourcesContent":["import React from 'react';\n\nimport { DataRecordType } from '../../../types';\nimport { CardRow } from '../Card';\n\ninterface SpreadCardRowProps {\n value?: number;\n isError: boolean;\n isLoading?: boolean;\n label: string;\n}\n\nexport const SpreadCardRow = ({\n label,\n isLoading,\n isError,\n value,\n}: SpreadCardRowProps) => (\n <CardRow\n key={DataRecordType.SPREAD}\n isError={isError}\n isLoading={isLoading || (value === undefined && !isError)}\n label={label}\n >\n <span data-testid=\"spread-value\">{value}</span>\n </CardRow>\n);\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAAkC,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAS3B,MAAMG,aAAa,GAAGC,IAAA;EAAA,IAAC;IAC5BC,KAAK;IACLC,SAAS;IACTC,OAAO;IACPC;EACkB,CAAC,GAAAJ,IAAA;EAAA,OACnBT,MAAA,CAAAO,OAAA,CAAAO,aAAA,CAACV,KAAA,CAAAW,OAAO;IACNC,GAAG,EAAEC,qBAAc,CAACC,MAAO;IAC3BN,OAAO,EAAEA,OAAQ;IACjBD,SAAS,EAAEA,SAAS,IAAKE,KAAK,KAAKM,SAAS,IAAI,CAACP,OAAS;IAC1DF,KAAK,EAAEA;EAAM,GAEbV,MAAA,CAAAO,OAAA,CAAAO,aAAA;IAAM,eAAY;EAAc,GAAED,KAAY,CACvC,CAAC;AAAA,CACX;AAACO,OAAA,CAAAZ,aAAA,GAAAA,aAAA","ignoreList":[]}
|
|
@@ -1,6 +1,61 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _DailyChangeCardRow = require("./DailyChangeCardRow");
|
|
7
|
+
Object.keys(_DailyChangeCardRow).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _DailyChangeCardRow[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _DailyChangeCardRow[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
var _LineChartCardRow = require("./LineChartCardRow");
|
|
18
|
+
Object.keys(_LineChartCardRow).forEach(function (key) {
|
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _LineChartCardRow[key]) return;
|
|
21
|
+
Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () {
|
|
24
|
+
return _LineChartCardRow[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
var _PriceCardRow = require("./PriceCardRow");
|
|
29
|
+
Object.keys(_PriceCardRow).forEach(function (key) {
|
|
30
|
+
if (key === "default" || key === "__esModule") return;
|
|
31
|
+
if (key in exports && exports[key] === _PriceCardRow[key]) return;
|
|
32
|
+
Object.defineProperty(exports, key, {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () {
|
|
35
|
+
return _PriceCardRow[key];
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
var _SentimentCardRow = require("./SentimentCardRow");
|
|
40
|
+
Object.keys(_SentimentCardRow).forEach(function (key) {
|
|
41
|
+
if (key === "default" || key === "__esModule") return;
|
|
42
|
+
if (key in exports && exports[key] === _SentimentCardRow[key]) return;
|
|
43
|
+
Object.defineProperty(exports, key, {
|
|
44
|
+
enumerable: true,
|
|
45
|
+
get: function () {
|
|
46
|
+
return _SentimentCardRow[key];
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
var _SpreadCardRow = require("./SpreadCardRow");
|
|
51
|
+
Object.keys(_SpreadCardRow).forEach(function (key) {
|
|
52
|
+
if (key === "default" || key === "__esModule") return;
|
|
53
|
+
if (key in exports && exports[key] === _SpreadCardRow[key]) return;
|
|
54
|
+
Object.defineProperty(exports, key, {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function () {
|
|
57
|
+
return _SpreadCardRow[key];
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
});
|
|
6
61
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../../src/components/Card/rows/index.tsx"],"sourcesContent":["export * from './DailyChangeCardRow';\nexport * from './LineChartCardRow';\nexport * from './PriceCardRow';\nexport * from './SentimentCardRow';\nexport * from './SpreadCardRow';\n"],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","names":["_DailyChangeCardRow","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_LineChartCardRow","_PriceCardRow","_SentimentCardRow","_SpreadCardRow"],"sources":["../../../../../src/components/Card/rows/index.tsx"],"sourcesContent":["export * from './DailyChangeCardRow';\nexport * from './LineChartCardRow';\nexport * from './PriceCardRow';\nexport * from './SentimentCardRow';\nexport * from './SpreadCardRow';\n"],"mappings":";;;;;AAAA,IAAAA,mBAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,mBAAA,EAAAI,OAAA,WAAAC,GAAA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cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAG,iBAAA,CAAAP,GAAA;IAAA;EAAA;AAAA;AACA,IAAAQ,cAAA,GAAAZ,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAU,cAAA,EAAAT,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAQ,cAAA,CAAAR,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAI,cAAA,CAAAR,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
|
@@ -1,9 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Disclaimer = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _images = require("../../images");
|
|
9
|
+
var _providers = require("../../providers");
|
|
10
|
+
var _tailwind = require("../../tailwind");
|
|
11
|
+
var _types = require("../../types");
|
|
12
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
13
|
+
const Disclaimer = _ref => {
|
|
7
14
|
let {
|
|
8
15
|
children,
|
|
9
16
|
logoLink,
|
|
@@ -16,35 +23,35 @@ export const Disclaimer = _ref => {
|
|
|
16
23
|
} = _ref;
|
|
17
24
|
const {
|
|
18
25
|
theme
|
|
19
|
-
} = useLayoutProvider();
|
|
20
|
-
const isDark = theme === Theme.Dark;
|
|
26
|
+
} = (0, _providers.useLayoutProvider)();
|
|
27
|
+
const isDark = theme === _types.Theme.Dark;
|
|
21
28
|
const {
|
|
22
29
|
size
|
|
23
|
-
} = useLayoutProvider();
|
|
24
|
-
const isDesktop = size === Size.DESKTOP;
|
|
25
|
-
const [isLogoHovered, setIsLogoHovered] = useState(false);
|
|
26
|
-
const [isInfoHovered, setIsInfoHovered] = useState(false);
|
|
30
|
+
} = (0, _providers.useLayoutProvider)();
|
|
31
|
+
const isDesktop = size === _types.Size.DESKTOP;
|
|
32
|
+
const [isLogoHovered, setIsLogoHovered] = (0, _react.useState)(false);
|
|
33
|
+
const [isInfoHovered, setIsInfoHovered] = (0, _react.useState)(false);
|
|
27
34
|
if (!logoLink && !text) {
|
|
28
35
|
return children;
|
|
29
36
|
}
|
|
30
37
|
const isClickable = linkArea === 'full';
|
|
31
|
-
return
|
|
32
|
-
className: cn('lw-relative lw-overflow-hidden', isClickable && 'lw-cursor-pointer', brandingSpace && brandingSpace === 'vertical' ? 'lw-pb-12' : 'lw-pb-0', !!fitContent && 'lw-w-fit'),
|
|
38
|
+
return _react.default.createElement("div", {
|
|
39
|
+
className: (0, _tailwind.cn)('lw-relative lw-overflow-hidden', isClickable && 'lw-cursor-pointer', brandingSpace && brandingSpace === 'vertical' ? 'lw-pb-12' : 'lw-pb-0', !!fitContent && 'lw-w-fit'),
|
|
33
40
|
"data-testid": "disclaimer-wrapper",
|
|
34
41
|
role: "presentation",
|
|
35
42
|
onClick: () => isClickable && window.open(logoLink, '_blank')
|
|
36
|
-
}, children, text &&
|
|
37
|
-
className: cn('lw-absolute lw-right-0 lw-top-0 lw-z-30 lw-flex lw-h-full lw-items-center lw-bg-border-primary lw-bg-opacity-90 lw-text-text-primary lw-delay-150 lw-duration-150 lw-ease-in-out', !isDesktop && 'lw-leading-[14px] lw-text-[11px] lw-p-[4px]', isDesktop && 'lw-text-sm lw-p-3', isInfoHovered && 'lw-opacity-100', !isInfoHovered && 'lw-opacity-0 lw-pointer-events-none'),
|
|
43
|
+
}, children, text && _react.default.createElement("div", {
|
|
44
|
+
className: (0, _tailwind.cn)('lw-absolute lw-right-0 lw-top-0 lw-z-30 lw-flex lw-h-full lw-items-center lw-bg-border-primary lw-bg-opacity-90 lw-text-text-primary lw-delay-150 lw-duration-150 lw-ease-in-out', !isDesktop && 'lw-leading-[14px] lw-text-[11px] lw-p-[4px]', isDesktop && 'lw-text-sm lw-p-3', isInfoHovered && 'lw-opacity-100', !isInfoHovered && 'lw-opacity-0 lw-pointer-events-none'),
|
|
38
45
|
onBlur: () => setIsInfoHovered(false),
|
|
39
46
|
onMouseOut: () => setIsInfoHovered(false)
|
|
40
|
-
}, text),
|
|
41
|
-
className: cn('lw-absolute lw-bottom-3 lw-right-0 lw-z-20 lw-flex lw-transition lw-delay-100 lw-duration-300 lw-ease-in-out', logoLink && !isLogoHovered && infoButtonPosition === 'left' && 'lw-translate-x-[55px]', isSlim && 'lw-bottom-[6px]', !isSlim && 'lw-bottom-2', infoButtonPosition === 'left' && 'lw-flex-row lw-items-center', infoButtonPosition === 'top' && 'lw-flex-col lw-items-end')
|
|
42
|
-
}, text &&
|
|
43
|
-
className: cn('lw-flex lw-h-[20px] lw-w-[20px] lw-items-center lw-justify-center lw-rounded-full lw-border lw-border-border-primary lw-pb-0.5 lw-text-sm lw-font-bold lw-text-text-secondary lw-shadow-basic', isDark && 'lw-bg-dark-blue', !isDark && 'lw-bg-bg-primary', infoButtonPosition === 'top' && 'lw-mr-1', infoButtonPosition === 'top' && !!logoLink && 'lw-mb-3', infoButtonPosition === 'left' && 'lw-mr-2 '),
|
|
47
|
+
}, text), _react.default.createElement("div", {
|
|
48
|
+
className: (0, _tailwind.cn)('lw-absolute lw-bottom-3 lw-right-0 lw-z-20 lw-flex lw-transition lw-delay-100 lw-duration-300 lw-ease-in-out', logoLink && !isLogoHovered && infoButtonPosition === 'left' && 'lw-translate-x-[55px]', isSlim && 'lw-bottom-[6px]', !isSlim && 'lw-bottom-2', infoButtonPosition === 'left' && 'lw-flex-row lw-items-center', infoButtonPosition === 'top' && 'lw-flex-col lw-items-end')
|
|
49
|
+
}, text && _react.default.createElement("div", {
|
|
50
|
+
className: (0, _tailwind.cn)('lw-flex lw-h-[20px] lw-w-[20px] lw-items-center lw-justify-center lw-rounded-full lw-border lw-border-border-primary lw-pb-0.5 lw-text-sm lw-font-bold lw-text-text-secondary lw-shadow-basic', isDark && 'lw-bg-dark-blue', !isDark && 'lw-bg-bg-primary', infoButtonPosition === 'top' && 'lw-mr-1', infoButtonPosition === 'top' && !!logoLink && 'lw-mb-3', infoButtonPosition === 'left' && 'lw-mr-2 '),
|
|
44
51
|
onFocus: () => setIsInfoHovered(true),
|
|
45
52
|
onMouseOver: () => setIsInfoHovered(true)
|
|
46
|
-
}, "i"), logoLink &&
|
|
47
|
-
className: cn('lw-cursor-pointer lw-rounded-l-full lw-bg-bg-primary lw-shadow-basic', infoButtonPosition === 'top' && 'lw-transition lw-delay-100 lw-duration-300 lw-ease-in-out', !isLogoHovered && infoButtonPosition === 'top' && 'lw-translate-x-[55px]'),
|
|
53
|
+
}, "i"), logoLink && _react.default.createElement("div", {
|
|
54
|
+
className: (0, _tailwind.cn)('lw-cursor-pointer lw-rounded-l-full lw-bg-bg-primary lw-shadow-basic', infoButtonPosition === 'top' && 'lw-transition lw-delay-100 lw-duration-300 lw-ease-in-out', !isLogoHovered && infoButtonPosition === 'top' && 'lw-translate-x-[55px]'),
|
|
48
55
|
"data-testid": "disclaimer-wrapper-logo",
|
|
49
56
|
role: "presentation",
|
|
50
57
|
onBlur: () => setIsLogoHovered(false),
|
|
@@ -55,10 +62,11 @@ export const Disclaimer = _ref => {
|
|
|
55
62
|
onFocus: () => setIsLogoHovered(true),
|
|
56
63
|
onMouseOut: () => setIsLogoHovered(false),
|
|
57
64
|
onMouseOver: () => setIsLogoHovered(true)
|
|
58
|
-
}, isDark ?
|
|
65
|
+
}, isDark ? _react.default.createElement(_images.OandaLogoDark, {
|
|
59
66
|
"data-testid": "disclaimer-wrapper-logo-dark"
|
|
60
|
-
}) :
|
|
67
|
+
}) : _react.default.createElement(_images.OandaLogoLight, {
|
|
61
68
|
"data-testid": "disclaimer-wrapper-logo-light"
|
|
62
69
|
}))));
|
|
63
70
|
};
|
|
71
|
+
exports.Disclaimer = Disclaimer;
|
|
64
72
|
//# sourceMappingURL=Disclaimer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Disclaimer.js","names":["
|
|
1
|
+
{"version":3,"file":"Disclaimer.js","names":["_react","_interopRequireWildcard","require","_images","_providers","_tailwind","_types","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","Disclaimer","_ref","children","logoLink","brandingSpace","fitContent","linkArea","text","isSlim","infoButtonPosition","theme","useLayoutProvider","isDark","Theme","Dark","size","isDesktop","Size","DESKTOP","isLogoHovered","setIsLogoHovered","useState","isInfoHovered","setIsInfoHovered","isClickable","createElement","className","cn","role","onClick","window","open","onBlur","onMouseOut","onFocus","onMouseOver","stopPropagation","OandaLogoDark","OandaLogoLight","exports"],"sources":["../../../../src/components/Disclaimer/Disclaimer.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } from 'react';\nimport React, { useState } from 'react';\n\nimport { OandaLogoDark, OandaLogoLight } from '../../images';\nimport { useLayoutProvider } from '../../providers';\nimport { cn } from '../../tailwind';\nimport type { RenderComponentParams } from '../../types';\nimport { Size, Theme } from '../../types';\n\ntype DisclaimerProps = PropsWithChildren &\n Omit<RenderComponentParams, 'Component'> & {\n text?: string;\n isSlim?: boolean;\n infoButtonPosition?: 'left' | 'top';\n };\n\nexport const Disclaimer: FC<DisclaimerProps> = ({\n children,\n logoLink,\n brandingSpace,\n fitContent = false,\n linkArea = 'full',\n text,\n isSlim,\n infoButtonPosition = 'top',\n}) => {\n const { theme } = useLayoutProvider();\n const isDark = theme === Theme.Dark;\n const { size } = useLayoutProvider();\n const isDesktop = size === Size.DESKTOP;\n\n const [isLogoHovered, setIsLogoHovered] = useState(false);\n const [isInfoHovered, setIsInfoHovered] = useState(false);\n\n if (!logoLink && !text) {\n return children;\n }\n\n const isClickable = linkArea === 'full';\n\n return (\n <div\n className={cn(\n 'lw-relative lw-overflow-hidden',\n isClickable && 'lw-cursor-pointer',\n brandingSpace && brandingSpace === 'vertical' ? 'lw-pb-12' : 'lw-pb-0',\n !!fitContent && 'lw-w-fit'\n )}\n data-testid=\"disclaimer-wrapper\"\n role=\"presentation\"\n onClick={() => isClickable && window.open(logoLink, '_blank')}\n >\n {children}\n {text && (\n <div\n className={cn(\n 'lw-absolute lw-right-0 lw-top-0 lw-z-30 lw-flex lw-h-full lw-items-center lw-bg-border-primary lw-bg-opacity-90 lw-text-text-primary lw-delay-150 lw-duration-150 lw-ease-in-out',\n !isDesktop && 'lw-leading-[14px] lw-text-[11px] lw-p-[4px]',\n isDesktop && 'lw-text-sm lw-p-3',\n isInfoHovered && 'lw-opacity-100',\n !isInfoHovered && 'lw-opacity-0 lw-pointer-events-none'\n )}\n onBlur={() => setIsInfoHovered(false)}\n onMouseOut={() => setIsInfoHovered(false)}\n >\n {text}\n </div>\n )}\n <div\n className={cn(\n 'lw-absolute lw-bottom-3 lw-right-0 lw-z-20 lw-flex lw-transition lw-delay-100 lw-duration-300 lw-ease-in-out',\n logoLink &&\n !isLogoHovered &&\n infoButtonPosition === 'left' &&\n 'lw-translate-x-[55px]',\n isSlim && 'lw-bottom-[6px]',\n !isSlim && 'lw-bottom-2',\n infoButtonPosition === 'left' && 'lw-flex-row lw-items-center',\n infoButtonPosition === 'top' && 'lw-flex-col lw-items-end'\n )}\n >\n {text && (\n <div\n className={cn(\n 'lw-flex lw-h-[20px] lw-w-[20px] lw-items-center lw-justify-center lw-rounded-full lw-border lw-border-border-primary lw-pb-0.5 lw-text-sm lw-font-bold lw-text-text-secondary lw-shadow-basic',\n isDark && 'lw-bg-dark-blue',\n !isDark && 'lw-bg-bg-primary',\n infoButtonPosition === 'top' && 'lw-mr-1',\n infoButtonPosition === 'top' && !!logoLink && 'lw-mb-3',\n infoButtonPosition === 'left' && 'lw-mr-2 '\n )}\n onFocus={() => setIsInfoHovered(true)}\n onMouseOver={() => setIsInfoHovered(true)}\n >\n i\n </div>\n )}\n {logoLink && (\n <div\n className={cn(\n 'lw-cursor-pointer lw-rounded-l-full lw-bg-bg-primary lw-shadow-basic',\n infoButtonPosition === 'top' &&\n 'lw-transition lw-delay-100 lw-duration-300 lw-ease-in-out',\n !isLogoHovered &&\n infoButtonPosition === 'top' &&\n 'lw-translate-x-[55px]'\n )}\n data-testid=\"disclaimer-wrapper-logo\"\n role=\"presentation\"\n onBlur={() => setIsLogoHovered(false)}\n onClick={(e) => {\n e.stopPropagation();\n window.open(logoLink, '_blank');\n }}\n onFocus={() => setIsLogoHovered(true)}\n onMouseOut={() => setIsLogoHovered(false)}\n onMouseOver={() => setIsLogoHovered(true)}\n >\n {isDark ? (\n <OandaLogoDark data-testid=\"disclaimer-wrapper-logo-dark\" />\n ) : (\n <OandaLogoLight data-testid=\"disclaimer-wrapper-logo-light\" />\n )}\n </div>\n )}\n </div>\n </div>\n );\n};\n"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AAEA,IAAAI,MAAA,GAAAJ,OAAA;AAA0C,SAAAD,wBAAAM,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAA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KAAMb,gBAAgB,CAAC,KAAK,CAAE;IAC1Ce,WAAW,EAAEA,CAAA,KAAMf,gBAAgB,CAAC,IAAI;EAAE,GAEzCR,MAAM,GACLtC,MAAA,CAAAiB,OAAA,CAAAkC,aAAA,CAAChD,OAAA,CAAA4D,aAAa;IAAC,eAAY;EAA8B,CAAE,CAAC,GAE5D/D,MAAA,CAAAiB,OAAA,CAAAkC,aAAA,CAAChD,OAAA,CAAA6D,cAAc;IAAC,eAAY;EAA+B,CAAE,CAE5D,CAEJ,CACF,CAAC;AAEV,CAAC;AAACC,OAAA,CAAAvC,UAAA,GAAAA,UAAA","ignoreList":[]}
|
|
@@ -1,2 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _Disclaimer = require("./Disclaimer");
|
|
7
|
+
Object.keys(_Disclaimer).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _Disclaimer[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _Disclaimer[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
2
17
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/Disclaimer/index.ts"],"sourcesContent":["export * from './Disclaimer';\n"],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","names":["_Disclaimer","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sources":["../../../../src/components/Disclaimer/index.ts"],"sourcesContent":["export * from './Disclaimer';\n"],"mappings":";;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,WAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,WAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,WAAA,CAAAK,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
|
@@ -1,48 +1,57 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.WidgetError = exports.Error = exports.ChartError = void 0;
|
|
7
|
+
var _monoI18n = require("@oanda/mono-i18n");
|
|
8
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
9
|
+
var _react = _interopRequireDefault(require("react"));
|
|
10
|
+
var _images = require("../../images");
|
|
11
|
+
var _providers = require("../../providers");
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
6
13
|
const ChartError = _ref => {
|
|
7
14
|
let {
|
|
8
15
|
errorType = 'dataUnavailable'
|
|
9
16
|
} = _ref;
|
|
10
17
|
const {
|
|
11
18
|
lang
|
|
12
|
-
} = useLocale();
|
|
19
|
+
} = (0, _monoI18n.useLocale)();
|
|
13
20
|
const {
|
|
14
21
|
isDark
|
|
15
|
-
} = useLayoutProvider();
|
|
16
|
-
return
|
|
17
|
-
className:
|
|
22
|
+
} = (0, _providers.useLayoutProvider)();
|
|
23
|
+
return _react.default.createElement("div", {
|
|
24
|
+
className: (0, _classnames.default)('lw-flex lw-flex-1 lw-flex-col lw-items-center lw-justify-center lw-stroke-2', {
|
|
18
25
|
'lw-text-text-primary': isDark,
|
|
19
26
|
'lw-text-text-secondary': !isDark
|
|
20
27
|
}),
|
|
21
28
|
"data-testid": "chart-error"
|
|
22
|
-
},
|
|
29
|
+
}, _react.default.createElement(_images.ChartErrorIcon, null), _react.default.createElement("span", {
|
|
23
30
|
className: "lw-mt-3 lw-font-sans lw-uppercase"
|
|
24
31
|
}, errorType === 'dataUnavailable' ? lang('data_unavailable') : lang('no_matching_results')));
|
|
25
32
|
};
|
|
33
|
+
exports.ChartError = ChartError;
|
|
26
34
|
const Error = () => {
|
|
27
35
|
const {
|
|
28
36
|
lang
|
|
29
|
-
} = useLocale();
|
|
37
|
+
} = (0, _monoI18n.useLocale)();
|
|
30
38
|
const {
|
|
31
39
|
isDark
|
|
32
|
-
} = useLayoutProvider();
|
|
33
|
-
return
|
|
34
|
-
className:
|
|
40
|
+
} = (0, _providers.useLayoutProvider)();
|
|
41
|
+
return _react.default.createElement("div", {
|
|
42
|
+
className: (0, _classnames.default)('lw-flex lw-items-center lw-justify-center lw-gap-1', {
|
|
35
43
|
'lw-text-text-primary': isDark,
|
|
36
44
|
'lw-text-text-secondary': !isDark
|
|
37
45
|
}),
|
|
38
46
|
"data-testid": "error"
|
|
39
|
-
},
|
|
47
|
+
}, _react.default.createElement(_images.ErrorIcon, null), _react.default.createElement("span", {
|
|
40
48
|
className: "lw-font-sans lw-text-xs lw-uppercase"
|
|
41
49
|
}, lang('data_unavailable')));
|
|
42
50
|
};
|
|
43
|
-
|
|
51
|
+
exports.Error = Error;
|
|
52
|
+
const WidgetError = () => _react.default.createElement("div", {
|
|
44
53
|
className: "lw-flex lw-h-[425px] lw-w-full lw-items-center lw-border lw-border-solid lw-border-border-primary",
|
|
45
54
|
"data-testid": "widget-error"
|
|
46
|
-
},
|
|
47
|
-
|
|
55
|
+
}, _react.default.createElement(ChartError, null));
|
|
56
|
+
exports.WidgetError = WidgetError;
|
|
48
57
|
//# sourceMappingURL=Error.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Error.js","names":["
|
|
1
|
+
{"version":3,"file":"Error.js","names":["_monoI18n","require","_classnames","_interopRequireDefault","_react","_images","_providers","e","__esModule","default","ChartError","_ref","errorType","lang","useLocale","isDark","useLayoutProvider","createElement","className","classnames","ChartErrorIcon","exports","Error","ErrorIcon","WidgetError"],"sources":["../../../../src/components/Error/Error.tsx"],"sourcesContent":["import { useLocale } from '@oanda/mono-i18n';\nimport classnames from 'classnames';\nimport React from 'react';\n\nimport { ChartErrorIcon, ErrorIcon } from '../../images';\nimport { useLayoutProvider } from '../../providers';\n\nconst ChartError = ({\n errorType = 'dataUnavailable',\n}: {\n errorType?: 'dataUnavailable' | 'noMatchingResults';\n}) => {\n const { lang } = useLocale();\n const { isDark } = useLayoutProvider();\n\n return (\n <div\n className={classnames(\n 'lw-flex lw-flex-1 lw-flex-col lw-items-center lw-justify-center lw-stroke-2',\n {\n 'lw-text-text-primary': isDark,\n 'lw-text-text-secondary': !isDark,\n }\n )}\n data-testid=\"chart-error\"\n >\n <ChartErrorIcon />\n <span className=\"lw-mt-3 lw-font-sans lw-uppercase\">\n {errorType === 'dataUnavailable'\n ? lang('data_unavailable')\n : lang('no_matching_results')}\n </span>\n </div>\n );\n};\n\nconst Error = () => {\n const { lang } = useLocale();\n const { isDark } = useLayoutProvider();\n\n return (\n <div\n className={classnames(\n 'lw-flex lw-items-center lw-justify-center lw-gap-1',\n {\n 'lw-text-text-primary': isDark,\n 'lw-text-text-secondary': !isDark,\n }\n )}\n data-testid=\"error\"\n >\n <ErrorIcon />\n <span className=\"lw-font-sans lw-text-xs lw-uppercase\">\n {lang('data_unavailable')}\n </span>\n </div>\n );\n};\n\nconst WidgetError = () => (\n <div\n className=\"lw-flex lw-h-[425px] lw-w-full lw-items-center lw-border lw-border-solid lw-border-border-primary\"\n data-testid=\"widget-error\"\n >\n <ChartError />\n </div>\n);\n\nexport { ChartError, Error, WidgetError };\n"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,I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AM;MAC9B,wBAAwB,EAAE,CAACA;IAC7B,CACF,CAAE;IACF,eAAY;EAAO,GAEnBX,MAAA,CAAAK,OAAA,CAAAQ,aAAA,CAACZ,OAAA,CAAAkB,SAAS,MAAE,CAAC,EACbnB,MAAA,CAAAK,OAAA,CAAAQ,aAAA;IAAMC,SAAS,EAAC;EAAsC,GACnDL,IAAI,CAAC,kBAAkB,CACpB,CACH,CAAC;AAEV,CAAC;AAACQ,OAAA,CAAAC,KAAA,GAAAA,KAAA;AAEF,MAAME,WAAW,GAAGA,CAAA,KAClBpB,MAAA,CAAAK,OAAA,CAAAQ,aAAA;EACEC,SAAS,EAAC,mGAAmG;EAC7G,eAAY;AAAc,GAE1Bd,MAAA,CAAAK,OAAA,CAAAQ,aAAA,CAACP,UAAU,MAAE,CACV,CACN;AAACW,OAAA,CAAAG,WAAA,GAAAA,WAAA","ignoreList":[]}
|
|
@@ -1,2 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _Error = require("./Error");
|
|
7
|
+
Object.keys(_Error).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _Error[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _Error[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
2
17
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/Error/index.ts"],"sourcesContent":["export * from './Error';\n"],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","names":["_Error","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sources":["../../../../src/components/Error/index.ts"],"sourcesContent":["export * from './Error';\n"],"mappings":";;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,MAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,MAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,MAAA,CAAAK,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
|
@@ -1,12 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.InfoBox = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
2
9
|
const InfoBox = _ref => {
|
|
3
10
|
let {
|
|
4
11
|
text
|
|
5
12
|
} = _ref;
|
|
6
|
-
return
|
|
13
|
+
return _react.default.createElement("span", {
|
|
7
14
|
className: "lw-ml-1 lw-font-sans lw-text-xs lw-font-bold",
|
|
8
15
|
"data-testid": "info-box"
|
|
9
16
|
}, text);
|
|
10
17
|
};
|
|
11
|
-
|
|
18
|
+
exports.InfoBox = InfoBox;
|
|
12
19
|
//# sourceMappingURL=InfoBox.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InfoBox.js","names":["
|
|
1
|
+
{"version":3,"file":"InfoBox.js","names":["_react","_interopRequireDefault","require","e","__esModule","default","InfoBox","_ref","text","createElement","className","exports"],"sources":["../../../../src/components/InfoBox/InfoBox.tsx"],"sourcesContent":["import React from 'react';\n\nimport type { InfoBoxProps } from './types';\n\nconst InfoBox = ({ text }: InfoBoxProps) => (\n <span\n className=\"lw-ml-1 lw-font-sans lw-text-xs lw-font-bold\"\n data-testid=\"info-box\"\n >\n {text}\n </span>\n);\n\nexport { InfoBox };\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA0B,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAI1B,MAAMG,OAAO,GAAGC,IAAA;EAAA,IAAC;IAAEC;EAAmB,CAAC,GAAAD,IAAA;EAAA,OACrCP,MAAA,CAAAK,OAAA,CAAAI,aAAA;IACEC,SAAS,EAAC,8CAA8C;IACxD,eAAY;EAAU,GAErBF,IACG,CAAC;AAAA,CACR;AAACG,OAAA,CAAAL,OAAA,GAAAA,OAAA","ignoreList":[]}
|
|
@@ -1,3 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _InfoBox = require("./InfoBox");
|
|
7
|
+
Object.keys(_InfoBox).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _InfoBox[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _InfoBox[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
var _types = require("./types");
|
|
18
|
+
Object.keys(_types).forEach(function (key) {
|
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _types[key]) return;
|
|
21
|
+
Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () {
|
|
24
|
+
return _types[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
3
28
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/InfoBox/index.ts"],"sourcesContent":["export * from './InfoBox';\nexport * from './types';\n"],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","names":["_InfoBox","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_types"],"sources":["../../../../src/components/InfoBox/index.ts"],"sourcesContent":["export * from './InfoBox';\nexport * from './types';\n"],"mappings":";;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,QAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,QAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,QAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,MAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,MAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,MAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,MAAA,CAAAL,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
|
@@ -1,9 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.NumberInput = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _reactNumberFormat = require("react-number-format");
|
|
9
|
+
var _images = require("../../images");
|
|
10
|
+
var _Label = require("../Label");
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
1
12
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2
|
-
|
|
3
|
-
import { NumericFormat } from 'react-number-format';
|
|
4
|
-
import { ArrowDownIcon, ArrowUpIcon } from '../../images';
|
|
5
|
-
import { Label } from '../Label';
|
|
6
|
-
export const NumberInput = _ref => {
|
|
13
|
+
const NumberInput = _ref => {
|
|
7
14
|
let {
|
|
8
15
|
label,
|
|
9
16
|
onIncrement,
|
|
@@ -15,14 +22,14 @@ export const NumberInput = _ref => {
|
|
|
15
22
|
withoutArrows,
|
|
16
23
|
...props
|
|
17
24
|
} = _ref;
|
|
18
|
-
return
|
|
25
|
+
return _react.default.createElement("div", {
|
|
19
26
|
className: "lw-group lw-grid lw-w-full lw-max-w-full lw-items-center lw-gap-2 lw-text-text-primary"
|
|
20
|
-
},
|
|
27
|
+
}, _react.default.createElement(_Label.Label, {
|
|
21
28
|
className: "lw-text-text-primary",
|
|
22
29
|
htmlFor: label
|
|
23
|
-
}, label),
|
|
30
|
+
}, label), _react.default.createElement("div", {
|
|
24
31
|
className: "lw-flex lw-h-12 lw-w-full lw-rounded lw-border lw-px-3 lw-py-2 lw-text-sm lw-outline-2 lw-outline-offset-[-2px] lw-outline-primary focus-within:lw-outline"
|
|
25
|
-
},
|
|
32
|
+
}, _react.default.createElement(_reactNumberFormat.NumericFormat, _extends({}, props, {
|
|
26
33
|
allowNegative: false,
|
|
27
34
|
className: "lw-w-full lw-bg-text-negative lw-text-sm focus:lw-outline-none",
|
|
28
35
|
decimalScale: decimalScale,
|
|
@@ -30,16 +37,17 @@ export const NumberInput = _ref => {
|
|
|
30
37
|
placeholder: placeholder,
|
|
31
38
|
thousandSeparator: ",",
|
|
32
39
|
value: value
|
|
33
|
-
})), !disabled && !withoutArrows &&
|
|
40
|
+
})), !disabled && !withoutArrows && _react.default.createElement("div", {
|
|
34
41
|
className: "lw-hidden lw-flex-col lw-justify-center group-hover:lw-flex"
|
|
35
|
-
},
|
|
42
|
+
}, _react.default.createElement("button", {
|
|
36
43
|
className: "lw-h-3 lw-justify-center focus:lw-outline-primary",
|
|
37
44
|
type: "button",
|
|
38
45
|
onClick: onIncrement
|
|
39
|
-
},
|
|
46
|
+
}, _react.default.createElement(_images.ArrowUpIcon, null)), _react.default.createElement("button", {
|
|
40
47
|
className: "lw-justify-center focus:lw-outline-primary",
|
|
41
48
|
type: "button",
|
|
42
49
|
onClick: onDecrement
|
|
43
|
-
},
|
|
50
|
+
}, _react.default.createElement(_images.ArrowDownIcon, null)))));
|
|
44
51
|
};
|
|
52
|
+
exports.NumberInput = NumberInput;
|
|
45
53
|
//# sourceMappingURL=NumberInput.js.map
|