@lessly/ui 0.16.0 → 0.17.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 +59 -1
- package/dist/index.js +550 -0
- package/dist/styles.css +9 -7
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1477,4 +1477,62 @@ interface NotificationToasterProps {
|
|
|
1477
1477
|
}
|
|
1478
1478
|
declare const NotificationToaster: React$1.ForwardRefExoticComponent<NotificationToasterProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1479
1479
|
|
|
1480
|
-
|
|
1480
|
+
/**
|
|
1481
|
+
* ISO 3166-1 alpha-2 countries, English names, sorted by name. Platform APIs that take a country
|
|
1482
|
+
* on an organization validate it as an alpha-2 code and upper-case it, so this list is the
|
|
1483
|
+
* client-side mirror of what such an endpoint accepts — an option outside it would be rejected.
|
|
1484
|
+
* Generated from the ISO 3166-1 code list with `Intl.DisplayNames('en', { type: 'region' })`.
|
|
1485
|
+
*/
|
|
1486
|
+
declare const COUNTRY_OPTIONS: SelectOption[];
|
|
1487
|
+
|
|
1488
|
+
/** One beneficial owner, in the shape the organization API takes it. */
|
|
1489
|
+
interface BeneficialOwnerPayload {
|
|
1490
|
+
name: string;
|
|
1491
|
+
country: string;
|
|
1492
|
+
share_pct: number;
|
|
1493
|
+
}
|
|
1494
|
+
/** The submit payload — snake_case, exactly as the organization-creation endpoint takes it. */
|
|
1495
|
+
interface OrganizationOnboardingPayload {
|
|
1496
|
+
name: string;
|
|
1497
|
+
legal_name?: string;
|
|
1498
|
+
owner_name?: string;
|
|
1499
|
+
country_of_incorporation?: string;
|
|
1500
|
+
residency_country?: string;
|
|
1501
|
+
beneficial_owners: BeneficialOwnerPayload[];
|
|
1502
|
+
/** Only present when no listed owner holds a controlling share. */
|
|
1503
|
+
ownership_confirmed?: boolean;
|
|
1504
|
+
}
|
|
1505
|
+
interface OrganizationOnboardingDefaults {
|
|
1506
|
+
name?: string;
|
|
1507
|
+
legal_name?: string;
|
|
1508
|
+
owner_name?: string;
|
|
1509
|
+
country_of_incorporation?: string;
|
|
1510
|
+
residency_country?: string;
|
|
1511
|
+
beneficial_owners?: BeneficialOwnerPayload[];
|
|
1512
|
+
}
|
|
1513
|
+
interface OrganizationOnboardingFormProps {
|
|
1514
|
+
/** Makes the country of incorporation — and the ownership confirmation, where it is shown —
|
|
1515
|
+
* mandatory. Mirrors the server-side requirement the consumer is configured for. */
|
|
1516
|
+
requireSanctionsFields: boolean;
|
|
1517
|
+
onSubmit: (payload: OrganizationOnboardingPayload) => void;
|
|
1518
|
+
defaultValues?: OrganizationOnboardingDefaults;
|
|
1519
|
+
/** Disables the submit button and swaps its label while the caller's request is in flight. */
|
|
1520
|
+
submitting?: boolean;
|
|
1521
|
+
serverError?: string | null;
|
|
1522
|
+
/** Field-level messages returned alongside a server error. */
|
|
1523
|
+
violations?: string[];
|
|
1524
|
+
/** Defaults to the built-in ISO 3166-1 alpha-2 list. */
|
|
1525
|
+
countries?: SelectOption[];
|
|
1526
|
+
submitLabel?: string;
|
|
1527
|
+
/** Renders a Cancel button when provided. */
|
|
1528
|
+
onCancel?: () => void;
|
|
1529
|
+
className?: string;
|
|
1530
|
+
}
|
|
1531
|
+
/**
|
|
1532
|
+
* The organization-creation form: name plus the extra details some jurisdictions require of a
|
|
1533
|
+
* new organization. Presentational and self-contained — it never calls an API and never
|
|
1534
|
+
* navigates; the caller wraps it in its own dialog and handles the outcome of `onSubmit`.
|
|
1535
|
+
*/
|
|
1536
|
+
declare function OrganizationOnboardingForm({ requireSanctionsFields, onSubmit, defaultValues, submitting, serverError, violations, countries, submitLabel, onCancel, className, }: OrganizationOnboardingFormProps): React$1.JSX.Element;
|
|
1537
|
+
|
|
1538
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AppShell, type AppShellProps, AppSidebar, type AppSidebarProps, AspectRatio, AuthenticatedLayout, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, type BeneficialOwnerPayload, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, type ButtonProps, COUNTRY_OPTIONS, Calendar, type CalendarProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, type CarouselApi, CarouselContent, type CarouselContextProps, CarouselItem, CarouselNext, type CarouselOptions, type CarouselPlugin, CarouselPrevious, type CarouselProps, Checkbox, Code, CodeBlock, type CodeBlockProps, type CodeLang, type CodeProps, Col, type ColProps, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ConfirmDialog, type ConfirmDialogProps, type ConnectionAuth, ConnectionCard, type ConnectionCardProps, type ConnectionScope, type ConnectionStatus, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CopyButton, type CopyButtonProps, type CreateProductSubmit, CreateProductWindow, type CreateProductWindowOrganization, type CreateProductWindowProduct, type CreateProductWindowProps, DatePicker, type DatePickerProps, type DeltaDirection, type DeltaTone, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DocsLink, type DocsLinkProps, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, type EmptyStateProps, ExtensionIcon, type ExtensionIconProps, ExtensionLink, type ExtensionLinkProps, type ExtensionLinkUiMode, FeedbackButton, type FeedbackButtonLabels, type FeedbackButtonProps, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, Grid, GridOverlay, type GridOverlayProps, type GridProps, HoverCard, HoverCardContent, HoverCardTrigger, InlineError, type InlineErrorProps, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, type InputProps, Label, MenuDivider, MenuPopup, type MenuPopupProps, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, type NavItem, type NavLinkComponent, NavRow, type NavRowProps, type NavRowVariant, NavSectionLabel, type NavSectionLabelProps, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, type NotifClass, type NotificationAction, NotificationBell, type NotificationBellProps, NotificationCenter, type NotificationCenterProps, type NotificationClass, type NotificationDeepLink, type NotificationItem, type NotificationMute, type NotificationPreferences, type NotificationProduct, NotificationSettings, type NotificationSettingsProps, type NotificationSeverity, type NotificationSubscription, type NotificationThreshold, NotificationToast, type NotificationToastDwell, type NotificationToastProps, NotificationToaster, type NotificationToasterPosition, type NotificationToasterProps, OrgProductSwitcher, type OrgProductSwitcherAction, type OrgProductSwitcherItem, type OrgProductSwitcherProps, type OrganizationOnboardingDefaults, OrganizationOnboardingForm, type OrganizationOnboardingFormProps, type OrganizationOnboardingPayload, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, type PaginationLinkProps, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, RequestRow, type RequestRowProps, type RequestState, type RequestSurface, type ResolvedTheme, type Responsive, ScrollArea, ScrollBar, SectionIntro, type SectionIntroProps, SegmentChip, type SegmentChipProps, Select, type SelectOption, type SelectProps, Separator, type Severity, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SidebarBackHeader, type SidebarBackHeaderProps, SidebarNav, SidebarNavLink, type SidebarNavLinkProps, type SidebarNavProps, SidebarProductHeader, type SidebarProductHeaderProps, SignInScreen, type SignInScreenProps, type SignInScreenState, Skeleton, Slider, StatCard, type StatCardProps, StatusDot, type StatusDotProps, Switch, type SwitchProps, TOAST_DWELL, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type TextareaProps, type Theme, ThemeToggle, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type UseSidebarOptions, type UseSidebarResult, UserMenu, type UserMenuItem, type UserMenuProps, type UserMenuUser, alertVariants, badgeVariants, buttonVariants, cn, formatRelativeAge, isKnownExtensionIcon, isNotificationSettled, navigationMenuTriggerStyle, segmentChipVariants, severityBadgeVariant, severityLabels, statusDotVariants, toggleVariants, useCarousel, useFormField, useIsMobile, useSidebar, useTheme };
|
package/dist/index.js
CHANGED
|
@@ -5092,6 +5092,554 @@ var NotificationToaster = React65.forwardRef(
|
|
|
5092
5092
|
}
|
|
5093
5093
|
);
|
|
5094
5094
|
NotificationToaster.displayName = "NotificationToaster";
|
|
5095
|
+
|
|
5096
|
+
// src/lib/countries.ts
|
|
5097
|
+
var COUNTRY_OPTIONS = [
|
|
5098
|
+
{ value: "AF", label: "Afghanistan" },
|
|
5099
|
+
{ value: "AX", label: "\xC5land Islands" },
|
|
5100
|
+
{ value: "AL", label: "Albania" },
|
|
5101
|
+
{ value: "DZ", label: "Algeria" },
|
|
5102
|
+
{ value: "AS", label: "American Samoa" },
|
|
5103
|
+
{ value: "AD", label: "Andorra" },
|
|
5104
|
+
{ value: "AO", label: "Angola" },
|
|
5105
|
+
{ value: "AI", label: "Anguilla" },
|
|
5106
|
+
{ value: "AQ", label: "Antarctica" },
|
|
5107
|
+
{ value: "AG", label: "Antigua & Barbuda" },
|
|
5108
|
+
{ value: "AR", label: "Argentina" },
|
|
5109
|
+
{ value: "AM", label: "Armenia" },
|
|
5110
|
+
{ value: "AW", label: "Aruba" },
|
|
5111
|
+
{ value: "AU", label: "Australia" },
|
|
5112
|
+
{ value: "AT", label: "Austria" },
|
|
5113
|
+
{ value: "AZ", label: "Azerbaijan" },
|
|
5114
|
+
{ value: "BS", label: "Bahamas" },
|
|
5115
|
+
{ value: "BH", label: "Bahrain" },
|
|
5116
|
+
{ value: "BD", label: "Bangladesh" },
|
|
5117
|
+
{ value: "BB", label: "Barbados" },
|
|
5118
|
+
{ value: "BY", label: "Belarus" },
|
|
5119
|
+
{ value: "BE", label: "Belgium" },
|
|
5120
|
+
{ value: "BZ", label: "Belize" },
|
|
5121
|
+
{ value: "BJ", label: "Benin" },
|
|
5122
|
+
{ value: "BM", label: "Bermuda" },
|
|
5123
|
+
{ value: "BT", label: "Bhutan" },
|
|
5124
|
+
{ value: "BO", label: "Bolivia" },
|
|
5125
|
+
{ value: "BA", label: "Bosnia & Herzegovina" },
|
|
5126
|
+
{ value: "BW", label: "Botswana" },
|
|
5127
|
+
{ value: "BV", label: "Bouvet Island" },
|
|
5128
|
+
{ value: "BR", label: "Brazil" },
|
|
5129
|
+
{ value: "IO", label: "British Indian Ocean Territory" },
|
|
5130
|
+
{ value: "VG", label: "British Virgin Islands" },
|
|
5131
|
+
{ value: "BN", label: "Brunei" },
|
|
5132
|
+
{ value: "BG", label: "Bulgaria" },
|
|
5133
|
+
{ value: "BF", label: "Burkina Faso" },
|
|
5134
|
+
{ value: "BI", label: "Burundi" },
|
|
5135
|
+
{ value: "KH", label: "Cambodia" },
|
|
5136
|
+
{ value: "CM", label: "Cameroon" },
|
|
5137
|
+
{ value: "CA", label: "Canada" },
|
|
5138
|
+
{ value: "CV", label: "Cape Verde" },
|
|
5139
|
+
{ value: "BQ", label: "Caribbean Netherlands" },
|
|
5140
|
+
{ value: "KY", label: "Cayman Islands" },
|
|
5141
|
+
{ value: "CF", label: "Central African Republic" },
|
|
5142
|
+
{ value: "TD", label: "Chad" },
|
|
5143
|
+
{ value: "CL", label: "Chile" },
|
|
5144
|
+
{ value: "CN", label: "China" },
|
|
5145
|
+
{ value: "CX", label: "Christmas Island" },
|
|
5146
|
+
{ value: "CC", label: "Cocos (Keeling) Islands" },
|
|
5147
|
+
{ value: "CO", label: "Colombia" },
|
|
5148
|
+
{ value: "KM", label: "Comoros" },
|
|
5149
|
+
{ value: "CG", label: "Congo - Brazzaville" },
|
|
5150
|
+
{ value: "CD", label: "Congo - Kinshasa" },
|
|
5151
|
+
{ value: "CK", label: "Cook Islands" },
|
|
5152
|
+
{ value: "CR", label: "Costa Rica" },
|
|
5153
|
+
{ value: "CI", label: "C\xF4te d\u2019Ivoire" },
|
|
5154
|
+
{ value: "HR", label: "Croatia" },
|
|
5155
|
+
{ value: "CU", label: "Cuba" },
|
|
5156
|
+
{ value: "CW", label: "Cura\xE7ao" },
|
|
5157
|
+
{ value: "CY", label: "Cyprus" },
|
|
5158
|
+
{ value: "CZ", label: "Czechia" },
|
|
5159
|
+
{ value: "DK", label: "Denmark" },
|
|
5160
|
+
{ value: "DJ", label: "Djibouti" },
|
|
5161
|
+
{ value: "DM", label: "Dominica" },
|
|
5162
|
+
{ value: "DO", label: "Dominican Republic" },
|
|
5163
|
+
{ value: "EC", label: "Ecuador" },
|
|
5164
|
+
{ value: "EG", label: "Egypt" },
|
|
5165
|
+
{ value: "SV", label: "El Salvador" },
|
|
5166
|
+
{ value: "GQ", label: "Equatorial Guinea" },
|
|
5167
|
+
{ value: "ER", label: "Eritrea" },
|
|
5168
|
+
{ value: "EE", label: "Estonia" },
|
|
5169
|
+
{ value: "SZ", label: "Eswatini" },
|
|
5170
|
+
{ value: "ET", label: "Ethiopia" },
|
|
5171
|
+
{ value: "FK", label: "Falkland Islands" },
|
|
5172
|
+
{ value: "FO", label: "Faroe Islands" },
|
|
5173
|
+
{ value: "FJ", label: "Fiji" },
|
|
5174
|
+
{ value: "FI", label: "Finland" },
|
|
5175
|
+
{ value: "FR", label: "France" },
|
|
5176
|
+
{ value: "GF", label: "French Guiana" },
|
|
5177
|
+
{ value: "PF", label: "French Polynesia" },
|
|
5178
|
+
{ value: "TF", label: "French Southern Territories" },
|
|
5179
|
+
{ value: "GA", label: "Gabon" },
|
|
5180
|
+
{ value: "GM", label: "Gambia" },
|
|
5181
|
+
{ value: "GE", label: "Georgia" },
|
|
5182
|
+
{ value: "DE", label: "Germany" },
|
|
5183
|
+
{ value: "GH", label: "Ghana" },
|
|
5184
|
+
{ value: "GI", label: "Gibraltar" },
|
|
5185
|
+
{ value: "GR", label: "Greece" },
|
|
5186
|
+
{ value: "GL", label: "Greenland" },
|
|
5187
|
+
{ value: "GD", label: "Grenada" },
|
|
5188
|
+
{ value: "GP", label: "Guadeloupe" },
|
|
5189
|
+
{ value: "GU", label: "Guam" },
|
|
5190
|
+
{ value: "GT", label: "Guatemala" },
|
|
5191
|
+
{ value: "GG", label: "Guernsey" },
|
|
5192
|
+
{ value: "GN", label: "Guinea" },
|
|
5193
|
+
{ value: "GW", label: "Guinea-Bissau" },
|
|
5194
|
+
{ value: "GY", label: "Guyana" },
|
|
5195
|
+
{ value: "HT", label: "Haiti" },
|
|
5196
|
+
{ value: "HM", label: "Heard & McDonald Islands" },
|
|
5197
|
+
{ value: "HN", label: "Honduras" },
|
|
5198
|
+
{ value: "HK", label: "Hong Kong SAR China" },
|
|
5199
|
+
{ value: "HU", label: "Hungary" },
|
|
5200
|
+
{ value: "IS", label: "Iceland" },
|
|
5201
|
+
{ value: "IN", label: "India" },
|
|
5202
|
+
{ value: "ID", label: "Indonesia" },
|
|
5203
|
+
{ value: "IR", label: "Iran" },
|
|
5204
|
+
{ value: "IQ", label: "Iraq" },
|
|
5205
|
+
{ value: "IE", label: "Ireland" },
|
|
5206
|
+
{ value: "IM", label: "Isle of Man" },
|
|
5207
|
+
{ value: "IL", label: "Israel" },
|
|
5208
|
+
{ value: "IT", label: "Italy" },
|
|
5209
|
+
{ value: "JM", label: "Jamaica" },
|
|
5210
|
+
{ value: "JP", label: "Japan" },
|
|
5211
|
+
{ value: "JE", label: "Jersey" },
|
|
5212
|
+
{ value: "JO", label: "Jordan" },
|
|
5213
|
+
{ value: "KZ", label: "Kazakhstan" },
|
|
5214
|
+
{ value: "KE", label: "Kenya" },
|
|
5215
|
+
{ value: "KI", label: "Kiribati" },
|
|
5216
|
+
{ value: "KW", label: "Kuwait" },
|
|
5217
|
+
{ value: "KG", label: "Kyrgyzstan" },
|
|
5218
|
+
{ value: "LA", label: "Laos" },
|
|
5219
|
+
{ value: "LV", label: "Latvia" },
|
|
5220
|
+
{ value: "LB", label: "Lebanon" },
|
|
5221
|
+
{ value: "LS", label: "Lesotho" },
|
|
5222
|
+
{ value: "LR", label: "Liberia" },
|
|
5223
|
+
{ value: "LY", label: "Libya" },
|
|
5224
|
+
{ value: "LI", label: "Liechtenstein" },
|
|
5225
|
+
{ value: "LT", label: "Lithuania" },
|
|
5226
|
+
{ value: "LU", label: "Luxembourg" },
|
|
5227
|
+
{ value: "MO", label: "Macao SAR China" },
|
|
5228
|
+
{ value: "MG", label: "Madagascar" },
|
|
5229
|
+
{ value: "MW", label: "Malawi" },
|
|
5230
|
+
{ value: "MY", label: "Malaysia" },
|
|
5231
|
+
{ value: "MV", label: "Maldives" },
|
|
5232
|
+
{ value: "ML", label: "Mali" },
|
|
5233
|
+
{ value: "MT", label: "Malta" },
|
|
5234
|
+
{ value: "MH", label: "Marshall Islands" },
|
|
5235
|
+
{ value: "MQ", label: "Martinique" },
|
|
5236
|
+
{ value: "MR", label: "Mauritania" },
|
|
5237
|
+
{ value: "MU", label: "Mauritius" },
|
|
5238
|
+
{ value: "YT", label: "Mayotte" },
|
|
5239
|
+
{ value: "MX", label: "Mexico" },
|
|
5240
|
+
{ value: "FM", label: "Micronesia" },
|
|
5241
|
+
{ value: "MD", label: "Moldova" },
|
|
5242
|
+
{ value: "MC", label: "Monaco" },
|
|
5243
|
+
{ value: "MN", label: "Mongolia" },
|
|
5244
|
+
{ value: "ME", label: "Montenegro" },
|
|
5245
|
+
{ value: "MS", label: "Montserrat" },
|
|
5246
|
+
{ value: "MA", label: "Morocco" },
|
|
5247
|
+
{ value: "MZ", label: "Mozambique" },
|
|
5248
|
+
{ value: "MM", label: "Myanmar (Burma)" },
|
|
5249
|
+
{ value: "NA", label: "Namibia" },
|
|
5250
|
+
{ value: "NR", label: "Nauru" },
|
|
5251
|
+
{ value: "NP", label: "Nepal" },
|
|
5252
|
+
{ value: "NL", label: "Netherlands" },
|
|
5253
|
+
{ value: "NC", label: "New Caledonia" },
|
|
5254
|
+
{ value: "NZ", label: "New Zealand" },
|
|
5255
|
+
{ value: "NI", label: "Nicaragua" },
|
|
5256
|
+
{ value: "NE", label: "Niger" },
|
|
5257
|
+
{ value: "NG", label: "Nigeria" },
|
|
5258
|
+
{ value: "NU", label: "Niue" },
|
|
5259
|
+
{ value: "NF", label: "Norfolk Island" },
|
|
5260
|
+
{ value: "KP", label: "North Korea" },
|
|
5261
|
+
{ value: "MK", label: "North Macedonia" },
|
|
5262
|
+
{ value: "MP", label: "Northern Mariana Islands" },
|
|
5263
|
+
{ value: "NO", label: "Norway" },
|
|
5264
|
+
{ value: "OM", label: "Oman" },
|
|
5265
|
+
{ value: "PK", label: "Pakistan" },
|
|
5266
|
+
{ value: "PW", label: "Palau" },
|
|
5267
|
+
{ value: "PS", label: "Palestinian Territories" },
|
|
5268
|
+
{ value: "PA", label: "Panama" },
|
|
5269
|
+
{ value: "PG", label: "Papua New Guinea" },
|
|
5270
|
+
{ value: "PY", label: "Paraguay" },
|
|
5271
|
+
{ value: "PE", label: "Peru" },
|
|
5272
|
+
{ value: "PH", label: "Philippines" },
|
|
5273
|
+
{ value: "PN", label: "Pitcairn Islands" },
|
|
5274
|
+
{ value: "PL", label: "Poland" },
|
|
5275
|
+
{ value: "PT", label: "Portugal" },
|
|
5276
|
+
{ value: "PR", label: "Puerto Rico" },
|
|
5277
|
+
{ value: "QA", label: "Qatar" },
|
|
5278
|
+
{ value: "RE", label: "R\xE9union" },
|
|
5279
|
+
{ value: "RO", label: "Romania" },
|
|
5280
|
+
{ value: "RU", label: "Russia" },
|
|
5281
|
+
{ value: "RW", label: "Rwanda" },
|
|
5282
|
+
{ value: "WS", label: "Samoa" },
|
|
5283
|
+
{ value: "SM", label: "San Marino" },
|
|
5284
|
+
{ value: "ST", label: "S\xE3o Tom\xE9 & Pr\xEDncipe" },
|
|
5285
|
+
{ value: "SA", label: "Saudi Arabia" },
|
|
5286
|
+
{ value: "SN", label: "Senegal" },
|
|
5287
|
+
{ value: "RS", label: "Serbia" },
|
|
5288
|
+
{ value: "SC", label: "Seychelles" },
|
|
5289
|
+
{ value: "SL", label: "Sierra Leone" },
|
|
5290
|
+
{ value: "SG", label: "Singapore" },
|
|
5291
|
+
{ value: "SX", label: "Sint Maarten" },
|
|
5292
|
+
{ value: "SK", label: "Slovakia" },
|
|
5293
|
+
{ value: "SI", label: "Slovenia" },
|
|
5294
|
+
{ value: "SB", label: "Solomon Islands" },
|
|
5295
|
+
{ value: "SO", label: "Somalia" },
|
|
5296
|
+
{ value: "ZA", label: "South Africa" },
|
|
5297
|
+
{ value: "GS", label: "South Georgia & South Sandwich Islands" },
|
|
5298
|
+
{ value: "KR", label: "South Korea" },
|
|
5299
|
+
{ value: "SS", label: "South Sudan" },
|
|
5300
|
+
{ value: "ES", label: "Spain" },
|
|
5301
|
+
{ value: "LK", label: "Sri Lanka" },
|
|
5302
|
+
{ value: "BL", label: "St. Barth\xE9lemy" },
|
|
5303
|
+
{ value: "SH", label: "St. Helena" },
|
|
5304
|
+
{ value: "KN", label: "St. Kitts & Nevis" },
|
|
5305
|
+
{ value: "LC", label: "St. Lucia" },
|
|
5306
|
+
{ value: "MF", label: "St. Martin" },
|
|
5307
|
+
{ value: "PM", label: "St. Pierre & Miquelon" },
|
|
5308
|
+
{ value: "VC", label: "St. Vincent & Grenadines" },
|
|
5309
|
+
{ value: "SD", label: "Sudan" },
|
|
5310
|
+
{ value: "SR", label: "Suriname" },
|
|
5311
|
+
{ value: "SJ", label: "Svalbard & Jan Mayen" },
|
|
5312
|
+
{ value: "SE", label: "Sweden" },
|
|
5313
|
+
{ value: "CH", label: "Switzerland" },
|
|
5314
|
+
{ value: "SY", label: "Syria" },
|
|
5315
|
+
{ value: "TW", label: "Taiwan" },
|
|
5316
|
+
{ value: "TJ", label: "Tajikistan" },
|
|
5317
|
+
{ value: "TZ", label: "Tanzania" },
|
|
5318
|
+
{ value: "TH", label: "Thailand" },
|
|
5319
|
+
{ value: "TL", label: "Timor-Leste" },
|
|
5320
|
+
{ value: "TG", label: "Togo" },
|
|
5321
|
+
{ value: "TK", label: "Tokelau" },
|
|
5322
|
+
{ value: "TO", label: "Tonga" },
|
|
5323
|
+
{ value: "TT", label: "Trinidad & Tobago" },
|
|
5324
|
+
{ value: "TN", label: "Tunisia" },
|
|
5325
|
+
{ value: "TR", label: "T\xFCrkiye" },
|
|
5326
|
+
{ value: "TM", label: "Turkmenistan" },
|
|
5327
|
+
{ value: "TC", label: "Turks & Caicos Islands" },
|
|
5328
|
+
{ value: "TV", label: "Tuvalu" },
|
|
5329
|
+
{ value: "UM", label: "U.S. Outlying Islands" },
|
|
5330
|
+
{ value: "VI", label: "U.S. Virgin Islands" },
|
|
5331
|
+
{ value: "UG", label: "Uganda" },
|
|
5332
|
+
{ value: "UA", label: "Ukraine" },
|
|
5333
|
+
{ value: "AE", label: "United Arab Emirates" },
|
|
5334
|
+
{ value: "GB", label: "United Kingdom" },
|
|
5335
|
+
{ value: "US", label: "United States" },
|
|
5336
|
+
{ value: "UY", label: "Uruguay" },
|
|
5337
|
+
{ value: "UZ", label: "Uzbekistan" },
|
|
5338
|
+
{ value: "VU", label: "Vanuatu" },
|
|
5339
|
+
{ value: "VA", label: "Vatican City" },
|
|
5340
|
+
{ value: "VE", label: "Venezuela" },
|
|
5341
|
+
{ value: "VN", label: "Vietnam" },
|
|
5342
|
+
{ value: "WF", label: "Wallis & Futuna" },
|
|
5343
|
+
{ value: "EH", label: "Western Sahara" },
|
|
5344
|
+
{ value: "YE", label: "Yemen" },
|
|
5345
|
+
{ value: "ZM", label: "Zambia" },
|
|
5346
|
+
{ value: "ZW", label: "Zimbabwe" }
|
|
5347
|
+
];
|
|
5348
|
+
|
|
5349
|
+
// src/components/organization-onboarding-form.tsx
|
|
5350
|
+
import * as React66 from "react";
|
|
5351
|
+
import { jsx as jsx79, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
5352
|
+
var CONTROLLER_SHARE_PCT = 50;
|
|
5353
|
+
var MAX_BENEFICIAL_OWNERS = 50;
|
|
5354
|
+
function parseShare(raw) {
|
|
5355
|
+
if (!/^\d{1,3}$/.test(raw.trim())) return null;
|
|
5356
|
+
const n = Number(raw);
|
|
5357
|
+
return n >= 0 && n <= 100 ? n : null;
|
|
5358
|
+
}
|
|
5359
|
+
function isRowBlank(row) {
|
|
5360
|
+
return row.name.trim() === "" && row.country === "" && row.share.trim() === "";
|
|
5361
|
+
}
|
|
5362
|
+
function initialRows(owners) {
|
|
5363
|
+
return (owners ?? []).map((owner, i) => ({
|
|
5364
|
+
key: i + 1,
|
|
5365
|
+
name: owner.name,
|
|
5366
|
+
country: owner.country,
|
|
5367
|
+
share: String(owner.share_pct)
|
|
5368
|
+
}));
|
|
5369
|
+
}
|
|
5370
|
+
function OrganizationOnboardingForm({
|
|
5371
|
+
requireSanctionsFields,
|
|
5372
|
+
onSubmit,
|
|
5373
|
+
defaultValues,
|
|
5374
|
+
submitting,
|
|
5375
|
+
serverError,
|
|
5376
|
+
violations,
|
|
5377
|
+
countries = COUNTRY_OPTIONS,
|
|
5378
|
+
submitLabel = "Create",
|
|
5379
|
+
onCancel,
|
|
5380
|
+
className
|
|
5381
|
+
}) {
|
|
5382
|
+
const [name, setName] = React66.useState(defaultValues?.name ?? "");
|
|
5383
|
+
const [legalName, setLegalName] = React66.useState(defaultValues?.legal_name ?? "");
|
|
5384
|
+
const [ownerName, setOwnerName] = React66.useState(defaultValues?.owner_name ?? "");
|
|
5385
|
+
const [countryOfIncorporation, setCountryOfIncorporation] = React66.useState(
|
|
5386
|
+
defaultValues?.country_of_incorporation ?? ""
|
|
5387
|
+
);
|
|
5388
|
+
const [residencyCountry, setResidencyCountry] = React66.useState(
|
|
5389
|
+
defaultValues?.residency_country ?? ""
|
|
5390
|
+
);
|
|
5391
|
+
const [owners, setOwners] = React66.useState(
|
|
5392
|
+
() => initialRows(defaultValues?.beneficial_owners)
|
|
5393
|
+
);
|
|
5394
|
+
const [ownershipConfirmed, setOwnershipConfirmed] = React66.useState(false);
|
|
5395
|
+
const nextKeyRef = React66.useRef(owners.length);
|
|
5396
|
+
const submittingRef = React66.useRef(false);
|
|
5397
|
+
const trimmed = name.trim();
|
|
5398
|
+
const filledOwners = owners.filter((row) => !isRowBlank(row));
|
|
5399
|
+
const ownerShares = filledOwners.map((row) => parseShare(row.share));
|
|
5400
|
+
const ownersValid = filledOwners.every(
|
|
5401
|
+
(row, i) => row.name.trim() !== "" && row.country !== "" && ownerShares[i] !== null
|
|
5402
|
+
);
|
|
5403
|
+
const shareSum = ownerShares.reduce((sum, share) => sum + (share ?? 0), 0);
|
|
5404
|
+
const hasController = ownerShares.some(
|
|
5405
|
+
(share) => share !== null && share >= CONTROLLER_SHARE_PCT
|
|
5406
|
+
);
|
|
5407
|
+
const needsOwnershipConfirmation = !hasController;
|
|
5408
|
+
const missingCountry = requireSanctionsFields && countryOfIncorporation === "";
|
|
5409
|
+
const missingConfirmation = requireSanctionsFields && needsOwnershipConfirmation && !ownershipConfirmed;
|
|
5410
|
+
const canSubmit = trimmed !== "" && ownersValid && !missingCountry && !missingConfirmation && !submitting;
|
|
5411
|
+
const addOwner = () => {
|
|
5412
|
+
if (owners.length >= MAX_BENEFICIAL_OWNERS) return;
|
|
5413
|
+
nextKeyRef.current += 1;
|
|
5414
|
+
setOwners((prev) => [
|
|
5415
|
+
...prev,
|
|
5416
|
+
{ key: nextKeyRef.current, name: "", country: "", share: "" }
|
|
5417
|
+
]);
|
|
5418
|
+
};
|
|
5419
|
+
const removeOwner = (key) => setOwners((prev) => prev.filter((row) => row.key !== key));
|
|
5420
|
+
const patchOwner = (key, patch) => setOwners((prev) => prev.map((row) => row.key === key ? { ...row, ...patch } : row));
|
|
5421
|
+
const handleSubmit = (event) => {
|
|
5422
|
+
event.preventDefault();
|
|
5423
|
+
if (!canSubmit || submittingRef.current) return;
|
|
5424
|
+
submittingRef.current = true;
|
|
5425
|
+
const beneficialOwners = filledOwners.map((row, i) => ({
|
|
5426
|
+
name: row.name,
|
|
5427
|
+
country: row.country,
|
|
5428
|
+
share_pct: ownerShares[i] ?? 0
|
|
5429
|
+
}));
|
|
5430
|
+
onSubmit({
|
|
5431
|
+
name: trimmed,
|
|
5432
|
+
...legalName.trim() !== "" ? { legal_name: legalName.trim() } : {},
|
|
5433
|
+
...ownerName.trim() !== "" ? { owner_name: ownerName.trim() } : {},
|
|
5434
|
+
...countryOfIncorporation !== "" ? { country_of_incorporation: countryOfIncorporation } : {},
|
|
5435
|
+
...residencyCountry !== "" ? { residency_country: residencyCountry } : {},
|
|
5436
|
+
beneficial_owners: beneficialOwners,
|
|
5437
|
+
// Only meaningful — and only collected — when the list shows no controlling owner.
|
|
5438
|
+
...needsOwnershipConfirmation ? { ownership_confirmed: ownershipConfirmed } : {}
|
|
5439
|
+
});
|
|
5440
|
+
};
|
|
5441
|
+
React66.useEffect(() => {
|
|
5442
|
+
submittingRef.current = false;
|
|
5443
|
+
}, [
|
|
5444
|
+
name,
|
|
5445
|
+
legalName,
|
|
5446
|
+
ownerName,
|
|
5447
|
+
countryOfIncorporation,
|
|
5448
|
+
residencyCountry,
|
|
5449
|
+
owners,
|
|
5450
|
+
ownershipConfirmed,
|
|
5451
|
+
submitting,
|
|
5452
|
+
serverError
|
|
5453
|
+
]);
|
|
5454
|
+
const countryField = (params) => /* @__PURE__ */ jsxs45("div", { className: "space-y-1.5", children: [
|
|
5455
|
+
/* @__PURE__ */ jsxs45(Label2, { htmlFor: params.id, children: [
|
|
5456
|
+
params.label,
|
|
5457
|
+
params.required && /* @__PURE__ */ jsx79("span", { className: "text-text-danger", children: " *" })
|
|
5458
|
+
] }),
|
|
5459
|
+
/* @__PURE__ */ jsx79(
|
|
5460
|
+
Select,
|
|
5461
|
+
{
|
|
5462
|
+
id: params.id,
|
|
5463
|
+
"data-testid": params.id,
|
|
5464
|
+
value: params.value,
|
|
5465
|
+
onValueChange: params.onChange,
|
|
5466
|
+
options: countries,
|
|
5467
|
+
placeholder: "Select a country\u2026",
|
|
5468
|
+
optionTestId: (value) => `${params.id}-option-${value}`
|
|
5469
|
+
}
|
|
5470
|
+
)
|
|
5471
|
+
] });
|
|
5472
|
+
return /* @__PURE__ */ jsxs45("form", { onSubmit: handleSubmit, className: cn("space-y-4", className), children: [
|
|
5473
|
+
/* @__PURE__ */ jsxs45("div", { className: "space-y-1.5", children: [
|
|
5474
|
+
/* @__PURE__ */ jsx79(Label2, { htmlFor: "create-org-name", children: "Organization name" }),
|
|
5475
|
+
/* @__PURE__ */ jsx79(
|
|
5476
|
+
Input,
|
|
5477
|
+
{
|
|
5478
|
+
id: "create-org-name",
|
|
5479
|
+
"data-testid": "create-org-input",
|
|
5480
|
+
value: name,
|
|
5481
|
+
onChange: (event) => setName(event.target.value),
|
|
5482
|
+
placeholder: "Acme Inc"
|
|
5483
|
+
}
|
|
5484
|
+
)
|
|
5485
|
+
] }),
|
|
5486
|
+
/* @__PURE__ */ jsxs45("div", { className: "space-y-1.5", children: [
|
|
5487
|
+
/* @__PURE__ */ jsx79(Label2, { htmlFor: "create-org-legal-name", children: "Legal name" }),
|
|
5488
|
+
/* @__PURE__ */ jsx79(
|
|
5489
|
+
Input,
|
|
5490
|
+
{
|
|
5491
|
+
id: "create-org-legal-name",
|
|
5492
|
+
"data-testid": "create-org-legal-name",
|
|
5493
|
+
value: legalName,
|
|
5494
|
+
onChange: (event) => setLegalName(event.target.value),
|
|
5495
|
+
placeholder: "Acme O\xDC"
|
|
5496
|
+
}
|
|
5497
|
+
)
|
|
5498
|
+
] }),
|
|
5499
|
+
/* @__PURE__ */ jsxs45("div", { className: "space-y-1.5", children: [
|
|
5500
|
+
/* @__PURE__ */ jsx79(Label2, { htmlFor: "create-org-owner-name", children: "Owner name" }),
|
|
5501
|
+
/* @__PURE__ */ jsx79(
|
|
5502
|
+
Input,
|
|
5503
|
+
{
|
|
5504
|
+
id: "create-org-owner-name",
|
|
5505
|
+
"data-testid": "create-org-owner-name",
|
|
5506
|
+
value: ownerName,
|
|
5507
|
+
onChange: (event) => setOwnerName(event.target.value),
|
|
5508
|
+
placeholder: "Jane Doe"
|
|
5509
|
+
}
|
|
5510
|
+
)
|
|
5511
|
+
] }),
|
|
5512
|
+
countryField({
|
|
5513
|
+
id: "create-org-country",
|
|
5514
|
+
label: "Country of incorporation",
|
|
5515
|
+
value: countryOfIncorporation,
|
|
5516
|
+
onChange: setCountryOfIncorporation,
|
|
5517
|
+
required: requireSanctionsFields
|
|
5518
|
+
}),
|
|
5519
|
+
countryField({
|
|
5520
|
+
id: "create-org-residency",
|
|
5521
|
+
label: "Country of residency",
|
|
5522
|
+
value: residencyCountry,
|
|
5523
|
+
onChange: setResidencyCountry,
|
|
5524
|
+
required: false
|
|
5525
|
+
}),
|
|
5526
|
+
/* @__PURE__ */ jsxs45("div", { className: "space-y-2", children: [
|
|
5527
|
+
/* @__PURE__ */ jsxs45("div", { className: "flex items-center justify-between", children: [
|
|
5528
|
+
/* @__PURE__ */ jsx79(Label2, { children: "Beneficial owners" }),
|
|
5529
|
+
/* @__PURE__ */ jsx79(
|
|
5530
|
+
Button,
|
|
5531
|
+
{
|
|
5532
|
+
type: "button",
|
|
5533
|
+
variant: "outline",
|
|
5534
|
+
size: "sm",
|
|
5535
|
+
"data-testid": "add-beneficial-owner",
|
|
5536
|
+
disabled: owners.length >= MAX_BENEFICIAL_OWNERS,
|
|
5537
|
+
onClick: addOwner,
|
|
5538
|
+
children: "Add owner"
|
|
5539
|
+
}
|
|
5540
|
+
)
|
|
5541
|
+
] }),
|
|
5542
|
+
owners.length === 0 && /* @__PURE__ */ jsx79("p", { className: "text-xs text-text-tertiary", children: "List the natural persons who ultimately own or control the organization." }),
|
|
5543
|
+
owners.map((row) => /* @__PURE__ */ jsxs45(
|
|
5544
|
+
"div",
|
|
5545
|
+
{
|
|
5546
|
+
"data-testid": `beneficial-owner-row-${row.key}`,
|
|
5547
|
+
className: "flex items-end gap-2",
|
|
5548
|
+
children: [
|
|
5549
|
+
/* @__PURE__ */ jsxs45("div", { className: "flex-1 space-y-1", children: [
|
|
5550
|
+
/* @__PURE__ */ jsx79(Label2, { htmlFor: `bo-name-${row.key}`, className: "text-xs", children: "Name" }),
|
|
5551
|
+
/* @__PURE__ */ jsx79(
|
|
5552
|
+
Input,
|
|
5553
|
+
{
|
|
5554
|
+
id: `bo-name-${row.key}`,
|
|
5555
|
+
"data-testid": `bo-name-${row.key}`,
|
|
5556
|
+
value: row.name,
|
|
5557
|
+
onChange: (event) => patchOwner(row.key, { name: event.target.value })
|
|
5558
|
+
}
|
|
5559
|
+
)
|
|
5560
|
+
] }),
|
|
5561
|
+
/* @__PURE__ */ jsxs45("div", { className: "w-40 space-y-1", children: [
|
|
5562
|
+
/* @__PURE__ */ jsx79(Label2, { htmlFor: `bo-country-${row.key}`, className: "text-xs", children: "Country" }),
|
|
5563
|
+
/* @__PURE__ */ jsx79(
|
|
5564
|
+
Select,
|
|
5565
|
+
{
|
|
5566
|
+
id: `bo-country-${row.key}`,
|
|
5567
|
+
"data-testid": `bo-country-${row.key}`,
|
|
5568
|
+
value: row.country,
|
|
5569
|
+
onValueChange: (value) => patchOwner(row.key, { country: value }),
|
|
5570
|
+
options: countries,
|
|
5571
|
+
placeholder: "Country\u2026",
|
|
5572
|
+
optionTestId: (value) => `bo-country-${row.key}-option-${value}`
|
|
5573
|
+
}
|
|
5574
|
+
)
|
|
5575
|
+
] }),
|
|
5576
|
+
/* @__PURE__ */ jsxs45("div", { className: "w-24 space-y-1", children: [
|
|
5577
|
+
/* @__PURE__ */ jsx79(Label2, { htmlFor: `bo-share-${row.key}`, className: "text-xs", children: "Share %" }),
|
|
5578
|
+
/* @__PURE__ */ jsx79(
|
|
5579
|
+
Input,
|
|
5580
|
+
{
|
|
5581
|
+
id: `bo-share-${row.key}`,
|
|
5582
|
+
"data-testid": `bo-share-${row.key}`,
|
|
5583
|
+
inputMode: "numeric",
|
|
5584
|
+
value: row.share,
|
|
5585
|
+
onChange: (event) => patchOwner(row.key, { share: event.target.value })
|
|
5586
|
+
}
|
|
5587
|
+
)
|
|
5588
|
+
] }),
|
|
5589
|
+
/* @__PURE__ */ jsx79(
|
|
5590
|
+
Button,
|
|
5591
|
+
{
|
|
5592
|
+
type: "button",
|
|
5593
|
+
variant: "outline",
|
|
5594
|
+
size: "sm",
|
|
5595
|
+
"data-testid": `remove-beneficial-owner-${row.key}`,
|
|
5596
|
+
onClick: () => removeOwner(row.key),
|
|
5597
|
+
children: "Remove"
|
|
5598
|
+
}
|
|
5599
|
+
)
|
|
5600
|
+
]
|
|
5601
|
+
},
|
|
5602
|
+
row.key
|
|
5603
|
+
)),
|
|
5604
|
+
!ownersValid && /* @__PURE__ */ jsx79("p", { "data-testid": "beneficial-owners-error", className: "text-xs text-text-danger", children: "Every owner needs a name, a country and a share between 0 and 100." }),
|
|
5605
|
+
shareSum > 100 && /* @__PURE__ */ jsxs45("p", { "data-testid": "beneficial-owners-sum-warning", className: "text-xs text-text-warning", children: [
|
|
5606
|
+
"The listed shares add up to ",
|
|
5607
|
+
shareSum,
|
|
5608
|
+
"%, which is more than 100%."
|
|
5609
|
+
] })
|
|
5610
|
+
] }),
|
|
5611
|
+
needsOwnershipConfirmation && /* @__PURE__ */ jsxs45("div", { className: "flex items-start gap-2", children: [
|
|
5612
|
+
/* @__PURE__ */ jsx79(
|
|
5613
|
+
Checkbox,
|
|
5614
|
+
{
|
|
5615
|
+
id: "create-org-ownership-confirmed",
|
|
5616
|
+
"data-testid": "create-org-ownership-confirmed",
|
|
5617
|
+
checked: ownershipConfirmed,
|
|
5618
|
+
onCheckedChange: (value) => setOwnershipConfirmed(value === true)
|
|
5619
|
+
}
|
|
5620
|
+
),
|
|
5621
|
+
/* @__PURE__ */ jsxs45(
|
|
5622
|
+
Label2,
|
|
5623
|
+
{
|
|
5624
|
+
htmlFor: "create-org-ownership-confirmed",
|
|
5625
|
+
className: "text-xs font-normal leading-snug",
|
|
5626
|
+
children: [
|
|
5627
|
+
"I confirm the ownership structure above is complete and correct",
|
|
5628
|
+
requireSanctionsFields && /* @__PURE__ */ jsx79("span", { className: "text-text-danger", children: " *" })
|
|
5629
|
+
]
|
|
5630
|
+
}
|
|
5631
|
+
)
|
|
5632
|
+
] }),
|
|
5633
|
+
(serverError || violations && violations.length > 0) && /* @__PURE__ */ jsxs45(InlineError, { children: [
|
|
5634
|
+
serverError,
|
|
5635
|
+
violations && violations.length > 0 && /* @__PURE__ */ jsx79("ul", { "data-testid": "create-org-violations", className: "mt-1 list-disc pl-4", children: violations.map((violation) => /* @__PURE__ */ jsx79("li", { children: violation }, violation)) })
|
|
5636
|
+
] }),
|
|
5637
|
+
/* @__PURE__ */ jsxs45("div", { className: "flex justify-end gap-2", children: [
|
|
5638
|
+
onCancel && /* @__PURE__ */ jsx79(Button, { type: "button", variant: "outline", onClick: onCancel, children: "Cancel" }),
|
|
5639
|
+
/* @__PURE__ */ jsx79(Button, { type: "submit", "data-testid": "submit-create-org", disabled: !canSubmit, children: submitting ? "Creating\u2026" : submitLabel })
|
|
5640
|
+
] })
|
|
5641
|
+
] });
|
|
5642
|
+
}
|
|
5095
5643
|
export {
|
|
5096
5644
|
Accordion,
|
|
5097
5645
|
AccordionContent,
|
|
@@ -5127,6 +5675,7 @@ export {
|
|
|
5127
5675
|
BreadcrumbPage,
|
|
5128
5676
|
BreadcrumbSeparator,
|
|
5129
5677
|
Button,
|
|
5678
|
+
COUNTRY_OPTIONS,
|
|
5130
5679
|
Calendar,
|
|
5131
5680
|
Card,
|
|
5132
5681
|
CardContent,
|
|
@@ -5268,6 +5817,7 @@ export {
|
|
|
5268
5817
|
NotificationToast,
|
|
5269
5818
|
NotificationToaster,
|
|
5270
5819
|
OrgProductSwitcher,
|
|
5820
|
+
OrganizationOnboardingForm,
|
|
5271
5821
|
Pagination,
|
|
5272
5822
|
PaginationContent,
|
|
5273
5823
|
PaginationEllipsis,
|
package/dist/styles.css
CHANGED
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
--bg-secondary: #12141b;
|
|
16
16
|
--bg-surface: #1f222d;
|
|
17
17
|
--bg-elevated: #252936;
|
|
18
|
+
--bg-overlay: #252936;
|
|
18
19
|
--bg-sunken: #0e1015;
|
|
19
20
|
--bg-brand: #06297d;
|
|
20
21
|
--bg-brand-subtle: #1f2541;
|
|
@@ -276,6 +277,7 @@
|
|
|
276
277
|
--bg-secondary: #eeeff0;
|
|
277
278
|
--bg-surface: #f2f3f4;
|
|
278
279
|
--bg-elevated: #edeef0;
|
|
280
|
+
--bg-overlay: #ffffff;
|
|
279
281
|
--bg-sunken: #e1e2e4;
|
|
280
282
|
--bg-brand-subtle: #e4ecfe;
|
|
281
283
|
--bg-brand-hover: #05226a;
|
|
@@ -742,10 +744,11 @@
|
|
|
742
744
|
}
|
|
743
745
|
:root {
|
|
744
746
|
/* === Nav / menu surfaces (0.3.0 sidebar) === */
|
|
745
|
-
/*
|
|
746
|
-
|
|
747
|
+
/* The floating surface sits on the package's overlay pair: --menu-bg on
|
|
748
|
+
--bg-overlay, --menu-shadow on --shadow-overlay. theme.css re-resolves both
|
|
749
|
+
per theme, so `.light` needs no override for either. */
|
|
747
750
|
--hov-bg: color-mix(in srgb, var(--text-primary) 7%, transparent);
|
|
748
|
-
--menu-bg: var(--bg-
|
|
751
|
+
--menu-bg: var(--bg-overlay);
|
|
749
752
|
--menu-shadow: var(--shadow-overlay);
|
|
750
753
|
--menu-hov: var(--hov-bg);
|
|
751
754
|
|
|
@@ -763,11 +766,10 @@
|
|
|
763
766
|
}
|
|
764
767
|
|
|
765
768
|
.light {
|
|
766
|
-
/* Light keeps opaque plates: a translucent text-mix would vanish on a
|
|
767
|
-
Pinned 0.3.0-prototype literals —
|
|
768
|
-
|
|
769
|
+
/* Light keeps opaque hover plates: a translucent text-mix would vanish on a
|
|
770
|
+
white menu. Pinned 0.3.0-prototype literals — the package has no hover-surface
|
|
771
|
+
roles yet, so these can't move onto tokens the way --menu-bg did. */
|
|
769
772
|
--hov-bg: #ffffff;
|
|
770
|
-
--menu-bg: #ffffff;
|
|
771
773
|
--menu-hov: #f2f4f7;
|
|
772
774
|
|
|
773
775
|
/* Auth screen — see :root above. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lessly/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0",
|
|
4
4
|
"description": "Lessly design system — shared UI primitives, tokens, and theme",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"packageManager": "pnpm@10.30.3",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
}
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"@lessly/tokens": "^0.
|
|
65
|
+
"@lessly/tokens": "^0.5.0",
|
|
66
66
|
"@radix-ui/react-accordion": "^1.2.16",
|
|
67
67
|
"@radix-ui/react-alert-dialog": "^1.1.19",
|
|
68
68
|
"@radix-ui/react-aspect-ratio": "^1.1.11",
|