@tallyui/components 3.15.0 → 3.16.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/dist/index.d.ts +23 -2
- package/dist/index.js +444 -355
- package/package.json +11 -9
- package/src/i18n/index.tsx +78 -0
- package/src/i18n/locales/en/components.json +30 -0
- package/src/index.ts +3 -0
- package/src/sale/tender-pane.tsx +35 -32
package/dist/index.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export { TextClassContext } from '@tallyui/primitives';
|
|
|
11
11
|
import { ScaleOverride, ScaleVariables, ScaleStep, Pointer, TypeSetId, ThemeFontFamily, ThemeType } from '@tallyui/theme';
|
|
12
12
|
import { CatalogueView, ProductSortValue, ProductSort, RefundableOrderLine, EarlierRefund, useRegisterSession, RegisterSession, MovementType, ApprovalNeeded, SwitchKind, SwitchWarnings, HandoverSlipData, AppSettings, useAppSettings, useSale, TenderState, TenderAction, AppliedDiscount, Discount, CatalogueEntry, CatalogueViewState, CartQuantityLine, SentOrder, PosOrder, ReceiptData, OutboxState, ParkedOrderSummary, OpenSale, DisplayState, SalesFigures, DatePreset, DayRange } from '@tallyui/pos';
|
|
13
13
|
import { ProductTraits, TraitContext, Money, CustomerTraits, Customer, CustomerInput, OrderRefundPayload, PaymentMethodDescriptor, ProductCategory, SyncNotice, StoreSettingsChoices, StoreSettingsChoice } from '@tallyui/core';
|
|
14
|
+
import { TFunction } from 'i18next';
|
|
14
15
|
|
|
15
16
|
declare const textVariants: (props?: ({
|
|
16
17
|
variant?: "link" | "default" | null | undefined;
|
|
@@ -1584,7 +1585,7 @@ declare function SplitTender(props: TenderProps): JSX.Element;
|
|
|
1584
1585
|
/**
|
|
1585
1586
|
* The tender pane, laid out as WCPOS v2's (monorepo main, packages/core/src/screens/main/pos/checkout/tender/):
|
|
1586
1587
|
* BalanceHeadline and LedgerLegs from ledger-pane.tsx, then the method tiles, entry, quick-cash chips,
|
|
1587
|
-
* keypad and commit from tender-pane.tsx's TenderKeypad. Copy is v2's
|
|
1588
|
+
* keypad and commit from tender-pane.tsx's TenderKeypad. Copy is read with useT, under v2's catalogue keys. Every figure
|
|
1588
1589
|
* comes from pos (useSale's captured-only totals, tenderRounding, quickTenderedAmounts, planLegs).
|
|
1589
1590
|
*/
|
|
1590
1591
|
|
|
@@ -2124,4 +2125,24 @@ interface FontProviderProps {
|
|
|
2124
2125
|
declare function FontProvider({ font, autoTypeSet, loadFonts, children }: FontProviderProps): React$1.JSX.Element;
|
|
2125
2126
|
declare function useFontType(): FontState;
|
|
2126
2127
|
|
|
2127
|
-
|
|
2128
|
+
/**
|
|
2129
|
+
* Port of WCPOS v2 (MIT) `packages/core/src/contexts/translations/index.tsx`: one i18next instance per
|
|
2130
|
+
* provider, a locale change applied with `changeLanguage`, v2's init options and `useT`. The regional
|
|
2131
|
+
* fallback (`fr_CA` → `fr`) is v2's `rxdb-backend.ts` `getBaseLanguage`, as `fallbackLng`. There is no
|
|
2132
|
+
* backend: English is bundled and the app passes other languages as `resources`.
|
|
2133
|
+
*/
|
|
2134
|
+
|
|
2135
|
+
/** Catalogues by language code, as the app spells it (`fr`, `fr_CA`, `fr-CA`): key → string. */
|
|
2136
|
+
type Catalogues = Record<string, Record<string, string>>;
|
|
2137
|
+
interface I18nProviderProps {
|
|
2138
|
+
/** The store's locale (`fr_CA` or `fr-CA`). Without one, the device's locale. */
|
|
2139
|
+
locale?: string;
|
|
2140
|
+
/** Other languages' catalogues; English is bundled. May arrive or change after mount. */
|
|
2141
|
+
resources?: Catalogues;
|
|
2142
|
+
children: React$1.ReactNode;
|
|
2143
|
+
}
|
|
2144
|
+
declare function I18nProvider({ locale, resources, children }: I18nProviderProps): React$1.JSX.Element;
|
|
2145
|
+
/** The components' `t`, read from the nearest `I18nProvider`, else English. Interpolation is `{name}`. */
|
|
2146
|
+
declare function useT(): TFunction;
|
|
2147
|
+
|
|
2148
|
+
export { APPROVAL_REQUIRED_TEXT, Accordion, AccordionContent, AccordionItem, AccordionTrigger, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AppShell, type AppShellProps, Avatar, type AvatarProps, Badge, type BadgeProps, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Cart, type CartAction, CartBar, CartColumnHeads, type CartColumnHeadsProps, CartFoot, type CartFootAction, type CartFootProps, CartLine, CartLineActions, type CartLineActionsProps, type CartLineProps, CartNoteInput, type CartNoteInputProps, CartPanel, type CartPanelProps, CartTotal, type CartTotalProps, CashCountInput, type CashCountInputProps, CashTendered, type CashTenderedProps, Catalogue, type Catalogues, type CategoryItem, CategoryNav, type CategoryNavProps, CategoryTile, type CategoryTileProps, ChangeDisplay, type ChangeDisplayProps, ChargeForm, type ChargeFormProps, Checkbox, CheckoutLayout, type CheckoutLayoutProps, type ChipItem, ClosureSheet, type ClosureSheetProps, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, ComboboxContent, ComboboxEmpty, ComboboxInput, ComboboxItem, ComboboxTrigger, type ConnectionStatus, ConnectorStatus, type ConnectorStatusProps, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CustomerCard, type CustomerCardProps, CustomerDisplayScreen, CustomerForm, type CustomerFormProps, type CustomerFormValues, CustomerOrderHistory, type CustomerOrderHistoryProps, CustomerPicker, type CustomerPickerProps, CustomerSelect, type CustomerSelectProps, DEFAULT_PRODUCT_FILTERS, DIGIT_ROWS, type Denomination, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DiscountBadge, type DiscountBadgeProps, DiscountChips, DiscountForm, DisplaySettings, type DisplaySettingsProps, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, FilterChip, FilterChipGroup, type FilterChipGroupProps, type FilterChipProps, FontProvider, type FontProviderProps, type FontState, type FontStatus, HStack, type HStackProps, HandoverSlip, type HandoverSlipProps, HoverCard, HoverCardContent, HoverCardTrigger, I18nProvider, type I18nProviderProps, Icon, IconButton, type IconButtonProps, type IconProps, InCartBadge, type InCartBadgeProps, Input, InputField, InputRoot, type InputRootProps, InputSlot, Keypad, type KeypadKey, type KeypadProps, Label, type LabelProps, LinePopover, type LinePopoverProps, LiveTabScreen, type LiveTabScreenProps, type LiveTabScreenState, Loader, type LoaderProps, MovementSheet, type MovementSheetProps, NavDrawer, type NavDrawerProps, NavRail, type NavRailProps, OpenRegisterCard, type OpenRegisterCardProps, OpenSaleTabs, type OpenSaleTabsProps, OrderCard, type OrderCardProps, OrderDetail, type OrderDetailLineItem, type OrderDetailProps, type OrderHistoryRow, OrderList, type OrderListProps, type OrderStatus, OrderStatusBadge, type OrderStatusBadgeProps, OrderSummary, OrderSummaryLine, type OrderSummaryLineProps, type OrderSummaryPayment, type OrderSummaryProps, OrdersList, POSLayout, type POSLayoutProps, PRODUCT_FILTER_CHIPS, ParkedSales, type ParkedSalesProps, type PaymentMethod, PaymentMethodCard, type PaymentMethodCardProps, PaymentSelector, type PaymentSelectorProps, Popover, PopoverContent, PopoverTrigger, PriceForm, ProductCard, type ProductCardProps, ProductFilterBar, type ProductFilterBarProps, type ProductFilterChip, type ProductFilters, ProductGrid, type ProductGridProps, ProductImage, type ProductImageProps, ProductList, type ProductListProps, ProductPrice, type ProductPriceProps, ProductSku, type ProductSkuProps, ProductStockBadge, type ProductStockBadgeProps, ProductTable, type ProductTableColumn, type ProductTableProps, ProductTitle, type ProductTitleProps, ProductVariantPicker, type ProductVariantPickerProps, Progress, type ProgressProps, QuantityStepper, type QuantityStepperProps, RadioGroup, RadioGroupItem, Receipt, type ReceiptItem, ReceiptPreview, type ReceiptPreviewProps, RefundForm, type RefundFormProps, type RefundFormValue, RefundModal, type RefundModalProps, RegisterBar, type RegisterBarPill, type RegisterBarProps, RegisterColumn, type RegisterColumnProps, RegisterCount, type RegisterCountProps, RegisterOpenClose, type RegisterOpenCloseProps, RegisterPanel, type RegisterPanelProps, RegisterPicker, type RegisterPickerProps, type RegisterPickerRegister, RegisterSummary, type RegisterSummaryProps, type SalesCardId, SalesCards, type SalesCardsProps, type SalesFilters, SalesFiltersBar, type SalesFiltersBarProps, SalesHero, type SalesHeroProps, type SalesOption, SalesRoom, type SalesRoomProps, ScaleProvider, type ScaleProviderProps, type ScaleScopeProps, type ScaleState, SearchIcon, SearchInput, type SearchInputProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, Separator, type SeparatorProps, SettingsGroup, type SettingsGroupProps, SettingsLayout, type SettingsLayoutProps, SettingsRow, type SettingsRowProps, type ShellNavItem, Slider, type SliderProps, SplitTender, StoreSettingsChoiceScreen, type StoreSettingsChoiceScreenProps, type SvgIconProps, Switch, SwitchConfirm, type SwitchConfirmProps, SyncStatus, Table, TableBody, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tender, TenderPane, type TenderPaneProps, Text, type TextProps, Textarea, type TextareaProps, Toast, ToastClose, ToastDescription, type ToastProps, ToastTitle, Toggle, ToggleGroup, ToggleGroupItem, type ToggleGroupItemProps, type ToggleGroupProps, type ToggleProps, Tooltip, TooltipContent, TooltipTrigger, type TransactionSummary, VStack, type VStackProps, type VariantOption, ViewToggle, type ViewToggleProps, XIcon, avatarVariants, badgeTextVariants, badgeVariants, buttonTextVariants, buttonVariants, createSvgIcon, defaultProductColumns, describeRegisterBarPill, discountLabel, formatStockSyncTime, hstackVariants, iconButtonVariants, iconVariants, injectPrintStyle, loaderVariants, orderReference, parseDiscount, parsePrice, textVariants, toastVariants, toggleTextVariants, toggleVariants, useDefaultProductColumns, useFontType, useInputContext, usePointer, useScale, useT, vstackVariants };
|