polaris_view_components 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +20 -0
- data/README.md +51 -0
- data/app/assets/icons/polaris/AbandonedCartMajor.svg +1 -0
- data/app/assets/icons/polaris/AccessibilityMajor.svg +1 -0
- data/app/assets/icons/polaris/ActivitiesMajor.svg +1 -0
- data/app/assets/icons/polaris/AddCodeMajor.svg +1 -0
- data/app/assets/icons/polaris/AddImageMajor.svg +1 -0
- data/app/assets/icons/polaris/AddMajor.svg +1 -0
- data/app/assets/icons/polaris/AddNoteMajor.svg +1 -0
- data/app/assets/icons/polaris/AddProductMajor.svg +1 -0
- data/app/assets/icons/polaris/AffiliateMajor.svg +1 -0
- data/app/assets/icons/polaris/AlertMinor.svg +1 -0
- data/app/assets/icons/polaris/AnalyticsMajor.svg +1 -0
- data/app/assets/icons/polaris/AppExtensionMinor.svg +1 -0
- data/app/assets/icons/polaris/AppsMajor.svg +1 -0
- data/app/assets/icons/polaris/ArchiveMajor.svg +1 -0
- data/app/assets/icons/polaris/ArchiveMinor.svg +1 -0
- data/app/assets/icons/polaris/ArrowDownMinor.svg +1 -0
- data/app/assets/icons/polaris/ArrowLeftMinor.svg +1 -0
- data/app/assets/icons/polaris/ArrowRightMinor.svg +1 -0
- data/app/assets/icons/polaris/ArrowUpMinor.svg +1 -0
- data/app/assets/icons/polaris/AttachmentMajor.svg +1 -0
- data/app/assets/icons/polaris/AutomationMajor.svg +1 -0
- data/app/assets/icons/polaris/BackspaceMajor.svg +1 -0
- data/app/assets/icons/polaris/BalanceMajor.svg +1 -0
- data/app/assets/icons/polaris/BankMajor.svg +1 -0
- data/app/assets/icons/polaris/BarcodeMajor.svg +1 -0
- data/app/assets/icons/polaris/BehaviorMajor.svg +1 -0
- data/app/assets/icons/polaris/BillingStatementDollarMajor.svg +1 -0
- data/app/assets/icons/polaris/BillingStatementEuroMajor.svg +1 -0
- data/app/assets/icons/polaris/BillingStatementPoundMajor.svg +1 -0
- data/app/assets/icons/polaris/BillingStatementRupeeMajor.svg +1 -0
- data/app/assets/icons/polaris/BillingStatementYenMajor.svg +1 -0
- data/app/assets/icons/polaris/BlockquoteMajor.svg +1 -0
- data/app/assets/icons/polaris/BlogMajor.svg +1 -0
- data/app/assets/icons/polaris/BugMajor.svg +1 -0
- data/app/assets/icons/polaris/ButtonCornerPillMajor.svg +1 -0
- data/app/assets/icons/polaris/ButtonCornerRoundedMajor.svg +1 -0
- data/app/assets/icons/polaris/ButtonCornerSquareMajor.svg +1 -0
- data/app/assets/icons/polaris/BuyButtonButtonLayoutMajor.svg +1 -0
- data/app/assets/icons/polaris/BuyButtonHorizontalLayoutMajor.svg +1 -0
- data/app/assets/icons/polaris/BuyButtonMajor.svg +1 -0
- data/app/assets/icons/polaris/BuyButtonVerticalLayoutMajor.svg +1 -0
- data/app/assets/icons/polaris/CalendarMajor.svg +1 -0
- data/app/assets/icons/polaris/CalendarMinor.svg +1 -0
- data/app/assets/icons/polaris/CalendarTickMajor.svg +1 -0
- data/app/assets/icons/polaris/CameraMajor.svg +1 -0
- data/app/assets/icons/polaris/CancelSmallMinor.svg +1 -0
- data/app/assets/icons/polaris/CapitalMajor.svg +1 -0
- data/app/assets/icons/polaris/CapturePaymentMinor.svg +1 -0
- data/app/assets/icons/polaris/CardReaderChipMajor.svg +1 -0
- data/app/assets/icons/polaris/CardReaderMajor.svg +1 -0
- data/app/assets/icons/polaris/CardReaderTapMajor.svg +1 -0
- data/app/assets/icons/polaris/CaretDownMinor.svg +1 -0
- data/app/assets/icons/polaris/CaretUpMinor.svg +1 -0
- data/app/assets/icons/polaris/CartDownMajor.svg +1 -0
- data/app/assets/icons/polaris/CartMajor.svg +1 -0
- data/app/assets/icons/polaris/CartUpMajor.svg +1 -0
- data/app/assets/icons/polaris/CashDollarMajor.svg +1 -0
- data/app/assets/icons/polaris/CashEuroMajor.svg +1 -0
- data/app/assets/icons/polaris/CashPoundMajor.svg +1 -0
- data/app/assets/icons/polaris/CashRupeeMajor.svg +1 -0
- data/app/assets/icons/polaris/CashYenMajor.svg +1 -0
- data/app/assets/icons/polaris/CategoriesMajor.svg +1 -0
- data/app/assets/icons/polaris/ChannelsMajor.svg +1 -0
- data/app/assets/icons/polaris/ChatMajor.svg +1 -0
- data/app/assets/icons/polaris/ChecklistAlternateMajor.svg +1 -0
- data/app/assets/icons/polaris/ChecklistMajor.svg +1 -0
- data/app/assets/icons/polaris/CheckoutMajor.svg +1 -0
- data/app/assets/icons/polaris/ChevronDownMinor.svg +1 -0
- data/app/assets/icons/polaris/ChevronLeftMinor.svg +1 -0
- data/app/assets/icons/polaris/ChevronRightMinor.svg +1 -0
- data/app/assets/icons/polaris/ChevronUpMinor.svg +1 -0
- data/app/assets/icons/polaris/CircleAlertMajor.svg +1 -0
- data/app/assets/icons/polaris/CircleCancelMajor.svg +1 -0
- data/app/assets/icons/polaris/CircleCancelMinor.svg +1 -0
- data/app/assets/icons/polaris/CircleChevronDownMinor.svg +1 -0
- data/app/assets/icons/polaris/CircleChevronLeftMinor.svg +1 -0
- data/app/assets/icons/polaris/CircleChevronRightMinor.svg +1 -0
- data/app/assets/icons/polaris/CircleChevronUpMinor.svg +1 -0
- data/app/assets/icons/polaris/CircleDisableMinor.svg +1 -0
- data/app/assets/icons/polaris/CircleDisabledMajor.svg +1 -0
- data/app/assets/icons/polaris/CircleDotsMajor.svg +1 -0
- data/app/assets/icons/polaris/CircleDownMajor.svg +1 -0
- data/app/assets/icons/polaris/CircleInformationMajor.svg +1 -0
- data/app/assets/icons/polaris/CircleLeftMajor.svg +1 -0
- data/app/assets/icons/polaris/CircleMinusMajor.svg +1 -0
- data/app/assets/icons/polaris/CircleMinusMinor.svg +1 -0
- data/app/assets/icons/polaris/CircleMinusOutlineMinor.svg +1 -0
- data/app/assets/icons/polaris/CirclePlusMajor.svg +1 -0
- data/app/assets/icons/polaris/CirclePlusMinor.svg +1 -0
- data/app/assets/icons/polaris/CirclePlusOutlineMinor.svg +1 -0
- data/app/assets/icons/polaris/CircleRightMajor.svg +1 -0
- data/app/assets/icons/polaris/CircleTickMajor.svg +1 -0
- data/app/assets/icons/polaris/CircleTickOutlineMinor.svg +1 -0
- data/app/assets/icons/polaris/CircleUpMajor.svg +1 -0
- data/app/assets/icons/polaris/ClipboardMinor.svg +1 -0
- data/app/assets/icons/polaris/ClockMajor.svg +1 -0
- data/app/assets/icons/polaris/ClockMinor.svg +1 -0
- data/app/assets/icons/polaris/CodeMajor.svg +1 -0
- data/app/assets/icons/polaris/CollectionsMajor.svg +1 -0
- data/app/assets/icons/polaris/ColorNoneMinor.svg +1 -0
- data/app/assets/icons/polaris/ColorsMajor.svg +1 -0
- data/app/assets/icons/polaris/Column1Major.svg +1 -0
- data/app/assets/icons/polaris/ColumnWithTextMajor.svg +1 -0
- data/app/assets/icons/polaris/Columns2Major.svg +1 -0
- data/app/assets/icons/polaris/Columns3Major.svg +1 -0
- data/app/assets/icons/polaris/ComposeMajor.svg +1 -0
- data/app/assets/icons/polaris/ConfettiMajor.svg +1 -0
- data/app/assets/icons/polaris/ConnectMinor.svg +1 -0
- data/app/assets/icons/polaris/ConversationMinor.svg +1 -0
- data/app/assets/icons/polaris/CreditCardMajor.svg +1 -0
- data/app/assets/icons/polaris/CreditCardPercentMajor.svg +1 -0
- data/app/assets/icons/polaris/CreditCardSecureMajor.svg +1 -0
- data/app/assets/icons/polaris/CurrencyConvertMinor.svg +1 -0
- data/app/assets/icons/polaris/CustomerMinusMajor.svg +1 -0
- data/app/assets/icons/polaris/CustomerPlusMajor.svg +1 -0
- data/app/assets/icons/polaris/CustomersMajor.svg +1 -0
- data/app/assets/icons/polaris/CustomersMinor.svg +1 -0
- data/app/assets/icons/polaris/DataVisualizationMajor.svg +1 -0
- data/app/assets/icons/polaris/DeleteMajor.svg +1 -0
- data/app/assets/icons/polaris/DeleteMinor.svg +1 -0
- data/app/assets/icons/polaris/DesktopMajor.svg +1 -0
- data/app/assets/icons/polaris/DetailedPopUpMajor.svg +1 -0
- data/app/assets/icons/polaris/DiamondAlertMajor.svg +1 -0
- data/app/assets/icons/polaris/DigitalMediaReceiverMajor.svg +1 -0
- data/app/assets/icons/polaris/DiscountAutomaticMajor.svg +1 -0
- data/app/assets/icons/polaris/DiscountCodeMajor.svg +1 -0
- data/app/assets/icons/polaris/DiscountsMajor.svg +1 -0
- data/app/assets/icons/polaris/DisputeMinor.svg +1 -0
- data/app/assets/icons/polaris/DnsSettingsMajor.svg +1 -0
- data/app/assets/icons/polaris/DomainNewMajor.svg +1 -0
- data/app/assets/icons/polaris/DomainsMajor.svg +1 -0
- data/app/assets/icons/polaris/DraftOrdersMajor.svg +1 -0
- data/app/assets/icons/polaris/DragDropMajor.svg +1 -0
- data/app/assets/icons/polaris/DragHandleMinor.svg +1 -0
- data/app/assets/icons/polaris/DropdownMinor.svg +1 -0
- data/app/assets/icons/polaris/DuplicateMinor.svg +1 -0
- data/app/assets/icons/polaris/EditMajor.svg +1 -0
- data/app/assets/icons/polaris/EditMinor.svg +1 -0
- data/app/assets/icons/polaris/EmailMajor.svg +1 -0
- data/app/assets/icons/polaris/EmailNewsletterMajor.svg +1 -0
- data/app/assets/icons/polaris/EmbedMinor.svg +1 -0
- data/app/assets/icons/polaris/EnableSelectionMinor.svg +1 -0
- data/app/assets/icons/polaris/EnvelopeMajor.svg +1 -0
- data/app/assets/icons/polaris/ExchangeMajor.svg +1 -0
- data/app/assets/icons/polaris/ExistingInventoryMajor.svg +1 -0
- data/app/assets/icons/polaris/ExitMajor.svg +1 -0
- data/app/assets/icons/polaris/ExportMinor.svg +1 -0
- data/app/assets/icons/polaris/ExternalMinor.svg +1 -0
- data/app/assets/icons/polaris/ExternalSmallMinor.svg +1 -0
- data/app/assets/icons/polaris/FaviconMajor.svg +1 -0
- data/app/assets/icons/polaris/FavoriteMajor.svg +1 -0
- data/app/assets/icons/polaris/FeaturedCollectionMajor.svg +1 -0
- data/app/assets/icons/polaris/FeaturedContentMajor.svg +1 -0
- data/app/assets/icons/polaris/FilterMajor.svg +1 -0
- data/app/assets/icons/polaris/FirstOrderMajor.svg +1 -0
- data/app/assets/icons/polaris/FirstVisitMajor.svg +1 -0
- data/app/assets/icons/polaris/FlagMajor.svg +1 -0
- data/app/assets/icons/polaris/FlipCameraMajor.svg +1 -0
- data/app/assets/icons/polaris/FolderDownMajor.svg +1 -0
- data/app/assets/icons/polaris/FolderMajor.svg +1 -0
- data/app/assets/icons/polaris/FolderMinusMajor.svg +1 -0
- data/app/assets/icons/polaris/FolderPlusMajor.svg +1 -0
- data/app/assets/icons/polaris/FolderUpMajor.svg +1 -0
- data/app/assets/icons/polaris/FollowUpEmailMajor.svg +1 -0
- data/app/assets/icons/polaris/FoodMajor.svg +1 -0
- data/app/assets/icons/polaris/FooterMajor.svg +1 -0
- data/app/assets/icons/polaris/FormsMajor.svg +1 -0
- data/app/assets/icons/polaris/FraudProtectMajor.svg +1 -0
- data/app/assets/icons/polaris/FraudProtectMinor.svg +1 -0
- data/app/assets/icons/polaris/FraudProtectPendingMajor.svg +1 -0
- data/app/assets/icons/polaris/FraudProtectPendingMinor.svg +1 -0
- data/app/assets/icons/polaris/FraudProtectUnprotectedMajor.svg +1 -0
- data/app/assets/icons/polaris/FraudProtectUnprotectedMinor.svg +1 -0
- data/app/assets/icons/polaris/GamesConsoleMajor.svg +1 -0
- data/app/assets/icons/polaris/GiftCardMajor.svg +1 -0
- data/app/assets/icons/polaris/GiftCardMinor.svg +1 -0
- data/app/assets/icons/polaris/GlobeMajor.svg +1 -0
- data/app/assets/icons/polaris/GlobeMinor.svg +1 -0
- data/app/assets/icons/polaris/GrammarMajor.svg +1 -0
- data/app/assets/icons/polaris/HashtagMajor.svg +1 -0
- data/app/assets/icons/polaris/HeaderMajor.svg +1 -0
- data/app/assets/icons/polaris/HeartMajor.svg +1 -0
- data/app/assets/icons/polaris/HideKeyboardMajor.svg +1 -0
- data/app/assets/icons/polaris/HideMinor.svg +1 -0
- data/app/assets/icons/polaris/HintMajor.svg +1 -0
- data/app/assets/icons/polaris/HomeMajor.svg +1 -0
- data/app/assets/icons/polaris/HorizontalDotsMinor.svg +1 -0
- data/app/assets/icons/polaris/IconsMajor.svg +1 -0
- data/app/assets/icons/polaris/IllustrationMajor.svg +1 -0
- data/app/assets/icons/polaris/ImageAltMajor.svg +1 -0
- data/app/assets/icons/polaris/ImageAltMinor.svg +1 -0
- data/app/assets/icons/polaris/ImageMajor.svg +1 -0
- data/app/assets/icons/polaris/ImageWithTextMajor.svg +1 -0
- data/app/assets/icons/polaris/ImageWithTextOverlayMajor.svg +1 -0
- data/app/assets/icons/polaris/ImagesMajor.svg +1 -0
- data/app/assets/icons/polaris/ImportMinor.svg +1 -0
- data/app/assets/icons/polaris/ImportStoreMajor.svg +1 -0
- data/app/assets/icons/polaris/IncomingMajor.svg +1 -0
- data/app/assets/icons/polaris/InfoMinor.svg +1 -0
- data/app/assets/icons/polaris/InstallMinor.svg +1 -0
- data/app/assets/icons/polaris/InventoryMajor.svg +1 -0
- data/app/assets/icons/polaris/InviteMinor.svg +1 -0
- data/app/assets/icons/polaris/IqMajor.svg +1 -0
- data/app/assets/icons/polaris/JobsMajor.svg +1 -0
- data/app/assets/icons/polaris/KeyMajor.svg +1 -0
- data/app/assets/icons/polaris/LabelPrinterMajor.svg +1 -0
- data/app/assets/icons/polaris/LandingPageMajor.svg +1 -0
- data/app/assets/icons/polaris/LanguageMinor.svg +1 -0
- data/app/assets/icons/polaris/LegalMajor.svg +1 -0
- data/app/assets/icons/polaris/LinkMinor.svg +1 -0
- data/app/assets/icons/polaris/ListMajor.svg +1 -0
- data/app/assets/icons/polaris/LiveViewMajor.svg +1 -0
- data/app/assets/icons/polaris/LocationMajor.svg +1 -0
- data/app/assets/icons/polaris/LocationsMinor.svg +1 -0
- data/app/assets/icons/polaris/LockMajor.svg +1 -0
- data/app/assets/icons/polaris/LockMinor.svg +1 -0
- data/app/assets/icons/polaris/LogOutMinor.svg +1 -0
- data/app/assets/icons/polaris/LogoBlockMajor.svg +1 -0
- data/app/assets/icons/polaris/ManagedStoreMajor.svg +1 -0
- data/app/assets/icons/polaris/MarkFulfilledMinor.svg +1 -0
- data/app/assets/icons/polaris/MarkPaidMinor.svg +1 -0
- data/app/assets/icons/polaris/MarketingMajor.svg +1 -0
- data/app/assets/icons/polaris/MaximizeMajor.svg +1 -0
- data/app/assets/icons/polaris/MaximizeMinor.svg +1 -0
- data/app/assets/icons/polaris/MentionMajor.svg +1 -0
- data/app/assets/icons/polaris/MicrophoneMajor.svg +1 -0
- data/app/assets/icons/polaris/MinimizeMajor.svg +1 -0
- data/app/assets/icons/polaris/MinimizeMinor.svg +1 -0
- data/app/assets/icons/polaris/MinusMinor.svg +1 -0
- data/app/assets/icons/polaris/MobileAcceptMajor.svg +1 -0
- data/app/assets/icons/polaris/MobileBackArrowMajor.svg +1 -0
- data/app/assets/icons/polaris/MobileCancelMajor.svg +1 -0
- data/app/assets/icons/polaris/MobileChevronMajor.svg +1 -0
- data/app/assets/icons/polaris/MobileHamburgerMajor.svg +1 -0
- data/app/assets/icons/polaris/MobileHorizontalDotsMajor.svg +1 -0
- data/app/assets/icons/polaris/MobileMajor.svg +1 -0
- data/app/assets/icons/polaris/MobilePlusMajor.svg +1 -0
- data/app/assets/icons/polaris/MobileVerticalDotsMajor.svg +1 -0
- data/app/assets/icons/polaris/MonerisMajor.svg +1 -0
- data/app/assets/icons/polaris/NatureMajor.svg +1 -0
- data/app/assets/icons/polaris/NavigationMajor.svg +1 -0
- data/app/assets/icons/polaris/NoteMajor.svg +1 -0
- data/app/assets/icons/polaris/NoteMinor.svg +1 -0
- data/app/assets/icons/polaris/NotificationMajor.svg +1 -0
- data/app/assets/icons/polaris/OnlineStoreMajor.svg +1 -0
- data/app/assets/icons/polaris/OrderStatusMinor.svg +1 -0
- data/app/assets/icons/polaris/OrdersMajor.svg +1 -0
- data/app/assets/icons/polaris/OutgoingMajor.svg +1 -0
- data/app/assets/icons/polaris/PackageMajor.svg +1 -0
- data/app/assets/icons/polaris/PageDownMajor.svg +1 -0
- data/app/assets/icons/polaris/PageMajor.svg +1 -0
- data/app/assets/icons/polaris/PageMinusMajor.svg +1 -0
- data/app/assets/icons/polaris/PagePlusMajor.svg +1 -0
- data/app/assets/icons/polaris/PageUpMajor.svg +1 -0
- data/app/assets/icons/polaris/PaginationEndMinor.svg +1 -0
- data/app/assets/icons/polaris/PaginationStartMinor.svg +1 -0
- data/app/assets/icons/polaris/PaintBrushMajor.svg +1 -0
- data/app/assets/icons/polaris/PauseCircleMajor.svg +1 -0
- data/app/assets/icons/polaris/PauseMajor.svg +1 -0
- data/app/assets/icons/polaris/PauseMinor.svg +1 -0
- data/app/assets/icons/polaris/PaymentsMajor.svg +1 -0
- data/app/assets/icons/polaris/PhoneInMajor.svg +1 -0
- data/app/assets/icons/polaris/PhoneMajor.svg +1 -0
- data/app/assets/icons/polaris/PhoneOutMajor.svg +1 -0
- data/app/assets/icons/polaris/PinMajor.svg +1 -0
- data/app/assets/icons/polaris/PinMinor.svg +1 -0
- data/app/assets/icons/polaris/PlayCircleMajor.svg +1 -0
- data/app/assets/icons/polaris/PlayMajor.svg +1 -0
- data/app/assets/icons/polaris/PlayMinor.svg +1 -0
- data/app/assets/icons/polaris/PlusMinor.svg +1 -0
- data/app/assets/icons/polaris/PointOfSaleMajor.svg +1 -0
- data/app/assets/icons/polaris/PopularMajor.svg +1 -0
- data/app/assets/icons/polaris/PriceLookupMinor.svg +1 -0
- data/app/assets/icons/polaris/PrintMajor.svg +1 -0
- data/app/assets/icons/polaris/PrintMinor.svg +1 -0
- data/app/assets/icons/polaris/ProductReturnsMinor.svg +1 -0
- data/app/assets/icons/polaris/ProductsMajor.svg +1 -0
- data/app/assets/icons/polaris/ProfileMajor.svg +1 -0
- data/app/assets/icons/polaris/ProfileMinor.svg +1 -0
- data/app/assets/icons/polaris/PromoteMinor.svg +1 -0
- data/app/assets/icons/polaris/QuestionMarkMajor.svg +1 -0
- data/app/assets/icons/polaris/QuestionMarkMinor.svg +1 -0
- data/app/assets/icons/polaris/QuickSaleMajor.svg +1 -0
- data/app/assets/icons/polaris/ReadTimeMinor.svg +1 -0
- data/app/assets/icons/polaris/ReceiptMajor.svg +1 -0
- data/app/assets/icons/polaris/RecentSearchesMajor.svg +1 -0
- data/app/assets/icons/polaris/RedoMajor.svg +1 -0
- data/app/assets/icons/polaris/ReferralCodeMajor.svg +1 -0
- data/app/assets/icons/polaris/ReferralMajor.svg +1 -0
- data/app/assets/icons/polaris/RefreshMajor.svg +1 -0
- data/app/assets/icons/polaris/RefreshMinor.svg +1 -0
- data/app/assets/icons/polaris/RefundMajor.svg +1 -0
- data/app/assets/icons/polaris/RefundMinor.svg +1 -0
- data/app/assets/icons/polaris/RemoveProductMajor.svg +1 -0
- data/app/assets/icons/polaris/RepeatOrderMajor.svg +1 -0
- data/app/assets/icons/polaris/ReplaceMajor.svg +1 -0
- data/app/assets/icons/polaris/ReplayMinor.svg +1 -0
- data/app/assets/icons/polaris/ReportMinor.svg +1 -0
- data/app/assets/icons/polaris/ReportsMajor.svg +1 -0
- data/app/assets/icons/polaris/ResetMinor.svg +1 -0
- data/app/assets/icons/polaris/ResourcesMajor.svg +1 -0
- data/app/assets/icons/polaris/ReturnMinor.svg +1 -0
- data/app/assets/icons/polaris/RiskMajor.svg +1 -0
- data/app/assets/icons/polaris/RiskMinor.svg +1 -0
- data/app/assets/icons/polaris/SandboxMajor.svg +1 -0
- data/app/assets/icons/polaris/SaveMinor.svg +1 -0
- data/app/assets/icons/polaris/SearchMajor.svg +1 -0
- data/app/assets/icons/polaris/SearchMinor.svg +1 -0
- data/app/assets/icons/polaris/SectionMajor.svg +1 -0
- data/app/assets/icons/polaris/SecureMajor.svg +1 -0
- data/app/assets/icons/polaris/SelectMinor.svg +1 -0
- data/app/assets/icons/polaris/SendMajor.svg +1 -0
- data/app/assets/icons/polaris/SettingsMajor.svg +1 -0
- data/app/assets/icons/polaris/SettingsMinor.svg +1 -0
- data/app/assets/icons/polaris/ShareIosMinor.svg +1 -0
- data/app/assets/icons/polaris/ShareMinor.svg +1 -0
- data/app/assets/icons/polaris/ShipmentMajor.svg +1 -0
- data/app/assets/icons/polaris/ShopcodesMajor.svg +1 -0
- data/app/assets/icons/polaris/SidebarLeftMajor.svg +1 -0
- data/app/assets/icons/polaris/SidebarRightMajor.svg +1 -0
- data/app/assets/icons/polaris/SlideshowMajor.svg +1 -0
- data/app/assets/icons/polaris/SmileyHappyMajor.svg +1 -0
- data/app/assets/icons/polaris/SmileyJoyMajor.svg +1 -0
- data/app/assets/icons/polaris/SmileyNeutralMajor.svg +1 -0
- data/app/assets/icons/polaris/SmileySadMajor.svg +1 -0
- data/app/assets/icons/polaris/SocialAdMajor.svg +1 -0
- data/app/assets/icons/polaris/SocialPostMajor.svg +1 -0
- data/app/assets/icons/polaris/SoftPackMajor.svg +1 -0
- data/app/assets/icons/polaris/SortAscendingMajor.svg +1 -0
- data/app/assets/icons/polaris/SortDescendingMajor.svg +1 -0
- data/app/assets/icons/polaris/SortMinor.svg +1 -0
- data/app/assets/icons/polaris/SoundMajor.svg +1 -0
- data/app/assets/icons/polaris/StarFilledMinor.svg +1 -0
- data/app/assets/icons/polaris/StarOutlineMinor.svg +1 -0
- data/app/assets/icons/polaris/StoreMajor.svg +1 -0
- data/app/assets/icons/polaris/StoreMinor.svg +1 -0
- data/app/assets/icons/polaris/StoreStatusMajor.svg +1 -0
- data/app/assets/icons/polaris/TabletMajor.svg +1 -0
- data/app/assets/icons/polaris/TapChipMajor.svg +1 -0
- data/app/assets/icons/polaris/TaxMajor.svg +1 -0
- data/app/assets/icons/polaris/TeamMajor.svg +1 -0
- data/app/assets/icons/polaris/TemplateMajor.svg +1 -0
- data/app/assets/icons/polaris/TextAlignmentCenterMajor.svg +1 -0
- data/app/assets/icons/polaris/TextAlignmentLeftMajor.svg +1 -0
- data/app/assets/icons/polaris/TextAlignmentRightMajor.svg +1 -0
- data/app/assets/icons/polaris/TextBlockMajor.svg +1 -0
- data/app/assets/icons/polaris/TextMajor.svg +1 -0
- data/app/assets/icons/polaris/ThemeEditMajor.svg +1 -0
- data/app/assets/icons/polaris/ThemeStoreMajor.svg +1 -0
- data/app/assets/icons/polaris/ThemesMajor.svg +1 -0
- data/app/assets/icons/polaris/ThumbsDownMajor.svg +1 -0
- data/app/assets/icons/polaris/ThumbsDownMinor.svg +1 -0
- data/app/assets/icons/polaris/ThumbsUpMajor.svg +1 -0
- data/app/assets/icons/polaris/ThumbsUpMinor.svg +1 -0
- data/app/assets/icons/polaris/TickMinor.svg +1 -0
- data/app/assets/icons/polaris/TickSmallMinor.svg +1 -0
- data/app/assets/icons/polaris/TimelineAttachmentMajor.svg +1 -0
- data/app/assets/icons/polaris/TipsMajor.svg +1 -0
- data/app/assets/icons/polaris/ToolsMajor.svg +1 -0
- data/app/assets/icons/polaris/TransactionFeeDollarMajor.svg +1 -0
- data/app/assets/icons/polaris/TransactionFeeEuroMajor.svg +1 -0
- data/app/assets/icons/polaris/TransactionFeePoundMajor.svg +1 -0
- data/app/assets/icons/polaris/TransactionFeeRupeeMajor.svg +1 -0
- data/app/assets/icons/polaris/TransactionFeeYenMajor.svg +1 -0
- data/app/assets/icons/polaris/TransactionMajor.svg +1 -0
- data/app/assets/icons/polaris/TransferInMajor.svg +1 -0
- data/app/assets/icons/polaris/TransferMajor.svg +1 -0
- data/app/assets/icons/polaris/TransferOutMajor.svg +1 -0
- data/app/assets/icons/polaris/TransferWithinShopifyMajor.svg +1 -0
- data/app/assets/icons/polaris/TransportMajor.svg +1 -0
- data/app/assets/icons/polaris/TroubleshootMajor.svg +1 -0
- data/app/assets/icons/polaris/TypeMajor.svg +1 -0
- data/app/assets/icons/polaris/UndoMajor.svg +1 -0
- data/app/assets/icons/polaris/UnfulfilledMajor.svg +1 -0
- data/app/assets/icons/polaris/UnknownDeviceMajor.svg +1 -0
- data/app/assets/icons/polaris/UpdateInventoryMajor.svg +1 -0
- data/app/assets/icons/polaris/UploadMajor.svg +1 -0
- data/app/assets/icons/polaris/VariantMajor.svg +1 -0
- data/app/assets/icons/polaris/ViewMajor.svg +1 -0
- data/app/assets/icons/polaris/ViewMinor.svg +1 -0
- data/app/assets/icons/polaris/ViewportNarrowMajor.svg +1 -0
- data/app/assets/icons/polaris/ViewportWideMajor.svg +1 -0
- data/app/assets/icons/polaris/VocabularyMajor.svg +1 -0
- data/app/assets/icons/polaris/WandMajor.svg +1 -0
- data/app/assets/icons/polaris/WearableMajor.svg +1 -0
- data/app/assets/icons/polaris/WholesaleMajor.svg +1 -0
- data/app/assets/icons/polaris/WifiMajor.svg +1 -0
- data/app/assets/javascripts/polaris.js +113 -0
- data/app/assets/stylesheets/polaris_view_components.css +136 -0
- data/app/components/polaris/action.rb +32 -0
- data/app/components/polaris/application_component.rb +35 -0
- data/app/components/polaris/avatar_component.html.erb +19 -0
- data/app/components/polaris/avatar_component.rb +39 -0
- data/app/components/polaris/badge_component.html.erb +9 -0
- data/app/components/polaris/badge_component.rb +51 -0
- data/app/components/polaris/banner_component.html.erb +42 -0
- data/app/components/polaris/banner_component.rb +89 -0
- data/app/components/polaris/base_button.rb +31 -0
- data/app/components/polaris/base_component.rb +23 -0
- data/app/components/polaris/button_component.html.erb +24 -0
- data/app/components/polaris/button_component.rb +90 -0
- data/app/components/polaris/button_group_component.html.erb +5 -0
- data/app/components/polaris/button_group_component.rb +109 -0
- data/app/components/polaris/callout_card_component.html.erb +46 -0
- data/app/components/polaris/callout_card_component.rb +45 -0
- data/app/components/polaris/caption_component.rb +18 -0
- data/app/components/polaris/card/header_component.html.erb +25 -0
- data/app/components/polaris/card/header_component.rb +23 -0
- data/app/components/polaris/card/section_component.html.erb +31 -0
- data/app/components/polaris/card/section_component.rb +40 -0
- data/app/components/polaris/card_component.html.erb +51 -0
- data/app/components/polaris/card_component.rb +52 -0
- data/app/components/polaris/character_count.rb +50 -0
- data/app/components/polaris/checkbox_component.html.erb +15 -0
- data/app/components/polaris/checkbox_component.rb +78 -0
- data/app/components/polaris/choice_component.html.erb +35 -0
- data/app/components/polaris/choice_component.rb +29 -0
- data/app/components/polaris/choice_list/component.html.erb +34 -0
- data/app/components/polaris/choice_list/component.rb +65 -0
- data/app/components/polaris/choice_list_component.html.erb +19 -0
- data/app/components/polaris/choice_list_component.rb +68 -0
- data/app/components/polaris/component.rb +5 -0
- data/app/components/polaris/description_list_component.html.erb +5 -0
- data/app/components/polaris/description_list_component.rb +41 -0
- data/app/components/polaris/display_text_component.rb +35 -0
- data/app/components/polaris/dropzone/component.html.erb +72 -0
- data/app/components/polaris/dropzone/component.rb +130 -0
- data/app/components/polaris/dropzone/controller.js +226 -0
- data/app/components/polaris/dropzone/utils.js +57 -0
- data/app/components/polaris/empty_state_component.html.erb +47 -0
- data/app/components/polaris/empty_state_component.rb +38 -0
- data/app/components/polaris/exception_list/item_component.html.erb +19 -0
- data/app/components/polaris/exception_list/item_component.rb +27 -0
- data/app/components/polaris/exception_list_component.html.erb +5 -0
- data/app/components/polaris/exception_list_component.rb +20 -0
- data/app/components/polaris/footer_help_component.html.erb +11 -0
- data/app/components/polaris/footer_help_component.rb +13 -0
- data/app/components/polaris/form_layout/group_component.html.erb +7 -0
- data/app/components/polaris/form_layout/group_component.rb +39 -0
- data/app/components/polaris/form_layout/item_component.rb +18 -0
- data/app/components/polaris/form_layout_component.html.erb +5 -0
- data/app/components/polaris/form_layout_component.rb +37 -0
- data/app/components/polaris/heading_component.rb +24 -0
- data/app/components/polaris/icon_component.html.erb +7 -0
- data/app/components/polaris/icon_component.rb +36 -0
- data/app/components/polaris/inline_error_component.html.erb +6 -0
- data/app/components/polaris/inline_error_component.rb +12 -0
- data/app/components/polaris/label_component.html.erb +21 -0
- data/app/components/polaris/label_component.rb +36 -0
- data/app/components/polaris/labelled_component.html.erb +25 -0
- data/app/components/polaris/labelled_component.rb +49 -0
- data/app/components/polaris/layout/annotated_section.html.erb +19 -0
- data/app/components/polaris/layout/annotated_section.rb +21 -0
- data/app/components/polaris/layout/section.rb +35 -0
- data/app/components/polaris/layout_component.html.erb +5 -0
- data/app/components/polaris/layout_component.rb +48 -0
- data/app/components/polaris/link_component.rb +48 -0
- data/app/components/polaris/list_component.html.erb +5 -0
- data/app/components/polaris/list_component.rb +46 -0
- data/app/components/polaris/new_component.rb +10 -0
- data/app/components/polaris/page_actions_component.html.erb +21 -0
- data/app/components/polaris/page_actions_component.rb +24 -0
- data/app/components/polaris/page_component.html.erb +63 -0
- data/app/components/polaris/page_component.rb +56 -0
- data/app/components/polaris/pagination_component.html.erb +19 -0
- data/app/components/polaris/pagination_component.rb +26 -0
- data/app/components/polaris/progress_bar_component.html.erb +14 -0
- data/app/components/polaris/progress_bar_component.rb +41 -0
- data/app/components/polaris/radio_button_component.html.erb +11 -0
- data/app/components/polaris/radio_button_component.rb +55 -0
- data/app/components/polaris/select_component.html.erb +36 -0
- data/app/components/polaris/select_component.rb +75 -0
- data/app/components/polaris/shopify_navigation_component.html.erb +9 -0
- data/app/components/polaris/shopify_navigation_component.rb +43 -0
- data/app/components/polaris/spinner_component.html.erb +11 -0
- data/app/components/polaris/spinner_component.rb +25 -0
- data/app/components/polaris/stack_component.html.erb +7 -0
- data/app/components/polaris/stack_component.rb +79 -0
- data/app/components/polaris/subheading_component.rb +24 -0
- data/app/components/polaris/text_container_component.rb +30 -0
- data/app/components/polaris/text_field_component.html.erb +103 -0
- data/app/components/polaris/text_field_component.rb +181 -0
- data/app/components/polaris/text_style_component.rb +32 -0
- data/app/components/polaris/thumbnail_component.html.erb +7 -0
- data/app/components/polaris/thumbnail_component.rb +37 -0
- data/app/components/polaris/visually_hidden_component.rb +12 -0
- data/app/helpers/polaris/action_helper.rb +14 -0
- data/app/helpers/polaris/class_name_helper.rb +24 -0
- data/app/helpers/polaris/conditional_helper.rb +11 -0
- data/app/helpers/polaris/fetch_or_fallback_helper.rb +53 -0
- data/app/helpers/polaris/form_builder.rb +16 -0
- data/app/helpers/polaris/option_helper.rb +13 -0
- data/app/helpers/polaris/view_helper.rb +66 -0
- data/app/javascript/polaris/index.js +9 -0
- data/app/javascript/polaris/select_controller.js +12 -0
- data/app/javascript/polaris/text_field_controller.js +112 -0
- data/app/validators/type_validator.rb +15 -0
- data/lib/polaris/view_components.rb +7 -0
- data/lib/polaris/view_components/engine.rb +29 -0
- data/lib/polaris/view_components/version.rb +5 -0
- data/lib/polaris_view_components.rb +1 -0
- metadata +588 -0
@@ -0,0 +1,46 @@
|
|
1
|
+
<%= render Polaris::BaseComponent.new(**@system_arguments) do %>
|
2
|
+
<div class="<%= container_classes %>">
|
3
|
+
<% if dismiss_button %>
|
4
|
+
<div class="Polaris-CalloutCard__Dismiss">
|
5
|
+
<%= dismiss_button %>
|
6
|
+
</div>
|
7
|
+
<% end %>
|
8
|
+
|
9
|
+
<div class="Polaris-Card__Section">
|
10
|
+
<div class="Polaris-CalloutCard">
|
11
|
+
<div class="Polaris-CalloutCard__Content">
|
12
|
+
<% if @title.present? %>
|
13
|
+
<div class="Polaris-CalloutCard__Title">
|
14
|
+
<%= polaris_heading { @title } %>
|
15
|
+
</div>
|
16
|
+
<% end %>
|
17
|
+
<% if content.present? %>
|
18
|
+
<div class="Polaris-TextContainer">
|
19
|
+
<%= content %>
|
20
|
+
</div>
|
21
|
+
<% end %>
|
22
|
+
<% if primary_action.present? || secondary_action.present? %>
|
23
|
+
<div class="Polaris-CalloutCard__Buttons">
|
24
|
+
<% if primary_action.present? && secondary_action.present? %>
|
25
|
+
<%= polaris_button_group do |group| %>
|
26
|
+
<% group.item do %>
|
27
|
+
<%= primary_action %>
|
28
|
+
<% end %>
|
29
|
+
<% group.item do %>
|
30
|
+
<%= secondary_action %>
|
31
|
+
<% end %>
|
32
|
+
<% end %>
|
33
|
+
<% elsif primary_action.present? %>
|
34
|
+
<%= primary_action %>
|
35
|
+
<% else %>
|
36
|
+
<%= secondary_action %>
|
37
|
+
<% end %>
|
38
|
+
</div>
|
39
|
+
<% end %>
|
40
|
+
</div>
|
41
|
+
|
42
|
+
<img class="<%= image_classes %>" src="<%= @illustration %>" alt="">
|
43
|
+
</div>
|
44
|
+
</div>
|
45
|
+
</div>
|
46
|
+
<% end %>
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Polaris
|
4
|
+
class CalloutCardComponent < Polaris::NewComponent
|
5
|
+
renders_one :primary_action, Polaris::ButtonComponent
|
6
|
+
renders_one :secondary_action, -> (plain: true, **system_arguments) do
|
7
|
+
Polaris::ButtonComponent.new(plain: plain, **system_arguments)
|
8
|
+
end
|
9
|
+
renders_one :dismiss_button, -> (**system_arguments) do
|
10
|
+
render Polaris::ButtonComponent.new(plain: true, **system_arguments) do |button|
|
11
|
+
button.icon(name: "CancelSmallMinor")
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
def initialize(
|
16
|
+
title: nil,
|
17
|
+
illustration: nil,
|
18
|
+
**system_arguments
|
19
|
+
)
|
20
|
+
@title = title
|
21
|
+
@illustration = illustration
|
22
|
+
|
23
|
+
@system_arguments = system_arguments
|
24
|
+
@system_arguments[:tag] = "div"
|
25
|
+
@system_arguments[:classes] = class_names(
|
26
|
+
@system_arguments[:classes],
|
27
|
+
"Polaris-Card",
|
28
|
+
)
|
29
|
+
end
|
30
|
+
|
31
|
+
def container_classes
|
32
|
+
class_names(
|
33
|
+
"Polaris-CalloutCard__Container",
|
34
|
+
"Polaris-CalloutCard--hasDismiss": dismiss_button.present?,
|
35
|
+
)
|
36
|
+
end
|
37
|
+
|
38
|
+
def image_classes
|
39
|
+
class_names(
|
40
|
+
"Polaris-CalloutCard__Image",
|
41
|
+
"Polaris-CalloutCard__DismissImage": dismiss_button.present?,
|
42
|
+
)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Polaris
|
4
|
+
class CaptionComponent < Polaris::NewComponent
|
5
|
+
def initialize(**system_arguments)
|
6
|
+
@system_arguments = system_arguments
|
7
|
+
@system_arguments[:tag] = 'p'
|
8
|
+
@system_arguments[:classes] = class_names(
|
9
|
+
@system_arguments[:classes],
|
10
|
+
"Polaris-Caption",
|
11
|
+
)
|
12
|
+
end
|
13
|
+
|
14
|
+
def call
|
15
|
+
render(Polaris::BaseComponent.new(**@system_arguments)) { content }
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<%= render Polaris::BaseComponent.new(**@system_arguments) do %>
|
2
|
+
<% if simple? %>
|
3
|
+
<%= polaris_heading { @title } %>
|
4
|
+
<% else %>
|
5
|
+
<%= polaris_stack(alignment: :trailing) do |stack| %>
|
6
|
+
<% stack.item(fill: true) do %>
|
7
|
+
<%= polaris_heading { @title } %>
|
8
|
+
<% end %>
|
9
|
+
|
10
|
+
<% if @actions.present? %>
|
11
|
+
<% stack.item do %>
|
12
|
+
<%= polaris_button_group do |group| %>
|
13
|
+
<% @actions.each do |action| %>
|
14
|
+
<% group.button(**action) %>
|
15
|
+
<% end %>
|
16
|
+
<% end %>
|
17
|
+
<% end %>
|
18
|
+
<% end %>
|
19
|
+
|
20
|
+
<% stack.item do %>
|
21
|
+
<%= content %>
|
22
|
+
<% end %>
|
23
|
+
<% end %>
|
24
|
+
<% end %>
|
25
|
+
<% end %>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
class Polaris::Card::HeaderComponent < Polaris::NewComponent
|
2
|
+
include Polaris::ActionHelper
|
3
|
+
|
4
|
+
def initialize(
|
5
|
+
title: "",
|
6
|
+
actions: [],
|
7
|
+
**system_arguments
|
8
|
+
)
|
9
|
+
@system_arguments = system_arguments
|
10
|
+
@system_arguments[:tag] = :div
|
11
|
+
@system_arguments[:classes] = class_names(
|
12
|
+
@system_arguments[:classes],
|
13
|
+
"Polaris-Card__Header",
|
14
|
+
)
|
15
|
+
|
16
|
+
@title = title
|
17
|
+
@actions = actions.map { |a| a.merge(plain: true) }
|
18
|
+
end
|
19
|
+
|
20
|
+
def simple?
|
21
|
+
content.blank? && @actions.blank?
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<%= render Polaris::BaseComponent.new(**@system_arguments) do %>
|
2
|
+
<% if @title.present? && @title.is_a?(String) %>
|
3
|
+
<div class="Polaris-Card__SectionHeader">
|
4
|
+
<% if @actions.present? %>
|
5
|
+
<%= polaris_stack(alignment: :trailing) do |stack| %>
|
6
|
+
<% stack.item(fill: true) do %>
|
7
|
+
<%= polaris_subheading { @title } %>
|
8
|
+
<% end %>
|
9
|
+
|
10
|
+
<% stack.item do %>
|
11
|
+
<%= polaris_button_group do |group| %>
|
12
|
+
<% @actions.each do |action| %>
|
13
|
+
<% group.button(**action) %>
|
14
|
+
<% end %>
|
15
|
+
<% end %>
|
16
|
+
<% end %>
|
17
|
+
<% end %>
|
18
|
+
<% else %>
|
19
|
+
<%= polaris_subheading { @title } %>
|
20
|
+
<% end %>
|
21
|
+
</div>
|
22
|
+
<% end %>
|
23
|
+
|
24
|
+
<% if subsections.present? %>
|
25
|
+
<% subsections.each do |subsection| %>
|
26
|
+
<%= subsection %>
|
27
|
+
<% end %>
|
28
|
+
<% else %>
|
29
|
+
<%= content %>
|
30
|
+
<% end %>
|
31
|
+
<% end %>
|
@@ -0,0 +1,40 @@
|
|
1
|
+
class Polaris::Card::SectionComponent < Polaris::NewComponent
|
2
|
+
renders_many :subsections, "Polaris::Card::SubsectionComponent"
|
3
|
+
|
4
|
+
def initialize(
|
5
|
+
title: "",
|
6
|
+
subdued: false,
|
7
|
+
flush: false,
|
8
|
+
full_width: false,
|
9
|
+
actions: [],
|
10
|
+
**system_arguments
|
11
|
+
)
|
12
|
+
@system_arguments = system_arguments
|
13
|
+
@system_arguments[:tag] = :div
|
14
|
+
@system_arguments[:classes] = class_names(
|
15
|
+
@system_arguments[:classes],
|
16
|
+
"Polaris-Card__Section",
|
17
|
+
"Polaris-Card__Section--flush": flush,
|
18
|
+
"Polaris-Card__Section--subdued": subdued,
|
19
|
+
"Polaris-Card__Section--fullWidth": full_width,
|
20
|
+
)
|
21
|
+
|
22
|
+
@title = title
|
23
|
+
@actions = actions.map { |a| a.merge(plain: true) }
|
24
|
+
end
|
25
|
+
|
26
|
+
class Polaris::Card::SubsectionComponent < Polaris::NewComponent
|
27
|
+
def initialize(**system_arguments)
|
28
|
+
@system_arguments = system_arguments
|
29
|
+
@system_arguments[:tag] = :div
|
30
|
+
@system_arguments[:classes] = class_names(
|
31
|
+
@system_arguments[:classes],
|
32
|
+
"Polaris-Card__Subsection",
|
33
|
+
)
|
34
|
+
end
|
35
|
+
|
36
|
+
def call
|
37
|
+
render(Polaris::BaseComponent.new(**@system_arguments)) { content }
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
<%= render Polaris::BaseComponent.new(**@system_arguments) do %>
|
2
|
+
<% if header.present? %>
|
3
|
+
<%= header %>
|
4
|
+
<% end %>
|
5
|
+
|
6
|
+
<% if @title.present? && !header.present? %>
|
7
|
+
<%= render Polaris::Card::HeaderComponent.new(title: @title, actions: @actions) %>
|
8
|
+
<% end %>
|
9
|
+
|
10
|
+
<% if sections.present? %>
|
11
|
+
<% sections.each do |section| %>
|
12
|
+
<%= section %>
|
13
|
+
<% end %>
|
14
|
+
<% else %>
|
15
|
+
<%= render Polaris::Card::SectionComponent.new do %>
|
16
|
+
<%= content %>
|
17
|
+
<% end %>
|
18
|
+
<% end %>
|
19
|
+
|
20
|
+
<% if render_footer? %>
|
21
|
+
<div class="<%= footer_classes %>">
|
22
|
+
<%= polaris_button_group do |group| %>
|
23
|
+
<% if @footer_action_alignment == :right %>
|
24
|
+
<% secondary_footer_actions.each do |secondary_footer_action| %>
|
25
|
+
<% group.item do %>
|
26
|
+
<%= secondary_footer_action %>
|
27
|
+
<% end %>
|
28
|
+
<% end %>
|
29
|
+
|
30
|
+
<% if primary_footer_action %>
|
31
|
+
<% group.item do %>
|
32
|
+
<%= primary_footer_action %>
|
33
|
+
<% end %>
|
34
|
+
<% end %>
|
35
|
+
<% else %>
|
36
|
+
<% if primary_footer_action %>
|
37
|
+
<% group.item do %>
|
38
|
+
<%= primary_footer_action %>
|
39
|
+
<% end %>
|
40
|
+
<% end %>
|
41
|
+
|
42
|
+
<% secondary_footer_actions.each do |secondary_footer_action| %>
|
43
|
+
<% group.item do %>
|
44
|
+
<%= secondary_footer_action %>
|
45
|
+
<% end %>
|
46
|
+
<% end %>
|
47
|
+
<% end %>
|
48
|
+
<% end %>
|
49
|
+
</div>
|
50
|
+
<% end %>
|
51
|
+
<% end %>
|
@@ -0,0 +1,52 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Polaris
|
4
|
+
class CardComponent < Polaris::NewComponent
|
5
|
+
include Polaris::ActionHelper
|
6
|
+
|
7
|
+
FOOTER_ACTION_ALIGNMENT_DEFAULT = :right
|
8
|
+
FOOTER_ACTION_ALIGNMENT_MAPPINGS = {
|
9
|
+
FOOTER_ACTION_ALIGNMENT_DEFAULT => "",
|
10
|
+
:left => "Polaris-Card__LeftJustified",
|
11
|
+
}
|
12
|
+
FOOTER_ACTION_ALIGNMENT_OPTIONS = FOOTER_ACTION_ALIGNMENT_MAPPINGS.keys
|
13
|
+
|
14
|
+
renders_one :header, Polaris::Card::HeaderComponent
|
15
|
+
renders_many :sections, Polaris::Card::SectionComponent
|
16
|
+
renders_one :primary_footer_action, -> (primary: true, **system_arguments) do
|
17
|
+
Polaris::ButtonComponent.new(primary: primary, **system_arguments)
|
18
|
+
end
|
19
|
+
renders_many :secondary_footer_actions, Polaris::ButtonComponent
|
20
|
+
|
21
|
+
def initialize(
|
22
|
+
title: "",
|
23
|
+
actions: [],
|
24
|
+
subdued: false,
|
25
|
+
footer_action_alignment: FOOTER_ACTION_ALIGNMENT_DEFAULT,
|
26
|
+
**system_arguments
|
27
|
+
)
|
28
|
+
@title = title
|
29
|
+
@actions = actions
|
30
|
+
@footer_action_alignment = footer_action_alignment
|
31
|
+
|
32
|
+
@system_arguments = system_arguments
|
33
|
+
@system_arguments[:tag] = :div
|
34
|
+
@system_arguments[:classes] = class_names(
|
35
|
+
@system_arguments[:classes],
|
36
|
+
"Polaris-Card",
|
37
|
+
"Polaris-Card--subdued": subdued,
|
38
|
+
)
|
39
|
+
end
|
40
|
+
|
41
|
+
def render_footer?
|
42
|
+
primary_footer_action.present? || secondary_footer_actions.any?
|
43
|
+
end
|
44
|
+
|
45
|
+
def footer_classes
|
46
|
+
class_names(
|
47
|
+
"Polaris-Card__Footer",
|
48
|
+
FOOTER_ACTION_ALIGNMENT_MAPPINGS[fetch_or_fallback(FOOTER_ACTION_ALIGNMENT_OPTIONS, @footer_action_alignment, FOOTER_ACTION_ALIGNMENT_DEFAULT)],
|
49
|
+
)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Polaris
|
4
|
+
class CharacterCount
|
5
|
+
def initialize(text_field:, max_length: nil)
|
6
|
+
@text_field = text_field
|
7
|
+
@max_length = max_length
|
8
|
+
end
|
9
|
+
|
10
|
+
def label
|
11
|
+
return "#{count} of #{@max_length} characters used" if max_length?
|
12
|
+
|
13
|
+
"#{count} characters"
|
14
|
+
end
|
15
|
+
|
16
|
+
def text
|
17
|
+
return "#{count}/#{@max_length}" if max_length?
|
18
|
+
|
19
|
+
"#{count}"
|
20
|
+
end
|
21
|
+
|
22
|
+
def label_template
|
23
|
+
if max_length?
|
24
|
+
"{count} of #{@max_length} characters used"
|
25
|
+
end
|
26
|
+
|
27
|
+
"{count} characters"
|
28
|
+
end
|
29
|
+
|
30
|
+
def text_template
|
31
|
+
return "{count}/#{@max_length}" if max_length?
|
32
|
+
|
33
|
+
"{count}"
|
34
|
+
end
|
35
|
+
|
36
|
+
private
|
37
|
+
|
38
|
+
def max_length?
|
39
|
+
@max_length.present?
|
40
|
+
end
|
41
|
+
|
42
|
+
def normalized_value
|
43
|
+
@text_field.value.to_s || ''
|
44
|
+
end
|
45
|
+
|
46
|
+
def count
|
47
|
+
normalized_value.length
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<%= render Polaris::ChoiceComponent.new(**@wrapper_arguments) do %>
|
2
|
+
<%= render Polaris::BaseComponent.new(**@system_arguments) do %>
|
3
|
+
<% if @form.present? && @attribute.present? %>
|
4
|
+
<%= @form.check_box(@attribute, @input_options, @value, @unchecked_value) %>
|
5
|
+
<% else %>
|
6
|
+
<%= check_box_tag(@name, @value, @checked, @input_options) %>
|
7
|
+
<% end %>
|
8
|
+
|
9
|
+
<span class="Polaris-Checkbox__Backdrop"></span>
|
10
|
+
|
11
|
+
<span class="Polaris-Checkbox__Icon">
|
12
|
+
<%= polaris_icon(name: icon_name) %>
|
13
|
+
</span>
|
14
|
+
<% end %>
|
15
|
+
<% end %>
|
@@ -0,0 +1,78 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Polaris
|
4
|
+
class CheckboxComponent < Polaris::NewComponent
|
5
|
+
include ActiveModel::Validations
|
6
|
+
|
7
|
+
attr_reader :checked
|
8
|
+
|
9
|
+
validates :checked, inclusion: { in: [true, false, :indeterminate] }
|
10
|
+
|
11
|
+
def initialize(
|
12
|
+
form: nil,
|
13
|
+
attribute: nil,
|
14
|
+
name: nil,
|
15
|
+
label: nil,
|
16
|
+
label_hidden: false,
|
17
|
+
checked: false,
|
18
|
+
disabled: false,
|
19
|
+
help_text: nil,
|
20
|
+
error: nil,
|
21
|
+
value: "1",
|
22
|
+
unchecked_value: "0",
|
23
|
+
wrapper_arguments: {},
|
24
|
+
input_options: {},
|
25
|
+
**system_arguments
|
26
|
+
)
|
27
|
+
@form = form
|
28
|
+
@attribute = attribute
|
29
|
+
@name = name
|
30
|
+
@checked = checked
|
31
|
+
@value = value
|
32
|
+
@unchecked_value = unchecked_value
|
33
|
+
|
34
|
+
@system_arguments = system_arguments
|
35
|
+
@system_arguments[:tag] = "span"
|
36
|
+
@system_arguments[:classes] = class_names(
|
37
|
+
@system_arguments[:classes],
|
38
|
+
"Polaris-Checkbox",
|
39
|
+
"Polaris-Checkbox--labelHidden": label_hidden,
|
40
|
+
"Polaris-Checkbox--error": error.present?,
|
41
|
+
)
|
42
|
+
|
43
|
+
@wrapper_arguments = {
|
44
|
+
label: label,
|
45
|
+
label_hidden: label_hidden,
|
46
|
+
disabled: disabled,
|
47
|
+
help_text: help_text,
|
48
|
+
error: error,
|
49
|
+
}.merge(wrapper_arguments)
|
50
|
+
|
51
|
+
@input_options = input_options
|
52
|
+
@input_options[:aria] ||= {}
|
53
|
+
@input_options[:disabled] = true if disabled
|
54
|
+
@input_options[:aria][:checked] = checked
|
55
|
+
if indeterminate?
|
56
|
+
@input_options[:indeterminate] = true
|
57
|
+
@input_options[:aria][:checked] = "mixed"
|
58
|
+
end
|
59
|
+
@input_options[:class] = class_names(
|
60
|
+
@input_options[:classes],
|
61
|
+
"Polaris-Checkbox__Input",
|
62
|
+
"Polaris-Checkbox__Input--indeterminate": indeterminate?,
|
63
|
+
)
|
64
|
+
end
|
65
|
+
|
66
|
+
def indeterminate?
|
67
|
+
@checked == :indeterminate
|
68
|
+
end
|
69
|
+
|
70
|
+
def icon_name
|
71
|
+
indeterminate? ? "MinusMinor" : "TickSmallMinor"
|
72
|
+
end
|
73
|
+
|
74
|
+
def before_render
|
75
|
+
validate!
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|