Shopify / polaris

Shopify’s design system to help us work together to build a great experience for all of our merchants.
https://polaris.shopify.com
Other
5.77k stars 1.17k forks source link

@shopify/polaris doesn't export hexToRgb #3147

Closed linxianxi closed 2 years ago

linxianxi commented 4 years ago

version: 5.1.0

ghost commented 4 years ago

👋 Thanks for opening your first issue. A contributor should give feedback soon. If you haven’t already, please check out the contributing guidelines.

dsounded commented 3 years ago

This is pretty needed stuff in case you want to allow setting the color vice versa hsb->hex and hex->hsb. Please re-consider this

bernier commented 2 years ago

Still unavailable. I can call hsbToHex or rgbToHsb but not hexToRgb

export 'hexToRgb' (imported as 'hexToRgb') was not found in '@shopify/polaris' (possible exports: AccountConnection, ActionList, ActionMenu, AppProvider, Autocomplete, Avatar, Backdrop, Badge, Banner, Breadcrumbs, Button, ButtonGroup, CalloutCard, Caption, Card, Checkbox, ChoiceList, Collapsible, ColorPicker, Combobox, Connected, ContextualSaveBar, DATA_ATTRIBUTE, DEFAULT_TOAST_DURATION, DEFAULT_TOAST_DURATION_WITH_ACTION, DataTable, DatePicker, DescriptionList, DisplayText, DropZone, EmptySearchResult, EmptyState, EventListener, ExceptionList, Filters, Focus, FooterHelp, Form, FormLayout, Frame, Heading, Icon, Image, IndexTable, Indicator, InlineError, Key, KeyboardKey, KeypressListener, KonamiCode, Label, Labelled, Layout, Link, List, Listbox, Loading, MediaCard, Modal, Navigation, OptionList, Page, PageActions, Pagination, PolarisTestProvider, Popover, PopoverCloseSource, Portal, PortalsManager, PositionedOverlay, ProgressBar, RadioButton, RangeSlider, ResourceItem, ResourceList, ScrollLock, Scrollable, Select, SettingToggle, Sheet, SkeletonBodyText, SkeletonDisplayText, SkeletonPage, SkeletonThumbnail, Spinner, Stack, Sticky, Subheading, Tabs, Tag, TextContainer, TextField, TextStyle, ThemeProvider, Thumbnail, Toast, Tooltip, TopBar, TrapFocus, Truncate, UNSTABLE_Tokens, UNSTABLE_toCssCustomPropertySyntax, UnstableBulkActions, UnstyledButton, UnstyledLink, VideoThumbnail, VisuallyHidden, _SECRET_INTERNAL_FilterControl, _SECRET_INTERNAL_SCROLL_LOCK_MANAGER_CONTEXT, _SECRET_INTERNAL_WITHIN_CONTENT_CONTEXT, buttonFrom, buttonsFrom, errorTextID, hsbToHex, hsbToRgb, hslToRgb, isNavigationItemActive, labelID, rgbString, rgbToHex, rgbToHsb, rgbToHsl, rgbaString, unstyledButtonFrom, useIndexResourceState)
alex-page commented 2 years ago

Hey folks. We will investigate our utility functions soon and decide what we want to support. I am going to close this issue for now.

If you require this function please let me know what you are trying to do!

adelespinasse commented 2 years ago

If you require this function please let me know what you are trying to do!

An example of why we'd need this function is when using the ColorPicker component, which requires the color property to be in HSB format. If the color is stored in hex format, it needs to be converted first.

offjeff91 commented 1 year ago

Still facing this issue...