reshaped 2.1.0 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -5
- package/LICENSE-SOURCE.md +40 -0
- package/LICENSE.md +21 -37
- package/bin/clean.sh +1 -0
- package/bin/release-source.sh +7 -0
- package/bundle.css +1 -1
- package/bundle.d.ts +2 -0
- package/bundle.js +10 -10
- package/cli/theming/definitions/figma.js +2 -2
- package/cli/theming/definitions/reshaped.js +3 -3
- package/components/Actionable/Actionable.module.css +1 -1
- package/components/Button/Button.module.css +1 -1
- package/components/Button/tests/Button.stories.js +4 -0
- package/components/Checkbox/Checkbox.module.css +1 -1
- package/components/Dismissible/Dismissible.module.css +1 -1
- package/components/Divider/Divider.module.css +1 -1
- package/components/DropdownMenu/DropdownMenu.js +1 -1
- package/components/MenuItem/MenuItem.module.css +1 -1
- package/components/Modal/Modal.module.css +1 -1
- package/components/Radio/Radio.module.css +1 -1
- package/components/Scrim/Scrim.module.css +1 -1
- package/components/Select/Select.js +1 -1
- package/components/Select/Select.module.css +1 -1
- package/components/Slider/Slider.d.ts +4 -0
- package/components/Slider/Slider.js +26 -0
- package/components/Slider/Slider.module.css +1 -0
- package/components/Slider/Slider.types.d.ts +78 -0
- package/components/Slider/SliderControlled.d.ts +4 -0
- package/components/Slider/SliderControlled.js +172 -0
- package/components/Slider/SliderThumb.d.ts +4 -0
- package/components/Slider/SliderThumb.js +21 -0
- package/components/Slider/SliderUncontrolled.d.ts +4 -0
- package/components/Slider/SliderUncontrolled.js +32 -0
- package/components/Slider/index.d.ts +2 -0
- package/components/Slider/index.js +1 -0
- package/components/Slider/tests/Slider.stories.d.ts +10 -0
- package/components/Slider/tests/Slider.stories.js +42 -0
- package/components/Switch/Switch.module.css +1 -1
- package/components/Tabs/Tabs.module.css +1 -1
- package/components/TextField/TextField.module.css +1 -1
- package/components/View/View.module.css +1 -1
- package/components/_private/Flyout/Flyout.types.d.ts +2 -0
- package/components/_private/Flyout/FlyoutContent.js +4 -2
- package/components/_private/Flyout/FlyoutControlled.js +8 -1
- package/components/_private/Portal/Portal.d.ts +1 -0
- package/config/next.d.ts +4 -0
- package/config/next.js +22 -0
- package/index.d.ts +2 -0
- package/index.js +1 -0
- package/package.json +41 -27
- package/themes/figma/theme.css +1 -1
- package/themes/reshaped/theme.css +1 -1
- package/themes/slate/theme.css +1 -1
- package/utilities/helpers.d.ts +2 -1
- package/utilities/helpers.js +10 -1
- package/cli/theming/definitions/minimal.d.ts +0 -3
- package/cli/theming/definitions/minimal.js +0 -80
- package/styles/aspectRatio/index.test.js +0 -24
- package/styles/bleed/index.test.d.ts +0 -1
- package/styles/bleed/index.test.js +0 -24
- package/styles/height/index.test.d.ts +0 -1
- package/styles/height/index.test.js +0 -27
- package/styles/inset/index.test.d.ts +0 -1
- package/styles/inset/index.test.js +0 -27
- package/styles/maxHeight/index.test.d.ts +0 -1
- package/styles/maxHeight/index.test.js +0 -27
- package/styles/maxWidth/index.test.d.ts +0 -1
- package/styles/maxWidth/index.test.js +0 -27
- package/styles/padding/index.test.d.ts +0 -1
- package/styles/padding/index.test.js +0 -24
- package/styles/position/index.test.d.ts +0 -1
- package/styles/position/index.test.js +0 -21
- package/styles/radius/index.test.d.ts +0 -1
- package/styles/radius/index.test.js +0 -24
- package/styles/width/index.test.d.ts +0 -1
- package/styles/width/index.test.js +0 -27
- package/themes/minimal/theme.css +0 -1
- package/utilities/testPresets.d.ts +0 -25
- package/utilities/testPresets.js +0 -76
- package/utilities/tests/Chain.test.d.ts +0 -1
- package/utilities/tests/Chain.test.js +0 -45
- /package/bin/{copy-release.sh → release-copy.sh} +0 -0
- /package/{styles/aspectRatio/index.test.d.ts → components/Slider/Slider.types.js} +0 -0
@@ -1 +1 @@
|
|
1
|
-
[data-rs-theme=reshaped][data-rs-color-mode=dark],[data-rs-theme=reshaped][data-rs-color-mode=light]{--rs-font-family-title:Inter,BlinkMacSystemFont,-apple-system,
|
1
|
+
[data-rs-theme=reshaped][data-rs-color-mode=dark],[data-rs-theme=reshaped][data-rs-color-mode=light]{--rs-font-family-title:Inter,BlinkMacSystemFont,-apple-system,Roboto,Helvetica,Arial,sans-serif;--rs-font-family-body:Inter,BlinkMacSystemFont,-apple-system,Roboto,Helvetica,Arial,sans-serif;--rs-font-weight-regular:400;--rs-font-weight-medium:500;--rs-font-weight-semibold:600;--rs-font-weight-bold:700;--rs-font-weight-heavy:800;--rs-font-weight-black:900;--rs-font-size-title-1:96px;--rs-line-height-title-1:100px;--rs-font-family-title-1:var(--rs-font-family-title);--rs-font-weight-title-1:var(--rs-font-weight-heavy);--rs-font-size-title-2:80px;--rs-line-height-title-2:84px;--rs-font-family-title-2:var(--rs-font-family-title);--rs-font-weight-title-2:var(--rs-font-weight-heavy);--rs-font-size-title-3:64px;--rs-line-height-title-3:68px;--rs-font-family-title-3:var(--rs-font-family-title);--rs-font-weight-title-3:var(--rs-font-weight-heavy);--rs-font-size-title-4:56px;--rs-line-height-title-4:60px;--rs-font-family-title-4:var(--rs-font-family-title);--rs-font-weight-title-4:var(--rs-font-weight-bold);--rs-font-size-title-5:48px;--rs-line-height-title-5:52px;--rs-font-family-title-5:var(--rs-font-family-title);--rs-font-weight-title-5:var(--rs-font-weight-bold);--rs-font-size-title-6:36px;--rs-line-height-title-6:40px;--rs-font-family-title-6:var(--rs-font-family-title);--rs-font-weight-title-6:var(--rs-font-weight-bold);--rs-font-size-featured-1:32px;--rs-line-height-featured-1:40px;--rs-font-family-featured-1:var(--rs-font-family-body);--rs-font-size-featured-2:24px;--rs-line-height-featured-2:32px;--rs-font-family-featured-2:var(--rs-font-family-body);--rs-font-size-featured-3:20px;--rs-line-height-featured-3:28px;--rs-font-family-featured-3:var(--rs-font-family-body);--rs-font-size-body-1:18px;--rs-line-height-body-1:28px;--rs-font-family-body-1:var(--rs-font-family-body);--rs-font-size-body-2:16px;--rs-line-height-body-2:24px;--rs-font-family-body-2:var(--rs-font-family-body);--rs-font-size-body-3:14px;--rs-line-height-body-3:20px;--rs-font-family-body-3:var(--rs-font-family-body);--rs-font-size-caption-1:12px;--rs-line-height-caption-1:16px;--rs-font-family-caption-1:var(--rs-font-family-body);--rs-font-size-caption-2:10px;--rs-line-height-caption-2:12px;--rs-font-family-caption-2:var(--rs-font-family-body);--rs-unit-base:4px;--rs-unit-radius-small:4px;--rs-unit-radius-medium:8px;--rs-unit-radius-large:12px;--rs-unit-x1:4px;--rs-unit-x2:8px;--rs-unit-x3:12px;--rs-unit-x4:16px;--rs-unit-x5:20px;--rs-unit-x6:24px;--rs-unit-x7:28px;--rs-unit-x8:32px;--rs-unit-x9:36px;--rs-unit-x10:40px;--rs-color-black:#000;--rs-color-white:#fff;--rs-color-on-background-primary:#fff;--rs-color-on-background-positive:#fff;--rs-color-on-background-critical:#fff;--rs-color-rgb-black:0,0,0;--rs-color-rgb-white:255,255,255;--rs-duration-fast:200ms;--rs-duration-medium:300ms;--rs-duration-slow:400ms;--rs-easing-standard:cubic-bezier(0.4,0,0.2,1);--rs-easing-accelerate:cubic-bezier(0.4,0,1,1);--rs-easing-decelerate:cubic-bezier(0,0,0.2,1);--rs-shadow-raised:0px 2px 3px rgba(0,0,0,.1),0px 1px 2px -1px rgba(0,0,0,.1);--rs-shadow-overlay:0px 5px 10px rgba(0,0,0,.05),0px 15px 25px rgba(0,0,0,.07)}[data-rs-theme=reshaped][data-rs-color-mode=light]{--rs-color-foreground-neutral:#14171f;--rs-color-foreground-neutral-faded:#4d5874;--rs-color-foreground-disabled:#c7cddb;--rs-color-foreground-primary:#4d4be7;--rs-color-foreground-positive:#05751f;--rs-color-foreground-critical:#cb101d;--rs-color-background-neutral:#dfe2ea;--rs-color-background-neutral-faded:#f3f4f6;--rs-color-background-neutral-highlighted:#d4d8e3;--rs-color-background-disabled:#eceef3;--rs-color-background-disabled-faded:#f4f5f7;--rs-color-background-primary:#5a58f2;--rs-color-background-primary-highlighted:#6d6bf5;--rs-color-background-primary-faded:#edecfd;--rs-color-background-positive:#118850;--rs-color-background-positive-faded:#ebfef6;--rs-color-background-positive-highlighted:#009950;--rs-color-background-critical:#e22c2c;--rs-color-background-critical-faded:#fef1f2;--rs-color-background-critical-highlighted:#eb4747;--rs-color-border-neutral:#bbc1d3;--rs-color-border-neutral-faded:#dfe2ea;--rs-color-border-disabled:#dfe2ea;--rs-color-border-primary:#4d4be7;--rs-color-border-primary-faded:#d7d5fb;--rs-color-border-positive:#05751f;--rs-color-border-positive-faded:#cdedd5;--rs-color-border-critical:#cb101d;--rs-color-border-critical-faded:#fbd5d8;--rs-color-background-page:#fff;--rs-color-background-page-faded:#fafafa;--rs-color-background-elevation-base:#fff;--rs-color-background-elevation-raised:#fff;--rs-color-background-elevation-overlay:#fff;--rs-color-on-background-neutral:#000;--rs-color-rgb-background-neutral:223,226,234;--rs-color-rgb-background-neutral-faded:243,244,246;--rs-color-rgb-background-neutral-highlighted:212,216,227;--rs-color-rgb-background-disabled:236,238,243;--rs-color-rgb-background-disabled-faded:244,245,247;--rs-color-rgb-background-primary:90,88,242;--rs-color-rgb-background-primary-highlighted:109,107,245;--rs-color-rgb-background-primary-faded:237,236,253;--rs-color-rgb-background-positive:17,136,80;--rs-color-rgb-background-positive-faded:235,254,246;--rs-color-rgb-background-positive-highlighted:0,153,80;--rs-color-rgb-background-critical:226,44,44;--rs-color-rgb-background-critical-faded:254,241,242;--rs-color-rgb-background-critical-highlighted:235,71,71;--rs-color-rgb-background-page:255,255,255;--rs-color-rgb-background-page-faded:250,250,250;--rs-color-rgb-background-elevation-base:255,255,255;--rs-color-rgb-background-elevation-raised:255,255,255;--rs-color-rgb-background-elevation-overlay:255,255,255}[data-rs-theme=reshaped][data-rs-color-mode=dark]{--rs-color-foreground-neutral:#eff0f1;--rs-color-foreground-neutral-faded:#c2c8d6;--rs-color-foreground-disabled:#404a63;--rs-color-foreground-primary:#9d9cf7;--rs-color-foreground-positive:#03ab5f;--rs-color-foreground-critical:#eb6666;--rs-color-background-neutral:#384056;--rs-color-background-neutral-faded:#242838;--rs-color-background-neutral-highlighted:#404a63;--rs-color-background-disabled:#1c202b;--rs-color-background-disabled-faded:#161922;--rs-color-background-primary:#5250f2;--rs-color-background-primary-highlighted:#5f5df4;--rs-color-background-primary-faded:#24254c;--rs-color-background-positive:#06743f;--rs-color-background-positive-faded:#0f2921;--rs-color-background-positive-highlighted:#008545;--rs-color-background-critical:#ab1717;--rs-color-background-critical-faded:#2f1e1f;--rs-color-background-critical-highlighted:#c11515;--rs-color-border-neutral:#49536f;--rs-color-border-neutral-faded:#313649;--rs-color-border-disabled:#242938;--rs-color-border-primary:#7d7bf4;--rs-color-border-primary-faded:#2e3160;--rs-color-border-positive:#03a059;--rs-color-border-positive-faded:#163c30;--rs-color-border-critical:#e95454;--rs-color-border-critical-faded:#412a2b;--rs-color-background-page:#0d1117;--rs-color-background-page-faded:#0f131a;--rs-color-background-elevation-base:#14181f;--rs-color-background-elevation-raised:#181d25;--rs-color-background-elevation-overlay:#1c212b;--rs-color-on-background-neutral:#fff;--rs-color-rgb-background-neutral:56,64,86;--rs-color-rgb-background-neutral-faded:36,40,56;--rs-color-rgb-background-neutral-highlighted:64,74,99;--rs-color-rgb-background-disabled:28,32,43;--rs-color-rgb-background-disabled-faded:22,25,34;--rs-color-rgb-background-primary:82,80,242;--rs-color-rgb-background-primary-highlighted:95,93,244;--rs-color-rgb-background-primary-faded:36,37,76;--rs-color-rgb-background-positive:6,116,63;--rs-color-rgb-background-positive-faded:15,41,33;--rs-color-rgb-background-positive-highlighted:0,133,69;--rs-color-rgb-background-critical:171,23,23;--rs-color-rgb-background-critical-faded:47,30,31;--rs-color-rgb-background-critical-highlighted:193,21,21;--rs-color-rgb-background-page:13,17,23;--rs-color-rgb-background-page-faded:15,19,26;--rs-color-rgb-background-elevation-base:20,24,31;--rs-color-rgb-background-elevation-raised:24,29,37;--rs-color-rgb-background-elevation-overlay:28,33,43}
|
package/themes/slate/theme.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
[data-rs-theme=slate][data-rs-color-mode=dark],[data-rs-theme=slate][data-rs-color-mode=light]{--rs-font-family-title:Inter,BlinkMacSystemFont,-apple-system,
|
1
|
+
[data-rs-theme=slate][data-rs-color-mode=dark],[data-rs-theme=slate][data-rs-color-mode=light]{--rs-font-family-title:Inter,BlinkMacSystemFont,-apple-system,Roboto,Helvetica,Arial,sans-serif;--rs-font-family-body:Inter,BlinkMacSystemFont,-apple-system,Roboto,Helvetica,Arial,sans-serif;--rs-font-weight-regular:400;--rs-font-weight-medium:500;--rs-font-weight-semibold:600;--rs-font-weight-bold:700;--rs-font-weight-heavy:800;--rs-font-weight-black:900;--rs-font-size-title-1:96px;--rs-line-height-title-1:100px;--rs-font-family-title-1:var(--rs-font-family-title);--rs-font-weight-title-1:var(--rs-font-weight-heavy);--rs-font-size-title-2:80px;--rs-line-height-title-2:84px;--rs-font-family-title-2:var(--rs-font-family-title);--rs-font-weight-title-2:var(--rs-font-weight-heavy);--rs-font-size-title-3:64px;--rs-line-height-title-3:68px;--rs-font-family-title-3:var(--rs-font-family-title);--rs-font-weight-title-3:var(--rs-font-weight-heavy);--rs-font-size-title-4:56px;--rs-line-height-title-4:60px;--rs-font-family-title-4:var(--rs-font-family-title);--rs-font-weight-title-4:var(--rs-font-weight-bold);--rs-font-size-title-5:48px;--rs-line-height-title-5:52px;--rs-font-family-title-5:var(--rs-font-family-title);--rs-font-weight-title-5:var(--rs-font-weight-bold);--rs-font-size-title-6:36px;--rs-line-height-title-6:40px;--rs-font-family-title-6:var(--rs-font-family-title);--rs-font-weight-title-6:var(--rs-font-weight-bold);--rs-font-size-featured-1:32px;--rs-line-height-featured-1:40px;--rs-font-family-featured-1:var(--rs-font-family-body);--rs-font-size-featured-2:24px;--rs-line-height-featured-2:32px;--rs-font-family-featured-2:var(--rs-font-family-body);--rs-font-size-featured-3:20px;--rs-line-height-featured-3:28px;--rs-font-family-featured-3:var(--rs-font-family-body);--rs-font-size-body-1:18px;--rs-line-height-body-1:28px;--rs-font-family-body-1:var(--rs-font-family-body);--rs-font-size-body-2:16px;--rs-line-height-body-2:24px;--rs-font-family-body-2:var(--rs-font-family-body);--rs-font-size-body-3:14px;--rs-line-height-body-3:20px;--rs-font-family-body-3:var(--rs-font-family-body);--rs-font-size-caption-1:12px;--rs-line-height-caption-1:16px;--rs-font-family-caption-1:var(--rs-font-family-body);--rs-font-size-caption-2:10px;--rs-line-height-caption-2:12px;--rs-font-family-caption-2:var(--rs-font-family-body);--rs-unit-base:4px;--rs-unit-radius-small:2px;--rs-unit-radius-medium:4px;--rs-unit-radius-large:6px;--rs-unit-x1:4px;--rs-unit-x2:8px;--rs-unit-x3:12px;--rs-unit-x4:16px;--rs-unit-x5:20px;--rs-unit-x6:24px;--rs-unit-x7:28px;--rs-unit-x8:32px;--rs-unit-x9:36px;--rs-unit-x10:40px;--rs-color-black:#000;--rs-color-white:#fff;--rs-color-on-background-primary:#fff;--rs-color-on-background-positive:#fff;--rs-color-on-background-critical:#fff;--rs-color-rgb-black:0,0,0;--rs-color-rgb-white:255,255,255;--rs-duration-fast:200ms;--rs-duration-medium:300ms;--rs-duration-slow:400ms;--rs-easing-standard:cubic-bezier(0.4,0,0.2,1);--rs-easing-accelerate:cubic-bezier(0.4,0,1,1);--rs-easing-decelerate:cubic-bezier(0,0,0.2,1);--rs-shadow-raised:0px 2px 3px rgba(0,0,0,.1),0px 1px 2px -1px rgba(0,0,0,.1);--rs-shadow-overlay:0px 5px 10px rgba(0,0,0,.05),0px 15px 25px rgba(0,0,0,.07)}[data-rs-theme=slate][data-rs-color-mode=light]{--rs-color-foreground-neutral:#161a26;--rs-color-foreground-neutral-faded:#717787;--rs-color-foreground-disabled:#d4d0d0;--rs-color-foreground-primary:#2383e2;--rs-color-foreground-positive:#05751f;--rs-color-foreground-critical:#cb101d;--rs-color-background-neutral:#e3e3e5;--rs-color-background-neutral-faded:#f2f3f5;--rs-color-background-neutral-highlighted:#dedee1;--rs-color-background-disabled:#eceef3;--rs-color-background-disabled-faded:#f4f5f7;--rs-color-background-primary:#2383e2;--rs-color-background-primary-highlighted:#3273cc;--rs-color-background-primary-faded:#e5f4fb;--rs-color-background-positive:#118850;--rs-color-background-positive-faded:#ebfef6;--rs-color-background-positive-highlighted:#009950;--rs-color-background-critical:#e22c2c;--rs-color-background-critical-faded:#fef1f2;--rs-color-background-critical-highlighted:#eb4747;--rs-color-border-neutral:#d2d2d2;--rs-color-border-neutral-faded:#e2e2e2;--rs-color-border-disabled:#e2e2e2;--rs-color-border-primary:#3d76c7;--rs-color-border-primary-faded:#c6d9f4;--rs-color-border-positive:#05751f;--rs-color-border-positive-faded:#cdedd5;--rs-color-border-critical:#cb101d;--rs-color-border-critical-faded:#fbd5d8;--rs-color-background-page:#fff;--rs-color-background-page-faded:#f7f7f5;--rs-color-background-elevation-base:#fff;--rs-color-background-elevation-raised:#fff;--rs-color-background-elevation-overlay:#fff;--rs-color-on-background-neutral:#000;--rs-color-rgb-background-neutral:227,227,229;--rs-color-rgb-background-neutral-faded:242,243,245;--rs-color-rgb-background-neutral-highlighted:222,222,225;--rs-color-rgb-background-disabled:236,238,243;--rs-color-rgb-background-disabled-faded:244,245,247;--rs-color-rgb-background-primary:35,131,226;--rs-color-rgb-background-primary-highlighted:50,115,204;--rs-color-rgb-background-primary-faded:229,244,251;--rs-color-rgb-background-positive:17,136,80;--rs-color-rgb-background-positive-faded:235,254,246;--rs-color-rgb-background-positive-highlighted:0,153,80;--rs-color-rgb-background-critical:226,44,44;--rs-color-rgb-background-critical-faded:254,241,242;--rs-color-rgb-background-critical-highlighted:235,71,71;--rs-color-rgb-background-page:255,255,255;--rs-color-rgb-background-page-faded:247,247,245;--rs-color-rgb-background-elevation-base:255,255,255;--rs-color-rgb-background-elevation-raised:255,255,255;--rs-color-rgb-background-elevation-overlay:255,255,255}[data-rs-theme=slate][data-rs-color-mode=dark]{--rs-color-foreground-neutral:#f2f3f5;--rs-color-foreground-neutral-faded:#9f9e9e;--rs-color-foreground-disabled:#656565;--rs-color-foreground-primary:#5098ff;--rs-color-foreground-positive:#03ab5f;--rs-color-foreground-critical:#eb6666;--rs-color-background-neutral:#4f5155;--rs-color-background-neutral-faded:#34363f;--rs-color-background-neutral-highlighted:#595c60;--rs-color-background-disabled:#313131;--rs-color-background-disabled-faded:#262626;--rs-color-background-primary:#4281db;--rs-color-background-primary-highlighted:#3273cc;--rs-color-background-primary-faded:#1e2c45;--rs-color-background-positive:#06743f;--rs-color-background-positive-faded:#0f2921;--rs-color-background-positive-highlighted:#008545;--rs-color-background-critical:#ab1717;--rs-color-background-critical-faded:#2f1e1f;--rs-color-background-critical-highlighted:#c11515;--rs-color-border-neutral:#414141;--rs-color-border-neutral-faded:#464646;--rs-color-border-disabled:#404040;--rs-color-border-primary:#5a91e0;--rs-color-border-primary-faded:#163a6a;--rs-color-border-positive:#03a059;--rs-color-border-positive-faded:#163c30;--rs-color-border-critical:#e95454;--rs-color-border-critical-faded:#412a2b;--rs-color-background-page:#191919;--rs-color-background-page-faded:#202020;--rs-color-background-elevation-base:#232323;--rs-color-background-elevation-raised:#262626;--rs-color-background-elevation-overlay:#292929;--rs-color-on-background-neutral:#fff;--rs-color-rgb-background-neutral:79,81,85;--rs-color-rgb-background-neutral-faded:52,54,63;--rs-color-rgb-background-neutral-highlighted:89,92,96;--rs-color-rgb-background-disabled:49,49,49;--rs-color-rgb-background-disabled-faded:38,38,38;--rs-color-rgb-background-primary:66,129,219;--rs-color-rgb-background-primary-highlighted:50,115,204;--rs-color-rgb-background-primary-faded:30,44,69;--rs-color-rgb-background-positive:6,116,63;--rs-color-rgb-background-positive-faded:15,41,33;--rs-color-rgb-background-positive-highlighted:0,133,69;--rs-color-rgb-background-critical:171,23,23;--rs-color-rgb-background-critical-faded:47,30,31;--rs-color-rgb-background-critical-highlighted:193,21,21;--rs-color-rgb-background-page:25,25,25;--rs-color-rgb-background-page-faded:32,32,32;--rs-color-rgb-background-elevation-base:35,35,35;--rs-color-rgb-background-elevation-raised:38,38,38;--rs-color-rgb-background-elevation-overlay:41,41,41}
|
package/utilities/helpers.d.ts
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import type * as G from "../types/global";
|
3
3
|
export declare const debounce: <T extends Function>(cb: T, wait?: number) => T;
|
4
|
-
export declare function debounceHandler<T extends React.SyntheticEvent>(handler: (event: T) => void, timeout: number): (event: T) => void;
|
4
|
+
export declare function debounceHandler<T extends React.SyntheticEvent | Event>(handler: (event: T) => void, timeout: number): (event: T) => void;
|
5
5
|
export declare const throttle: <T extends Function>(cb: T, wait: number) => (...args: unknown[]) => void;
|
6
|
+
export declare function throttleHandler<T extends React.SyntheticEvent | Event>(handler: (event: T) => void, timeout: number): (event: T) => void;
|
6
7
|
type Value = string | boolean | number | undefined;
|
7
8
|
type ClassNameResolver = string | ((value: Value) => string);
|
8
9
|
export declare const classNames: (...args: G.ClassName[]) => string;
|
package/utilities/helpers.js
CHANGED
@@ -10,7 +10,8 @@ export const debounce = (cb, wait = 20) => {
|
|
10
10
|
export function debounceHandler(handler, timeout) {
|
11
11
|
const debounced = debounce(handler, timeout);
|
12
12
|
return (event) => {
|
13
|
-
event
|
13
|
+
if ("persist" in event)
|
14
|
+
event.persist();
|
14
15
|
return debounced(event);
|
15
16
|
};
|
16
17
|
}
|
@@ -31,6 +32,14 @@ export const throttle = (cb, wait) => {
|
|
31
32
|
}
|
32
33
|
};
|
33
34
|
};
|
35
|
+
export function throttleHandler(handler, timeout) {
|
36
|
+
const throttled = throttle(handler, timeout);
|
37
|
+
return (event) => {
|
38
|
+
if ("persist" in event)
|
39
|
+
event.persist();
|
40
|
+
return throttled(event);
|
41
|
+
};
|
42
|
+
}
|
34
43
|
export const classNames = (...args) => {
|
35
44
|
return args.reduce((acc, cur) => {
|
36
45
|
if (Array.isArray(cur)) {
|
@@ -1,80 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
-
};
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
const reshaped_1 = __importDefault(require("./reshaped"));
|
7
|
-
const theme = Object.assign(Object.assign({}, reshaped_1.default), { color: Object.assign(Object.assign({}, reshaped_1.default.color), { foregroundNeutral: {
|
8
|
-
hex: "#161a26",
|
9
|
-
hexDark: "#f2f3f5",
|
10
|
-
}, foregroundNeutralFaded: {
|
11
|
-
hex: "#717787",
|
12
|
-
hexDark: "#9f9e9e",
|
13
|
-
}, foregroundPrimary: {
|
14
|
-
hex: "#2383e2",
|
15
|
-
hexDark: "#5098ff",
|
16
|
-
}, foregroundDisabled: {
|
17
|
-
hex: "#d4d0d0",
|
18
|
-
hexDark: "#656565",
|
19
|
-
}, backgroundPrimary: {
|
20
|
-
hex: "#2383e2",
|
21
|
-
hexDark: "#4281DB",
|
22
|
-
}, backgroundPrimaryFaded: {
|
23
|
-
hex: "#e5f4fb",
|
24
|
-
hexDark: "#1e2c45",
|
25
|
-
}, backgroundPrimaryHighlighted: {
|
26
|
-
hex: "#3273CC",
|
27
|
-
hexDark: "#3273CC",
|
28
|
-
}, backgroundElevationBase: {
|
29
|
-
hex: "#ffffff",
|
30
|
-
hexDark: "#232323",
|
31
|
-
}, backgroundElevationRaised: {
|
32
|
-
hex: "#ffffff",
|
33
|
-
hexDark: "#262626",
|
34
|
-
}, backgroundElevationOverlay: {
|
35
|
-
hex: "#ffffff",
|
36
|
-
hexDark: "#292929",
|
37
|
-
}, backgroundNeutral: {
|
38
|
-
hex: "#e3e3e5",
|
39
|
-
hexDark: "#4f5155",
|
40
|
-
}, backgroundNeutralFaded: {
|
41
|
-
hex: "#f2f3f5",
|
42
|
-
hexDark: "#34363f",
|
43
|
-
}, backgroundNeutralHighlighted: {
|
44
|
-
hex: "#dedee1",
|
45
|
-
hexDark: "#595c60",
|
46
|
-
}, backgroundPage: {
|
47
|
-
hex: "#ffffff",
|
48
|
-
hexDark: "#191919",
|
49
|
-
}, backgroundPageFaded: {
|
50
|
-
hex: "#F7F7F5",
|
51
|
-
hexDark: "#202020",
|
52
|
-
}, backgroundDisabled: {
|
53
|
-
hex: "#ECEEF3",
|
54
|
-
hexDark: "#313131",
|
55
|
-
}, backgroundDisabledFaded: {
|
56
|
-
hex: "#F4F5F7",
|
57
|
-
hexDark: "#262626",
|
58
|
-
}, borderPrimary: {
|
59
|
-
hex: "#3D76C7",
|
60
|
-
hexDark: "#5A91E0",
|
61
|
-
}, borderPrimaryFaded: {
|
62
|
-
hex: "#c6d9f4",
|
63
|
-
hexDark: "#163a6a",
|
64
|
-
}, borderNeutral: {
|
65
|
-
hex: "#d2d2d2",
|
66
|
-
hexDark: "#414141",
|
67
|
-
}, borderNeutralFaded: {
|
68
|
-
hex: "#E2E2E2",
|
69
|
-
hexDark: "#464646",
|
70
|
-
}, borderDisabled: {
|
71
|
-
hex: "#E2E2E2",
|
72
|
-
hexDark: "#404040",
|
73
|
-
} }), unit: Object.assign(Object.assign({}, reshaped_1.default.unit), { radiusSmall: {
|
74
|
-
px: 2,
|
75
|
-
}, radiusMedium: {
|
76
|
-
px: 4,
|
77
|
-
}, radiusLarge: {
|
78
|
-
px: 6,
|
79
|
-
} }) });
|
80
|
-
exports.default = theme;
|
@@ -1,24 +0,0 @@
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
8
|
-
});
|
9
|
-
};
|
10
|
-
import getAspectRatioStyles from "./index.js";
|
11
|
-
describe("Styles/AspectRatio", () => {
|
12
|
-
test("handles positive value", () => {
|
13
|
-
expect(getAspectRatioStyles(1 / 2)).toMatchSnapshot();
|
14
|
-
});
|
15
|
-
test("handles 0 value", () => {
|
16
|
-
expect(getAspectRatioStyles(0)).toMatchSnapshot();
|
17
|
-
});
|
18
|
-
test("handles undefined value", () => {
|
19
|
-
expect(getAspectRatioStyles()).toMatchSnapshot();
|
20
|
-
});
|
21
|
-
test("handles responsive value", () => __awaiter(void 0, void 0, void 0, function* () {
|
22
|
-
expect(getAspectRatioStyles({ s: 4, m: 0, l: 2 })).toMatchSnapshot();
|
23
|
-
}));
|
24
|
-
});
|
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|
@@ -1,24 +0,0 @@
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
8
|
-
});
|
9
|
-
};
|
10
|
-
import getBleedStyles from "./index.js";
|
11
|
-
describe("Styles/Bleed", () => {
|
12
|
-
test("handles positive value", () => {
|
13
|
-
expect(getBleedStyles(4)).toMatchSnapshot();
|
14
|
-
});
|
15
|
-
test("handles 0 value", () => {
|
16
|
-
expect(getBleedStyles(0)).toMatchSnapshot();
|
17
|
-
});
|
18
|
-
test("handles undefined value", () => {
|
19
|
-
expect(getBleedStyles()).toMatchSnapshot();
|
20
|
-
});
|
21
|
-
test("handles responsive value", () => __awaiter(void 0, void 0, void 0, function* () {
|
22
|
-
expect(getBleedStyles({ s: 4, m: 0, l: 2 })).toMatchSnapshot();
|
23
|
-
}));
|
24
|
-
});
|
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|
@@ -1,27 +0,0 @@
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
8
|
-
});
|
9
|
-
};
|
10
|
-
import getHeightStyles from "./index.js";
|
11
|
-
describe("Styles/Height", () => {
|
12
|
-
test("handles px value", () => {
|
13
|
-
expect(getHeightStyles("50px")).toMatchSnapshot();
|
14
|
-
});
|
15
|
-
test("handles % value", () => {
|
16
|
-
expect(getHeightStyles("50%")).toMatchSnapshot();
|
17
|
-
});
|
18
|
-
test("handles unit value", () => {
|
19
|
-
expect(getHeightStyles(5)).toMatchSnapshot();
|
20
|
-
});
|
21
|
-
test("handles undefined value", () => {
|
22
|
-
expect(getHeightStyles()).toMatchSnapshot();
|
23
|
-
});
|
24
|
-
test("handles responsive value", () => __awaiter(void 0, void 0, void 0, function* () {
|
25
|
-
expect(getHeightStyles({ s: "50px", l: "50%" })).toMatchSnapshot();
|
26
|
-
}));
|
27
|
-
});
|
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|
@@ -1,27 +0,0 @@
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
8
|
-
});
|
9
|
-
};
|
10
|
-
import getInsetStyles from "./index.js";
|
11
|
-
describe("Styles/Inset", () => {
|
12
|
-
test("handles positive value", () => {
|
13
|
-
expect(getInsetStyles(4)).toMatchSnapshot();
|
14
|
-
});
|
15
|
-
test("handles 0 value", () => {
|
16
|
-
expect(getInsetStyles(0)).toMatchSnapshot();
|
17
|
-
});
|
18
|
-
test("handles undefined value", () => {
|
19
|
-
expect(getInsetStyles()).toMatchSnapshot();
|
20
|
-
});
|
21
|
-
test("handles responsive value", () => __awaiter(void 0, void 0, void 0, function* () {
|
22
|
-
expect(getInsetStyles({ s: 4, m: 0, l: 2 })).toMatchSnapshot();
|
23
|
-
}));
|
24
|
-
test("handles value width defined side", () => {
|
25
|
-
expect(getInsetStyles(4, "start")).toMatchSnapshot();
|
26
|
-
});
|
27
|
-
});
|
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|
@@ -1,27 +0,0 @@
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
8
|
-
});
|
9
|
-
};
|
10
|
-
import getMaxHeightStyles from "./index.js";
|
11
|
-
describe("Styles/MaxHeight", () => {
|
12
|
-
test("handles px value", () => {
|
13
|
-
expect(getMaxHeightStyles("50px")).toMatchSnapshot();
|
14
|
-
});
|
15
|
-
test("handles % value", () => {
|
16
|
-
expect(getMaxHeightStyles("50%")).toMatchSnapshot();
|
17
|
-
});
|
18
|
-
test("handles unit value", () => {
|
19
|
-
expect(getMaxHeightStyles(5)).toMatchSnapshot();
|
20
|
-
});
|
21
|
-
test("handles undefined value", () => {
|
22
|
-
expect(getMaxHeightStyles()).toMatchSnapshot();
|
23
|
-
});
|
24
|
-
test("handles responsive value", () => __awaiter(void 0, void 0, void 0, function* () {
|
25
|
-
expect(getMaxHeightStyles({ s: "50px", l: "50%" })).toMatchSnapshot();
|
26
|
-
}));
|
27
|
-
});
|
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|
@@ -1,27 +0,0 @@
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
8
|
-
});
|
9
|
-
};
|
10
|
-
import getMaxWidthStyles from "./index.js";
|
11
|
-
describe("Styles/MaxWidth", () => {
|
12
|
-
test("handles px value", () => {
|
13
|
-
expect(getMaxWidthStyles("50px")).toMatchSnapshot();
|
14
|
-
});
|
15
|
-
test("handles % value", () => {
|
16
|
-
expect(getMaxWidthStyles("50%")).toMatchSnapshot();
|
17
|
-
});
|
18
|
-
test("handles unit value", () => {
|
19
|
-
expect(getMaxWidthStyles(5)).toMatchSnapshot();
|
20
|
-
});
|
21
|
-
test("handles undefined value", () => {
|
22
|
-
expect(getMaxWidthStyles()).toMatchSnapshot();
|
23
|
-
});
|
24
|
-
test("handles responsive value", () => __awaiter(void 0, void 0, void 0, function* () {
|
25
|
-
expect(getMaxWidthStyles({ s: "50px", l: "50%" })).toMatchSnapshot();
|
26
|
-
}));
|
27
|
-
});
|
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|
@@ -1,24 +0,0 @@
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
8
|
-
});
|
9
|
-
};
|
10
|
-
import getPaddingStyles from "./index.js";
|
11
|
-
describe("Styles/Padding", () => {
|
12
|
-
test("handles positive value", () => {
|
13
|
-
expect(getPaddingStyles(4)).toMatchSnapshot();
|
14
|
-
});
|
15
|
-
test("handles 0 value", () => {
|
16
|
-
expect(getPaddingStyles(0)).toMatchSnapshot();
|
17
|
-
});
|
18
|
-
test("handles undefined value", () => {
|
19
|
-
expect(getPaddingStyles()).toMatchSnapshot();
|
20
|
-
});
|
21
|
-
test("handles responsive value", () => __awaiter(void 0, void 0, void 0, function* () {
|
22
|
-
expect(getPaddingStyles({ s: 4, m: 0, l: 2 })).toMatchSnapshot();
|
23
|
-
}));
|
24
|
-
});
|
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|
@@ -1,21 +0,0 @@
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
8
|
-
});
|
9
|
-
};
|
10
|
-
import getPositionStyles from "./index.js";
|
11
|
-
describe("Styles/Position", () => {
|
12
|
-
test("handles value", () => {
|
13
|
-
expect(getPositionStyles("absolute")).toMatchSnapshot();
|
14
|
-
});
|
15
|
-
test("handles undefined value", () => {
|
16
|
-
expect(getPositionStyles()).toMatchSnapshot();
|
17
|
-
});
|
18
|
-
test("handles responsive value", () => __awaiter(void 0, void 0, void 0, function* () {
|
19
|
-
expect(getPositionStyles({ s: "absolute", l: "fixed" })).toMatchSnapshot();
|
20
|
-
}));
|
21
|
-
});
|
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|
@@ -1,24 +0,0 @@
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
8
|
-
});
|
9
|
-
};
|
10
|
-
import getRadiusStyles from "./index.js";
|
11
|
-
describe("Styles/Radius", () => {
|
12
|
-
test("handles value", () => {
|
13
|
-
expect(getRadiusStyles("large")).toMatchSnapshot();
|
14
|
-
});
|
15
|
-
test("handles none", () => {
|
16
|
-
expect(getRadiusStyles("none")).toMatchSnapshot();
|
17
|
-
});
|
18
|
-
test("handles undefined value", () => {
|
19
|
-
expect(getRadiusStyles()).toMatchSnapshot();
|
20
|
-
});
|
21
|
-
test("handles responsive value", () => __awaiter(void 0, void 0, void 0, function* () {
|
22
|
-
expect(getRadiusStyles({ s: "small", m: "none", l: "circular" })).toMatchSnapshot();
|
23
|
-
}));
|
24
|
-
});
|
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|
@@ -1,27 +0,0 @@
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
8
|
-
});
|
9
|
-
};
|
10
|
-
import getWidthStyles from "./index.js";
|
11
|
-
describe("Styles/Width", () => {
|
12
|
-
test("handles px value", () => {
|
13
|
-
expect(getWidthStyles("50px")).toMatchSnapshot();
|
14
|
-
});
|
15
|
-
test("handles % value", () => {
|
16
|
-
expect(getWidthStyles("50%")).toMatchSnapshot();
|
17
|
-
});
|
18
|
-
test("handles unit value", () => {
|
19
|
-
expect(getWidthStyles(5)).toMatchSnapshot();
|
20
|
-
});
|
21
|
-
test("handles undefined value", () => {
|
22
|
-
expect(getWidthStyles()).toMatchSnapshot();
|
23
|
-
});
|
24
|
-
test("handles responsive value", () => __awaiter(void 0, void 0, void 0, function* () {
|
25
|
-
expect(getWidthStyles({ s: "50px", l: "50%" })).toMatchSnapshot();
|
26
|
-
}));
|
27
|
-
});
|
package/themes/minimal/theme.css
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
[data-rs-theme=minimal][data-rs-color-mode=dark],[data-rs-theme=minimal][data-rs-color-mode=light]{--rs-font-family-title:Inter,BlinkMacSystemFont,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;--rs-font-family-body:Inter,BlinkMacSystemFont,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;--rs-font-weight-regular:400;--rs-font-weight-medium:500;--rs-font-weight-semibold:600;--rs-font-weight-bold:700;--rs-font-weight-heavy:800;--rs-font-weight-black:900;--rs-font-size-title-1:96px;--rs-line-height-title-1:100px;--rs-font-family-title-1:var(--rs-font-family-title);--rs-font-weight-title-1:var(--rs-font-weight-heavy);--rs-font-size-title-2:80px;--rs-line-height-title-2:84px;--rs-font-family-title-2:var(--rs-font-family-title);--rs-font-weight-title-2:var(--rs-font-weight-heavy);--rs-font-size-title-3:64px;--rs-line-height-title-3:68px;--rs-font-family-title-3:var(--rs-font-family-title);--rs-font-weight-title-3:var(--rs-font-weight-heavy);--rs-font-size-title-4:56px;--rs-line-height-title-4:60px;--rs-font-family-title-4:var(--rs-font-family-title);--rs-font-weight-title-4:var(--rs-font-weight-bold);--rs-font-size-title-5:48px;--rs-line-height-title-5:52px;--rs-font-family-title-5:var(--rs-font-family-title);--rs-font-weight-title-5:var(--rs-font-weight-bold);--rs-font-size-title-6:36px;--rs-line-height-title-6:40px;--rs-font-family-title-6:var(--rs-font-family-title);--rs-font-weight-title-6:var(--rs-font-weight-bold);--rs-font-size-featured-1:32px;--rs-line-height-featured-1:40px;--rs-font-family-featured-1:var(--rs-font-family-body);--rs-font-size-featured-2:24px;--rs-line-height-featured-2:32px;--rs-font-family-featured-2:var(--rs-font-family-body);--rs-font-size-featured-3:20px;--rs-line-height-featured-3:28px;--rs-font-family-featured-3:var(--rs-font-family-body);--rs-font-size-body-1:18px;--rs-line-height-body-1:24px;--rs-font-family-body-1:var(--rs-font-family-body);--rs-font-size-body-2:16px;--rs-line-height-body-2:24px;--rs-font-family-body-2:var(--rs-font-family-body);--rs-font-size-body-3:14px;--rs-line-height-body-3:20px;--rs-font-family-body-3:var(--rs-font-family-body);--rs-font-size-caption-1:12px;--rs-line-height-caption-1:16px;--rs-font-family-caption-1:var(--rs-font-family-body);--rs-font-size-caption-2:10px;--rs-line-height-caption-2:12px;--rs-font-family-caption-2:var(--rs-font-family-body);--rs-unit-base:4px;--rs-unit-radius-small:2px;--rs-unit-radius-medium:4px;--rs-unit-radius-large:6px;--rs-unit-x1:4px;--rs-unit-x2:8px;--rs-unit-x3:12px;--rs-unit-x4:16px;--rs-unit-x5:20px;--rs-unit-x6:24px;--rs-unit-x7:28px;--rs-unit-x8:32px;--rs-unit-x9:36px;--rs-unit-x10:40px;--rs-color-black:#000;--rs-color-white:#fff;--rs-color-on-background-primary:#fff;--rs-color-on-background-positive:#fff;--rs-color-on-background-critical:#fff;--rs-color-rgb-black:0,0,0;--rs-color-rgb-white:255,255,255;--rs-duration-fast:200ms;--rs-duration-medium:300ms;--rs-duration-slow:400ms;--rs-easing-standard:cubic-bezier(0.4,0,0.2,1);--rs-easing-accelerate:cubic-bezier(0.4,0,1,1);--rs-easing-decelerate:cubic-bezier(0,0,0.2,1);--rs-shadow-raised:0px 2px 3px rgba(0,0,0,.1),0px 1px 2px -1px rgba(0,0,0,.1);--rs-shadow-overlay:0px 5px 10px rgba(0,0,0,.05),0px 15px 25px rgba(0,0,0,.07)}[data-rs-theme=minimal][data-rs-color-mode=light]{--rs-color-foreground-neutral:#161a26;--rs-color-foreground-neutral-faded:#717787;--rs-color-foreground-disabled:#d4d0d0;--rs-color-foreground-primary:#2383e2;--rs-color-foreground-positive:#05751f;--rs-color-foreground-critical:#cb101d;--rs-color-background-neutral:#e3e3e5;--rs-color-background-neutral-faded:#f2f3f5;--rs-color-background-neutral-highlighted:#dedee1;--rs-color-background-disabled:#eceef3;--rs-color-background-disabled-faded:#f4f5f7;--rs-color-background-primary:#2383e2;--rs-color-background-primary-highlighted:#3273cc;--rs-color-background-primary-faded:#d6ebf6;--rs-color-background-positive:#118850;--rs-color-background-positive-faded:#ebfef6;--rs-color-background-positive-highlighted:#009950;--rs-color-background-critical:#e22c2c;--rs-color-background-critical-faded:#fef1f2;--rs-color-background-critical-highlighted:#eb4747;--rs-color-border-neutral:#d2d2d2;--rs-color-border-neutral-faded:#e2e2e2;--rs-color-border-disabled:#e2e2e2;--rs-color-border-primary:#3d76c7;--rs-color-border-primary-faded:#508de4;--rs-color-border-positive:#05751f;--rs-color-border-positive-faded:#cdedd5;--rs-color-border-critical:#cb101d;--rs-color-border-critical-faded:#fbd5d8;--rs-color-background-page:#fff;--rs-color-background-page-faded:#f7f7f5;--rs-color-background-elevation-base:#fff;--rs-color-background-elevation-raised:#fff;--rs-color-background-elevation-overlay:#fff;--rs-color-on-background-neutral:#000;--rs-color-rgb-background-neutral:227,227,229;--rs-color-rgb-background-neutral-faded:242,243,245;--rs-color-rgb-background-neutral-highlighted:222,222,225;--rs-color-rgb-background-disabled:236,238,243;--rs-color-rgb-background-disabled-faded:244,245,247;--rs-color-rgb-background-primary:35,131,226;--rs-color-rgb-background-primary-highlighted:50,115,204;--rs-color-rgb-background-primary-faded:214,235,246;--rs-color-rgb-background-positive:17,136,80;--rs-color-rgb-background-positive-faded:235,254,246;--rs-color-rgb-background-positive-highlighted:0,153,80;--rs-color-rgb-background-critical:226,44,44;--rs-color-rgb-background-critical-faded:254,241,242;--rs-color-rgb-background-critical-highlighted:235,71,71;--rs-color-rgb-background-page:255,255,255;--rs-color-rgb-background-page-faded:247,247,245;--rs-color-rgb-background-elevation-base:255,255,255;--rs-color-rgb-background-elevation-raised:255,255,255;--rs-color-rgb-background-elevation-overlay:255,255,255}[data-rs-theme=minimal][data-rs-color-mode=dark]{--rs-color-foreground-neutral:#f2f3f5;--rs-color-foreground-neutral-faded:#9f9e9e;--rs-color-foreground-disabled:#656565;--rs-color-foreground-primary:#5098ff;--rs-color-foreground-positive:#03ab5f;--rs-color-foreground-critical:#eb6666;--rs-color-background-neutral:#4f5155;--rs-color-background-neutral-faded:#34363f;--rs-color-background-neutral-highlighted:#595c60;--rs-color-background-disabled:#313131;--rs-color-background-disabled-faded:#262626;--rs-color-background-primary:#4281db;--rs-color-background-primary-highlighted:#3273cc;--rs-color-background-primary-faded:#1e2c45;--rs-color-background-positive:#06743f;--rs-color-background-positive-faded:#0f2921;--rs-color-background-positive-highlighted:#008545;--rs-color-background-critical:#ab1717;--rs-color-background-critical-faded:#2f1e1f;--rs-color-background-critical-highlighted:#c11515;--rs-color-border-neutral:#414141;--rs-color-border-neutral-faded:#464646;--rs-color-border-disabled:#404040;--rs-color-border-primary:#5a91e0;--rs-color-border-primary-faded:#163a6a;--rs-color-border-positive:#03a059;--rs-color-border-positive-faded:#163c30;--rs-color-border-critical:#e95454;--rs-color-border-critical-faded:#412a2b;--rs-color-background-page:#191919;--rs-color-background-page-faded:#202020;--rs-color-background-elevation-base:#232323;--rs-color-background-elevation-raised:#262626;--rs-color-background-elevation-overlay:#292929;--rs-color-on-background-neutral:#fff;--rs-color-rgb-background-neutral:79,81,85;--rs-color-rgb-background-neutral-faded:52,54,63;--rs-color-rgb-background-neutral-highlighted:89,92,96;--rs-color-rgb-background-disabled:49,49,49;--rs-color-rgb-background-disabled-faded:38,38,38;--rs-color-rgb-background-primary:66,129,219;--rs-color-rgb-background-primary-highlighted:50,115,204;--rs-color-rgb-background-primary-faded:30,44,69;--rs-color-rgb-background-positive:6,116,63;--rs-color-rgb-background-positive-faded:15,41,33;--rs-color-rgb-background-positive-highlighted:0,133,69;--rs-color-rgb-background-critical:171,23,23;--rs-color-rgb-background-critical-faded:47,30,31;--rs-color-rgb-background-critical-highlighted:193,21,21;--rs-color-rgb-background-page:25,25,25;--rs-color-rgb-background-page-faded:32,32,32;--rs-color-rgb-background-elevation-base:35,35,35;--rs-color-rgb-background-elevation-raised:38,38,38;--rs-color-rgb-background-elevation-overlay:41,41,41}
|
@@ -1,25 +0,0 @@
|
|
1
|
-
import React from "react";
|
2
|
-
type Renderer<P> = (props: P) => React.ReactElement;
|
3
|
-
export declare const testChildren: (renderer: Renderer<{
|
4
|
-
children: React.ReactNode;
|
5
|
-
}>) => void;
|
6
|
-
export declare const testLinkBehavior: (renderer: Renderer<{
|
7
|
-
href: string;
|
8
|
-
}>) => void;
|
9
|
-
export declare const testLinkButtonBehavior: (renderer: Renderer<{
|
10
|
-
href: string;
|
11
|
-
onClick: () => void;
|
12
|
-
}>) => void;
|
13
|
-
export declare const testButtonBehavior: (renderer: Renderer<{
|
14
|
-
onClick: () => void;
|
15
|
-
}>) => void;
|
16
|
-
export declare const testButtonType: (renderer: Renderer<{
|
17
|
-
type: string;
|
18
|
-
}>) => void;
|
19
|
-
export declare const testDisabledButton: (renderer: Renderer<{
|
20
|
-
onClick: () => void;
|
21
|
-
}>) => void;
|
22
|
-
export declare const testAriaLabel: (renderer: Renderer<{
|
23
|
-
ariaLabel: string;
|
24
|
-
}>) => void;
|
25
|
-
export {};
|
package/utilities/testPresets.js
DELETED
@@ -1,76 +0,0 @@
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
8
|
-
});
|
9
|
-
};
|
10
|
-
import React from "react";
|
11
|
-
import { render, screen } from "@testing-library/react";
|
12
|
-
import userEvent from "@testing-library/user-event";
|
13
|
-
export const testChildren = (renderer) => {
|
14
|
-
test("renders children", () => {
|
15
|
-
render(renderer({ children: "Children" }));
|
16
|
-
expect(screen.getByText("Children")).toBeInTheDocument();
|
17
|
-
});
|
18
|
-
};
|
19
|
-
export const testLinkBehavior = (renderer) => {
|
20
|
-
test("works as a link", () => {
|
21
|
-
render(renderer({ href: "https://reshaped.so" }));
|
22
|
-
const link = screen.getByRole("link");
|
23
|
-
expect(link).toBeInTheDocument();
|
24
|
-
expect(link.getAttribute("href")).toBe("https://reshaped.so");
|
25
|
-
});
|
26
|
-
};
|
27
|
-
export const testLinkButtonBehavior = (renderer) => {
|
28
|
-
test("works as a button with href", () => __awaiter(void 0, void 0, void 0, function* () {
|
29
|
-
const noop = jest.fn();
|
30
|
-
render(renderer({ onClick: noop, href: "https://reshaped.so" }));
|
31
|
-
const button = screen.getByRole("link");
|
32
|
-
button.addEventListener("click", (e) => e.preventDefault());
|
33
|
-
expect(button).toBeInTheDocument();
|
34
|
-
yield userEvent.click(button);
|
35
|
-
expect(noop).toBeCalledTimes(1);
|
36
|
-
}));
|
37
|
-
};
|
38
|
-
export const testButtonBehavior = (renderer) => {
|
39
|
-
test("works as a button", () => __awaiter(void 0, void 0, void 0, function* () {
|
40
|
-
const noop = jest.fn();
|
41
|
-
render(renderer({ onClick: noop }));
|
42
|
-
const button = screen.getByRole("button");
|
43
|
-
expect(button).toBeInTheDocument();
|
44
|
-
yield userEvent.click(button);
|
45
|
-
expect(noop).toBeCalledTimes(1);
|
46
|
-
// fireEvent.keyDown(button, { key: "Enter" });
|
47
|
-
// expect(noop).toBeCalledTimes(2);
|
48
|
-
// fireEvent.keyDown(button, { key: " " });
|
49
|
-
// expect(noop).toBeCalledTimes(3);
|
50
|
-
}));
|
51
|
-
};
|
52
|
-
export const testButtonType = (renderer) => {
|
53
|
-
test("applies correct button type", () => __awaiter(void 0, void 0, void 0, function* () {
|
54
|
-
const noop = jest.fn();
|
55
|
-
render(React.createElement("form", { onSubmit: noop }, renderer({ type: "button" })));
|
56
|
-
const button = screen.getByRole("button");
|
57
|
-
yield userEvent.click(button);
|
58
|
-
expect(noop).not.toBeCalled();
|
59
|
-
}));
|
60
|
-
};
|
61
|
-
export const testDisabledButton = (renderer) => {
|
62
|
-
test("disables the button", () => __awaiter(void 0, void 0, void 0, function* () {
|
63
|
-
const noop = jest.fn();
|
64
|
-
render(renderer({ onClick: noop }));
|
65
|
-
const button = screen.getByRole("button");
|
66
|
-
yield userEvent.click(button);
|
67
|
-
expect(noop).not.toBeCalled();
|
68
|
-
}));
|
69
|
-
};
|
70
|
-
export const testAriaLabel = (renderer) => {
|
71
|
-
test("renders aria-label", () => {
|
72
|
-
render(renderer({ ariaLabel: "Hey" }));
|
73
|
-
const button = screen.getByRole("button");
|
74
|
-
expect(button.getAttribute("aria-label")).toBeDefined();
|
75
|
-
});
|
76
|
-
};
|
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|