polaris_view_components 0.13.6 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +0 -2
- data/app/assets/icons/polaris/AbandonedCartMajor.svg +1 -1
- data/app/assets/icons/polaris/AccessibilityMajor.svg +1 -1
- data/app/assets/icons/polaris/ActivitiesMajor.svg +1 -1
- data/app/assets/icons/polaris/AddCodeMajor.svg +1 -1
- data/app/assets/icons/polaris/AddImageMajor.svg +1 -1
- data/app/assets/icons/polaris/AddMajor.svg +1 -1
- data/app/assets/icons/polaris/AddNoteMajor.svg +1 -1
- data/app/assets/icons/polaris/AddProductMajor.svg +1 -1
- data/app/assets/icons/polaris/AdjustMinor.svg +1 -0
- data/app/assets/icons/polaris/AffiliateMajor.svg +1 -1
- data/app/assets/icons/polaris/AlertMinor.svg +1 -1
- data/app/assets/icons/polaris/AnalyticsBarHorizontalMinor.svg +1 -0
- data/app/assets/icons/polaris/AnalyticsBarStackedMinor.svg +1 -0
- data/app/assets/icons/polaris/AnalyticsCohortMinor.svg +1 -0
- data/app/assets/icons/polaris/AnalyticsDonutMinor.svg +1 -0
- data/app/assets/icons/polaris/AnalyticsFunnelMinor.svg +1 -0
- data/app/assets/icons/polaris/AnalyticsLineMinor.svg +1 -0
- data/app/assets/icons/polaris/AnalyticsMajor.svg +1 -1
- data/app/assets/icons/polaris/AnalyticsMinor.svg +1 -1
- data/app/assets/icons/polaris/AnalyticsTableMinor.svg +1 -0
- data/app/assets/icons/polaris/AnyClickModelMinor.svg +1 -0
- data/app/assets/icons/polaris/AppExtensionMinor.svg +1 -1
- data/app/assets/icons/polaris/AppsMajor.svg +1 -1
- data/app/assets/icons/polaris/AppsMinor.svg +1 -1
- data/app/assets/icons/polaris/ArchiveMajor.svg +1 -1
- data/app/assets/icons/polaris/ArchiveMinor.svg +1 -1
- data/app/assets/icons/polaris/ArrowDownMinor.svg +1 -1
- data/app/assets/icons/polaris/ArrowLeftMinor.svg +1 -1
- data/app/assets/icons/polaris/ArrowRightMinor.svg +1 -1
- data/app/assets/icons/polaris/ArrowUpMinor.svg +1 -1
- data/app/assets/icons/polaris/AttachmentMajor.svg +1 -1
- data/app/assets/icons/polaris/AutomationMajor.svg +1 -1
- data/app/assets/icons/polaris/BackspaceMajor.svg +1 -1
- data/app/assets/icons/polaris/BalanceMajor.svg +1 -1
- data/app/assets/icons/polaris/BankMajor.svg +1 -1
- data/app/assets/icons/polaris/BarcodeMajor.svg +1 -1
- data/app/assets/icons/polaris/BehaviorMajor.svg +1 -1
- data/app/assets/icons/polaris/BehaviorMinor.svg +1 -0
- data/app/assets/icons/polaris/BillingStatementDollarMajor.svg +1 -1
- data/app/assets/icons/polaris/BillingStatementEuroMajor.svg +1 -1
- data/app/assets/icons/polaris/BillingStatementPoundMajor.svg +1 -1
- data/app/assets/icons/polaris/BillingStatementRupeeMajor.svg +1 -1
- data/app/assets/icons/polaris/BillingStatementYenMajor.svg +1 -1
- data/app/assets/icons/polaris/BlockMinor.svg +1 -1
- data/app/assets/icons/polaris/BlockquoteMajor.svg +1 -1
- data/app/assets/icons/polaris/BlogMajor.svg +1 -1
- data/app/assets/icons/polaris/BugMajor.svg +1 -1
- data/app/assets/icons/polaris/ButtonCornerPillMajor.svg +1 -1
- data/app/assets/icons/polaris/ButtonCornerRoundedMajor.svg +1 -1
- data/app/assets/icons/polaris/ButtonCornerSquareMajor.svg +1 -1
- data/app/assets/icons/polaris/ButtonMinor.svg +1 -1
- data/app/assets/icons/polaris/BuyButtonButtonLayoutMajor.svg +1 -1
- data/app/assets/icons/polaris/BuyButtonHorizontalLayoutMajor.svg +1 -1
- data/app/assets/icons/polaris/BuyButtonMajor.svg +1 -1
- data/app/assets/icons/polaris/BuyButtonVerticalLayoutMajor.svg +1 -1
- data/app/assets/icons/polaris/CalendarMajor.svg +1 -1
- data/app/assets/icons/polaris/CalendarMinor.svg +1 -1
- data/app/assets/icons/polaris/CalendarTickMajor.svg +1 -1
- data/app/assets/icons/polaris/CalendarTimeMinor.svg +1 -0
- data/app/assets/icons/polaris/CameraMajor.svg +1 -1
- data/app/assets/icons/polaris/CancelMajor.svg +1 -0
- data/app/assets/icons/polaris/CancelMinor.svg +1 -0
- data/app/assets/icons/polaris/CancelSmallMinor.svg +1 -1
- data/app/assets/icons/polaris/CapitalMajor.svg +1 -1
- data/app/assets/icons/polaris/CapturePaymentMinor.svg +1 -1
- data/app/assets/icons/polaris/CardReaderChipMajor.svg +1 -1
- data/app/assets/icons/polaris/CardReaderMajor.svg +1 -1
- data/app/assets/icons/polaris/CardReaderTapMajor.svg +1 -1
- data/app/assets/icons/polaris/CaretDownMinor.svg +1 -1
- data/app/assets/icons/polaris/CaretUpMinor.svg +1 -1
- data/app/assets/icons/polaris/CartDownMajor.svg +1 -1
- data/app/assets/icons/polaris/CartMajor.svg +1 -1
- data/app/assets/icons/polaris/CartUpMajor.svg +1 -1
- data/app/assets/icons/polaris/CashDollarMajor.svg +1 -1
- data/app/assets/icons/polaris/CashDollarMinor.svg +1 -0
- data/app/assets/icons/polaris/CashEuroMajor.svg +1 -1
- data/app/assets/icons/polaris/CashPoundMajor.svg +1 -1
- data/app/assets/icons/polaris/CashRupeeMajor.svg +1 -1
- data/app/assets/icons/polaris/CashYenMajor.svg +1 -1
- data/app/assets/icons/polaris/CategoriesMajor.svg +1 -1
- data/app/assets/icons/polaris/ChannelsMajor.svg +1 -1
- data/app/assets/icons/polaris/ChatMajor.svg +1 -1
- data/app/assets/icons/polaris/ChecklistAlternateMajor.svg +1 -1
- data/app/assets/icons/polaris/ChecklistMajor.svg +1 -1
- data/app/assets/icons/polaris/CheckoutMajor.svg +1 -1
- data/app/assets/icons/polaris/ChevronDownMinor.svg +1 -1
- data/app/assets/icons/polaris/ChevronLeftMinor.svg +1 -1
- data/app/assets/icons/polaris/ChevronRightMinor.svg +1 -1
- data/app/assets/icons/polaris/ChevronUpMinor.svg +1 -1
- data/app/assets/icons/polaris/CircleAlertMajor.svg +1 -1
- data/app/assets/icons/polaris/CircleCancelMajor.svg +1 -1
- data/app/assets/icons/polaris/CircleCancelMinor.svg +1 -1
- data/app/assets/icons/polaris/CircleChevronDownMinor.svg +1 -1
- data/app/assets/icons/polaris/CircleChevronLeftMinor.svg +1 -1
- data/app/assets/icons/polaris/CircleChevronRightMinor.svg +1 -1
- data/app/assets/icons/polaris/CircleChevronUpMinor.svg +1 -1
- data/app/assets/icons/polaris/CircleDisableMinor.svg +1 -1
- data/app/assets/icons/polaris/CircleDisabledMajor.svg +1 -1
- data/app/assets/icons/polaris/CircleDotsMajor.svg +1 -1
- data/app/assets/icons/polaris/CircleDownMajor.svg +1 -1
- data/app/assets/icons/polaris/CircleInformationMajor.svg +1 -1
- data/app/assets/icons/polaris/CircleLeftMajor.svg +1 -1
- data/app/assets/icons/polaris/CircleMinusMajor.svg +1 -1
- data/app/assets/icons/polaris/CircleMinusMinor.svg +1 -1
- data/app/assets/icons/polaris/CircleMinusOutlineMinor.svg +1 -1
- data/app/assets/icons/polaris/CirclePlusMajor.svg +1 -1
- data/app/assets/icons/polaris/CirclePlusMinor.svg +1 -1
- data/app/assets/icons/polaris/CirclePlusOutlineMinor.svg +1 -1
- data/app/assets/icons/polaris/CircleRightMajor.svg +1 -1
- data/app/assets/icons/polaris/CircleTickMajor.svg +1 -1
- data/app/assets/icons/polaris/CircleTickMinor.svg +1 -1
- data/app/assets/icons/polaris/CircleTickOutlineMinor.svg +1 -1
- data/app/assets/icons/polaris/CircleUpMajor.svg +1 -1
- data/app/assets/icons/polaris/ClipboardMinor.svg +1 -1
- data/app/assets/icons/polaris/ClockMajor.svg +1 -1
- data/app/assets/icons/polaris/ClockMinor.svg +1 -1
- data/app/assets/icons/polaris/CodeMajor.svg +1 -1
- data/app/assets/icons/polaris/CodeMinor.svg +1 -0
- data/app/assets/icons/polaris/CollectionReferenceMinor.svg +1 -0
- data/app/assets/icons/polaris/CollectionsMajor.svg +1 -1
- data/app/assets/icons/polaris/ColorNoneMinor.svg +1 -1
- data/app/assets/icons/polaris/ColorsMajor.svg +1 -1
- data/app/assets/icons/polaris/Column1Major.svg +1 -1
- data/app/assets/icons/polaris/ColumnWithTextMajor.svg +1 -1
- data/app/assets/icons/polaris/Columns2Major.svg +1 -1
- data/app/assets/icons/polaris/Columns3Major.svg +1 -1
- data/app/assets/icons/polaris/Columns3Minor.svg +1 -1
- data/app/assets/icons/polaris/ComposeMajor.svg +1 -1
- data/app/assets/icons/polaris/ConfettiMajor.svg +1 -1
- data/app/assets/icons/polaris/ConnectMinor.svg +1 -1
- data/app/assets/icons/polaris/ContentMinor.svg +1 -0
- data/app/assets/icons/polaris/ConversationMinor.svg +1 -1
- data/app/assets/icons/polaris/CreditCardCancelMajor.svg +1 -0
- data/app/assets/icons/polaris/CreditCardMajor.svg +1 -1
- data/app/assets/icons/polaris/CreditCardPercentMajor.svg +1 -1
- data/app/assets/icons/polaris/CreditCardSecureMajor.svg +1 -1
- data/app/assets/icons/polaris/CurrencyConvertMinor.svg +1 -1
- data/app/assets/icons/polaris/CustomerMinusMajor.svg +1 -1
- data/app/assets/icons/polaris/CustomerPlusMajor.svg +1 -1
- data/app/assets/icons/polaris/CustomersMajor.svg +1 -1
- data/app/assets/icons/polaris/CustomersMinor.svg +1 -1
- data/app/assets/icons/polaris/DataDrivenModelMinor.svg +1 -0
- data/app/assets/icons/polaris/DataVisualizationMajor.svg +1 -1
- data/app/assets/icons/polaris/DecimalMinor.svg +1 -0
- data/app/assets/icons/polaris/DeleteMajor.svg +1 -1
- data/app/assets/icons/polaris/DeleteMinor.svg +1 -1
- data/app/assets/icons/polaris/DesktopMajor.svg +1 -1
- data/app/assets/icons/polaris/DetailedPopUpMajor.svg +1 -1
- data/app/assets/icons/polaris/DiamondAlertMajor.svg +1 -1
- data/app/assets/icons/polaris/DiamondAlertMinor.svg +1 -0
- data/app/assets/icons/polaris/DigitalMediaReceiverMajor.svg +1 -1
- data/app/assets/icons/polaris/DiscountAutomaticMajor.svg +1 -1
- data/app/assets/icons/polaris/DiscountCodeMajor.svg +1 -1
- data/app/assets/icons/polaris/DiscountsMajor.svg +1 -1
- data/app/assets/icons/polaris/DiscountsMinor.svg +1 -1
- data/app/assets/icons/polaris/DisputeMinor.svg +1 -1
- data/app/assets/icons/polaris/DnsSettingsMajor.svg +1 -1
- data/app/assets/icons/polaris/DockFloatingMajor.svg +1 -0
- data/app/assets/icons/polaris/DockSideMajor.svg +1 -0
- data/app/assets/icons/polaris/DomainNewMajor.svg +1 -1
- data/app/assets/icons/polaris/DomainRedirectMinor.svg +1 -0
- data/app/assets/icons/polaris/DomainsMajor.svg +1 -1
- data/app/assets/icons/polaris/DraftOrdersMajor.svg +1 -1
- data/app/assets/icons/polaris/DragDropMajor.svg +1 -1
- data/app/assets/icons/polaris/DragHandleMinor.svg +1 -1
- data/app/assets/icons/polaris/DropdownMinor.svg +1 -1
- data/app/assets/icons/polaris/DuplicateMinor.svg +1 -1
- data/app/assets/icons/polaris/DynamicSourceMajor.svg +1 -0
- data/app/assets/icons/polaris/DynamicSourceMinor.svg +1 -0
- data/app/assets/icons/polaris/EditMajor.svg +1 -1
- data/app/assets/icons/polaris/EditMinor.svg +1 -1
- data/app/assets/icons/polaris/EmailMajor.svg +1 -1
- data/app/assets/icons/polaris/EmailNewsletterMajor.svg +1 -1
- data/app/assets/icons/polaris/EmbedMinor.svg +1 -1
- data/app/assets/icons/polaris/EnableSelectionMinor.svg +1 -1
- data/app/assets/icons/polaris/EnterMajor.svg +1 -0
- data/app/assets/icons/polaris/EnvelopeMajor.svg +1 -1
- data/app/assets/icons/polaris/ExchangeMajor.svg +1 -1
- data/app/assets/icons/polaris/ExistingInventoryMajor.svg +1 -1
- data/app/assets/icons/polaris/ExitMajor.svg +1 -1
- data/app/assets/icons/polaris/ExploreImagesMajor.svg +1 -0
- data/app/assets/icons/polaris/ExportMinor.svg +1 -1
- data/app/assets/icons/polaris/ExtendMajor.svg +1 -0
- data/app/assets/icons/polaris/ExtendMinor.svg +1 -0
- data/app/assets/icons/polaris/ExternalMinor.svg +1 -1
- data/app/assets/icons/polaris/ExternalSmallMinor.svg +1 -1
- data/app/assets/icons/polaris/EyeDropperMinor.svg +1 -0
- data/app/assets/icons/polaris/FaviconMajor.svg +1 -1
- data/app/assets/icons/polaris/FavoriteMajor.svg +1 -1
- data/app/assets/icons/polaris/FeaturedCollectionMajor.svg +1 -1
- data/app/assets/icons/polaris/FeaturedContentMajor.svg +1 -1
- data/app/assets/icons/polaris/FileMinor.svg +1 -0
- data/app/assets/icons/polaris/FilterMajor.svg +1 -1
- data/app/assets/icons/polaris/FilterMinor.svg +1 -0
- data/app/assets/icons/polaris/FinancesMajor.svg +1 -1
- data/app/assets/icons/polaris/FinancesMinor.svg +1 -1
- data/app/assets/icons/polaris/FirstClickModelMinor.svg +1 -0
- data/app/assets/icons/polaris/FirstOrderMajor.svg +1 -1
- data/app/assets/icons/polaris/FirstVisitMajor.svg +1 -1
- data/app/assets/icons/polaris/FlagMajor.svg +1 -1
- data/app/assets/icons/polaris/FlipCameraMajor.svg +1 -1
- data/app/assets/icons/polaris/FolderDownMajor.svg +1 -1
- data/app/assets/icons/polaris/FolderMajor.svg +1 -1
- data/app/assets/icons/polaris/FolderMinusMajor.svg +1 -1
- data/app/assets/icons/polaris/FolderPlusMajor.svg +1 -1
- data/app/assets/icons/polaris/FolderUpMajor.svg +1 -1
- data/app/assets/icons/polaris/FollowUpEmailMajor.svg +1 -1
- data/app/assets/icons/polaris/FoodMajor.svg +1 -1
- data/app/assets/icons/polaris/FooterMajor.svg +1 -1
- data/app/assets/icons/polaris/FormsMajor.svg +1 -1
- data/app/assets/icons/polaris/FraudProtectMajor.svg +1 -1
- data/app/assets/icons/polaris/FraudProtectMinor.svg +1 -1
- data/app/assets/icons/polaris/FraudProtectPendingMajor.svg +1 -1
- data/app/assets/icons/polaris/FraudProtectPendingMinor.svg +1 -1
- data/app/assets/icons/polaris/FraudProtectUnprotectedMajor.svg +1 -1
- data/app/assets/icons/polaris/FraudProtectUnprotectedMinor.svg +1 -1
- data/app/assets/icons/polaris/FulfillmentFulfilledMajor.svg +1 -0
- data/app/assets/icons/polaris/FulfillmentOnHoldMajor.svg +1 -0
- data/app/assets/icons/polaris/GamesConsoleMajor.svg +1 -1
- data/app/assets/icons/polaris/GiftCardMajor.svg +1 -1
- data/app/assets/icons/polaris/GiftCardMinor.svg +1 -1
- data/app/assets/icons/polaris/GlobeMajor.svg +1 -1
- data/app/assets/icons/polaris/GlobeMinor.svg +1 -1
- data/app/assets/icons/polaris/GrammarMajor.svg +1 -1
- data/app/assets/icons/polaris/HashtagMajor.svg +1 -1
- data/app/assets/icons/polaris/HashtagMinor.svg +1 -0
- data/app/assets/icons/polaris/HeaderMajor.svg +1 -1
- data/app/assets/icons/polaris/HeartMajor.svg +1 -1
- data/app/assets/icons/polaris/HideKeyboardMajor.svg +1 -1
- data/app/assets/icons/polaris/HideMinor.svg +1 -1
- data/app/assets/icons/polaris/HintMajor.svg +1 -1
- data/app/assets/icons/polaris/HomeMajor.svg +1 -1
- data/app/assets/icons/polaris/HomeMinor.svg +1 -1
- data/app/assets/icons/polaris/HorizontalDotsMinor.svg +1 -1
- data/app/assets/icons/polaris/IconsMajor.svg +1 -1
- data/app/assets/icons/polaris/IdentityCardMajor.svg +1 -0
- data/app/assets/icons/polaris/IllustrationMajor.svg +1 -1
- data/app/assets/icons/polaris/ImageAltMajor.svg +1 -1
- data/app/assets/icons/polaris/ImageAltMinor.svg +1 -1
- data/app/assets/icons/polaris/ImageMajor.svg +1 -1
- data/app/assets/icons/polaris/ImageWithTextMajor.svg +1 -1
- data/app/assets/icons/polaris/ImageWithTextOverlayMajor.svg +1 -1
- data/app/assets/icons/polaris/ImagesMajor.svg +1 -1
- data/app/assets/icons/polaris/ImportMinor.svg +1 -1
- data/app/assets/icons/polaris/ImportStoreMajor.svg +1 -1
- data/app/assets/icons/polaris/InactiveLocationMajor.svg +1 -0
- data/app/assets/icons/polaris/InactiveLocationMinor.svg +1 -0
- data/app/assets/icons/polaris/IncomingMajor.svg +1 -1
- data/app/assets/icons/polaris/InsertDynamicSourceMajor.svg +1 -0
- data/app/assets/icons/polaris/InsertDynamicSourceMinor.svg +1 -0
- data/app/assets/icons/polaris/InstallMinor.svg +1 -1
- data/app/assets/icons/polaris/InventoryMajor.svg +1 -1
- data/app/assets/icons/polaris/InviteMinor.svg +1 -1
- data/app/assets/icons/polaris/IqMajor.svg +1 -1
- data/app/assets/icons/polaris/JobsMajor.svg +1 -1
- data/app/assets/icons/polaris/KeyMajor.svg +1 -1
- data/app/assets/icons/polaris/KeyboardMajor.svg +1 -0
- data/app/assets/icons/polaris/KeyboardMinor.svg +1 -0
- data/app/assets/icons/polaris/LabelPrinterMajor.svg +1 -1
- data/app/assets/icons/polaris/LandingPageMajor.svg +1 -1
- data/app/assets/icons/polaris/LanguageMinor.svg +1 -1
- data/app/assets/icons/polaris/LastClickModelMinor.svg +1 -0
- data/app/assets/icons/polaris/LastNonDirectClickModelMinor.svg +1 -0
- data/app/assets/icons/polaris/LegalMajor.svg +1 -1
- data/app/assets/icons/polaris/LinearModelMinor.svg +1 -0
- data/app/assets/icons/polaris/LinkMinor.svg +1 -1
- data/app/assets/icons/polaris/ListMajor.svg +1 -1
- data/app/assets/icons/polaris/ListMinor.svg +1 -0
- data/app/assets/icons/polaris/LiveViewMajor.svg +1 -1
- data/app/assets/icons/polaris/LocationMajor.svg +1 -1
- data/app/assets/icons/polaris/LocationsMinor.svg +1 -1
- data/app/assets/icons/polaris/LockMajor.svg +1 -1
- data/app/assets/icons/polaris/LockMinor.svg +1 -1
- data/app/assets/icons/polaris/LogOutMinor.svg +1 -1
- data/app/assets/icons/polaris/LogoBlockMajor.svg +1 -1
- data/app/assets/icons/polaris/MagicMajor.svg +1 -0
- data/app/assets/icons/polaris/MagicMinor.svg +1 -0
- data/app/assets/icons/polaris/ManagedStoreMajor.svg +1 -1
- data/app/assets/icons/polaris/MarkFulfilledMinor.svg +1 -1
- data/app/assets/icons/polaris/MarkPaidMinor.svg +1 -1
- data/app/assets/icons/polaris/MarketingMajor.svg +1 -1
- data/app/assets/icons/polaris/MarketingMinor.svg +1 -1
- data/app/assets/icons/polaris/MarketsMajor.svg +1 -0
- data/app/assets/icons/polaris/MaximizeMajor.svg +1 -1
- data/app/assets/icons/polaris/MaximizeMinor.svg +1 -1
- data/app/assets/icons/polaris/MeasurementMinor.svg +1 -0
- data/app/assets/icons/polaris/MentionMajor.svg +1 -1
- data/app/assets/icons/polaris/MergeMinor.svg +1 -0
- data/app/assets/icons/polaris/MetafieldsMajor.svg +1 -0
- data/app/assets/icons/polaris/MetafieldsMinor.svg +1 -0
- data/app/assets/icons/polaris/MetaobjectMinor.svg +1 -0
- data/app/assets/icons/polaris/MetaobjectReferenceMinor.svg +1 -0
- data/app/assets/icons/polaris/MicrophoneMajor.svg +1 -1
- data/app/assets/icons/polaris/MinimizeMajor.svg +1 -1
- data/app/assets/icons/polaris/MinimizeMinor.svg +1 -1
- data/app/assets/icons/polaris/MinusMajor.svg +1 -0
- data/app/assets/icons/polaris/MinusMinor.svg +1 -1
- data/app/assets/icons/polaris/MobileAcceptMajor.svg +1 -1
- data/app/assets/icons/polaris/MobileBackArrowMajor.svg +1 -1
- data/app/assets/icons/polaris/MobileCancelMajor.svg +1 -1
- data/app/assets/icons/polaris/MobileChevronMajor.svg +1 -1
- data/app/assets/icons/polaris/MobileHamburgerMajor.svg +1 -1
- data/app/assets/icons/polaris/MobileHorizontalDotsMajor.svg +1 -1
- data/app/assets/icons/polaris/MobileMajor.svg +1 -1
- data/app/assets/icons/polaris/MobilePlusMajor.svg +1 -1
- data/app/assets/icons/polaris/MonerisMajor.svg +1 -1
- data/app/assets/icons/polaris/MoneyMinor.svg +1 -0
- data/app/assets/icons/polaris/NavigationMajor.svg +1 -1
- data/app/assets/icons/polaris/NoteMajor.svg +1 -1
- data/app/assets/icons/polaris/NoteMinor.svg +1 -1
- data/app/assets/icons/polaris/NotificationMajor.svg +1 -1
- data/app/assets/icons/polaris/OnlineStoreMajor.svg +1 -1
- data/app/assets/icons/polaris/OnlineStoreMinor.svg +1 -1
- data/app/assets/icons/polaris/OrderStatusMinor.svg +1 -1
- data/app/assets/icons/polaris/OrdersMajor.svg +1 -1
- data/app/assets/icons/polaris/OrdersMinor.svg +1 -1
- data/app/assets/icons/polaris/OrganizationMajor.svg +1 -0
- data/app/assets/icons/polaris/OutgoingMajor.svg +1 -1
- data/app/assets/icons/polaris/PackageMajor.svg +1 -1
- data/app/assets/icons/polaris/PageDownMajor.svg +1 -1
- data/app/assets/icons/polaris/PageMajor.svg +1 -1
- data/app/assets/icons/polaris/PageMinusMajor.svg +1 -1
- data/app/assets/icons/polaris/PagePlusMajor.svg +1 -1
- data/app/assets/icons/polaris/PageReferenceMinor.svg +1 -0
- data/app/assets/icons/polaris/PageUpMajor.svg +1 -1
- data/app/assets/icons/polaris/PaginationEndMinor.svg +1 -1
- data/app/assets/icons/polaris/PaginationStartMinor.svg +1 -1
- data/app/assets/icons/polaris/PaintBrushMajor.svg +1 -1
- data/app/assets/icons/polaris/PaperCheckMajor.svg +1 -0
- data/app/assets/icons/polaris/PaperCheckMinor.svg +1 -0
- data/app/assets/icons/polaris/PasskeyMajor.svg +1 -0
- data/app/assets/icons/polaris/PasskeyMinor.svg +1 -0
- data/app/assets/icons/polaris/PauseCircleMajor.svg +1 -1
- data/app/assets/icons/polaris/PauseMajor.svg +1 -1
- data/app/assets/icons/polaris/PauseMinor.svg +1 -1
- data/app/assets/icons/polaris/PaymentsMajor.svg +1 -1
- data/app/assets/icons/polaris/PersonalizedTextMajor.svg +1 -0
- data/app/assets/icons/polaris/PhoneInMajor.svg +1 -1
- data/app/assets/icons/polaris/PhoneMajor.svg +1 -1
- data/app/assets/icons/polaris/PhoneOutMajor.svg +1 -1
- data/app/assets/icons/polaris/PinMajor.svg +1 -1
- data/app/assets/icons/polaris/PinMinor.svg +1 -1
- data/app/assets/icons/polaris/PinUnfilledMajor.svg +1 -0
- data/app/assets/icons/polaris/PinUnfilledMinor.svg +1 -0
- data/app/assets/icons/polaris/PlanMajor.svg +1 -0
- data/app/assets/icons/polaris/PlanMinor.svg +1 -0
- data/app/assets/icons/polaris/PlayCircleMajor.svg +1 -1
- data/app/assets/icons/polaris/PlayMajor.svg +1 -1
- data/app/assets/icons/polaris/PlayMinor.svg +1 -1
- data/app/assets/icons/polaris/PlusMinor.svg +1 -1
- data/app/assets/icons/polaris/PointOfSaleMajor.svg +1 -1
- data/app/assets/icons/polaris/PopularMajor.svg +1 -1
- data/app/assets/icons/polaris/PositionBasedModelMinor.svg +1 -0
- data/app/assets/icons/polaris/PriceLookupMinor.svg +1 -1
- data/app/assets/icons/polaris/PrintMajor.svg +1 -1
- data/app/assets/icons/polaris/PrintMinor.svg +1 -1
- data/app/assets/icons/polaris/ProductCostMajor.svg +1 -0
- data/app/assets/icons/polaris/ProductReferenceMinor.svg +1 -0
- data/app/assets/icons/polaris/ProductReturnsMinor.svg +1 -1
- data/app/assets/icons/polaris/ProductsMajor.svg +1 -1
- data/app/assets/icons/polaris/ProductsMinor.svg +1 -1
- data/app/assets/icons/polaris/ProfileMajor.svg +1 -1
- data/app/assets/icons/polaris/PromoteMinor.svg +1 -1
- data/app/assets/icons/polaris/QuestionMarkInverseMajor.svg +1 -1
- data/app/assets/icons/polaris/QuestionMarkInverseMinor.svg +1 -1
- data/app/assets/icons/polaris/QuestionMarkMajor.svg +1 -1
- data/app/assets/icons/polaris/QuestionMarkMinor.svg +1 -1
- data/app/assets/icons/polaris/QuickSaleMajor.svg +1 -1
- data/app/assets/icons/polaris/ReadTimeMinor.svg +1 -1
- data/app/assets/icons/polaris/ReceiptMajor.svg +1 -1
- data/app/assets/icons/polaris/RecentSearchesMajor.svg +1 -1
- data/app/assets/icons/polaris/RedoMajor.svg +1 -1
- data/app/assets/icons/polaris/ReferralCodeMajor.svg +1 -1
- data/app/assets/icons/polaris/ReferralMajor.svg +1 -1
- data/app/assets/icons/polaris/RefreshMajor.svg +1 -1
- data/app/assets/icons/polaris/RefreshMinor.svg +1 -1
- data/app/assets/icons/polaris/RefundMajor.svg +1 -1
- data/app/assets/icons/polaris/RefundMinor.svg +1 -1
- data/app/assets/icons/polaris/RemoveProductMajor.svg +1 -1
- data/app/assets/icons/polaris/RepeatOrderMajor.svg +1 -1
- data/app/assets/icons/polaris/ReplaceMajor.svg +1 -1
- data/app/assets/icons/polaris/ReplayMinor.svg +1 -1
- data/app/assets/icons/polaris/ReportMinor.svg +1 -1
- data/app/assets/icons/polaris/ReportsMajor.svg +1 -1
- data/app/assets/icons/polaris/ResetMinor.svg +1 -1
- data/app/assets/icons/polaris/ResourcesMajor.svg +1 -1
- data/app/assets/icons/polaris/ReturnMinor.svg +1 -1
- data/app/assets/icons/polaris/ReturnsMajor.svg +1 -0
- data/app/assets/icons/polaris/RichTextMinor.svg +1 -0
- data/app/assets/icons/polaris/RiskMajor.svg +1 -1
- data/app/assets/icons/polaris/RiskMinor.svg +1 -1
- data/app/assets/icons/polaris/Rows2Major.svg +1 -0
- data/app/assets/icons/polaris/SandboxMajor.svg +1 -1
- data/app/assets/icons/polaris/SaveMinor.svg +1 -1
- data/app/assets/icons/polaris/SearchMajor.svg +1 -1
- data/app/assets/icons/polaris/SearchMinor.svg +1 -1
- data/app/assets/icons/polaris/SectionMajor.svg +1 -1
- data/app/assets/icons/polaris/SecureMajor.svg +1 -1
- data/app/assets/icons/polaris/SelectMinor.svg +1 -1
- data/app/assets/icons/polaris/SendMajor.svg +1 -1
- data/app/assets/icons/polaris/SettingsMajor.svg +1 -1
- data/app/assets/icons/polaris/SettingsMinor.svg +1 -1
- data/app/assets/icons/polaris/ShareIosMinor.svg +1 -1
- data/app/assets/icons/polaris/ShareMinor.svg +1 -1
- data/app/assets/icons/polaris/ShipmentMajor.svg +1 -1
- data/app/assets/icons/polaris/ShopcodesMajor.svg +1 -1
- data/app/assets/icons/polaris/SidebarLeftMajor.svg +1 -1
- data/app/assets/icons/polaris/SidebarRightMajor.svg +1 -1
- data/app/assets/icons/polaris/SimplifyMajor.svg +1 -0
- data/app/assets/icons/polaris/SimplifyMinor.svg +1 -0
- data/app/assets/icons/polaris/SlideshowMajor.svg +1 -1
- data/app/assets/icons/polaris/SmileyHappyMajor.svg +1 -1
- data/app/assets/icons/polaris/SmileyJoyMajor.svg +1 -1
- data/app/assets/icons/polaris/SmileyNeutralMajor.svg +1 -1
- data/app/assets/icons/polaris/SmileySadMajor.svg +1 -1
- data/app/assets/icons/polaris/SocialAdMajor.svg +1 -1
- data/app/assets/icons/polaris/SocialPostMajor.svg +1 -1
- data/app/assets/icons/polaris/SoftPackMajor.svg +1 -1
- data/app/assets/icons/polaris/SortAscendingMajor.svg +1 -1
- data/app/assets/icons/polaris/SortDescendingMajor.svg +1 -1
- data/app/assets/icons/polaris/SortMinor.svg +1 -1
- data/app/assets/icons/polaris/SoundMajor.svg +1 -1
- data/app/assets/icons/polaris/StarFilledMinor.svg +1 -1
- data/app/assets/icons/polaris/StarOutlineMinor.svg +1 -1
- data/app/assets/icons/polaris/StatusActiveMajor.svg +1 -0
- data/app/assets/icons/polaris/StoreMajor.svg +1 -1
- data/app/assets/icons/polaris/StoreMinor.svg +1 -1
- data/app/assets/icons/polaris/StoreStatusMajor.svg +1 -1
- data/app/assets/icons/polaris/TabletMajor.svg +1 -1
- data/app/assets/icons/polaris/TapChipMajor.svg +1 -1
- data/app/assets/icons/polaris/TaxMajor.svg +1 -1
- data/app/assets/icons/polaris/TeamMajor.svg +1 -1
- data/app/assets/icons/polaris/TemplateMajor.svg +1 -1
- data/app/assets/icons/polaris/TemplateMinor.svg +1 -0
- data/app/assets/icons/polaris/TextAlignmentCenterMajor.svg +1 -1
- data/app/assets/icons/polaris/TextAlignmentLeftMajor.svg +1 -1
- data/app/assets/icons/polaris/TextAlignmentRightMajor.svg +1 -1
- data/app/assets/icons/polaris/TextBlockMajor.svg +1 -1
- data/app/assets/icons/polaris/TextMajor.svg +1 -1
- data/app/assets/icons/polaris/ThemeEditMajor.svg +1 -1
- data/app/assets/icons/polaris/ThemeStoreMajor.svg +1 -1
- data/app/assets/icons/polaris/ThemesMajor.svg +1 -1
- data/app/assets/icons/polaris/ThumbsDownMajor.svg +1 -1
- data/app/assets/icons/polaris/ThumbsDownMinor.svg +1 -1
- data/app/assets/icons/polaris/ThumbsUpMajor.svg +1 -1
- data/app/assets/icons/polaris/ThumbsUpMinor.svg +1 -1
- data/app/assets/icons/polaris/TickSmallMinor.svg +1 -1
- data/app/assets/icons/polaris/TimeDecayModelMinor.svg +1 -0
- data/app/assets/icons/polaris/TimelineAttachmentMajor.svg +1 -1
- data/app/assets/icons/polaris/TipsMajor.svg +1 -1
- data/app/assets/icons/polaris/TitleMinor.svg +1 -1
- data/app/assets/icons/polaris/ToggleMinor.svg +1 -0
- data/app/assets/icons/polaris/ToolsMajor.svg +1 -1
- data/app/assets/icons/polaris/TransactionFeeDollarMajor.svg +1 -1
- data/app/assets/icons/polaris/TransactionFeeEuroMajor.svg +1 -1
- data/app/assets/icons/polaris/TransactionFeePoundMajor.svg +1 -1
- data/app/assets/icons/polaris/TransactionFeeRupeeMajor.svg +1 -1
- data/app/assets/icons/polaris/TransactionFeeYenMajor.svg +1 -1
- data/app/assets/icons/polaris/TransactionMajor.svg +1 -1
- data/app/assets/icons/polaris/TransferInMajor.svg +1 -1
- data/app/assets/icons/polaris/TransferMajor.svg +1 -1
- data/app/assets/icons/polaris/TransferOutMajor.svg +1 -1
- data/app/assets/icons/polaris/TransferWithinShopifyMajor.svg +1 -1
- data/app/assets/icons/polaris/TransportMajor.svg +1 -1
- data/app/assets/icons/polaris/TroubleshootMajor.svg +1 -1
- data/app/assets/icons/polaris/TypeMajor.svg +1 -1
- data/app/assets/icons/polaris/TypeMinor.svg +1 -0
- data/app/assets/icons/polaris/UndoMajor.svg +1 -1
- data/app/assets/icons/polaris/UnfulfilledMajor.svg +1 -1
- data/app/assets/icons/polaris/UnknownDeviceMajor.svg +1 -1
- data/app/assets/icons/polaris/UpdateInventoryMajor.svg +1 -1
- data/app/assets/icons/polaris/UploadMajor.svg +1 -1
- data/app/assets/icons/polaris/VariantMajor.svg +1 -1
- data/app/assets/icons/polaris/ViewMajor.svg +1 -1
- data/app/assets/icons/polaris/ViewMinor.svg +1 -1
- data/app/assets/icons/polaris/ViewportNarrowMajor.svg +1 -1
- data/app/assets/icons/polaris/ViewportShortMajor.svg +1 -0
- data/app/assets/icons/polaris/ViewportTallMajor.svg +1 -0
- data/app/assets/icons/polaris/ViewportWideMajor.svg +1 -1
- data/app/assets/icons/polaris/VocabularyMajor.svg +1 -1
- data/app/assets/icons/polaris/VolumeMinor.svg +1 -0
- data/app/assets/icons/polaris/WandMajor.svg +1 -1
- data/app/assets/icons/polaris/WandMinor.svg +1 -1
- data/app/assets/icons/polaris/WearableMajor.svg +1 -1
- data/app/assets/icons/polaris/WeightMinor.svg +1 -0
- data/app/assets/icons/polaris/WholesaleMajor.svg +1 -1
- data/app/assets/icons/polaris/WifiMajor.svg +1 -1
- data/app/assets/javascripts/polaris_view_components/data_table_controller.js +33 -0
- data/app/assets/javascripts/polaris_view_components/index.js +2 -0
- data/app/assets/javascripts/polaris_view_components/toast_controller.js +1 -1
- data/app/assets/javascripts/polaris_view_components.js +33 -5
- data/app/assets/stylesheets/polaris_view_components/{custom.css → custom.pcss} +67 -11
- data/app/assets/stylesheets/polaris_view_components/{shopify_navigation.css → shopify_navigation.pcss} +22 -26
- data/app/assets/stylesheets/polaris_view_components.css +2133 -1708
- data/app/assets/stylesheets/polaris_view_components.pcss +4 -0
- data/app/components/polaris/action_list/item_component.html.erb +9 -11
- data/app/components/polaris/action_list/section_component.html.erb +30 -6
- data/app/components/polaris/action_list/section_component.rb +7 -12
- data/app/components/polaris/action_list_component.html.erb +12 -8
- data/app/components/polaris/action_list_component.rb +5 -1
- data/app/components/polaris/autocomplete_component.html.erb +1 -1
- data/app/components/polaris/avatar_component.html.erb +1 -1
- data/app/components/polaris/avatar_component.rb +44 -12
- data/app/components/polaris/badge_component.html.erb +12 -4
- data/app/components/polaris/badge_component.rb +26 -0
- data/app/components/polaris/banner_component.html.erb +29 -24
- data/app/components/polaris/banner_component.rb +4 -2
- data/app/components/polaris/bleed_component.rb +73 -0
- data/app/components/polaris/box_component.rb +187 -0
- data/app/components/polaris/button_group_component.rb +3 -1
- data/app/components/polaris/callout_card_component.html.erb +3 -3
- data/app/components/polaris/callout_card_component.rb +2 -2
- data/app/components/polaris/caption_component.rb +1 -6
- data/app/components/polaris/card/header_component.html.erb +4 -4
- data/app/components/polaris/card/header_component.rb +1 -1
- data/app/components/polaris/card/section_component.html.erb +6 -6
- data/app/components/polaris/card/section_component.rb +7 -7
- data/app/components/polaris/card_component.html.erb +4 -4
- data/app/components/polaris/card_component.rb +4 -4
- data/app/components/polaris/choice_component.html.erb +3 -1
- data/app/components/polaris/choice_list_component.html.erb +17 -8
- data/app/components/polaris/choice_list_component.rb +2 -6
- data/app/components/polaris/component.rb +1 -0
- data/app/components/polaris/data_table/cell_component.rb +2 -0
- data/app/components/polaris/data_table_component.html.erb +66 -64
- data/app/components/polaris/data_table_component.rb +15 -0
- data/app/components/polaris/description_list_component.rb +3 -1
- data/app/components/polaris/display_text_component.rb +7 -11
- data/app/components/polaris/divider_component.rb +35 -0
- data/app/components/polaris/dropzone_component.html.erb +9 -9
- data/app/components/polaris/empty_state_component.html.erb +41 -36
- data/app/components/polaris/empty_state_component.rb +5 -13
- data/app/components/polaris/filters_component.rb +2 -2
- data/app/components/polaris/footer_help_component.html.erb +3 -9
- data/app/components/polaris/footer_help_component.rb +1 -0
- data/app/components/polaris/frame/save_bar_component.html.erb +9 -4
- data/app/components/polaris/heading_component.rb +2 -6
- data/app/components/polaris/horizontal_grid_component.rb +82 -0
- data/app/components/polaris/horizontal_stack_component.rb +64 -0
- data/app/components/polaris/inline_code_component.rb +16 -0
- data/app/components/polaris/inline_component.rb +44 -0
- data/app/components/polaris/inline_error_component.html.erb +1 -1
- data/app/components/polaris/labelled_component.html.erb +3 -1
- data/app/components/polaris/labelled_component.rb +1 -1
- data/app/components/polaris/layout/annotated_section.html.erb +3 -2
- data/app/components/polaris/layout/annotated_section.rb +1 -0
- data/app/components/polaris/layout_component.html.erb +1 -1
- data/app/components/polaris/layout_component.rb +2 -0
- data/app/components/polaris/link_component.rb +1 -14
- data/app/components/polaris/list_component.rb +10 -1
- data/app/components/polaris/modal/section_component.rb +5 -1
- data/app/components/polaris/modal_component.html.erb +50 -30
- data/app/components/polaris/modal_component.rb +0 -4
- data/app/components/polaris/navigation/item_component.html.erb +21 -13
- data/app/components/polaris/navigation/item_component.rb +8 -6
- data/app/components/polaris/navigation/section_component.html.erb +2 -2
- data/app/components/polaris/option_list/section_component.html.erb +26 -10
- data/app/components/polaris/option_list/section_component.rb +2 -4
- data/app/components/polaris/option_list_component.html.erb +5 -2
- data/app/components/polaris/option_list_component.rb +9 -9
- data/app/components/polaris/page_actions_component.html.erb +4 -4
- data/app/components/polaris/page_actions_component.rb +1 -21
- data/app/components/polaris/page_component.html.erb +91 -88
- data/app/components/polaris/page_component.rb +24 -10
- data/app/components/polaris/pagination_component.html.erb +5 -5
- data/app/components/polaris/placeholder_component.rb +37 -0
- data/app/components/polaris/popover/pane_component.html.erb +1 -1
- data/app/components/polaris/popover/pane_component.rb +22 -5
- data/app/components/polaris/popover/section_component.rb +5 -1
- data/app/components/polaris/popover_component.html.erb +20 -13
- data/app/components/polaris/popover_component.rb +5 -1
- data/app/components/polaris/progress_bar_component.html.erb +2 -5
- data/app/components/polaris/progress_bar_component.rb +13 -0
- data/app/components/polaris/resource_item/shortcut_actions_component.html.erb +3 -3
- data/app/components/polaris/resource_item_component.html.erb +42 -19
- data/app/components/polaris/resource_item_component.rb +8 -25
- data/app/components/polaris/select_component.html.erb +5 -3
- data/app/components/polaris/skeleton_body_text_component.html.erb +2 -4
- data/app/components/polaris/skeleton_body_text_component.rb +1 -7
- data/app/components/polaris/skeleton_page_component.html.erb +58 -20
- data/app/components/polaris/skeleton_page_component.rb +21 -6
- data/app/components/polaris/spinner_component.html.erb +12 -6
- data/app/components/polaris/spinner_component.rb +26 -0
- data/app/components/polaris/stack/item_component.rb +2 -2
- data/app/components/polaris/stack_component.rb +20 -20
- data/app/components/polaris/subheading_component.rb +2 -6
- data/app/components/polaris/tabs/tab_component.html.erb +2 -2
- data/app/components/polaris/tabs/tab_component.rb +2 -2
- data/app/components/polaris/tabs_component.html.erb +7 -1
- data/app/components/polaris/tabs_component.rb +3 -3
- data/app/components/polaris/text_component.html.erb +3 -0
- data/app/components/polaris/text_component.rb +132 -0
- data/app/components/polaris/text_field_component.rb +4 -0
- data/app/components/polaris/text_style_component.rb +25 -21
- data/app/components/polaris/thumbnail_component.html.erb +1 -1
- data/app/components/polaris/thumbnail_component.rb +24 -9
- data/app/components/polaris/toast_component.html.erb +1 -1
- data/app/components/polaris/tokens/border.rb +9 -0
- data/app/components/polaris/tokens/color.rb +132 -0
- data/app/components/polaris/tokens/shadow.rb +18 -0
- data/app/components/polaris/tokens/spacing.rb +27 -0
- data/app/components/polaris/tokens.rb +4 -0
- data/app/components/polaris/top_bar/user_menu_component.html.erb +20 -5
- data/app/components/polaris/vertical_stack_component.rb +70 -0
- data/app/components/polaris/visually_hidden_component.rb +1 -1
- data/app/helpers/polaris/fetch_or_fallback_helper.rb +13 -1
- data/app/helpers/polaris/form_builder.rb +1 -1
- data/app/helpers/polaris/styles_list_helper.rb +22 -0
- data/app/helpers/polaris/view_helper.rb +15 -4
- data/lib/install/install.rb +6 -1
- data/lib/polaris/view_components/codemods/v3_slot_setters.rb +222 -0
- data/lib/polaris/view_components/engine.rb +0 -3
- data/lib/polaris/view_components/version.rb +1 -1
- data/lib/tasks/polaris_view_components_tasks.rake +14 -0
- metadata +117 -11
- data/app/assets/stylesheets/polaris_view_components.postcss.css +0 -4
- /data/app/assets/stylesheets/polaris_view_components/{spacer_component.css → spacer_component.pcss} +0 -0
@@ -16,6 +16,7 @@ module Polaris
|
|
16
16
|
vertical_alignment: ALIGNMENT_DEFAULT,
|
17
17
|
totals_in_header: false,
|
18
18
|
totals_in_footer: false,
|
19
|
+
increased_density: false,
|
19
20
|
**system_arguments
|
20
21
|
)
|
21
22
|
@data = data
|
@@ -23,6 +24,7 @@ module Polaris
|
|
23
24
|
@vertical_alignment = fetch_or_fallback(ALIGNMENT_OPTIONS, vertical_alignment, ALIGNMENT_DEFAULT)
|
24
25
|
@totals_in_header = totals_in_header
|
25
26
|
@totals_in_footer = totals_in_footer
|
27
|
+
@increased_density = increased_density
|
26
28
|
@system_arguments = system_arguments
|
27
29
|
end
|
28
30
|
|
@@ -32,9 +34,20 @@ module Polaris
|
|
32
34
|
args[:classes],
|
33
35
|
"Polaris-DataTable"
|
34
36
|
)
|
37
|
+
args[:data] ||= {}
|
38
|
+
args[:data][:controller] = "polaris-data-table"
|
35
39
|
end
|
36
40
|
end
|
37
41
|
|
42
|
+
def wrapper_arguments
|
43
|
+
{
|
44
|
+
tag: "div",
|
45
|
+
classes: class_names(
|
46
|
+
"Polaris-DataTable__IncreasedTableDensity": @increased_density
|
47
|
+
)
|
48
|
+
}
|
49
|
+
end
|
50
|
+
|
38
51
|
def row_arguments(row)
|
39
52
|
{tag: "tr"}.tap do |args|
|
40
53
|
args[:classes] = class_names(
|
@@ -42,6 +55,8 @@ module Polaris
|
|
42
55
|
"Polaris-DataTable--hoverable": @hoverable
|
43
56
|
)
|
44
57
|
args[:id] = dom_id(row) if row.respond_to?(:to_key)
|
58
|
+
args[:data] ||= {}
|
59
|
+
args[:data][:polaris_data_table_target] = "row"
|
45
60
|
end
|
46
61
|
end
|
47
62
|
|
@@ -32,7 +32,9 @@ module Polaris
|
|
32
32
|
|
33
33
|
def call
|
34
34
|
safe_join [
|
35
|
-
tag.dt(class: "Polaris-DescriptionList__Term")
|
35
|
+
tag.dt(class: "Polaris-DescriptionList__Term") do
|
36
|
+
render(Polaris::TextComponent.new(as: :span, variant: :headingSm).with_content(@term))
|
37
|
+
end,
|
36
38
|
tag.dd(class: "Polaris-DescriptionList__Description") { content }
|
37
39
|
]
|
38
40
|
end
|
@@ -7,10 +7,10 @@ module Polaris
|
|
7
7
|
|
8
8
|
SIZE_DEFAULT = :medium
|
9
9
|
SIZE_MAPPINGS = {
|
10
|
-
small:
|
11
|
-
medium:
|
12
|
-
large:
|
13
|
-
extra_large:
|
10
|
+
small: :headingLg,
|
11
|
+
medium: :headingXl,
|
12
|
+
large: :heading2xl,
|
13
|
+
extra_large: :heading4xl
|
14
14
|
}
|
15
15
|
SIZE_OPTIONS = SIZE_MAPPINGS.keys
|
16
16
|
|
@@ -20,16 +20,12 @@ module Polaris
|
|
20
20
|
**system_arguments
|
21
21
|
)
|
22
22
|
@system_arguments = system_arguments
|
23
|
-
@
|
24
|
-
@
|
25
|
-
@system_arguments[:classes],
|
26
|
-
"Polaris-DisplayText",
|
27
|
-
SIZE_MAPPINGS[fetch_or_fallback(SIZE_OPTIONS, size, SIZE_DEFAULT)]
|
28
|
-
)
|
23
|
+
@element = element
|
24
|
+
@variant = SIZE_MAPPINGS[fetch_or_fallback(SIZE_OPTIONS, size, SIZE_DEFAULT)]
|
29
25
|
end
|
30
26
|
|
31
27
|
def call
|
32
|
-
render(Polaris::
|
28
|
+
render(Polaris::TextComponent.new(as: @element, variant: @variant, **@system_arguments)) { content }
|
33
29
|
end
|
34
30
|
end
|
35
31
|
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Polaris
|
4
|
+
class DividerComponent < Polaris::Component
|
5
|
+
def initialize(
|
6
|
+
border_color: "border-subdued",
|
7
|
+
border_width: "1",
|
8
|
+
**system_arguments
|
9
|
+
)
|
10
|
+
@system_arguments = system_arguments.tap do |args|
|
11
|
+
args[:tag] = "hr"
|
12
|
+
args[:classes] = class_names(
|
13
|
+
args[:classes],
|
14
|
+
"Polaris-Divider"
|
15
|
+
)
|
16
|
+
args[:style] = styles_list(
|
17
|
+
args[:style],
|
18
|
+
"border-block-start": "var(--p-border-width-#{fetch_or_fallback(Tokens::Border::WIDTH_SCALE, border_width)}) solid #{border_color_value(border_color)}"
|
19
|
+
)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def call
|
24
|
+
render(Polaris::BaseComponent.new(**@system_arguments)) { content }
|
25
|
+
end
|
26
|
+
|
27
|
+
private
|
28
|
+
|
29
|
+
def border_color_value(border_color)
|
30
|
+
return "border-subdued" unless border_color
|
31
|
+
return "transparent" if border_color == "transparent"
|
32
|
+
"var(--p-color-#{fetch_or_fallback(Tokens::Color::BORDER_ALIAS, border_color)})"
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -6,7 +6,7 @@
|
|
6
6
|
>
|
7
7
|
<% unless @size == :small %>
|
8
8
|
<%= render Polaris::StackComponent.new(vertical: true, spacing: :tight) do |stack| %>
|
9
|
-
<% stack.
|
9
|
+
<% stack.with_item do %>
|
10
10
|
<%= render Polaris::DisplayTextComponent.new(size: :small) do %>
|
11
11
|
<%= @overlay_text %>
|
12
12
|
<% end %>
|
@@ -20,7 +20,7 @@
|
|
20
20
|
data-polaris-dropzone-target="errorOverlay"
|
21
21
|
>
|
22
22
|
<%= render Polaris::StackComponent.new(vertical: true, spacing: :tight) do |stack| %>
|
23
|
-
<% stack.
|
23
|
+
<% stack.with_item do %>
|
24
24
|
<%= render Polaris::DisplayTextComponent.new(size: :small) do %>
|
25
25
|
<%= @error_overlay_text %>
|
26
26
|
<% end %>
|
@@ -35,13 +35,13 @@
|
|
35
35
|
<% else %>
|
36
36
|
<%= render Polaris::StackComponent.new(vertical: true, spacing: :tight) do |stack| %>
|
37
37
|
<% unless @size == :medium %>
|
38
|
-
<% stack.
|
38
|
+
<% stack.with_item do %>
|
39
39
|
<img width="<%= @size == :small ? 20 : 40 %>" src="data:image/svg+xml,%3csvg fill='none' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M20 10a10 10 0 11-20 0 10 10 0 0120 0zM5.3 8.3l4-4a1 1 0 011.4 0l4 4a1 1 0 01-1.4 1.4L11 7.4V15a1 1 0 11-2 0V7.4L6.7 9.7a1 1 0 01-1.4-1.4z' fill='%235C5F62'/%3e%3c/svg%3e" alt="">
|
40
40
|
<% end %>
|
41
41
|
<% end %>
|
42
42
|
|
43
43
|
<% unless @size == :small %>
|
44
|
-
<% stack.
|
44
|
+
<% stack.with_item do %>
|
45
45
|
<% if @size == :medium %>
|
46
46
|
<div class="Polaris-DropZone-FileUpload__ActionTitle">
|
47
47
|
<%= @file_upload_button %>
|
@@ -55,7 +55,7 @@
|
|
55
55
|
<% end %>
|
56
56
|
|
57
57
|
<% unless @size == :small %>
|
58
|
-
<% stack.
|
58
|
+
<% stack.with_item do %>
|
59
59
|
<% help_text = capture do %>
|
60
60
|
<%= render Polaris::TextStyleComponent.new(variation: :subdued) do %>
|
61
61
|
<%= @file_upload_help %>
|
@@ -115,7 +115,7 @@
|
|
115
115
|
data: { target: "icon" },
|
116
116
|
style: "border: none; background: none;"
|
117
117
|
) do |thumbnail| %>
|
118
|
-
<%= thumbnail.
|
118
|
+
<%= thumbnail.with_icon(name: "TimelineAttachmentMajor") %>
|
119
119
|
<% end %>
|
120
120
|
<%= polaris_thumbnail(source: "#", size: :small, data: { target: "thumbnail" }) %>
|
121
121
|
<% else %>
|
@@ -125,18 +125,18 @@
|
|
125
125
|
vertical: !@multiple,
|
126
126
|
spacing: @multiple ? :default : :tight,
|
127
127
|
) do |stack| %>
|
128
|
-
<% stack.
|
128
|
+
<% stack.with_item do %>
|
129
129
|
<%= polaris_thumbnail(
|
130
130
|
size: :small,
|
131
131
|
data: { target: "icon" },
|
132
132
|
style: "border: none; background: none;"
|
133
133
|
) do |thumbnail| %>
|
134
|
-
<%= thumbnail.
|
134
|
+
<%= thumbnail.with_icon(name: "TimelineAttachmentMajor") %>
|
135
135
|
<% end %>
|
136
136
|
<%= polaris_thumbnail(source: "#", size: :small, data: { target: "thumbnail" }) %>
|
137
137
|
<% end %>
|
138
138
|
|
139
|
-
<% stack.
|
139
|
+
<% stack.with_item(fill: true) do %>
|
140
140
|
<div data-target="content">
|
141
141
|
<%= polaris_caption do %>
|
142
142
|
<%= polaris_text_subdued(data: { target: "file-size" }) { "SIZE" } %>
|
@@ -1,52 +1,57 @@
|
|
1
|
-
<%=
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
<%= polaris_box(
|
2
|
+
padding_inline_start: "0",
|
3
|
+
padding_inline_end: "0",
|
4
|
+
padding_block_start: "5",
|
5
|
+
padding_block_end: "16",
|
6
|
+
**@system_arguments
|
7
|
+
) do %>
|
8
|
+
<%= polaris_vertical_stack(inline_align: :center) do %>
|
9
|
+
<img src="<%= @image %>" role="presentation" class="<%= @image_contained_class %>">
|
10
|
+
|
11
|
+
<%= polaris_box(max_width: @full_width? "100%" : "400px") do %>
|
12
|
+
<%= polaris_vertical_stack(inline_align: :center) do %>
|
5
13
|
<% if @heading.present? || content.present? %>
|
6
|
-
|
14
|
+
<%= polaris_box(padding_block_end: "6") do %>
|
7
15
|
<% if @heading.present? %>
|
8
|
-
|
9
|
-
<%=
|
10
|
-
|
16
|
+
<%= polaris_box(padding_block_end: "4") do %>
|
17
|
+
<%= polaris_text(
|
18
|
+
variant: @within == :container ? :headingLg : :headingXl,
|
19
|
+
as: :p,
|
20
|
+
alignment: :center
|
21
|
+
) do %>
|
22
|
+
<%= @heading %>
|
23
|
+
<% end %>
|
24
|
+
<% end %>
|
11
25
|
<% end %>
|
12
26
|
<% if content.present? %>
|
13
|
-
|
27
|
+
<%= polaris_text(as: :span, color: :subdued, alignment: :center) do %>
|
14
28
|
<%= content %>
|
15
|
-
|
29
|
+
<% end %>
|
16
30
|
<% end %>
|
17
|
-
|
31
|
+
<% end %>
|
18
32
|
<% end %>
|
19
33
|
<% if primary_action.present? || secondary_action.present? %>
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
<% stack.item do %>
|
24
|
-
<%= primary_action %>
|
25
|
-
<% end %>
|
26
|
-
<% end %>
|
27
|
-
<% if secondary_action.present? %>
|
28
|
-
<% stack.item do %>
|
29
|
-
<%= secondary_action %>
|
30
|
-
<% end %>
|
31
|
-
<% end %>
|
34
|
+
<%= polaris_horizontal_stack(align: :center, gap: "2") do %>
|
35
|
+
<% if secondary_action.present? %>
|
36
|
+
<%= secondary_action %>
|
32
37
|
<% end %>
|
33
|
-
|
38
|
+
<% if primary_action.present? %>
|
39
|
+
<%= primary_action %>
|
40
|
+
<% end %>
|
41
|
+
<% end %>
|
34
42
|
<% end %>
|
35
43
|
<% if footer.present? %>
|
36
|
-
|
37
|
-
|
44
|
+
<%= polaris_box(padding_block_start: "4") do %>
|
45
|
+
<%= polaris_text(as: :span, color: :subdued, alignment: :center) do %>
|
38
46
|
<%= footer %>
|
39
|
-
|
40
|
-
|
47
|
+
<% end %>
|
48
|
+
<% end %>
|
41
49
|
<% end %>
|
42
|
-
|
43
|
-
|
50
|
+
<% end %>
|
51
|
+
<% end %>
|
44
52
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
</div>
|
49
|
-
<% if unsectioned_content.present? %>
|
50
|
-
<%= unsectioned_content %>
|
53
|
+
<% if unsectioned_content.present? %>
|
54
|
+
<%= unsectioned_content %>
|
55
|
+
<% end %>
|
51
56
|
<% end %>
|
52
57
|
<% end %>
|
@@ -3,11 +3,7 @@
|
|
3
3
|
module Polaris
|
4
4
|
class EmptyStateComponent < Polaris::Component
|
5
5
|
WITHIN_DEFAULT = :page
|
6
|
-
|
7
|
-
WITHIN_DEFAULT => "",
|
8
|
-
:container => "Polaris-EmptyState--withinContentContainer"
|
9
|
-
}
|
10
|
-
WITHIN_OPTIONS = WITHIN_MAPPINGS.keys
|
6
|
+
WITHIN_OPTIONS = [:page, :container]
|
11
7
|
|
12
8
|
renders_one :primary_action, ->(primary: true, **system_arguments) do
|
13
9
|
Polaris::ButtonComponent.new(primary: primary, **system_arguments)
|
@@ -19,21 +15,17 @@ module Polaris
|
|
19
15
|
def initialize(
|
20
16
|
image:,
|
21
17
|
heading: nil,
|
18
|
+
image_contained: false,
|
22
19
|
full_width: false,
|
23
20
|
within: WITHIN_DEFAULT,
|
24
21
|
**system_arguments
|
25
22
|
)
|
26
23
|
@image = image
|
24
|
+
@image_contained_class = image_contained ? "Polaris-EmptyState--imageContained" : nil
|
27
25
|
@heading = heading
|
28
|
-
|
26
|
+
@full_width = full_width
|
27
|
+
@within = within
|
29
28
|
@system_arguments = system_arguments
|
30
|
-
@system_arguments[:tag] = "div"
|
31
|
-
@system_arguments[:classes] = class_names(
|
32
|
-
@system_arguments[:classes],
|
33
|
-
"Polaris-EmptyState",
|
34
|
-
WITHIN_MAPPINGS[fetch_or_fallback(WITHIN_OPTIONS, within, WITHIN_DEFAULT)],
|
35
|
-
"Polaris-EmptyState--fullWidth": full_width
|
36
|
-
)
|
37
29
|
end
|
38
30
|
end
|
39
31
|
end
|
@@ -45,7 +45,7 @@ module Polaris
|
|
45
45
|
|
46
46
|
def call
|
47
47
|
polaris_text_field(disabled: @disabled, **@system_arguments) do |text_field|
|
48
|
-
text_field.
|
48
|
+
text_field.with_prefix do
|
49
49
|
polaris_icon(name: "SearchMinor")
|
50
50
|
end
|
51
51
|
end
|
@@ -83,7 +83,7 @@ module Polaris
|
|
83
83
|
def call
|
84
84
|
render(Polaris::BaseComponent.new(**system_arguments)) do
|
85
85
|
render(Polaris::PopoverComponent.new(**popover_arguments)) do |popover|
|
86
|
-
popover.
|
86
|
+
popover.with_button(disclosure: true, disabled: @disabled) { @label }
|
87
87
|
content
|
88
88
|
end
|
89
89
|
end
|
@@ -1,11 +1,5 @@
|
|
1
|
-
<%= render Polaris::BaseComponent.new(
|
2
|
-
<div class="Polaris-
|
3
|
-
|
4
|
-
<%= polaris_icon(name: "InfoMinor", color: :highlight) %>
|
5
|
-
</div>
|
6
|
-
|
7
|
-
<div class="Polaris-FooterHelp__Text">
|
8
|
-
<%= content %>
|
9
|
-
</div>
|
1
|
+
<%= render Polaris::BaseComponent.new(**@system_arguments) do %>
|
2
|
+
<div class="Polaris-FooterHelp__Text">
|
3
|
+
<%= content %>
|
10
4
|
</div>
|
11
5
|
<% end %>
|
@@ -4,6 +4,7 @@ module Polaris
|
|
4
4
|
class FooterHelpComponent < Polaris::Component
|
5
5
|
def initialize(**system_arguments)
|
6
6
|
@system_arguments = system_arguments
|
7
|
+
@system_arguments[:tag] = "div"
|
7
8
|
@system_arguments[:classes] = class_names(
|
8
9
|
@system_arguments[:classes],
|
9
10
|
"Polaris-FooterHelp"
|
@@ -6,15 +6,20 @@
|
|
6
6
|
<% end %>
|
7
7
|
|
8
8
|
<div class="<%= content_classes %>">
|
9
|
-
|
9
|
+
<%= polaris_text(
|
10
|
+
as: :h2,
|
11
|
+
variant: :headingMd,
|
12
|
+
truncate: true,
|
13
|
+
color: :text_inverse
|
14
|
+
) do %>
|
10
15
|
<%= @message %>
|
11
|
-
|
16
|
+
<% end %>
|
12
17
|
<div class="Polaris-Frame-ContextualSaveBar__ActionContainer">
|
13
18
|
<%= polaris_stack(spacing: :tight) do |stack| %>
|
14
|
-
<% stack.
|
19
|
+
<% stack.with_item do %>
|
15
20
|
<%= discard_action %>
|
16
21
|
<% end %>
|
17
|
-
<% stack.
|
22
|
+
<% stack.with_item do %>
|
18
23
|
<%= save_action %>
|
19
24
|
<% end %>
|
20
25
|
<% end %>
|
@@ -10,15 +10,11 @@ module Polaris
|
|
10
10
|
**system_arguments
|
11
11
|
)
|
12
12
|
@system_arguments = system_arguments
|
13
|
-
@
|
14
|
-
@system_arguments[:classes] = class_names(
|
15
|
-
@system_arguments[:classes],
|
16
|
-
"Polaris-Heading"
|
17
|
-
)
|
13
|
+
@element = element
|
18
14
|
end
|
19
15
|
|
20
16
|
def call
|
21
|
-
render(Polaris::
|
17
|
+
render(Polaris::TextComponent.new(as: @element, variant: :headingMd, **@system_arguments)) { content }
|
22
18
|
end
|
23
19
|
end
|
24
20
|
end
|
@@ -0,0 +1,82 @@
|
|
1
|
+
module Polaris
|
2
|
+
class HorizontalGridComponent < Polaris::Component
|
3
|
+
COLUMNS_MAPPINGS = {
|
4
|
+
oneThird: "minmax(0, 1fr)",
|
5
|
+
oneHalf: "minmax(0, 1fr)",
|
6
|
+
twoThirds: "minmax(0, 2fr)"
|
7
|
+
}
|
8
|
+
COLUMNS_OPTIONS = COLUMNS_MAPPINGS.keys
|
9
|
+
ALIGN_OPTIONS = %i[start center end baseline stretch]
|
10
|
+
|
11
|
+
def initialize(
|
12
|
+
columns: nil,
|
13
|
+
gap: nil,
|
14
|
+
align_items: nil,
|
15
|
+
**system_arguments
|
16
|
+
)
|
17
|
+
@system_arguments = system_arguments.tap do |args|
|
18
|
+
args[:tag] = "div"
|
19
|
+
args[:classes] = class_names(
|
20
|
+
args[:classes],
|
21
|
+
"Polaris-HorizontalGrid"
|
22
|
+
)
|
23
|
+
args[:style] = styles_list(
|
24
|
+
args[:style],
|
25
|
+
"--pc-horizontal-grid-align-items": fetch_or_fallback(ALIGN_OPTIONS, align_items, allow_nil: true),
|
26
|
+
**gap_value(gap),
|
27
|
+
**columns_value(columns)
|
28
|
+
)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
def call
|
33
|
+
render(Polaris::BaseComponent.new(**@system_arguments)) { content }
|
34
|
+
end
|
35
|
+
|
36
|
+
private
|
37
|
+
|
38
|
+
def gap_value(gap)
|
39
|
+
return {} unless gap
|
40
|
+
|
41
|
+
value = fetch_or_fallback_nested(
|
42
|
+
Tokens::Spacing::SCREEN_SIZES,
|
43
|
+
Tokens::Spacing::SCALE,
|
44
|
+
gap
|
45
|
+
)
|
46
|
+
|
47
|
+
if value.is_a?(Hash)
|
48
|
+
value.each_with_object({}) do |(key, value), hash|
|
49
|
+
hash["--pc-horizontal-grid-gap-#{key}"] = "var(--p-space-#{value})"
|
50
|
+
end
|
51
|
+
else
|
52
|
+
{"--pc-horizontal-grid-gap-xs": "var(--p-space-#{value})"}
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
def columns_value(columns)
|
57
|
+
return {} unless columns
|
58
|
+
|
59
|
+
if columns.is_a?(Hash)
|
60
|
+
columns.each_with_object({}) do |(key, value), hash|
|
61
|
+
hash["--pc-horizontal-grid-grid-template-columns-#{key}"] = column_value(value)
|
62
|
+
end
|
63
|
+
else
|
64
|
+
{"--pc-horizontal-grid-grid-template-columns-xs": column_value(columns)}
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
def column_value(value)
|
69
|
+
return unless value
|
70
|
+
|
71
|
+
if value.is_a?(Integer)
|
72
|
+
"repeat(#{value}, minmax(0, 1fr));"
|
73
|
+
elsif value.is_a?(Array)
|
74
|
+
value.map do |column|
|
75
|
+
COLUMNS_MAPPINGS[fetch_or_fallback(COLUMNS_OPTIONS, column)]
|
76
|
+
end.join(" ")
|
77
|
+
else
|
78
|
+
value
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
module Polaris
|
2
|
+
class HorizontalStackComponent < Polaris::Component
|
3
|
+
ALIGN_DEFAULT = :default
|
4
|
+
ALIGN_MAPPINGS = {
|
5
|
+
default: "",
|
6
|
+
start: "start",
|
7
|
+
center: "center",
|
8
|
+
end: "end",
|
9
|
+
space_around: "space-around",
|
10
|
+
space_between: "space-between",
|
11
|
+
space_evenly: "space-evenly"
|
12
|
+
}
|
13
|
+
ALIGN_OPTIONS = ALIGN_MAPPINGS.keys
|
14
|
+
|
15
|
+
BLOCK_ALIGN_OPTIONS = %i[start center end baseline stretch]
|
16
|
+
|
17
|
+
def initialize(
|
18
|
+
align: ALIGN_DEFAULT,
|
19
|
+
block_align: nil,
|
20
|
+
gap: nil,
|
21
|
+
wrap: true,
|
22
|
+
**system_arguments
|
23
|
+
)
|
24
|
+
@system_arguments = system_arguments.tap do |args|
|
25
|
+
args[:tag] = "div"
|
26
|
+
args[:classes] = class_names(
|
27
|
+
args[:classes],
|
28
|
+
"Polaris-HorizontalStack"
|
29
|
+
)
|
30
|
+
args[:style] = styles_list(
|
31
|
+
args[:style],
|
32
|
+
"--pc-horizontal-stack-align": ALIGN_MAPPINGS[fetch_or_fallback(ALIGN_OPTIONS, align, ALIGN_DEFAULT)],
|
33
|
+
"--pc-horizontal-stack-block-align": fetch_or_fallback(BLOCK_ALIGN_OPTIONS, block_align, allow_nil: true),
|
34
|
+
"--pc-horizontal-stack-wrap": wrap ? "wrap" : "nowrap",
|
35
|
+
**gap_value(gap)
|
36
|
+
)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
def call
|
41
|
+
render(Polaris::BaseComponent.new(**@system_arguments)) { content }
|
42
|
+
end
|
43
|
+
|
44
|
+
private
|
45
|
+
|
46
|
+
def gap_value(gap)
|
47
|
+
return {} unless gap
|
48
|
+
|
49
|
+
value = fetch_or_fallback_nested(
|
50
|
+
Tokens::Spacing::SCREEN_SIZES,
|
51
|
+
Tokens::Spacing::SCALE,
|
52
|
+
gap
|
53
|
+
)
|
54
|
+
|
55
|
+
if value.is_a?(Hash)
|
56
|
+
value.each_with_object({}) do |(key, value), hash|
|
57
|
+
hash["--pc-horizontal-stack-gap-#{key}"] = "var(--p-space-#{value})"
|
58
|
+
end
|
59
|
+
else
|
60
|
+
{"--pc-horizontal-stack-gap-xs": "var(--p-space-#{value})"}
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Polaris
|
4
|
+
class InlineCodeComponent < Polaris::Component
|
5
|
+
def initialize(**system_arguments)
|
6
|
+
@system_arguments = system_arguments.tap do |opts|
|
7
|
+
opts[:tag] = "code"
|
8
|
+
opts[:classes] = "Polaris-InlineCode__Code"
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
def call
|
13
|
+
render(Polaris::BaseComponent.new(**@system_arguments)) { content }
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Polaris
|
4
|
+
class InlineComponent < Polaris::Component
|
5
|
+
include ActiveModel::Validations
|
6
|
+
|
7
|
+
attr_reader :align, :block_align, :gap, :wrap
|
8
|
+
|
9
|
+
ALIGN_DEFAULT = :start
|
10
|
+
ALIGN_OPTIONS = %i[start center end space-around space-between space-evenly]
|
11
|
+
validates :align, inclusion: {in: ALIGN_OPTIONS}
|
12
|
+
|
13
|
+
BLOCK_ALIGN_DEFAULT = :center
|
14
|
+
BLOCK_ALIGN_OPTIONS = %i[start center end baseline stretch]
|
15
|
+
validates :block_align, inclusion: {in: BLOCK_ALIGN_OPTIONS}
|
16
|
+
|
17
|
+
GAP_DEFAULT = 4
|
18
|
+
validates :gap, inclusion: {in: Polaris::Tokens::Spacing::SCALE}
|
19
|
+
|
20
|
+
WRAP_DEFAULT = true
|
21
|
+
validates :wrap, inclusion: {in: [true, false]}
|
22
|
+
|
23
|
+
def initialize(
|
24
|
+
align: ALIGN_DEFAULT,
|
25
|
+
block_align: BLOCK_ALIGN_DEFAULT,
|
26
|
+
gap: GAP_DEFAULT,
|
27
|
+
wrap: WRAP_DEFAULT,
|
28
|
+
**system_arguments
|
29
|
+
)
|
30
|
+
@system_arguments = system_arguments
|
31
|
+
|
32
|
+
@system_arguments[:tag] = :div
|
33
|
+
@system_arguments[:classes] = class_names(
|
34
|
+
@system_arguments[:classes],
|
35
|
+
"Polaris-Inline"
|
36
|
+
)
|
37
|
+
@system_arguments[:style] = "--pc-inline-align: #{align}; --pc-inline-block-align: #{block_align}; --pc-inline-wrap: #{wrap ? :wrap : :nowrap}; --pc-inline-gap-xs: var(--p-space-#{gap})"
|
38
|
+
end
|
39
|
+
|
40
|
+
def call
|
41
|
+
render(Polaris::BaseComponent.new(**@system_arguments)) { content }
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -23,7 +23,7 @@ module Polaris
|
|
23
23
|
|
24
24
|
if label_action && label_action[:content].present?
|
25
25
|
label_content = label_action.delete(:content)
|
26
|
-
|
26
|
+
with_label_action(**label_action) { label_content }
|
27
27
|
end
|
28
28
|
|
29
29
|
@system_arguments = system_arguments
|