@artsy/palette 19.6.0 → 19.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/elements/BaseTabs/BaseTab.d.ts +2 -2
  3. package/dist/elements/BorderBox/BorderBox.d.ts +1 -0
  4. package/dist/elements/BorderBox/BorderBoxBase.d.ts +1 -0
  5. package/dist/elements/BorderedRadio/BorderedRadio.d.ts +20 -20
  6. package/dist/elements/Box/Box.d.ts +1 -0
  7. package/dist/elements/CSSGrid/CSSGrid.d.ts +1 -0
  8. package/dist/elements/Carousel/Carousel.d.ts +3 -3
  9. package/dist/elements/Carousel/CarouselNavigation.d.ts +4 -4
  10. package/dist/elements/Clickable/Clickable.d.ts +2 -2
  11. package/dist/elements/Flex/Flex.d.ts +1 -0
  12. package/dist/elements/FullBleed/FullBleed.d.ts +1 -0
  13. package/dist/elements/GridColumns/GridColumns.d.ts +1 -1
  14. package/dist/elements/Link/Link.d.ts +1 -0
  15. package/dist/elements/Modal/ModalBase.js +7 -1
  16. package/dist/elements/Modal/ModalBase.js.map +1 -1
  17. package/dist/elements/Radio/RadioDot.d.ts +1 -0
  18. package/dist/elements/Range/Range.d.ts +11 -0
  19. package/dist/elements/Range/Range.js +179 -0
  20. package/dist/elements/Range/Range.js.map +1 -0
  21. package/dist/elements/Range/Range.story.d.ts +7 -0
  22. package/dist/elements/Range/Range.story.js +139 -0
  23. package/dist/elements/Range/Range.story.js.map +1 -0
  24. package/dist/elements/Range/index.d.ts +1 -0
  25. package/dist/elements/Range/index.js +19 -0
  26. package/dist/elements/Range/index.js.map +1 -0
  27. package/dist/elements/Separator/Separator.d.ts +1 -0
  28. package/dist/elements/Shelf/useClickScroll.d.ts +1 -0
  29. package/dist/elements/Shelf/useDragScroll.d.ts +1 -0
  30. package/dist/elements/StackableBorderBox/StackableBorderBox.d.ts +1 -0
  31. package/dist/elements/Sup/Sup.d.ts +1 -0
  32. package/dist/elements/Swiper/Swiper.d.ts +2 -2
  33. package/dist/elements/Text/Text.d.ts +1 -0
  34. package/dist/elements/Typography/Typography.d.ts +4 -4
  35. package/dist/elements/VisuallyHidden/VisuallyHidden.d.ts +1 -0
  36. package/dist/elements/index.d.ts +1 -0
  37. package/dist/elements/index.js +13 -0
  38. package/dist/elements/index.js.map +1 -1
  39. package/dist/svgs/Icon.d.ts +1 -1
  40. package/dist/utils/remapValue.d.ts +15 -0
  41. package/dist/utils/remapValue.js +22 -0
  42. package/dist/utils/remapValue.js.map +1 -0
  43. package/dist/utils/useClickOutside.d.ts +1 -0
  44. package/dist/utils/usePortal.d.ts +1 -1
  45. package/dist/utils/usePortal.js.map +1 -1
  46. package/dist/utils/useWidthOf.d.ts +1 -0
  47. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -1,3 +1,19 @@
1
+ # v19.7.0 (Fri May 13 2022)
2
+
3
+ #### 🚀 Enhancement
4
+
5
+ - feat(range): implements range [#1154](https://github.com/artsy/palette/pull/1154) ([@dzucconi](https://github.com/dzucconi))
6
+
7
+ #### 🐛 Bug Fix
8
+
9
+ - feat(range): implements range ([@dzucconi](https://github.com/dzucconi))
10
+
11
+ #### Authors: 1
12
+
13
+ - Damon ([@dzucconi](https://github.com/dzucconi))
14
+
15
+ ---
16
+
1
17
  # v19.6.0 (Thu May 05 2022)
2
18
 
3
19
  #### 🚀 Enhancement
@@ -23,7 +23,7 @@ export declare type BaseTabProps = TextProps & {
23
23
  * E.g.: `<BaseTab as={RouterLink} to="/foo">Foo</BaseTab>`
24
24
  * or `<BaseTab as={Clickable} onClick={handleClick}>Foo</BaseTab>`
25
25
  */
26
- export declare const BaseTab: import("styled-components").StyledComponentClass<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("..").BoxProps & import("styled-system").TypographyProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & Omit<import("styled-system").ColorProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol>, "color"> & {
26
+ export declare const BaseTab: import("styled-components").StyledComponentClass<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & import("..").BoxProps & import("styled-system").TypographyProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & Omit<import("styled-system").ColorProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol>, "color"> & {
27
27
  variant?: import("styled-system").ResponsiveValue<import("@artsy/palette-tokens/dist/typography/types").TextVariant, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
28
28
  textColor?: import("styled-system").ResponsiveValue<"black100" | "black80" | "black60" | "black30" | "black10" | "black5" | "blue100" | "blue10" | "copper100" | "copper10" | "green100" | "green10" | "purple100" | "brand" | "purple30" | "purple5" | "red100" | "red10" | "yellow100" | "yellow30" | "yellow10" | "white100", Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
29
29
  lineClamp?: number | undefined;
@@ -31,7 +31,7 @@ export declare const BaseTab: import("styled-components").StyledComponentClass<i
31
31
  overflowEllipsis?: boolean | undefined;
32
32
  textTransform?: import("styled-system").ResponsiveValue<import("../Text").TextTransform, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
33
33
  lineClamp?: import("styled-system").ResponsiveValue<number, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
34
- } & BaseTabProps, any, import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("..").BoxProps & import("styled-system").TypographyProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & Omit<import("styled-system").ColorProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol>, "color"> & {
34
+ } & BaseTabProps, any, React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & import("..").BoxProps & import("styled-system").TypographyProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & Omit<import("styled-system").ColorProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol>, "color"> & {
35
35
  variant?: import("styled-system").ResponsiveValue<import("@artsy/palette-tokens/dist/typography/types").TextVariant, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
36
36
  textColor?: import("styled-system").ResponsiveValue<"black100" | "black80" | "black60" | "black30" | "black10" | "black5" | "blue100" | "blue10" | "copper100" | "copper10" | "green100" | "green10" | "purple100" | "brand" | "purple30" | "purple5" | "red100" | "red10" | "yellow100" | "yellow30" | "yellow10" | "white100", Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
37
37
  lineClamp?: number | undefined;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { BorderBoxProps } from "./BorderBoxBase";
2
3
  /**
3
4
  * A `div` that has a common border and padding set by default, with an optional
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { FlexProps } from "../Flex";
2
3
  export interface BorderBoxProps extends FlexProps {
3
4
  hover?: boolean;
@@ -110,14 +110,14 @@ export declare const BorderedRadio: import("styled-components").StyledComponentC
110
110
  suppressHydrationWarning?: boolean | undefined;
111
111
  accessKey?: string | undefined;
112
112
  className?: string | undefined;
113
- contentEditable?: "inherit" | (boolean | "true" | "false") | undefined;
113
+ contentEditable?: "inherit" | (boolean | "false" | "true") | undefined;
114
114
  contextMenu?: string | undefined;
115
115
  dir?: string | undefined;
116
- draggable?: (boolean | "true" | "false") | undefined;
116
+ draggable?: (boolean | "false" | "true") | undefined;
117
117
  id?: string | undefined;
118
118
  lang?: string | undefined;
119
119
  placeholder?: string | undefined;
120
- spellCheck?: (boolean | "true" | "false") | undefined;
120
+ spellCheck?: (boolean | "false" | "true") | undefined;
121
121
  tabIndex?: number | undefined;
122
122
  translate?: "yes" | "no" | undefined;
123
123
  radioGroup?: string | undefined;
@@ -144,47 +144,47 @@ export declare const BorderedRadio: import("styled-components").StyledComponentC
144
144
  inputMode?: "text" | "search" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
145
145
  is?: string | undefined;
146
146
  'aria-activedescendant'?: string | undefined;
147
- 'aria-atomic'?: boolean | "true" | "false" | undefined;
147
+ 'aria-atomic'?: boolean | "false" | "true" | undefined;
148
148
  'aria-autocomplete'?: "none" | "inline" | "list" | "both" | undefined;
149
- 'aria-busy'?: boolean | "true" | "false" | undefined;
150
- 'aria-checked'?: boolean | "true" | "false" | "mixed" | undefined;
149
+ 'aria-busy'?: boolean | "false" | "true" | undefined;
150
+ 'aria-checked'?: boolean | "false" | "true" | "mixed" | undefined;
151
151
  'aria-colcount'?: number | undefined;
152
152
  'aria-colindex'?: number | undefined;
153
153
  'aria-colspan'?: number | undefined;
154
154
  'aria-controls'?: string | undefined;
155
- 'aria-current'?: boolean | "time" | "true" | "false" | "page" | "step" | "location" | "date" | undefined;
155
+ 'aria-current'?: boolean | "time" | "false" | "true" | "page" | "step" | "location" | "date" | undefined;
156
156
  'aria-describedby'?: string | undefined;
157
157
  'aria-details'?: string | undefined;
158
- 'aria-disabled'?: boolean | "true" | "false" | undefined;
158
+ 'aria-disabled'?: boolean | "false" | "true" | undefined;
159
159
  'aria-dropeffect'?: "link" | "none" | "copy" | "execute" | "move" | "popup" | undefined;
160
160
  'aria-errormessage'?: string | undefined;
161
- 'aria-expanded'?: boolean | "true" | "false" | undefined;
161
+ 'aria-expanded'?: boolean | "false" | "true" | undefined;
162
162
  'aria-flowto'?: string | undefined;
163
- 'aria-grabbed'?: boolean | "true" | "false" | undefined;
164
- 'aria-haspopup'?: boolean | "dialog" | "menu" | "grid" | "true" | "false" | "listbox" | "tree" | undefined;
165
- 'aria-hidden'?: boolean | "true" | "false" | undefined;
166
- 'aria-invalid'?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
163
+ 'aria-grabbed'?: boolean | "false" | "true" | undefined;
164
+ 'aria-haspopup'?: boolean | "dialog" | "menu" | "grid" | "false" | "true" | "listbox" | "tree" | undefined;
165
+ 'aria-hidden'?: boolean | "false" | "true" | undefined;
166
+ 'aria-invalid'?: boolean | "false" | "true" | "grammar" | "spelling" | undefined;
167
167
  'aria-keyshortcuts'?: string | undefined;
168
168
  'aria-label'?: string | undefined;
169
169
  'aria-labelledby'?: string | undefined;
170
170
  'aria-level'?: number | undefined;
171
171
  'aria-live'?: "off" | "assertive" | "polite" | undefined;
172
- 'aria-modal'?: boolean | "true" | "false" | undefined;
173
- 'aria-multiline'?: boolean | "true" | "false" | undefined;
174
- 'aria-multiselectable'?: boolean | "true" | "false" | undefined;
172
+ 'aria-modal'?: boolean | "false" | "true" | undefined;
173
+ 'aria-multiline'?: boolean | "false" | "true" | undefined;
174
+ 'aria-multiselectable'?: boolean | "false" | "true" | undefined;
175
175
  'aria-orientation'?: "horizontal" | "vertical" | undefined;
176
176
  'aria-owns'?: string | undefined;
177
177
  'aria-placeholder'?: string | undefined;
178
178
  'aria-posinset'?: number | undefined;
179
- 'aria-pressed'?: boolean | "true" | "false" | "mixed" | undefined;
180
- 'aria-readonly'?: boolean | "true" | "false" | undefined;
179
+ 'aria-pressed'?: boolean | "false" | "true" | "mixed" | undefined;
180
+ 'aria-readonly'?: boolean | "false" | "true" | undefined;
181
181
  'aria-relevant'?: "text" | "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
182
- 'aria-required'?: boolean | "true" | "false" | undefined;
182
+ 'aria-required'?: boolean | "false" | "true" | undefined;
183
183
  'aria-roledescription'?: string | undefined;
184
184
  'aria-rowcount'?: number | undefined;
185
185
  'aria-rowindex'?: number | undefined;
186
186
  'aria-rowspan'?: number | undefined;
187
- 'aria-selected'?: boolean | "true" | "false" | undefined;
187
+ 'aria-selected'?: boolean | "false" | "true" | undefined;
188
188
  'aria-setsize'?: number | undefined;
189
189
  'aria-sort'?: "none" | "ascending" | "descending" | "other" | undefined;
190
190
  'aria-valuemax'?: number | undefined;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { BackgroundProps, BorderProps, ColorProps, FlexboxProps, LayoutProps, PositionProps, SpaceProps, TextAlignProps } from "styled-system";
2
3
  export interface BoxProps extends BackgroundProps, BorderProps, Omit<ColorProps, "color">, FlexboxProps, LayoutProps, PositionProps, SpaceProps, TextAlignProps {
3
4
  }
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { GridProps } from "styled-system";
2
3
  import { BoxProps } from "../Box";
3
4
  /**
@@ -8,15 +8,15 @@ export declare type CarouselRailProps = BoxProps & {
8
8
  transition?: ResponsiveValue<string>;
9
9
  };
10
10
  /** A `CarouselRail` slides back and forth within the viewport */
11
- export declare const CarouselRail: import("styled-components").StyledComponentClass<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & BoxProps & {
11
+ export declare const CarouselRail: import("styled-components").StyledComponentClass<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & BoxProps & {
12
12
  transition?: ResponsiveValue<string, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
13
- }, any, import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & BoxProps & {
13
+ }, any, React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & BoxProps & {
14
14
  transition?: ResponsiveValue<string, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
15
15
  }>;
16
16
  /** CarouselCellProps */
17
17
  export declare type CarouselCellProps = BoxProps;
18
18
  /** A `CarouselCell` wraps a single child in the carousel */
19
- export declare const CarouselCell: import("styled-components").StyledComponentClass<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & BoxProps, any, import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & BoxProps>;
19
+ export declare const CarouselCell: import("styled-components").StyledComponentClass<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & BoxProps, any, React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & BoxProps>;
20
20
  /**
21
21
  * We share this spacing value with the `Swiper` component
22
22
  */
@@ -5,20 +5,20 @@ export declare type CarouselNavigationProps = ClickableProps;
5
5
  /**
6
6
  * Default next button
7
7
  */
8
- export declare const CarouselNext: import("styled-components").StyledComponentClass<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & import("..").BoxProps & {
8
+ export declare const CarouselNext: import("styled-components").StyledComponentClass<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & import("..").BoxProps & {
9
9
  cursor?: import("styled-system").ResponsiveValue<string, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
10
10
  textDecoration?: import("styled-system").ResponsiveValue<string, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
11
- }, any, import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & import("..").BoxProps & {
11
+ }, any, import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & import("..").BoxProps & {
12
12
  cursor?: import("styled-system").ResponsiveValue<string, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
13
13
  textDecoration?: import("styled-system").ResponsiveValue<string, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
14
14
  }>;
15
15
  /**
16
16
  * Default previous button
17
17
  */
18
- export declare const CarouselPrevious: import("styled-components").StyledComponentClass<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & import("..").BoxProps & {
18
+ export declare const CarouselPrevious: import("styled-components").StyledComponentClass<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & import("..").BoxProps & {
19
19
  cursor?: import("styled-system").ResponsiveValue<string, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
20
20
  textDecoration?: import("styled-system").ResponsiveValue<string, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
21
- }, any, import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & import("..").BoxProps & {
21
+ }, any, import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & import("..").BoxProps & {
22
22
  cursor?: import("styled-system").ResponsiveValue<string, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
23
23
  textDecoration?: import("styled-system").ResponsiveValue<string, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
24
24
  }>;
@@ -10,10 +10,10 @@ export declare type ClickableProps = React.ButtonHTMLAttributes<HTMLButtonElemen
10
10
  * Clickable is a utility component useful for wrapping things like <div>s
11
11
  * without having to deal with the requirements to make the <div> accessible.
12
12
  */
13
- export declare const Clickable: import("styled-components").StyledComponentClass<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & React.ButtonHTMLAttributes<HTMLButtonElement> & BoxProps & {
13
+ export declare const Clickable: import("styled-components").StyledComponentClass<React.ClassAttributes<HTMLButtonElement> & React.ButtonHTMLAttributes<HTMLButtonElement> & BoxProps & {
14
14
  cursor?: ResponsiveValue<string, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
15
15
  textDecoration?: ResponsiveValue<string, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
16
- }, any, import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & React.ButtonHTMLAttributes<HTMLButtonElement> & BoxProps & {
16
+ }, any, React.ClassAttributes<HTMLButtonElement> & React.ButtonHTMLAttributes<HTMLButtonElement> & BoxProps & {
17
17
  cursor?: ResponsiveValue<string, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
18
18
  textDecoration?: ResponsiveValue<string, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
19
19
  }>;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { BoxProps } from "../Box";
2
3
  /**
3
4
  * Flex is Box with display: flex
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { BoxProps } from "../Box";
2
3
  /** FullBleedProps */
3
4
  export declare type FullBleedProps = BoxProps;
@@ -8,7 +8,7 @@ export declare type GridColumnsProps = Omit<CSSGridProps, "gridTemplateColumns">
8
8
  /**
9
9
  * A 12-column fluid grid
10
10
  */
11
- export declare const GridColumns: import("styled-components").StyledComponentClass<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & BoxProps & CSSGridProps, any, import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & BoxProps & CSSGridProps>;
11
+ export declare const GridColumns: import("styled-components").StyledComponentClass<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & BoxProps & CSSGridProps, any, React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & BoxProps & CSSGridProps>;
12
12
  declare type CellProps = ColumnCell & GridColumnProps & BoxProps;
13
13
  /** Column implements `Box` and `gridColumn` */
14
14
  export declare type ColumnProps = CellProps & {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { Color } from "../../Theme";
2
3
  import { BoxProps } from "../Box";
3
4
  declare type UnderlineBehaviors = "default" | "hover" | "none";
@@ -142,8 +142,14 @@ var _ModalBase = function _ModalBase(_ref) {
142
142
  (0, _react.useEffect)(function () {
143
143
  var updateMaxHeight = function updateMaxHeight() {
144
144
  setMaxHeight(window.innerHeight);
145
- };
145
+ }; // Due to the dialog being portaled; we need to wait until the next tick
146
+ // before we can perform any operations that rely on the sizing of elements.
147
+ // Presumably anything that relies on this also listens to resize for updates.
148
+
146
149
 
150
+ setTimeout(function () {
151
+ window.dispatchEvent(new Event("resize"));
152
+ }, 0);
147
153
  window.addEventListener("resize", updateMaxHeight, {
148
154
  passive: true
149
155
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/elements/Modal/ModalBase.tsx"],"names":["ScrollIsolation","RemoveScroll","Container","Flex","systemZIndex","Dialog","attrs","role","DEFAULT_MODAL_Z_INDEX","ModalBase","props","window","_ModalBase","children","zIndex","dialogProps","onClose","rest","containerEl","scrollIsolationEl","handleMouseDown","event","target","current","ref","handleKeydown","key","preventDefault","stopPropagation","document","addEventListener","removeEventListener","innerHeight","maxHeight","setMaxHeight","updateMaxHeight","passive","createPortal","displayName"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA;AACA;AACA,IAAMA,eAAe,GAAG,+BAAOC,+BAAP,CAAH;AAAA;AAAA;AAAA,sFAArB;AAQA,IAAMC,SAAS,GAAG,+BAAOC,UAAP,CAAH;AAAA;AAAA;AAAA,oGAQXC,oBARW,CAAf;AAWA,IAAMC,MAAM,GAAG,+BAAOF,UAAP,EAAaG,KAAb,CAAmB;AAAEC,EAAAA,IAAI,EAAE;AAAR,CAAnB,CAAH;AAAA;AAAA;AAAA,8EAAZ;AASA;;AASA;AACA;AACA;AACO,IAAMC,qBAAqB,GAAG,IAA9B;AAEP;AACA;AACA;AACA;AACA;;;;AACO,IAAMC,SAAmC,GAAG,SAAtCA,SAAsC,CAACC,KAAD,EAAW;AAC5D,MAAI,OAAOC,MAAP,KAAkB,WAAtB,EAAmC;AACjC,WAAO,IAAP;AACD;;AACD,sBAA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CI,CAsCJ;;;AACA,wBAAU,YAAM;AACd,QAAMC,eAAe,GAAG,SAAlBA,eAAkB,GAAM;AAC5BD,MAAAA,YAAY,CAACvB,MAAM,CAACqB,WAAR,CAAZ;AACD,KAFD;;AAIArB,IAAAA,MAAM,CAACmB,gBAAP,CAAwB,QAAxB,EAAkCK,eAAlC,EAAmD;AAAEC,MAAAA,OAAO,EAAE;AAAX,KAAnD;AACA,WAAO,YAAM;AACXzB,MAAAA,MAAM,CAACoB,mBAAP,CAA2B,QAA3B,EAAqCI,eAArC;AACD,KAFD;AAGD,GATD,EASG,EATH;;AAWA,mBAAyB,4BAAzB;AAAA,MAAQE,YAAR,cAAQA,YAAR;;AAEA,SAAOA,YAAY,eACjB,6BAAC,SAAD;AAAW,IAAA,GAAG,EAAEnB,WAAhB;AAAoC,IAAA,MAAM,EAAEJ;AAA5C,KAAwDG,IAAxD,gBACE,6BAAC,eAAD;AACE,IAAA,GAAG,EAAEE,iBADP;AAEE,IAAA,WAAW,EAAEC;AAFf,kBAIE,6BAAC,MAAD;AAAQ,IAAA,SAAS,EAAEa;AAAnB,KAAkClB,WAAlC,GACGF,QADH,CAJF,CADF,CADiB,CAAnB;AAYD,CAtEM;;;AAwEPJ,SAAS,CAAC6B,WAAV,GAAwB,WAAxB","sourcesContent":["import React, { useEffect, useRef, useState } from \"react\"\nimport { RemoveScroll } from \"react-remove-scroll\"\nimport styled from \"styled-components\"\nimport { zIndex as systemZIndex, ZIndexProps } from \"styled-system\"\nimport { useFocusLock } from \"../../utils/useFocusLock\"\nimport { usePortal } from \"../../utils/usePortal\"\nimport { Flex, FlexProps } from \"../Flex\"\n\n// TODO: Update TypeScript definitions for this library\n// https://github.com/theKashey/react-remove-scroll\nconst ScrollIsolation = styled(RemoveScroll as any)`\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n`\n\nconst Container = styled(Flex)`\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n align-items: center;\n justify-content: center;\n ${systemZIndex}\n`\n\nconst Dialog = styled(Flex).attrs({ role: \"dialog\" })`\n overflow-y: auto;\n -webkit-overflow-scrolling: touch;\n\n > * {\n max-height: 100%;\n }\n`\n\n/** BaseModal */\nexport type ModalBaseProps = React.HTMLAttributes<HTMLDivElement> &\n FlexProps &\n ZIndexProps & {\n children?: React.ReactNode\n dialogProps?: FlexProps\n onClose?(): void\n }\n\n/**\n * It seems we've landed on this value as the 'top'\n */\nexport const DEFAULT_MODAL_Z_INDEX = 9999\n\n/**\n * BaseModal\n * Low-level modal that has no opinions about layout/overlay\n * Modals content using a portal, locks scroll.\n */\nexport const ModalBase: React.FC<ModalBaseProps> = (props) => {\n if (typeof window === \"undefined\") {\n return null\n }\n return <_ModalBase {...props} />\n}\n\nexport const _ModalBase: React.FC<ModalBaseProps> = ({\n children,\n zIndex = DEFAULT_MODAL_Z_INDEX,\n dialogProps = {},\n onClose = () => null,\n ...rest\n}) => {\n const containerEl = useRef<HTMLDivElement | null>(null)\n const scrollIsolationEl = useRef<HTMLDivElement | null>(null)\n\n const handleMouseDown = (\n event: React.MouseEvent<HTMLDivElement, MouseEvent>\n ) => {\n if (event.target === scrollIsolationEl.current) {\n onClose()\n }\n }\n\n useFocusLock({ ref: containerEl })\n\n useEffect(() => {\n const handleKeydown = (event: KeyboardEvent) => {\n switch (event.key) {\n case \"Escape\":\n // Prevent <esc> from interfering with the returned focus\n event.preventDefault()\n event.stopPropagation()\n\n // Handle close\n return onClose()\n default:\n break\n }\n }\n\n document.addEventListener(\"keydown\", handleKeydown)\n return () => {\n document.removeEventListener(\"keydown\", handleKeydown)\n }\n }, [onClose])\n\n // Sets to `innerHeight` so as to simulate `100vh` on iOS\n const [maxHeight, setMaxHeight] = useState(window.innerHeight)\n\n // Keeps `maxHeight` in sync\n useEffect(() => {\n const updateMaxHeight = () => {\n setMaxHeight(window.innerHeight)\n }\n\n window.addEventListener(\"resize\", updateMaxHeight, { passive: true })\n return () => {\n window.removeEventListener(\"resize\", updateMaxHeight)\n }\n }, [])\n\n const { createPortal } = usePortal()\n\n return createPortal(\n <Container ref={containerEl as any} zIndex={zIndex} {...rest}>\n <ScrollIsolation\n ref={scrollIsolationEl as any}\n onMouseDown={handleMouseDown}\n >\n <Dialog maxHeight={maxHeight} {...dialogProps}>\n {children}\n </Dialog>\n </ScrollIsolation>\n </Container>\n )\n}\n\nModalBase.displayName = \"ModalBase\"\n"],"file":"ModalBase.js"}
1
+ {"version":3,"sources":["../../../src/elements/Modal/ModalBase.tsx"],"names":["ScrollIsolation","RemoveScroll","Container","Flex","systemZIndex","Dialog","attrs","role","DEFAULT_MODAL_Z_INDEX","ModalBase","props","window","_ModalBase","children","zIndex","dialogProps","onClose","rest","containerEl","scrollIsolationEl","handleMouseDown","event","target","current","ref","handleKeydown","key","preventDefault","stopPropagation","document","addEventListener","removeEventListener","innerHeight","maxHeight","setMaxHeight","updateMaxHeight","setTimeout","dispatchEvent","Event","passive","createPortal","displayName"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA;AACA;AACA,IAAMA,eAAe,GAAG,+BAAOC,+BAAP,CAAH;AAAA;AAAA;AAAA,sFAArB;AAQA,IAAMC,SAAS,GAAG,+BAAOC,UAAP,CAAH;AAAA;AAAA;AAAA,oGAQXC,oBARW,CAAf;AAWA,IAAMC,MAAM,GAAG,+BAAOF,UAAP,EAAaG,KAAb,CAAmB;AAAEC,EAAAA,IAAI,EAAE;AAAR,CAAnB,CAAH;AAAA;AAAA;AAAA,8EAAZ;AASA;;AASA;AACA;AACA;AACO,IAAMC,qBAAqB,GAAG,IAA9B;AAEP;AACA;AACA;AACA;AACA;;;;AACO,IAAMC,SAAmC,GAAG,SAAtCA,SAAsC,CAACC,KAAD,EAAW;AAC5D,MAAI,OAAOC,MAAP,KAAkB,WAAtB,EAAmC;AACjC,WAAO,IAAP;AACD;;AACD,sBAAO,6BAAC,UAAD,E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A,wBAAU,YAAM;AACd,QAAMC,eAAe,GAAG,SAAlBA,eAAkB,GAAM;AAC5BD,MAAAA,YAAY,CAACvB,MAAM,CAACqB,WAAR,CAAZ;AACD,KAFD,CADc,CAKd;AACA;AACA;;;AACAI,IAAAA,UAAU,CAAC,YAAM;AACfzB,MAAAA,MAAM,CAAC0B,aAAP,CAAqB,IAAIC,KAAJ,CAAU,QAAV,CAArB;AACD,KAFS,EAEP,CAFO,CAAV;AAIA3B,IAAAA,MAAM,CAACmB,gBAAP,CAAwB,QAAxB,EAAkCK,eAAlC,EAAmD;AAAEI,MAAAA,OAAO,EAAE;AAAX,KAAnD;AAEA,WAAO,YAAM;AACX5B,MAAAA,MAAM,CAACoB,mBAAP,CAA2B,QAA3B,EAAqCI,eAArC;AACD,KAFD;AAGD,GAjBD,EAiBG,EAjBH;;AAmBA,mBAAyB,4BAAzB;AAAA,MAAQK,YAAR,cAAQA,YAAR;;AAEA,SAAOA,YAAY,eACjB,6BAAC,SAAD;AAAW,IAAA,GAAG,EAAEtB,WAAhB;AAAoC,IAAA,MAAM,EAAEJ;AAA5C,KAAwDG,IAAxD,gBACE,6BAAC,eAAD;AACE,IAAA,GAAG,EAAEE,iBADP;AAEE,IAAA,WAAW,EAAEC;AAFf,kBAIE,6BAAC,MAAD;AAAQ,IAAA,SAAS,EAAEa;AAAnB,KAAkClB,WAAlC,GACGF,QADH,CAJF,CADF,CADiB,CAAnB;AAYD,CA9EM;;;AAgFPJ,SAAS,CAACgC,WAAV,GAAwB,WAAxB","sourcesContent":["import React, { useEffect, useRef, useState } from \"react\"\nimport { RemoveScroll } from \"react-remove-scroll\"\nimport styled from \"styled-components\"\nimport { zIndex as systemZIndex, ZIndexProps } from \"styled-system\"\nimport { useFocusLock } from \"../../utils/useFocusLock\"\nimport { usePortal } from \"../../utils/usePortal\"\nimport { Flex, FlexProps } from \"../Flex\"\n\n// TODO: Update TypeScript definitions for this library\n// https://github.com/theKashey/react-remove-scroll\nconst ScrollIsolation = styled(RemoveScroll as any)`\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n`\n\nconst Container = styled(Flex)`\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n align-items: center;\n justify-content: center;\n ${systemZIndex}\n`\n\nconst Dialog = styled(Flex).attrs({ role: \"dialog\" })`\n overflow-y: auto;\n -webkit-overflow-scrolling: touch;\n\n > * {\n max-height: 100%;\n }\n`\n\n/** BaseModal */\nexport type ModalBaseProps = React.HTMLAttributes<HTMLDivElement> &\n FlexProps &\n ZIndexProps & {\n children?: React.ReactNode\n dialogProps?: FlexProps\n onClose?(): void\n }\n\n/**\n * It seems we've landed on this value as the 'top'\n */\nexport const DEFAULT_MODAL_Z_INDEX = 9999\n\n/**\n * BaseModal\n * Low-level modal that has no opinions about layout/overlay\n * Modals content using a portal, locks scroll.\n */\nexport const ModalBase: React.FC<ModalBaseProps> = (props) => {\n if (typeof window === \"undefined\") {\n return null\n }\n return <_ModalBase {...props} />\n}\n\nexport const _ModalBase: React.FC<ModalBaseProps> = ({\n children,\n zIndex = DEFAULT_MODAL_Z_INDEX,\n dialogProps = {},\n onClose = () => null,\n ...rest\n}) => {\n const containerEl = useRef<HTMLDivElement | null>(null)\n const scrollIsolationEl = useRef<HTMLDivElement | null>(null)\n\n const handleMouseDown = (\n event: React.MouseEvent<HTMLDivElement, MouseEvent>\n ) => {\n if (event.target === scrollIsolationEl.current) {\n onClose()\n }\n }\n\n useFocusLock({ ref: containerEl })\n\n useEffect(() => {\n const handleKeydown = (event: KeyboardEvent) => {\n switch (event.key) {\n case \"Escape\":\n // Prevent <esc> from interfering with the returned focus\n event.preventDefault()\n event.stopPropagation()\n\n // Handle close\n return onClose()\n default:\n break\n }\n }\n\n document.addEventListener(\"keydown\", handleKeydown)\n return () => {\n document.removeEventListener(\"keydown\", handleKeydown)\n }\n }, [onClose])\n\n // Sets to `innerHeight` so as to simulate `100vh` on iOS\n const [maxHeight, setMaxHeight] = useState(window.innerHeight)\n\n // Keeps `maxHeight` in sync\n useEffect(() => {\n const updateMaxHeight = () => {\n setMaxHeight(window.innerHeight)\n }\n\n // Due to the dialog being portaled; we need to wait until the next tick\n // before we can perform any operations that rely on the sizing of elements.\n // Presumably anything that relies on this also listens to resize for updates.\n setTimeout(() => {\n window.dispatchEvent(new Event(\"resize\"))\n }, 0)\n\n window.addEventListener(\"resize\", updateMaxHeight, { passive: true })\n\n return () => {\n window.removeEventListener(\"resize\", updateMaxHeight)\n }\n }, [])\n\n const { createPortal } = usePortal()\n\n return createPortal(\n <Container ref={containerEl as any} zIndex={zIndex} {...rest}>\n <ScrollIsolation\n ref={scrollIsolationEl as any}\n onMouseDown={handleMouseDown}\n >\n <Dialog maxHeight={maxHeight} {...dialogProps}>\n {children}\n </Dialog>\n </ScrollIsolation>\n </Container>\n )\n}\n\nModalBase.displayName = \"ModalBase\"\n"],"file":"ModalBase.js"}
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export interface CheckProps {
2
3
  disabled?: boolean;
3
4
  error?: boolean;
@@ -0,0 +1,11 @@
1
+ import * as React from "react";
2
+ import { BoxProps } from "../Box";
3
+ export declare const RANGE_HANDLE_SIZE = 24;
4
+ export interface RangeProps extends BoxProps {
5
+ min: number;
6
+ max: number;
7
+ step: number;
8
+ value?: number[];
9
+ onChange?: (range: [min: number, max: number]) => void;
10
+ }
11
+ export declare const Range: React.FC<RangeProps>;
@@ -0,0 +1,179 @@
1
+ "use strict";
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.Range = exports.RANGE_HANDLE_SIZE = void 0;
9
+
10
+ var _themeGet = require("@styled-system/theme-get");
11
+
12
+ var React = _interopRequireWildcard(require("react"));
13
+
14
+ var _styledComponents = _interopRequireWildcard(require("styled-components"));
15
+
16
+ var _helpers = require("../../helpers");
17
+
18
+ var _remapValue = require("../../utils/remapValue");
19
+
20
+ var _Box = require("../Box");
21
+
22
+ var _Flex = require("../Flex");
23
+
24
+ var _excluded = ["min", "max", "step", "value", "onChange"];
25
+
26
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
27
+
28
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
29
+
30
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
31
+
32
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
33
+
34
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
35
+
36
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
37
+
38
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
39
+
40
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
41
+
42
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
43
+
44
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
45
+
46
+ var RANGE_HANDLE_SIZE = 24;
47
+ exports.RANGE_HANDLE_SIZE = RANGE_HANDLE_SIZE;
48
+
49
+ var Range = function Range(_ref) {
50
+ var min = _ref.min,
51
+ max = _ref.max,
52
+ step = _ref.step,
53
+ _ref$value = _ref.value,
54
+ value = _ref$value === void 0 ? [0, max] : _ref$value,
55
+ onChange = _ref.onChange,
56
+ rest = _objectWithoutProperties(_ref, _excluded);
57
+
58
+ var minRef = (0, React.useRef)(null);
59
+ var maxRef = (0, React.useRef)(null);
60
+
61
+ var _useState = (0, React.useState)(value),
62
+ _useState2 = _slicedToArray(_useState, 2),
63
+ values = _useState2[0],
64
+ setValues = _useState2[1];
65
+
66
+ var _useState3 = (0, React.useState)(0),
67
+ _useState4 = _slicedToArray(_useState3, 2),
68
+ maxWidth = _useState4[0],
69
+ setMaxWidth = _useState4[1];
70
+
71
+ var handleMinChange = function handleMinChange(_ref2) {
72
+ var value = _ref2.target.valueAsNumber;
73
+ if (value > values[1]) return;
74
+ setValues([value, values[1]]);
75
+ onChange === null || onChange === void 0 ? void 0 : onChange([value, values[1]]);
76
+ };
77
+
78
+ var handleMaxChange = function handleMaxChange(_ref3) {
79
+ var value = _ref3.target.valueAsNumber;
80
+ if (value < values[0]) return;
81
+ setValues([values[0], value]);
82
+ onChange === null || onChange === void 0 ? void 0 : onChange([values[0], value]);
83
+ };
84
+
85
+ (0, React.useEffect)(function () {
86
+ if (!maxRef.current) return;
87
+ setMaxWidth(maxRef.current.offsetWidth);
88
+ }, []);
89
+ (0, React.useEffect)(function () {
90
+ var handleResize = function handleResize() {
91
+ if (!maxRef.current) return;
92
+ setMaxWidth(maxRef.current.offsetWidth);
93
+ };
94
+
95
+ window.addEventListener("resize", handleResize, {
96
+ passive: true
97
+ });
98
+ return function () {
99
+ window.removeEventListener("resize", handleResize);
100
+ };
101
+ }, []);
102
+ var selectionRectangle = "rect(0, ".concat((0, _remapValue.remapValue)(values[1], {
103
+ min: min,
104
+ max: max
105
+ }, {
106
+ min: 0,
107
+ max: maxWidth - RANGE_HANDLE_SIZE
108
+ }), "px, 2px, ").concat((0, _remapValue.remapValue)(values[0], {
109
+ min: min,
110
+ max: max
111
+ }, {
112
+ min: 0,
113
+ max: maxWidth - RANGE_HANDLE_SIZE
114
+ }), "px)");
115
+ var maxRectangle = "rect(0, ".concat(maxWidth, "px, ").concat(RANGE_HANDLE_SIZE, "px, ").concat((0, _remapValue.remapValue)(values[1], {
116
+ min: min,
117
+ max: max
118
+ }, {
119
+ min: 0,
120
+ max: maxWidth - RANGE_HANDLE_SIZE
121
+ }), "px)");
122
+ return /*#__PURE__*/React.createElement(Track, rest, /*#__PURE__*/React.createElement(Selection, {
123
+ style: {
124
+ clip: selectionRectangle
125
+ }
126
+ }), /*#__PURE__*/React.createElement(Slider, {
127
+ ref: minRef,
128
+ min: min,
129
+ max: max,
130
+ step: step,
131
+ onInput: handleMinChange,
132
+ value: values[0]
133
+ }), /*#__PURE__*/React.createElement(Slider, {
134
+ ref: maxRef,
135
+ min: min,
136
+ max: max,
137
+ step: step,
138
+ onInput: handleMaxChange,
139
+ value: values[1],
140
+ style: {
141
+ clip: maxRectangle
142
+ }
143
+ }), /*#__PURE__*/React.createElement(Shadow, {
144
+ left: (0, _remapValue.remapValue)(values[1], {
145
+ min: min,
146
+ max: max
147
+ }, {
148
+ min: 0,
149
+ max: maxWidth - RANGE_HANDLE_SIZE
150
+ })
151
+ }));
152
+ };
153
+
154
+ exports.Range = Range;
155
+ Range.displayName = "Range";
156
+ var Track = (0, _styledComponents.default)(_Flex.Flex).withConfig({
157
+ displayName: "Range__Track",
158
+ componentId: "si9a6m-0"
159
+ })(["align-items:center;position:relative;height:", "px;&:before{content:\"\";display:block;position:absolute;height:2px;left:0;right:0;top:50%;margin-top:-1px;background-color:", ";}"], RANGE_HANDLE_SIZE, (0, _themeGet.themeGet)("colors.black30"));
160
+ var Shadow = (0, _styledComponents.default)(_Box.Box).withConfig({
161
+ displayName: "Range__Shadow",
162
+ componentId: "si9a6m-1"
163
+ })(["position:absolute;width:", "px;height:", "px;top:50%;margin-top:-", "px;background-color:transparent;pointer-events:none;border-radius:50%;box-shadow:", ";"], RANGE_HANDLE_SIZE, RANGE_HANDLE_SIZE, RANGE_HANDLE_SIZE / 2, _helpers.FLAT_SHADOW);
164
+ var Selection = (0, _styledComponents.default)(_Box.Box).withConfig({
165
+ displayName: "Range__Selection",
166
+ componentId: "si9a6m-2"
167
+ })(["position:absolute;height:2px;left:0;right:0;top:50%;margin-top:-1px;background-color:", ";"], (0, _themeGet.themeGet)("colors.brand"));
168
+ var railStyles = (0, _styledComponents.css)(["width:100%;height:", "px;"], RANGE_HANDLE_SIZE);
169
+ var handleStyles = (0, _styledComponents.css)(["user-select:none;cursor:grab;width:", "px;height:", "px;background-color:", ";border-radius:50%;border:1px solid ", ";"], RANGE_HANDLE_SIZE, RANGE_HANDLE_SIZE, (0, _themeGet.themeGet)("colors.white100"), (0, _themeGet.themeGet)("colors.black10"));
170
+
171
+ var Slider = _styledComponents.default.input.withConfig({
172
+ displayName: "Range__Slider",
173
+ componentId: "si9a6m-3"
174
+ })(["appearance:none;background:transparent;position:relative;margin:0;width:100%;position:absolute;top:0;left:0;&::-webkit-slider-runnable-track{", "}&::-moz-range-track{", "}&::-webkit-slider-thumb{-webkit-appearance:none;", "}&::-moz-range-thumb{", "}&:active{&::-webkit-slider-thumb{box-shadow:none;background-color:", ";}&::-moz-range-thumb{box-shadow:none;background-color:", ";}}&:first-of-type{&::-webkit-slider-thumb{box-shadow:", ";}&::-moz-range-thumb{box-shadow:", ";}}"], railStyles, railStyles, handleStyles, handleStyles, (0, _themeGet.themeGet)("colors.black5"), (0, _themeGet.themeGet)("colors.black5"), _helpers.FLAT_SHADOW, _helpers.FLAT_SHADOW);
175
+
176
+ Slider.defaultProps = {
177
+ type: "range"
178
+ };
179
+ //# sourceMappingURL=Range.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/elements/Range/Range.tsx"],"names":["RANGE_HANDLE_SIZE","Range","min","max","step","value","onChange","rest","minRef","maxRef","values","setValues","maxWidth","setMaxWidth","handleMinChange","target","valueAsNumber","handleMaxChange","current","offsetWidth","handleResize","window","addEventListener","passive","removeEventListener","selectionRectangle","maxRectangle","clip","Track","Flex","Shadow","Box","FLAT_SHADOW","Selection","railStyles","css","handleStyles","Slider","styled","input","defaultProps","type"],"mappings":";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AA;AAAA,2LAGC7B,iBAHD,EAca,wBAAS,gBAAT,CAdb,CAAX;AAkBA,IAAM8B,MAAM,GAAG,+BAAOC,QAAP,CAAH;AAAA;AAAA;AAAA,oKAED/B,iBAFC,EAGAA,iBAHA,EAKKA,iBAAiB,GAAG,CALzB,EASIgC,oBATJ,CAAZ;AAYA,IAAMC,SAAS,GAAG,+BAAOF,QAAP,CAAH;AAAA;AAAA;AAAA,mGAOO,wBAAS,cAAT,CAPP,CAAf;AAUA,IAAMG,UAAU,OAAGC,qBAAH,iCAEJnC,iBAFI,CAAhB;AAKA,IAAMoC,YAAY,OAAGD,qBAAH,8HAGPnC,iBAHO,EAINA,iBAJM,EAKI,wBAAS,iBAAT,CALJ,EAOI,wBAAS,gBAAT,CAPJ,CAAlB;;AAUA,IAAMqC,MAAM,GAAGC,0BAAOC,KAAV;AAAA;AAAA;AAAA,qeAWNL,UAXM,EAeNA,UAfM,EAoBNE,YApBM,EAwBNA,YAxBM,EA8Bc,wBAAS,eAAT,CA9Bd,EAmCc,wBAAS,eAAT,CAnCd,EAyCQJ,oBAzCR,EA6CQA,oBA7CR,CAAZ;;AAkDAK,MAAM,CAACG,YAAP,GAAsB;AACpBC,EAAAA,IAAI,EAAE;AADc,CAAtB","sourcesContent":["import { themeGet } from \"@styled-system/theme-get\"\nimport * as React from \"react\"\nimport { useEffect, useRef, useState } from \"react\"\nimport styled, { css } from \"styled-components\"\nimport { FLAT_SHADOW } from \"../../helpers\"\nimport { remapValue } from \"../../utils/remapValue\"\nimport { Box, BoxProps } from \"../Box\"\nimport { Flex } from \"../Flex\"\n\nexport const RANGE_HANDLE_SIZE = 24\n\nexport interface RangeProps extends BoxProps {\n min: number\n max: number\n step: number\n value?: number[]\n onChange?: (range: [min: number, max: number]) => void\n}\n\nexport const Range: React.FC<RangeProps> = ({\n min,\n max,\n step,\n value = [0, max],\n onChange,\n ...rest\n}) => {\n const minRef = useRef<HTMLInputElement | null>(null)\n const maxRef = useRef<HTMLInputElement | null>(null)\n\n const [values, setValues] = useState(value)\n\n const [maxWidth, setMaxWidth] = useState(0)\n\n const handleMinChange = ({\n target: { valueAsNumber: value },\n }: React.ChangeEvent<HTMLInputElement>) => {\n if (value > values[1]) return\n setValues([value, values[1]])\n onChange?.([value, values[1]])\n }\n\n const handleMaxChange = ({\n target: { valueAsNumber: value },\n }: React.ChangeEvent<HTMLInputElement>) => {\n if (value < values[0]) return\n setValues([values[0], value])\n onChange?.([values[0], value])\n }\n\n useEffect(() => {\n if (!maxRef.current) return\n setMaxWidth(maxRef.current.offsetWidth)\n }, [])\n\n useEffect(() => {\n const handleResize = () => {\n if (!maxRef.current) return\n setMaxWidth(maxRef.current.offsetWidth)\n }\n\n window.addEventListener(\"resize\", handleResize, { passive: true })\n\n return () => {\n window.removeEventListener(\"resize\", handleResize)\n }\n }, [])\n\n const selectionRectangle = `rect(0, ${remapValue(\n values[1],\n { min, max },\n { min: 0, max: maxWidth - RANGE_HANDLE_SIZE }\n )}px, 2px, ${remapValue(\n values[0],\n { min, max },\n { min: 0, max: maxWidth - RANGE_HANDLE_SIZE }\n )}px)`\n\n const maxRectangle = `rect(0, ${maxWidth}px, ${RANGE_HANDLE_SIZE}px, ${remapValue(\n values[1],\n { min, max },\n { min: 0, max: maxWidth - RANGE_HANDLE_SIZE }\n )}px)`\n\n return (\n <Track {...rest}>\n <Selection style={{ clip: selectionRectangle }} />\n\n <Slider\n ref={minRef as any}\n min={min}\n max={max}\n step={step}\n onInput={handleMinChange}\n value={values[0]}\n />\n\n <Slider\n ref={maxRef as any}\n min={min}\n max={max}\n step={step}\n onInput={handleMaxChange}\n value={values[1]}\n style={{ clip: maxRectangle }}\n />\n\n {/* Max slider is clipped so position a shadow independent of it */}\n <Shadow\n left={remapValue(\n values[1],\n { min, max },\n { min: 0, max: maxWidth - RANGE_HANDLE_SIZE }\n )}\n />\n </Track>\n )\n}\n\nconst Track = styled(Flex)`\n align-items: center;\n position: relative;\n height: ${RANGE_HANDLE_SIZE}px;\n\n &:before {\n content: \"\";\n display: block;\n position: absolute;\n height: 2px;\n left: 0;\n right: 0;\n top: 50%;\n margin-top: -1px;\n background-color: ${themeGet(\"colors.black30\")};\n }\n`\n\nconst Shadow = styled(Box)`\n position: absolute;\n width: ${RANGE_HANDLE_SIZE}px;\n height: ${RANGE_HANDLE_SIZE}px;\n top: 50%;\n margin-top: -${RANGE_HANDLE_SIZE / 2}px;\n background-color: transparent;\n pointer-events: none;\n border-radius: 50%;\n box-shadow: ${FLAT_SHADOW};\n`\n\nconst Selection = styled(Box)`\n position: absolute;\n height: 2px;\n left: 0;\n right: 0;\n top: 50%;\n margin-top: -1px;\n background-color: ${themeGet(\"colors.brand\")};\n`\n\nconst railStyles = css`\n width: 100%;\n height: ${RANGE_HANDLE_SIZE}px;\n`\n\nconst handleStyles = css`\n user-select: none;\n cursor: grab;\n width: ${RANGE_HANDLE_SIZE}px;\n height: ${RANGE_HANDLE_SIZE}px;\n background-color: ${themeGet(\"colors.white100\")};\n border-radius: 50%;\n border: 1px solid ${themeGet(\"colors.black10\")};\n`\n\nconst Slider = styled.input`\n appearance: none;\n background: transparent;\n position: relative;\n margin: 0;\n width: 100%;\n position: absolute;\n top: 0;\n left: 0;\n\n &::-webkit-slider-runnable-track {\n ${railStyles}\n }\n\n &::-moz-range-track {\n ${railStyles}\n }\n\n &::-webkit-slider-thumb {\n -webkit-appearance: none;\n ${handleStyles}\n }\n\n &::-moz-range-thumb {\n ${handleStyles}\n }\n\n &:active {\n &::-webkit-slider-thumb {\n box-shadow: none;\n background-color: ${themeGet(\"colors.black5\")};\n }\n\n &::-moz-range-thumb {\n box-shadow: none;\n background-color: ${themeGet(\"colors.black5\")};\n }\n }\n\n &:first-of-type {\n &::-webkit-slider-thumb {\n box-shadow: ${FLAT_SHADOW};\n }\n\n &::-moz-range-thumb {\n box-shadow: ${FLAT_SHADOW};\n }\n }\n`\n\nSlider.defaultProps = {\n type: \"range\",\n}\n"],"file":"Range.js"}
@@ -0,0 +1,7 @@
1
+ declare const _default: {
2
+ title: string;
3
+ };
4
+ export default _default;
5
+ export declare const Default: () => JSX.Element;
6
+ export declare const WithinModal: () => JSX.Element;
7
+ export declare const InContext: () => JSX.Element;
@@ -0,0 +1,139 @@
1
+ "use strict";
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.default = exports.WithinModal = exports.InContext = exports.Default = void 0;
9
+
10
+ var _addonActions = require("@storybook/addon-actions");
11
+
12
+ var _react = _interopRequireWildcard(require("react"));
13
+
14
+ var _storybookStates = require("storybook-states");
15
+
16
+ var _Box = require("../Box");
17
+
18
+ var _Modal = require("../Modal");
19
+
20
+ var _Range = require("./Range");
21
+
22
+ var _LabeledInput = require("../LabeledInput");
23
+
24
+ var _Flex = require("../Flex");
25
+
26
+ var _ = require("../..");
27
+
28
+ var _Text = require("../Text");
29
+
30
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
31
+
32
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
33
+
34
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
35
+
36
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
37
+
38
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
39
+
40
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
41
+
42
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
43
+
44
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
45
+
46
+ var _default = {
47
+ title: "Components/Range"
48
+ };
49
+ exports.default = _default;
50
+
51
+ var Default = function Default() {
52
+ return /*#__PURE__*/_react.default.createElement(_storybookStates.States, {
53
+ states: [{}, {
54
+ value: [1100, 3450]
55
+ }, {
56
+ step: 1,
57
+ max: 10
58
+ }]
59
+ }, /*#__PURE__*/_react.default.createElement(_Range.Range, {
60
+ min: 0,
61
+ max: 5000,
62
+ step: 10,
63
+ onChange: (0, _addonActions.action)("onChange")
64
+ }));
65
+ };
66
+
67
+ exports.Default = Default;
68
+ Default.displayName = "Default";
69
+
70
+ var WithinModal = function WithinModal() {
71
+ return /*#__PURE__*/_react.default.createElement(_Modal.ModalBase, {
72
+ width: "100%",
73
+ height: "100%",
74
+ dialogProps: {
75
+ width: 400,
76
+ height: 400,
77
+ bg: "black5"
78
+ }
79
+ }, /*#__PURE__*/_react.default.createElement(_Box.Box, {
80
+ width: 400,
81
+ height: 400
82
+ }, /*#__PURE__*/_react.default.createElement(_Range.Range, {
83
+ min: 0,
84
+ max: 5000,
85
+ step: 10,
86
+ onChange: (0, _addonActions.action)("onChange")
87
+ })));
88
+ };
89
+
90
+ exports.WithinModal = WithinModal;
91
+ WithinModal.displayName = "WithinModal";
92
+
93
+ var InContext = function InContext() {
94
+ var _useState = (0, _react.useState)([0, 50000]),
95
+ _useState2 = _slicedToArray(_useState, 2),
96
+ _useState2$ = _slicedToArray(_useState2[0], 2),
97
+ min = _useState2$[0],
98
+ max = _useState2$[1],
99
+ setMinMax = _useState2[1];
100
+
101
+ return /*#__PURE__*/_react.default.createElement(_Box.Box, {
102
+ p: 2,
103
+ border: "1px solid",
104
+ borderColor: "black10",
105
+ width: 375
106
+ }, /*#__PURE__*/_react.default.createElement(_Flex.Flex, null, /*#__PURE__*/_react.default.createElement(_LabeledInput.LabeledInput, {
107
+ title: "Min",
108
+ label: "$USD",
109
+ flex: 1,
110
+ value: min
111
+ }), /*#__PURE__*/_react.default.createElement(_.Spacer, {
112
+ ml: 1
113
+ }), /*#__PURE__*/_react.default.createElement(_LabeledInput.LabeledInput, {
114
+ title: "Max",
115
+ label: "$USD",
116
+ flex: 1,
117
+ value: max
118
+ })), /*#__PURE__*/_react.default.createElement(_.Spacer, {
119
+ mt: 1
120
+ }), /*#__PURE__*/_react.default.createElement(_Range.Range, {
121
+ min: 0,
122
+ max: 50000,
123
+ step: 100,
124
+ value: [min, max],
125
+ onChange: setMinMax
126
+ }), /*#__PURE__*/_react.default.createElement(_.Spacer, {
127
+ mt: 0.5
128
+ }), /*#__PURE__*/_react.default.createElement(_Flex.Flex, {
129
+ justifyContent: "space-between"
130
+ }, /*#__PURE__*/_react.default.createElement(_Text.Text, {
131
+ variant: "xs"
132
+ }, "$0"), /*#__PURE__*/_react.default.createElement(_Text.Text, {
133
+ variant: "xs"
134
+ }, "$50000+")));
135
+ };
136
+
137
+ exports.InContext = InContext;
138
+ InContext.displayName = "InContext";
139
+ //# sourceMappingURL=Range.story.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/elements/Range/Range.story.tsx"],"names":["title","Default","value","step","max","WithinModal","width","height","bg","InContext","min","setMinMax"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;;;eAEe;AACbA,EAAAA,KAAK,EAAE;AADM,C;;;AAIR,IAAMC,OAAO,GAAG,SAAVA,OAAU,GAAM;AAC3B,sBACE,6BAAC,uBAAD;AACE,IAAA,MAAM,EAAE,CAAC,EAAD,EAAK;AAAEC,MAAAA,KAAK,EAAE,CAAC,IAAD,EAAO,IAAP;AAAT,KAAL,EAA8B;AAAEC,MAAAA,IAAI,EAAE,CAAR;AAAWC,MAAAA,GAAG,EAAE;AAAhB,KAA9B;AADV,kBAGE,6BAAC,YAAD;AAAO,IAAA,GAAG,EAAE,CAAZ;AAAe,IAAA,GAAG,EAAE,IAApB;AAA0B,IAAA,IAAI,EAAE,EAAhC;AAAoC,IAAA,QAAQ,EAAE,0BAAO,UAAP;AAA9C,IAHF,CADF;AAOD,CARM;;;AAAMH,O;;AAUN,IAAMI,WAAW,GAAG,SAAdA,WAAc,GAAM;AAC/B,sBACE,6BAAC,gBAAD;AACE,IAAA,KAAK,EAAC,MADR;AAEE,IAAA,MAAM,EAAC,M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,EAAE,CADP;AAEE,IAAA,GAAG,EAAE,KAFP;AAGE,IAAA,IAAI,EAAE,GAHR;AAIE,IAAA,KAAK,EAAE,CAACM,GAAD,EAAMN,GAAN,CAJT;AAKE,IAAA,QAAQ,EAAEO;AALZ,IAXF,eAmBE,6BAAC,QAAD;AAAQ,IAAA,EAAE,EAAE;AAAZ,IAnBF,eAqBE,6BAAC,UAAD;AAAM,IAAA,cAAc,EAAC;AAArB,kBACE,6BAAC,UAAD;AAAM,IAAA,OAAO,EAAC;AAAd,UADF,eAGE,6BAAC,UAAD;AAAM,IAAA,OAAO,EAAC;AAAd,eAHF,CArBF,CADF;AA6BD,CAhCM;;;AAAMF,S","sourcesContent":["import { action } from \"@storybook/addon-actions\"\nimport React, { useState } from \"react\"\nimport { States } from \"storybook-states\"\nimport { Box } from \"../Box\"\nimport { ModalBase } from \"../Modal\"\nimport { Range, RangeProps } from \"./Range\"\nimport { LabeledInput } from \"../LabeledInput\"\nimport { Flex } from \"../Flex\"\nimport { Spacer } from \"../..\"\nimport { Text } from \"../Text\"\n\nexport default {\n title: \"Components/Range\",\n}\n\nexport const Default = () => {\n return (\n <States<Partial<RangeProps>>\n states={[{}, { value: [1100, 3450] }, { step: 1, max: 10 }]}\n >\n <Range min={0} max={5000} step={10} onChange={action(\"onChange\")} />\n </States>\n )\n}\n\nexport const WithinModal = () => {\n return (\n <ModalBase\n width=\"100%\"\n height=\"100%\"\n dialogProps={{ width: 400, height: 400, bg: \"black5\" }}\n >\n <Box width={400} height={400}>\n <Range min={0} max={5000} step={10} onChange={action(\"onChange\")} />\n </Box>\n </ModalBase>\n )\n}\n\nexport const InContext = () => {\n const [[min, max], setMinMax] = useState<number[]>([0, 50000])\n\n return (\n <Box p={2} border=\"1px solid\" borderColor=\"black10\" width={375}>\n <Flex>\n <LabeledInput title=\"Min\" label=\"$USD\" flex={1} value={min} />\n\n <Spacer ml={1} />\n\n <LabeledInput title=\"Max\" label=\"$USD\" flex={1} value={max} />\n </Flex>\n\n <Spacer mt={1} />\n\n <Range\n min={0}\n max={50000}\n step={100}\n value={[min, max]}\n onChange={setMinMax}\n />\n\n <Spacer mt={0.5} />\n\n <Flex justifyContent=\"space-between\">\n <Text variant=\"xs\">$0</Text>\n\n <Text variant=\"xs\">$50000+</Text>\n </Flex>\n </Box>\n )\n}\n"],"file":"Range.story.js"}
@@ -0,0 +1 @@
1
+ export * from "./Range";
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ var _Range = require("./Range");
8
+
9
+ Object.keys(_Range).forEach(function (key) {
10
+ if (key === "default" || key === "__esModule") return;
11
+ if (key in exports && exports[key] === _Range[key]) return;
12
+ Object.defineProperty(exports, key, {
13
+ enumerable: true,
14
+ get: function get() {
15
+ return _Range[key];
16
+ }
17
+ });
18
+ });
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/elements/Range/index.ts"],"names":[],"mappings":";;;;;;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA","sourcesContent":["export * from \"./Range\"\n"],"file":"index.js"}
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { BorderProps, ColorProps, SpaceProps, WidthProps } from "styled-system";
2
3
  export interface SeparatorProps extends SpaceProps, WidthProps, BorderProps, ColorProps {
3
4
  }
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  interface UseClickScroll {
2
3
  trackRef?: React.MutableRefObject<HTMLElement | null>;
3
4
  thumbRef?: React.MutableRefObject<HTMLElement | null>;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  interface UseDragScroll {
2
3
  viewport?: HTMLElement | null;
3
4
  thumbRef?: React.MutableRefObject<HTMLElement | null>;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { BorderBoxProps } from "../BorderBox/BorderBoxBase";
2
3
  /**
3
4
  * A stackable border box is a BorderBox that shares borders with its siblings.
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { TextProps } from "../Text";
2
3
  export declare type SupProps = TextProps;
3
4
  export declare const Sup: import("styled-components").StyledComponentClass<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("..").BoxProps & import("styled-system").TypographyProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & Omit<import("styled-system").ColorProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol>, "color"> & {
@@ -3,11 +3,11 @@ import { BoxProps } from "../Box";
3
3
  /** SwiperRailProps */
4
4
  export declare type SwiperRailProps = BoxProps;
5
5
  /** A `SwiperRail` slides back and forth within the viewport */
6
- export declare const SwiperRail: import("styled-components").StyledComponentClass<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & BoxProps, any, import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & BoxProps>;
6
+ export declare const SwiperRail: import("styled-components").StyledComponentClass<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & BoxProps, any, React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & BoxProps>;
7
7
  /** SwiperCellProps */
8
8
  export declare type SwiperCellProps = BoxProps;
9
9
  /** A `SwiperCell` wraps a single child in the carousel */
10
- export declare const SwiperCell: import("styled-components").StyledComponentClass<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & BoxProps, any, import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & BoxProps>;
10
+ export declare const SwiperCell: import("styled-components").StyledComponentClass<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & BoxProps, any, React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & BoxProps>;
11
11
  declare type ScrollSnapAlign = "none" | "start" | "end" | "center";
12
12
  /** SwiperProps */
13
13
  export declare type SwiperProps = BoxProps & {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { TextVariant } from "@artsy/palette-tokens/dist/typography/types";
2
3
  import { ColorProps, ResponsiveValue, TypographyProps } from "styled-system";
3
4
  import { Color } from "../../Theme";
@@ -26,7 +26,7 @@ interface TextProps extends ColorProps, FontSizeProps, LineHeightProps, MaxWidth
26
26
  element?: keyof JSX.IntrinsicElements | React.ComponentType<any>;
27
27
  }
28
28
  /** Base Text component for typography */
29
- export declare const BaseText: StyledComponentClass<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & TextProps, any, import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & TextProps>;
29
+ export declare const BaseText: StyledComponentClass<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & TextProps, any, React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & TextProps>;
30
30
  /**
31
31
  * The supported typefaces
32
32
  */
@@ -114,7 +114,7 @@ export declare const Sans: StyledComponentClass<SansProps, any, {
114
114
  lineHeight?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
115
115
  italic?: boolean | undefined;
116
116
  weight?: "medium" | "regular" | null | undefined;
117
- element?: keyof JSX.IntrinsicElements | React.ComponentType<any> | undefined;
117
+ element?: React.ComponentType<any> | keyof JSX.IntrinsicElements | undefined;
118
118
  numberOfLines?: number | undefined;
119
119
  ellipsizeMode?: string | undefined;
120
120
  unstable_trackIn?: boolean | undefined;
@@ -189,7 +189,7 @@ export declare const Serif: StyledComponentClass<SerifProps, any, {
189
189
  lineHeight?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
190
190
  italic?: boolean | undefined;
191
191
  weight?: "regular" | "semibold" | null | undefined;
192
- element?: keyof JSX.IntrinsicElements | React.ComponentType<any> | undefined;
192
+ element?: React.ComponentType<any> | keyof JSX.IntrinsicElements | undefined;
193
193
  numberOfLines?: number | undefined;
194
194
  ellipsizeMode?: string | undefined;
195
195
  unstable_trackIn?: boolean | undefined;
@@ -257,7 +257,7 @@ export declare const Display: StyledComponentClass<DisplayProps, any, {
257
257
  fontSize?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
258
258
  lineHeight?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
259
259
  weight?: "regular" | null | undefined;
260
- element?: keyof JSX.IntrinsicElements | React.ComponentType<any> | undefined;
260
+ element?: React.ComponentType<any> | keyof JSX.IntrinsicElements | undefined;
261
261
  numberOfLines?: number | undefined;
262
262
  ellipsizeMode?: string | undefined;
263
263
  } & {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { BoxProps } from "../Box";
2
3
  /**
3
4
  * Visually the hide element, but present in DOM so that it is accessible
@@ -49,6 +49,7 @@ export * from "./ProgressBarTimer";
49
49
  export * from "./ProgressDots";
50
50
  export * from "./Radio";
51
51
  export * from "./RadioGroup";
52
+ export * from "./Range";
52
53
  export * from "./ReadMore";
53
54
  export * from "./ResponsiveBox";
54
55
  export * from "./Select";
@@ -667,6 +667,19 @@ Object.keys(_RadioGroup).forEach(function (key) {
667
667
  });
668
668
  });
669
669
 
670
+ var _Range = require("./Range");
671
+
672
+ Object.keys(_Range).forEach(function (key) {
673
+ if (key === "default" || key === "__esModule") return;
674
+ if (key in exports && exports[key] === _Range[key]) return;
675
+ Object.defineProperty(exports, key, {
676
+ enumerable: true,
677
+ get: function get() {
678
+ return _Range[key];
679
+ }
680
+ });
681
+ });
682
+
670
683
  var _ReadMore = require("./ReadMore");
671
684
 
672
685
  Object.keys(_ReadMore).forEach(function (key) {
@@ -1 +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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA","sourcesContent":["export * from \"./AutocompleteInput\"\nexport * from \"./Avatar\"\nexport * from \"./Badge\"\nexport * from \"./Banner\"\nexport * from \"./BaseTabs\"\nexport * from \"./BorderBox\"\nexport * from \"./BorderedRadio\"\nexport * from \"./Box\"\nexport * from \"./Breadcrumbs\"\nexport * from \"./Button\"\nexport * from \"./Cards\"\nexport * from \"./Carousel\"\nexport * from \"./CarouselBar\"\nexport * from \"./Checkbox\"\nexport * from \"./CleanTag\"\nexport * from \"./Clickable\"\nexport * from \"./Collapse\"\nexport * from \"./Colors\"\nexport * from \"./CSSGrid\"\nexport * from \"./Dialog\"\nexport * from \"./Dropdown\"\nexport * from \"./EntityHeader\"\nexport * from \"./Expandable\"\nexport * from \"./FilterSelect\"\nexport * from \"./Flex\"\nexport * from \"./FullBleed\"\nexport * from \"./Grid\"\nexport * from \"./GridColumns\"\nexport * from \"./HorizontalOverflow\"\nexport * from \"./HTML\"\nexport * from \"./IconButton\"\nexport * from \"./Image\"\nexport * from \"./Input\"\nexport * from \"./Join\"\nexport * from \"./LabeledInput\"\nexport * from \"./Link\"\nexport * from \"./Marquee\"\nexport * from \"./Menu\"\nexport * from \"./Message\"\nexport * from \"./Modal\"\nexport * from \"./ModalDialog\"\nexport * from \"./MultiSelect\"\nexport * from \"./Pagination\"\nexport * from \"./PasswordInput\"\nexport * from \"./Pill\"\nexport * from \"./Popover\"\nexport * from \"./ProgressBar\"\nexport * from \"./ProgressBarTimer\"\nexport * from \"./ProgressDots\"\nexport * from \"./Radio\"\nexport * from \"./RadioGroup\"\nexport * from \"./ReadMore\"\nexport * from \"./ResponsiveBox\"\nexport * from \"./Select\"\nexport * from \"./Separator\"\nexport * from \"./Shelf\"\nexport * from \"./ShowMore\"\nexport * from \"./Skeleton\"\nexport * from \"./Skip\"\nexport * from \"./Spacer\"\nexport * from \"./Spinner\"\nexport * from \"./StackableBorderBox\"\nexport * from \"./StaticCountdownTimer\"\nexport * from \"./Stepper\"\nexport * from \"./Sup\"\nexport * from \"./Swiper\"\nexport * from \"./Tabs\"\nexport * from \"./Tags\"\nexport * from \"./Text\"\nexport * from \"./TextArea\"\nexport * from \"./TimeRemaining\"\nexport * from \"./Toasts\"\nexport * from \"./Toggle\"\nexport * from \"./Tooltip\"\nexport * from \"./Typography\"\nexport * from \"./VisuallyHidden\"\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../src/elements/index.tsx"],"names":[],"mappings":";;;;;;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAA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AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA","sourcesContent":["export * from \"./AutocompleteInput\"\nexport * from \"./Avatar\"\nexport * from \"./Badge\"\nexport * from \"./Banner\"\nexport * from \"./BaseTabs\"\nexport * from \"./BorderBox\"\nexport * from \"./BorderedRadio\"\nexport * from \"./Box\"\nexport * from \"./Breadcrumbs\"\nexport * from \"./Button\"\nexport * from \"./Cards\"\nexport * from \"./Carousel\"\nexport * from \"./CarouselBar\"\nexport * from \"./Checkbox\"\nexport * from \"./CleanTag\"\nexport * from \"./Clickable\"\nexport * from \"./Collapse\"\nexport * from \"./Colors\"\nexport * from \"./CSSGrid\"\nexport * from \"./Dialog\"\nexport * from \"./Dropdown\"\nexport * from \"./EntityHeader\"\nexport * from \"./Expandable\"\nexport * from \"./FilterSelect\"\nexport * from \"./Flex\"\nexport * from \"./FullBleed\"\nexport * from \"./Grid\"\nexport * from \"./GridColumns\"\nexport * from \"./HorizontalOverflow\"\nexport * from \"./HTML\"\nexport * from \"./IconButton\"\nexport * from \"./Image\"\nexport * from \"./Input\"\nexport * from \"./Join\"\nexport * from \"./LabeledInput\"\nexport * from \"./Link\"\nexport * from \"./Marquee\"\nexport * from \"./Menu\"\nexport * from \"./Message\"\nexport * from \"./Modal\"\nexport * from \"./ModalDialog\"\nexport * from \"./MultiSelect\"\nexport * from \"./Pagination\"\nexport * from \"./PasswordInput\"\nexport * from \"./Pill\"\nexport * from \"./Popover\"\nexport * from \"./ProgressBar\"\nexport * from \"./ProgressBarTimer\"\nexport * from \"./ProgressDots\"\nexport * from \"./Radio\"\nexport * from \"./RadioGroup\"\nexport * from \"./Range\"\nexport * from \"./ReadMore\"\nexport * from \"./ResponsiveBox\"\nexport * from \"./Select\"\nexport * from \"./Separator\"\nexport * from \"./Shelf\"\nexport * from \"./ShowMore\"\nexport * from \"./Skeleton\"\nexport * from \"./Skip\"\nexport * from \"./Spacer\"\nexport * from \"./Spinner\"\nexport * from \"./StackableBorderBox\"\nexport * from \"./StaticCountdownTimer\"\nexport * from \"./Stepper\"\nexport * from \"./Sup\"\nexport * from \"./Swiper\"\nexport * from \"./Tabs\"\nexport * from \"./Tags\"\nexport * from \"./Text\"\nexport * from \"./TextArea\"\nexport * from \"./TimeRemaining\"\nexport * from \"./Toasts\"\nexport * from \"./Toggle\"\nexport * from \"./Tooltip\"\nexport * from \"./Typography\"\nexport * from \"./VisuallyHidden\"\n"],"file":"index.js"}
@@ -6,7 +6,7 @@ export interface IconProps extends React.SVGProps<any>, SpaceProps, PositionProp
6
6
  title?: string;
7
7
  }
8
8
  /** Wrapper for icons to include space */
9
- export declare const Icon: import("styled-components").StyledComponentClass<import("react").SVGProps<SVGSVGElement> & IconProps, any, import("react").SVGProps<SVGSVGElement> & IconProps>;
9
+ export declare const Icon: import("styled-components").StyledComponentClass<React.SVGProps<SVGSVGElement> & IconProps, any, React.SVGProps<SVGSVGElement> & IconProps>;
10
10
  /** Compatibility component used to normalize paths between react dom and react native */
11
11
  export declare const Path: FC<JSX.IntrinsicElements["path"]>;
12
12
  /** Compatibility component used to normalize titles between react dom and react native */
@@ -0,0 +1,15 @@
1
+ declare type Range = {
2
+ min: number;
3
+ max: number;
4
+ };
5
+ /**
6
+ * Remaps a value from within one range to its corresponding value in another range.
7
+ * E.g. convert between units or proportionally scale a value.
8
+ *
9
+ * @param n A numeric value
10
+ * @param from Range the value comes from
11
+ * @param to Range you wish to remap the value onto
12
+ * @returns The remapped numeric value
13
+ */
14
+ export declare const remapValue: (n: number, from: Range, to: Range) => number;
15
+ export {};
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.remapValue = void 0;
7
+
8
+ /**
9
+ * Remaps a value from within one range to its corresponding value in another range.
10
+ * E.g. convert between units or proportionally scale a value.
11
+ *
12
+ * @param n A numeric value
13
+ * @param from Range the value comes from
14
+ * @param to Range you wish to remap the value onto
15
+ * @returns The remapped numeric value
16
+ */
17
+ var remapValue = function remapValue(n, from, to) {
18
+ return (n - from.min) * (to.max - to.min) / (from.max - from.min) + to.min;
19
+ };
20
+
21
+ exports.remapValue = remapValue;
22
+ //# sourceMappingURL=remapValue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/utils/remapValue.ts"],"names":["remapValue","n","from","to","min","max"],"mappings":";;;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,IAAMA,UAAU,GAAG,SAAbA,UAAa,CAACC,CAAD,EAAYC,IAAZ,EAAyBC,EAAzB,EAAuC;AAC/D,SAAQ,CAACF,CAAC,GAAGC,IAAI,CAACE,GAAV,KAAkBD,EAAE,CAACE,GAAH,GAASF,EAAE,CAACC,GAA9B,CAAD,IAAwCF,IAAI,CAACG,GAAL,GAAWH,IAAI,CAACE,GAAxD,IAA+DD,EAAE,CAACC,GAAzE;AACD,CAFM","sourcesContent":["type Range = { min: number; max: number }\n\n/**\n * Remaps a value from within one range to its corresponding value in another range.\n * E.g. convert between units or proportionally scale a value.\n *\n * @param n A numeric value\n * @param from Range the value comes from\n * @param to Range you wish to remap the value onto\n * @returns The remapped numeric value\n */\nexport const remapValue = (n: number, from: Range, to: Range) => {\n return ((n - from.min) * (to.max - to.min)) / (from.max - from.min) + to.min\n}\n"],"file":"remapValue.js"}
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export interface UseClickOutside {
2
3
  ref: React.RefObject<HTMLElement>;
3
4
  when: boolean;
@@ -1,4 +1,4 @@
1
1
  import React from "react";
2
2
  export declare const usePortal: () => {
3
- createPortal: (children: React.ReactNode) => import("react").ReactPortal | null;
3
+ createPortal: (children: React.ReactNode) => React.ReactPortal | null;
4
4
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/usePortal.ts"],"names":["usePortal","appendEl","el","current","document","createElement","body","appendChild","removeChild","createPortal","children","window"],"mappings":";;;;;;;AAAA;;AACA;;AAEO,IAAMA,SAAS,GAAG,SAAZA,SAAY,GAAM;AAC7B,MAAMC,QAAQ,GAAG,mBAA8B,IAA9B,CAAjB;AAEA,wBAAU,YAAM;AAAA;;AACd,QAAMC,EAAE,wBAAGD,QAAQ,CAACE,OAAZ,iEAAuBC,QAAQ,CAACC,aAAT,CAAuB,KAAvB,CAA/B;AACAJ,IAAAA,QAAQ,CAACE,OAAT,GAAmBD,EAAnB;AAEAE,IAAAA,QAAQ,CAACE,IAAT,CAAcC,WAAd,CAA0BL,EAA1B;AAEA,WAAO,YAAM;AACXE,MAAAA,QAAQ,CAACE,IAAT,CAAcE,WAAd,CAA0BN,EAA1B;AACD,KAFD;AAGD,GATD,EASG,EATH;AAWA,MAAMO,YAAY,GAAG,wBAAY,UAACC,QAAD,EAA+B;AAAA;;AAC9D,QAAI,OAAOC,MAAP,KAAkB,WAAtB,EAAmC,OAAO,IAAP,CAD2B,CAG9D;;AACA,QAAMT,EAAE,yBAAGD,QAAQ,CAACE,OAAZ,mEAAuBC,QAAQ,CAACC,aAAT,CAAuB,KAAvB,CAA/B;AACAJ,IAAAA,QAAQ,CAACE,OAAT,GAAmBD,EAAnB;AAEA,wBAAO,4BAAiBQ,QAAjB,EAA2BR,EAA3B,CAAP;AACD,GARoB,EAQlB,EARkB,CAArB;AAUA,SAAO;AAAEO,IAAAA,YAAY,EAAZA;AAAF,GAAP;AACD,CAzBM","sourcesContent":["import React, { useEffect, useRef, useCallback } from \"react\"\nimport { createPortal as __createPortal__ } from \"react-dom\"\n\nexport const usePortal = () => {\n const appendEl = useRef<HTMLDivElement | null>(null)\n\n useEffect(() => {\n const el = appendEl.current ?? document.createElement(\"div\")\n appendEl.current = el\n\n document.body.appendChild(el)\n\n return () => {\n document.body.removeChild(el)\n }\n }, [])\n\n const createPortal = useCallback((children: React.ReactNode) => {\n if (typeof window === \"undefined\") return null\n\n // May execute before effect runs and appendEl is set\n const el = appendEl.current ?? document.createElement(\"div\")\n appendEl.current = el\n\n return __createPortal__(children, el)\n }, [])\n\n return { createPortal }\n}\n"],"file":"usePortal.js"}
1
+ {"version":3,"sources":["../../src/utils/usePortal.ts"],"names":["usePortal","appendEl","el","current","document","createElement","body","appendChild","removeChild","createPortal","children","window"],"mappings":";;;;;;;AAAA;;AACA;;AAEO,IAAMA,SAAS,GAAG,SAAZA,SAAY,GAAM;AAC7B,MAAMC,QAAQ,GAAG,mBAA8B,IAA9B,CAAjB;AAEA,wBAAU,YAAM;AAAA;;AACd,QAAMC,EAAE,wBAAGD,QAAQ,CAACE,OAAZ,iEAAuBC,QAAQ,CAACC,aAAT,CAAuB,KAAvB,CAA/B;AACAJ,IAAAA,QAAQ,CAACE,OAAT,GAAmBD,EAAnB;AAEAE,IAAAA,QAAQ,CAACE,IAAT,CAAcC,WAAd,CAA0BL,EAA1B;AAEA,WAAO,YAAM;AACXE,MAAAA,QAAQ,CAACE,IAAT,CAAcE,WAAd,CAA0BN,EAA1B;AACD,KAFD;AAGD,GATD,EASG,EATH;AAWA,MAAMO,YAAY,GAAG,wBACnB,UAACC,QAAD,EAAyD;AAAA;;AACvD,QAAI,OAAOC,MAAP,KAAkB,WAAtB,EAAmC,OAAO,IAAP,CADoB,CAGvD;;AACA,QAAMT,EAAE,yBAAGD,QAAQ,CAACE,OAAZ,mEAAuBC,QAAQ,CAACC,aAAT,CAAuB,KAAvB,CAA/B;AACAJ,IAAAA,QAAQ,CAACE,OAAT,GAAmBD,EAAnB;AAEA,wBAAO,4BAAiBQ,QAAjB,EAA2BR,EAA3B,CAAP;AACD,GATkB,EAUnB,EAVmB,CAArB;AAaA,SAAO;AAAEO,IAAAA,YAAY,EAAZA;AAAF,GAAP;AACD,CA5BM","sourcesContent":["import React, { useEffect, useRef, useCallback } from \"react\"\nimport { createPortal as __createPortal__ } from \"react-dom\"\n\nexport const usePortal = () => {\n const appendEl = useRef<HTMLDivElement | null>(null)\n\n useEffect(() => {\n const el = appendEl.current ?? document.createElement(\"div\")\n appendEl.current = el\n\n document.body.appendChild(el)\n\n return () => {\n document.body.removeChild(el)\n }\n }, [])\n\n const createPortal = useCallback(\n (children: React.ReactNode): React.ReactPortal | null => {\n if (typeof window === \"undefined\") return null\n\n // May execute before effect runs and appendEl is set\n const el = appendEl.current ?? document.createElement(\"div\")\n appendEl.current = el\n\n return __createPortal__(children, el)\n },\n []\n )\n\n return { createPortal }\n}\n"],"file":"usePortal.js"}
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  interface UseWidthOf {
2
3
  ref: React.MutableRefObject<HTMLElement | null>;
3
4
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artsy/palette",
3
- "version": "19.6.0",
3
+ "version": "19.7.0",
4
4
  "description": "Design system library for react components",
5
5
  "main": "dist/index.js",
6
6
  "publishConfig": {
@@ -123,7 +123,7 @@
123
123
  "luxon": "^1.15",
124
124
  "proportional-scale": "^4.0.0",
125
125
  "react-lazy-load-image-component": "1.5.0",
126
- "react-remove-scroll": "^2.3.0",
126
+ "react-remove-scroll": "2.5.0",
127
127
  "styled-bootstrap-grid": "3.1.0",
128
128
  "styled-system": "^5.1.5",
129
129
  "trunc-html": "^1.1.2",
@@ -178,5 +178,5 @@
178
178
  "<rootDir>/www/"
179
179
  ]
180
180
  },
181
- "gitHead": "d3c41d9ad04611139d903b5b00cf549cc4372240"
181
+ "gitHead": "1fad0d96c1c0f9e8f8b75cd481df9d461ba438f9"
182
182
  }