@wonderflow/react-components 10.0.0-next.4 → 10.1.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.
- package/core/basic.css +1 -1
- package/core.css +1 -1
- package/dist/components/autocomplete/autocomplete.js +1 -1
- package/dist/components/button/button.module.css +1 -1
- package/dist/components/chip/chip.module.css +1 -1
- package/dist/components/clamp-text/clamp-text.d.ts +5 -1
- package/dist/components/clamp-text/clamp-text.d.ts.map +1 -1
- package/dist/components/clamp-text/clamp-text.js +6 -4
- package/dist/components/clamp-text/clamp-text.module.css +1 -1
- package/dist/components/drawer/drawer.d.ts.map +1 -1
- package/dist/components/drawer/drawer.js +4 -6
- package/dist/components/drawer/drawer.module.css +1 -1
- package/dist/components/info-state/info-state.d.ts +34 -3
- package/dist/components/info-state/info-state.d.ts.map +1 -1
- package/dist/components/input-group/input-group.d.ts +6 -2
- package/dist/components/input-group/input-group.d.ts.map +1 -1
- package/dist/components/input-group/input-group.js +3 -3
- package/dist/components/linear-progress/linear-progress.module.css +1 -1
- package/dist/components/list/list.d.ts +3 -3
- package/dist/components/list/list.d.ts.map +1 -1
- package/dist/components/list/list.module.css +1 -1
- package/dist/components/modal/content/modal-content.d.ts +17 -4
- package/dist/components/modal/content/modal-content.d.ts.map +1 -1
- package/dist/components/modal/modal.d.ts +3 -3
- package/dist/components/modal/modal.d.ts.map +1 -1
- package/dist/components/modal/modal.js +7 -11
- package/dist/components/overlay-container/index.d.ts +0 -1
- package/dist/components/overlay-container/index.d.ts.map +1 -1
- package/dist/components/overlay-container/index.js +0 -1
- package/dist/components/overlay-container/overlay-container.d.ts.map +1 -1
- package/dist/components/overlay-container/overlay-container.js +1 -1
- package/dist/components/overlay-container/overlay-container.module.css +1 -1
- package/dist/components/popover/index.d.ts +0 -1
- package/dist/components/popover/index.d.ts.map +1 -1
- package/dist/components/popover/index.js +0 -1
- package/dist/components/popover/popover.d.ts.map +1 -1
- package/dist/components/popover/popover.js +5 -3
- package/dist/components/select/select.module.css +1 -1
- package/dist/components/selection-controls/checkbox.d.ts.map +1 -1
- package/dist/components/selection-controls/checkbox.js +2 -2
- package/dist/components/selection-controls/radio.d.ts.map +1 -1
- package/dist/components/selection-controls/radio.js +1 -1
- package/dist/components/selection-controls/selection-controls.module.css +1 -1
- package/dist/components/slider/slider.module.css +1 -1
- package/dist/components/snackbar/snackbar.d.ts.map +1 -1
- package/dist/components/snackbar/snackbar.js +4 -4
- package/dist/components/snackbar/snackbar.module.css +1 -1
- package/dist/components/stack/stack.d.ts +4 -0
- package/dist/components/stack/stack.d.ts.map +1 -1
- package/dist/components/stack/stack.js +8 -7
- package/dist/components/stack/stack.module.css +1 -1
- package/dist/components/tab/tab.d.ts +9 -3
- package/dist/components/tab/tab.d.ts.map +1 -1
- package/dist/components/tab/tab.js +3 -3
- package/dist/components/tab/tab.module.css +1 -1
- package/dist/components/tab/tabs-panel.d.ts +1 -1
- package/dist/components/tab/tabs-panel.d.ts.map +1 -1
- package/dist/components/table/table.d.ts +6 -2
- package/dist/components/table/table.d.ts.map +1 -1
- package/dist/components/table/table.js +5 -3
- package/dist/components/textfield/base-field/base-field.module.css +1 -1
- package/dist/components/textfield/textfield.module.css +1 -1
- package/dist/components/title/title.d.ts +8 -0
- package/dist/components/title/title.d.ts.map +1 -1
- package/dist/components/title/title.js +5 -3
- package/dist/components/title/title.module.css +1 -1
- package/dist/components/tooltip/tooltip.module.css +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/providers/index.d.ts +4 -0
- package/dist/providers/index.d.ts.map +1 -0
- package/dist/providers/index.js +3 -0
- package/dist/{components/overlay-container/overlay-context.d.ts → providers/overlay.d.ts} +2 -2
- package/dist/providers/overlay.d.ts.map +1 -0
- package/dist/{components/overlay-container/overlay-context.js → providers/overlay.js} +0 -0
- package/dist/providers/responsive.d.ts +25 -0
- package/dist/providers/responsive.d.ts.map +1 -0
- package/dist/providers/responsive.js +43 -0
- package/package.json +22 -22
- package/dist/components/overlay-container/overlay-context.d.ts.map +0 -1
package/core/basic.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
html{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;background-color:var(--global-background);box-sizing:border-box;font-size:100%;line-height:1.5}*,:after,:before{-webkit-tap-highlight-color:hsl(0 100% 47%/20%);box-sizing:inherit;margin:0}:focus-visible{outline:5px auto Highlight;outline:5px auto -webkit-focus-ring-color}body{font-feature-settings:"calt" off;color:var(--global-foreground);font-family:system-ui,sans-serif;font-size:1.125rem;margin:0;scroll-padding:5rem}::selection{background-color:var(--dimmed-7);color:var(--dimmed-0);text-shadow:none}img{display:block;inline-size:100%;max-inline-size:100%}svg:not([fill]){fill:currentcolor}fieldset{border:0;padding:0}
|
|
1
|
+
html{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;background-color:var(--global-background);box-sizing:border-box;font-size:100%;line-height:1.5}*,:after,:before{-webkit-tap-highlight-color:hsl(0 100% 47%/20%);box-sizing:inherit;margin:0;outline-offset:5px;transition:outline-offset .2s ease-out}:focus-visible{outline:5px auto Highlight;outline:5px auto -webkit-focus-ring-color;outline-offset:2px}body{font-feature-settings:"calt" off;color:var(--global-foreground);font-family:system-ui,sans-serif;font-size:1.125rem;margin:0;scroll-padding:5rem}::selection{background-color:var(--dimmed-7);color:var(--dimmed-0);text-shadow:none}img{display:block;inline-size:100%;max-inline-size:100%}svg:not([fill]){fill:currentcolor}fieldset{border:0;padding:0}
|
package/core.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
html{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;background-color:var(--global-background);box-sizing:border-box;font-size:100%;line-height:1.5}*,:after,:before{-webkit-tap-highlight-color:hsl(0 100% 47%/20%);box-sizing:inherit;margin:0}:focus-visible{outline:5px auto Highlight;outline:5px auto -webkit-focus-ring-color}body{font-feature-settings:"calt" off;color:var(--global-foreground);font-family:system-ui,sans-serif;font-size:1.125rem;margin:0;scroll-padding:5rem}::selection{background-color:var(--dimmed-7);color:var(--dimmed-0);text-shadow:none}img{display:block;inline-size:100%;max-inline-size:100%}svg:not([fill]){fill:currentcolor}fieldset{border:0;padding:0}[data-elevation]{--shadow-color:0deg 0% 0%}[data-elevation-hover="0"]:hover,[data-elevation="0"]{box-shadow:none;transition:box-shadow .1s cubic-bezier(.3,.07,.34,1)}[data-elevation-hover="1"]:hover,[data-elevation="1"]{box-shadow:0 3px 13px hsl(var(--shadow-color)/6%),0 2.5px 4.59px hsl(var(--shadow-color)/4.06%),0 1.34px 2.45px hsl(var(--shadow-color)/2.35%),0 .75px 1.37px hsl(var(--shadow-color)/4%),0 .39px .73px hsl(var(--shadow-color)/1.65%),0 .16px .3px hsl(var(--shadow-color)/.94%);transition:box-shadow .1s cubic-bezier(.3,.07,.34,1)}[data-elevation-hover="2"]:hover,[data-elevation="2"]{box-shadow:0 9px 25px hsl(var(--shadow-color)/8%),0 3.75px 10.44px hsl(var(--shadow-color)/6.35%),0 2.01px 5.58px hsl(var(--shadow-color)/4.75%),0 1.12px 3.13px hsl(var(--shadow-color)/4.5%),0 .6px 1.66px hsl(var(--shadow-color)/4.25%),0 .25px .69px hsl(var(--shadow-color)/3.65%);transition:box-shadow .1s cubic-bezier(.3,.07,.34,1)}[data-elevation-hover="3"]:hover,[data-elevation="3"]{box-shadow:0 18px 40px hsl(var(--shadow-color)/9%),0 7.51px 16.71px hsl(var(--shadow-color)/5.63%),0 4.02px 8.93px hsl(var(--shadow-color)/4.15%),0 2.25px 5px hsl(var(--shadow-color)/4%),0 1.19px 2.66px hsl(var(--shadow-color)/3.85%),0 .49px 1.1px hsl(var(--shadow-color)/3.37%);transition:box-shadow .1s cubic-bezier(.3,.07,.34,1)}[data-elevation-hover="4"]:hover,[data-elevation="4"]{box-shadow:0 33px 78px hsl(var(--shadow-color)/11%),0 12.04px 28.47px hsl(var(--shadow-color)/7.59%),0 5.84px 13.82px hsl(var(--shadow-color)/6.12%),0 2.86px 6.77px hsl(var(--shadow-color)/4.88%),0 1.13px 2.67px hsl(var(--shadow-color)/5.41%);transition:box-shadow .1s cubic-bezier(.3,.07,.34,1)}:where(p){font-size:1rem;line-height:1.5;min-block-size:.01vh}small{font-size:.7em}b,strong{font-weight:600}:where(a:any-link){color:var(--global-interactive-text);text-decoration:none;word-break:break-word}:where(a:any-link):not([class]){background-image:linear-gradient(currentcolor,currentcolor);background-position:0 100%;background-repeat:no-repeat;background-size:0 1px;transition:background-size .2s cubic-bezier(0,0,.34,1)}:where(a:any-link):not([class]):focus,:where(a:any-link):not([class]):hover{background-size:100% 1px}del{background-color:var(--highlight-red-background);box-shadow:0 0 0 2px var(--highlight-red-background);color:var(--highlight-red-foreground)}del,ins{border-radius:.25rem;padding:2px 4px}ins{background-color:var(--highlight-green-background);box-shadow:0 0 0 2px var(--highlight-green-background);color:var(--highlight-green-foreground);text-decoration:none}address{font-style:normal;line-height:inherit}dt{font-weight:600}dd{margin:0;padding:0}ol,ul{padding-left:1rem}ul li::marker{font-size:inherit;font-weight:600;min-inline-size:2rem;text-align:right}ol li::marker{font-feature-settings:"tnum";font-size:inherit;font-variant-numeric:tabular-nums;font-weight:600;min-inline-size:2rem;white-space:nowrap}kbd{border:1px solid var(--dimmed-1);border-radius:.25rem;box-shadow:0 2px 0 var(--dimmed-1);font-weight:600;padding:2px 4px}mark{background:var(--highlight-yellow-background);color:var(--highlight-yellow-foreground);padding:0 2px}abbr{text-decoration:underline dashed var(--cta-default)}label,legend{font-size:inherit}code{background-color:var(--global-vibrancy-background);border-radius:.25rem;font-family:monospace;font-size:1em;padding:0 4px 3px}
|
|
1
|
+
html{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;background-color:var(--global-background);box-sizing:border-box;font-size:100%;line-height:1.5}*,:after,:before{-webkit-tap-highlight-color:hsl(0 100% 47%/20%);box-sizing:inherit;margin:0;outline-offset:5px;transition:outline-offset .2s ease-out}:focus-visible{outline:5px auto Highlight;outline:5px auto -webkit-focus-ring-color;outline-offset:2px}body{font-feature-settings:"calt" off;color:var(--global-foreground);font-family:system-ui,sans-serif;font-size:1.125rem;margin:0;scroll-padding:5rem}::selection{background-color:var(--dimmed-7);color:var(--dimmed-0);text-shadow:none}img{display:block;inline-size:100%;max-inline-size:100%}svg:not([fill]){fill:currentcolor}fieldset{border:0;padding:0}[data-elevation]{--shadow-color:0deg 0% 0%}[data-elevation-hover="0"]:hover,[data-elevation="0"]{box-shadow:none;transition:box-shadow .1s cubic-bezier(.3,.07,.34,1)}[data-elevation-hover="1"]:hover,[data-elevation="1"]{box-shadow:0 3px 13px hsl(var(--shadow-color)/6%),0 2.5px 4.59px hsl(var(--shadow-color)/4.06%),0 1.34px 2.45px hsl(var(--shadow-color)/2.35%),0 .75px 1.37px hsl(var(--shadow-color)/4%),0 .39px .73px hsl(var(--shadow-color)/1.65%),0 .16px .3px hsl(var(--shadow-color)/.94%);transition:box-shadow .1s cubic-bezier(.3,.07,.34,1)}[data-elevation-hover="2"]:hover,[data-elevation="2"]{box-shadow:0 9px 25px hsl(var(--shadow-color)/8%),0 3.75px 10.44px hsl(var(--shadow-color)/6.35%),0 2.01px 5.58px hsl(var(--shadow-color)/4.75%),0 1.12px 3.13px hsl(var(--shadow-color)/4.5%),0 .6px 1.66px hsl(var(--shadow-color)/4.25%),0 .25px .69px hsl(var(--shadow-color)/3.65%);transition:box-shadow .1s cubic-bezier(.3,.07,.34,1)}[data-elevation-hover="3"]:hover,[data-elevation="3"]{box-shadow:0 18px 40px hsl(var(--shadow-color)/9%),0 7.51px 16.71px hsl(var(--shadow-color)/5.63%),0 4.02px 8.93px hsl(var(--shadow-color)/4.15%),0 2.25px 5px hsl(var(--shadow-color)/4%),0 1.19px 2.66px hsl(var(--shadow-color)/3.85%),0 .49px 1.1px hsl(var(--shadow-color)/3.37%);transition:box-shadow .1s cubic-bezier(.3,.07,.34,1)}[data-elevation-hover="4"]:hover,[data-elevation="4"]{box-shadow:0 33px 78px hsl(var(--shadow-color)/11%),0 12.04px 28.47px hsl(var(--shadow-color)/7.59%),0 5.84px 13.82px hsl(var(--shadow-color)/6.12%),0 2.86px 6.77px hsl(var(--shadow-color)/4.88%),0 1.13px 2.67px hsl(var(--shadow-color)/5.41%);transition:box-shadow .1s cubic-bezier(.3,.07,.34,1)}:where(p){font-size:1rem;line-height:1.5;min-block-size:.01vh}small{font-size:.7em}b,strong{font-weight:600}:where(a:any-link){color:var(--global-interactive-text);text-decoration:none;word-break:break-word}:where(a:any-link):not([class]){background-image:linear-gradient(currentcolor,currentcolor);background-position:0 100%;background-repeat:no-repeat;background-size:0 1px;transition:background-size .2s cubic-bezier(0,0,.34,1)}:where(a:any-link):not([class]):focus,:where(a:any-link):not([class]):hover{background-size:100% 1px}del{background-color:var(--highlight-red-background);box-shadow:0 0 0 2px var(--highlight-red-background);color:var(--highlight-red-foreground)}del,ins{border-radius:.25rem;padding:2px 4px}ins{background-color:var(--highlight-green-background);box-shadow:0 0 0 2px var(--highlight-green-background);color:var(--highlight-green-foreground);text-decoration:none}address{font-style:normal;line-height:inherit}dt{font-weight:600}dd{margin:0;padding:0}ol,ul{padding-left:1rem}ul li::marker{font-size:inherit;font-weight:600;min-inline-size:2rem;text-align:right}ol li::marker{font-feature-settings:"tnum";font-size:inherit;font-variant-numeric:tabular-nums;font-weight:600;min-inline-size:2rem;white-space:nowrap}kbd{border:1px solid var(--dimmed-1);border-radius:.25rem;box-shadow:0 2px 0 var(--dimmed-1);font-weight:600;padding:2px 4px}mark{background:var(--highlight-yellow-background);color:var(--highlight-yellow-foreground);padding:0 2px}abbr{text-decoration:underline dashed var(--cta-default)}label,legend{font-size:inherit}code{background-color:var(--global-vibrancy-background);border-radius:.25rem;font-family:monospace;font-size:1em;padding:0 4px 3px}
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useDebounce, useFocusWithin, useKeyPress, useSize, } from 'ahooks';
|
|
3
3
|
import { AnimatePresence, domMax, LazyMotion, m, } from 'framer-motion';
|
|
4
4
|
import { Children, cloneElement, forwardRef, isValidElement, useCallback, useEffect, useMemo, useRef, useState, } from 'react';
|
|
5
|
-
import mergeRefs from 'react-merge-refs';
|
|
5
|
+
import { mergeRefs } from 'react-merge-refs';
|
|
6
6
|
import { usePopperTooltip } from 'react-popper-tooltip';
|
|
7
7
|
import { useUIDSeed } from 'react-uid';
|
|
8
8
|
import { Menu, Skeleton, Stack, Text, Textfield, } from '../..';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:where(.Button){-webkit-touch-callout:none;grid-gap:.5rem;align-items:center
|
|
1
|
+
:where(.Button){-webkit-touch-callout:none;grid-gap:.5rem;align-items:center;appearance:none;background:none;border:0;border-radius:.25rem;box-sizing:border-box;cursor:pointer;display:inline-flex;font-family:inherit;font-weight:600;justify-content:center;margin:0;min-inline-size:min-content;overflow:hidden;position:relative;text-decoration:none;transition:all .1s cubic-bezier(.3,.07,.34,1);-webkit-user-select:none;user-select:none;white-space:nowrap}:where(.Button):not([aria-pressed=true],[aria-disabled=true],[aria-busy=true]):active{transform:scale(.98);transform-origin:center}[data-button-dimension=big]:where(.Button){block-size:3rem;font-size:1.13rem;padding:.55rem 1.5rem .66rem}[data-button-dimension=regular]:where(.Button){block-size:2.5rem;font-size:1rem;padding:.33rem 1rem .5rem}[data-button-dimension=small]:where(.Button){grid-gap:.25rem;block-size:1.5rem;font-size:.88rem;padding:0 .5rem .11rem}[data-button-kind=primary]:where(.Button){background:var(--cta-default);color:var(--cta-foreground)}[data-button-kind=primary]:where(.Button):not([aria-pressed=true],[aria-disabled=true],[aria-busy=true]):is(:active){background:var(--cta-dark)}[data-button-kind=primary]:where(.Button):where([aria-pressed=true]),[data-button-kind=primary]:where(.Button):where([aria-pressed=true]:active){background:#9e0018;color:#fff}[data-button-kind=secondary]:where(.Button){-webkit-backdrop-filter:saturate(180%) blur(62px);backdrop-filter:saturate(180%) blur(62px);background-color:var(--global-vibrancy-background);color:var(--global-vibrancy-foreground)}[data-button-kind=secondary]:where(.Button):not([aria-pressed=true],[aria-disabled=true],[aria-busy=true]):is(:active){background-color:var(--global-vibrancy-background-hard);color:var(--global-vibrancy-foreground)}[data-button-kind=secondary]:where(.Button):where([aria-pressed=true]),[data-button-kind=secondary]:where(.Button):where([aria-pressed=true]:active){background:var(--dimmed-7);color:var(--dimmed-0)}[data-button-kind=flat]:where(.Button){color:var(--global-vibrancy-foreground)}[data-button-kind=flat]:where(.Button):not([aria-pressed=true],[aria-disabled=true],[aria-busy=true]):is(:active){background-color:var(--global-vibrancy-background-hard)}[data-button-kind=flat]:where(.Button):is(:hover,:focus){-webkit-backdrop-filter:saturate(180%) blur(62px);backdrop-filter:saturate(180%) blur(62px);background-color:var(--global-vibrancy-background);color:var(--global-vibrancy-foreground)}[data-button-kind=flat]:where(.Button):where([aria-pressed=true]),[data-button-kind=flat]:where(.Button):where([aria-pressed=true]:is(:active,:focus)){background:var(--dimmed-7);color:var(--dimmed-0)}[data-button-fullwidth=true]:where(.Button){inline-size:100%}[data-button-icon-position=right]:where(.Button){flex-direction:row-reverse}[aria-disabled=true]:where(.Button),[aria-disabled=true]:where(.Button):is(:hover,:focus,:active){-webkit-backdrop-filter:saturate(180%) blur(62px);backdrop-filter:saturate(180%) blur(62px);background-color:var(--global-disabled-background);color:var(--global-disabled-foreground);cursor:not-allowed;pointer-events:none}[aria-busy=true]:where(.Button){pointer-events:none}[aria-busy=true]:where(.Button)>:not(.SpinnerIndicator){visibility:hidden}.SpinnerIndicator{bottom:0;display:grid;left:0;place-content:center;position:absolute;right:0;top:0}.ButtonsGroup{display:inline-flex}.ButtonsGroup>*+*{box-shadow:inset 1px 0 0 hsla(0,0%,40%,.2)}.ButtonsGroup>:not(:first-child,:last-child,:only-of-type){border-radius:0}.ButtonsGroup>:first-child:not(:only-of-type){border-bottom-right-radius:0;border-top-right-radius:0}.ButtonsGroup>:last-child:not(:only-of-type){border-bottom-left-radius:0;border-top-left-radius:0}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.Chip{background-color:var(--highlight-gray-background);block-size:2rem;border-radius:3rem;color:var(--highlight-gray-foreground);font-size:1rem;font-weight:600;padding:.25rem .5rem}.Chip[data-chip-dimension=small]{block-size:1.5rem;font-size:.88rem}.Chip[data-chip-dimension=big]{font-size:1.13rem}.Chip[data-chip-color=cyan]{background-color:var(--highlight-cyan-background);color:var(--highlight-cyan-foreground)}.Chip[data-chip-color=green]{background-color:var(--highlight-green-background);color:var(--highlight-green-foreground)}.Chip[data-chip-color=purple]{background-color:var(--highlight-purple-background);color:var(--highlight-purple-foreground)}.Chip[data-chip-color=yellow]{background-color:var(--highlight-yellow-background);color:var(--highlight-yellow-foreground)}.Chip[data-chip-color=red]{background-color:var(--highlight-red-background);color:var(--highlight-red-foreground)}.Chip[data-chip-color=blue]{background-color:var(--highlight-blue-background);color:var(--highlight-blue-foreground)}.Chip[data-chip-color=magenta]{background-color:var(--highlight-magenta-background);color:var(--highlight-magenta-foreground)}.Chip[data-chip-color=violet]{background-color:var(--highlight-violet-background);color:var(--highlight-violet-foreground)}.Chip[data-chip-color=indigo]{background-color:var(--highlight-indigo-background);color:var(--highlight-indigo-foreground)}.Chip[data-chip-color=mint]{background-color:var(--highlight-mint-background);color:var(--highlight-mint-foreground)}.Chip[data-chip-color=dipsy]{background-color:var(--highlight-dipsy-background);color:var(--highlight-dipsy-foreground)}.Chip[data-chip-color=salmon]{background-color:var(--highlight-salmon-background);color:var(--highlight-salmon-foreground)}.Action{
|
|
1
|
+
.Chip{background-color:var(--highlight-gray-background);block-size:2rem;border-radius:3rem;color:var(--highlight-gray-foreground);font-size:1rem;font-weight:600;padding:.25rem .5rem}.Chip[data-chip-dimension=small]{block-size:1.5rem;font-size:.88rem}.Chip[data-chip-dimension=big]{font-size:1.13rem}.Chip[data-chip-color=cyan]{background-color:var(--highlight-cyan-background);color:var(--highlight-cyan-foreground)}.Chip[data-chip-color=green]{background-color:var(--highlight-green-background);color:var(--highlight-green-foreground)}.Chip[data-chip-color=purple]{background-color:var(--highlight-purple-background);color:var(--highlight-purple-foreground)}.Chip[data-chip-color=yellow]{background-color:var(--highlight-yellow-background);color:var(--highlight-yellow-foreground)}.Chip[data-chip-color=red]{background-color:var(--highlight-red-background);color:var(--highlight-red-foreground)}.Chip[data-chip-color=blue]{background-color:var(--highlight-blue-background);color:var(--highlight-blue-foreground)}.Chip[data-chip-color=magenta]{background-color:var(--highlight-magenta-background);color:var(--highlight-magenta-foreground)}.Chip[data-chip-color=violet]{background-color:var(--highlight-violet-background);color:var(--highlight-violet-foreground)}.Chip[data-chip-color=indigo]{background-color:var(--highlight-indigo-background);color:var(--highlight-indigo-foreground)}.Chip[data-chip-color=mint]{background-color:var(--highlight-mint-background);color:var(--highlight-mint-foreground)}.Chip[data-chip-color=dipsy]{background-color:var(--highlight-dipsy-background);color:var(--highlight-dipsy-foreground)}.Chip[data-chip-color=salmon]{background-color:var(--highlight-salmon-background);color:var(--highlight-salmon-foreground)}.Action{appearance:none;background:none;border:0;color:inherit;cursor:pointer;display:inline-flex;font:inherit;margin-top:1px;padding:0}
|
|
@@ -9,8 +9,12 @@ export declare type ClampTextProps = {
|
|
|
9
9
|
* Define how many lines the text should be clamped to.
|
|
10
10
|
*/
|
|
11
11
|
rows?: number;
|
|
12
|
+
/**
|
|
13
|
+
* Show the full text when element is hovered with pointer.
|
|
14
|
+
*/
|
|
15
|
+
expandable?: boolean;
|
|
12
16
|
};
|
|
13
|
-
declare type PolymorphicClampText = Polymorphic.ForwardRefComponent<'
|
|
17
|
+
declare type PolymorphicClampText = Polymorphic.ForwardRefComponent<'div', ClampTextProps>;
|
|
14
18
|
export declare const ClampText: PolymorphicClampText;
|
|
15
19
|
export {};
|
|
16
20
|
//# sourceMappingURL=clamp-text.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clamp-text.d.ts","sourceRoot":"","sources":["../../../src/components/clamp-text/clamp-text.tsx"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"clamp-text.d.ts","sourceRoot":"","sources":["../../../src/components/clamp-text/clamp-text.tsx"],"names":[],"mappings":"AACA,OAAO,EACsB,SAAS,EACrC,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,WAAW,EAAyB,MAAM,cAAc,CAAC;AAIlE,oBAAY,cAAc,GAAG;IAC3B;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAA;AAED,aAAK,oBAAoB,GAAG,WAAW,CAAC,mBAAmB,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC;AAEnF,eAAO,MAAM,SAAS,sBAgDI,CAAC"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import clsx from 'clsx';
|
|
3
|
-
import { forwardRef } from 'react';
|
|
3
|
+
import { forwardRef, useState, } from 'react';
|
|
4
|
+
import { ToggleButton, Tooltip } from '../..';
|
|
4
5
|
import styles from './clamp-text.module.css';
|
|
5
|
-
export const ClampText = forwardRef(({ className, children, rows = 1, style, as: Wrapper = '
|
|
6
|
+
export const ClampText = forwardRef(({ className, children, rows = 1, style, expandable, as: Wrapper = 'div', ...otherProps }, forwardedRef) => {
|
|
7
|
+
const [isExpanded, setIsExpandend] = useState(false);
|
|
6
8
|
const dynamicStyle = {
|
|
7
9
|
'--r': rows,
|
|
8
10
|
};
|
|
9
|
-
return (
|
|
11
|
+
return (_jsxs(Wrapper, { ref: forwardedRef, className: clsx(styles.ClampText, className), ...otherProps, children: [_jsx("span", { className: styles.Content, "data-clamp-text-expanded": isExpanded, style: { ...dynamicStyle, ...style }, children: children }), expandable && (_jsxs(Tooltip, { trigger: (_jsx(ToggleButton, { className: styles.Trigger, pressed: isExpanded, onClick: () => setIsExpandend(state => !state), restingIcon: "plus", pressedIcon: "minus", dimension: "small", kind: "secondary" })), children: [`${isExpanded ? 'Collapse' : 'Expand'} text`, ' ', "text"] }))] }));
|
|
10
12
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ClampText{-webkit-line-clamp:var(--r,1);-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}
|
|
1
|
+
.ClampText{display:inline-block;position:relative}.Content{-webkit-line-clamp:var(--r,1);-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;padding-right:1.75rem}.Content[data-clamp-text-expanded=true]{-webkit-line-clamp:unset}.Trigger{position:absolute;right:0;top:.25rem}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../../src/components/drawer/drawer.tsx"],"names":[],"mappings":"AAIA,OAAO,EACsB,SAAS,EACrC,MAAM,OAAO,CAAC;AASf,oBAAY,WAAW,GAAG;IACxB;;;;;;OAMG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;IAClC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACxB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAA;AAED,eAAO,MAAM,MAAM,EAAE,eAAe,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../../src/components/drawer/drawer.tsx"],"names":[],"mappings":"AAIA,OAAO,EACsB,SAAS,EACrC,MAAM,OAAO,CAAC;AASf,oBAAY,WAAW,GAAG;IACxB;;;;;;OAMG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;IAClC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACxB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAA;AAED,eAAO,MAAM,MAAM,EAAE,eAAe,CAAC,WAAW,CA4F9C,CAAC"}
|
|
@@ -9,10 +9,6 @@ import { Elevator, IconButton, Stack, Title, useOverlayContext, } from '../..';
|
|
|
9
9
|
import styles from './drawer.module.css';
|
|
10
10
|
export const Drawer = forwardRef(({ children, className, closeOnClickOutside = true, showHeader = true, maxWidth = '400px', side = 'right', theme = 'light', isModal = true, title, ...otherProps }, forwardedRef) => {
|
|
11
11
|
const { titleId, onClose } = useOverlayContext();
|
|
12
|
-
const cssEasingToArray = (cssEasing) => {
|
|
13
|
-
const [x1, y1, x2, y2] = cssEasing.replace(/[^0-9.,]+/g, '').split(',').map(i => parseFloat(i));
|
|
14
|
-
return [x1, y1, x2, y2];
|
|
15
|
-
};
|
|
16
12
|
useKeyPress('esc', () => (!isModal && onClose) && onClose());
|
|
17
13
|
const dynamicStyle = {
|
|
18
14
|
'--max-w': maxWidth,
|
|
@@ -21,14 +17,16 @@ export const Drawer = forwardRef(({ children, className, closeOnClickOutside = t
|
|
|
21
17
|
visible: {
|
|
22
18
|
x: 0,
|
|
23
19
|
transition: {
|
|
24
|
-
|
|
20
|
+
type: 'spring',
|
|
21
|
+
bounce: 0,
|
|
25
22
|
duration: parseFloat(tkns.duration[500].replace('s', '')),
|
|
26
23
|
},
|
|
27
24
|
},
|
|
28
25
|
hidden: {
|
|
29
26
|
x: side === 'right' ? '100%' : '-100%',
|
|
30
27
|
transition: {
|
|
31
|
-
|
|
28
|
+
type: 'spring',
|
|
29
|
+
bounce: 0,
|
|
32
30
|
duration: parseFloat(tkns.duration[500].replace('s', '')),
|
|
33
31
|
},
|
|
34
32
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.Drawer{display:contents}.Container{align-items:stretch;bottom:0;display:grid;left:0;pointer-events:none;position:absolute;right:0;top:0}.Container[data-drawer-side=right]{justify-content:flex-end}.Container[data-drawer-side=left]{justify-content:flex-start}@media (min-width:30em){.Container{overflow:auto}}.Container>*{pointer-events:auto}.Content{-webkit-overflow-scrolling:touch;background-color:var(--global-background);inline-size:
|
|
1
|
+
.Drawer{display:contents}.Container{align-items:stretch;bottom:0;display:grid;left:0;pointer-events:none;position:absolute;right:0;top:0}.Container[data-drawer-side=right]{justify-content:flex-end}.Container[data-drawer-side=left]{justify-content:flex-start}@media (min-width:30em){.Container{overflow:auto}}.Container>*{pointer-events:auto}.Content{-webkit-overflow-scrolling:touch;background-color:var(--global-background);inline-size:100vw;max-inline-size:var(--max-w);overflow:auto;overscroll-behavior:contain}.Header{background-color:inherit;border-bottom:1px solid var(--dimmed-1);padding:1rem 1rem 1.5rem 1.5rem;position:sticky;top:0;z-index:1}.CloseButton.CloseButton{flex-grow:0}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { StackProps, SymbolProps } from '../..';
|
|
3
|
-
export declare type InfoStateProps = {
|
|
3
|
+
export declare type InfoStateProps = PropsWithClass<{
|
|
4
4
|
/**
|
|
5
5
|
* Set the main tagline of the info state. This should be catchy and short
|
|
6
6
|
* as much as possible.
|
|
@@ -29,9 +29,40 @@ export declare type InfoStateProps = {
|
|
|
29
29
|
* as many elements as you want, we suggest to add no more than two actions.
|
|
30
30
|
*/
|
|
31
31
|
actions?: ReactNode;
|
|
32
|
-
}
|
|
32
|
+
}>;
|
|
33
33
|
export declare const InfoState: import("react").ForwardRefExoticComponent<{
|
|
34
34
|
style?: Record<string, any> | undefined;
|
|
35
35
|
className?: string | undefined;
|
|
36
|
-
} &
|
|
36
|
+
} & {
|
|
37
|
+
/**
|
|
38
|
+
* Set the main tagline of the info state. This should be catchy and short
|
|
39
|
+
* as much as possible.
|
|
40
|
+
*/
|
|
41
|
+
title: ReactNode;
|
|
42
|
+
/**
|
|
43
|
+
* The icon to display. This is used to enforce the message of the info state.
|
|
44
|
+
* This is not displayed if `image` is set.
|
|
45
|
+
*/
|
|
46
|
+
icon?: import("packages/symbols/dist").SymbolNames | import("react").ReactElement<HTMLOrSVGElement, string | import("react").JSXElementConstructor<any>> | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* Set the icon color. Please use the correct color based on the type of the message.
|
|
49
|
+
* Eg. Don't use `green` for negative informations.
|
|
50
|
+
*/
|
|
51
|
+
iconColor?: "gray" | "cyan" | "green" | "purple" | "yellow" | "red" | "blue" | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* An image may be used instead of an icon. The image is centered and scaled.
|
|
54
|
+
*/
|
|
55
|
+
image?: string | undefined;
|
|
56
|
+
/**
|
|
57
|
+
* Set the direction of the content (column or row).
|
|
58
|
+
*/
|
|
59
|
+
direction?: StackProps['direction'];
|
|
60
|
+
/**
|
|
61
|
+
* Pass the suplementary actions to the info state. Even if you can pass
|
|
62
|
+
* as many elements as you want, we suggest to add no more than two actions.
|
|
63
|
+
*/
|
|
64
|
+
actions?: ReactNode;
|
|
65
|
+
} & {
|
|
66
|
+
children?: ReactNode;
|
|
67
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
37
68
|
//# sourceMappingURL=info-state.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"info-state.d.ts","sourceRoot":"","sources":["../../../src/components/info-state/info-state.tsx"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"info-state.d.ts","sourceRoot":"","sources":["../../../src/components/info-state/info-state.tsx"],"names":[],"mappings":"AACA,OAAO,EAAiC,SAAS,EAAE,MAAM,OAAO,CAAC;AAEjE,OAAO,EACE,UAAU,EAAU,WAAW,EACvC,MAAM,cAAc,CAAC;AAItB,oBAAY,cAAc,GAAG,cAAc,CAAC;IAC1C;;;OAGG;IACH,KAAK,EAAE,SAAS,CAAC;IACjB;;;OAGG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IAC7B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC;IAC7E;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,SAAS,CAAC,EAAE,UAAU,CAAC,WAAW,CAAC,CAAC;IACpC;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB,CAAC,CAAA;AAEF,eAAO,MAAM,SAAS;;;;IA9BpB;;;OAGG;WACI,SAAS;IAChB;;;OAGG;;IAEH;;;OAGG;;IAEH;;OAEG;;IAEH;;OAEG;gBACS,UAAU,CAAC,WAAW,CAAC;IACnC;;;OAGG;cACO,SAAS;;;kDAoEnB,CAAC"}
|
|
@@ -7,7 +7,7 @@ export declare type InputGroupProps = {
|
|
|
7
7
|
/**
|
|
8
8
|
* Add a decoration element after the input.
|
|
9
9
|
*/
|
|
10
|
-
|
|
10
|
+
prefix?: ReactNode;
|
|
11
11
|
/**
|
|
12
12
|
* Add a decoration element before the input.
|
|
13
13
|
*/
|
|
@@ -15,11 +15,15 @@ export declare type InputGroupProps = {
|
|
|
15
15
|
/**
|
|
16
16
|
* Add an accessible label to the componsed input group
|
|
17
17
|
*/
|
|
18
|
-
|
|
18
|
+
suffix?: ReactNode;
|
|
19
19
|
/**
|
|
20
20
|
* Pass the dimension down to the imput element.
|
|
21
21
|
*/
|
|
22
22
|
dimension?: 'small' | 'big' | 'regular';
|
|
23
|
+
/**
|
|
24
|
+
* Assign a label to the center field.
|
|
25
|
+
*/
|
|
26
|
+
label?: string;
|
|
23
27
|
};
|
|
24
28
|
export declare const InputGroup: import("react").ForwardRefExoticComponent<{
|
|
25
29
|
style?: Record<string, any> | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-group.d.ts","sourceRoot":"","sources":["../../../src/components/input-group/input-group.tsx"],"names":[],"mappings":"AACA,OAAO,EAC+C,SAAS,EAC9D,MAAM,OAAO,CAAC;AAOf,oBAAY,eAAe,GAAG;IAC5B;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC;IACjB;;OAEG;IACH,
|
|
1
|
+
{"version":3,"file":"input-group.d.ts","sourceRoot":"","sources":["../../../src/components/input-group/input-group.tsx"],"names":[],"mappings":"AACA,OAAO,EAC+C,SAAS,EAC9D,MAAM,OAAO,CAAC;AAOf,oBAAY,eAAe,GAAG;IAC5B;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC;IACjB;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB;;OAEG;IACH,GAAG,CAAC,EAAE,SAAS,CAAC;IAChB;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,KAAK,GAAG,SAAS,CAAC;IACxC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAA;AAED,eAAO,MAAM,UAAU;;;yEA4DrB,CAAC"}
|
|
@@ -4,14 +4,14 @@ import { Children, cloneElement, forwardRef, isValidElement, } from 'react';
|
|
|
4
4
|
import { useUIDSeed } from 'react-uid';
|
|
5
5
|
import { Stack, Text } from '../..';
|
|
6
6
|
import styles from './input-group.module.css';
|
|
7
|
-
export const InputGroup = forwardRef(({ className, input,
|
|
7
|
+
export const InputGroup = forwardRef(({ className, input, suffix, prefix, label, dimension = 'regular', ...otherProps }, forwardedRef) => {
|
|
8
8
|
const seedID = useUIDSeed();
|
|
9
|
-
return (_jsxs(Stack, { rowGap: 4, hAlign: "stretch", vAlign: "start", fill: false, children: [label && _jsx(Text, { as: "label", size: dimension === 'small' ? 14 : 16, htmlFor: seedID('field'), children: label }), _jsxs(Stack, { as: "fieldset", direction: "row", vAlign: "start", hAlign: "start", fill: false, inline: true, ref: forwardedRef, className: clsx(styles.InputGroup, className), "data-input-group-has-end": Boolean(
|
|
9
|
+
return (_jsxs(Stack, { rowGap: 4, hAlign: "stretch", vAlign: "start", fill: false, children: [label && _jsx(Text, { as: "label", size: dimension === 'small' ? 14 : 16, htmlFor: seedID('field'), children: label }), _jsxs(Stack, { as: "fieldset", direction: "row", vAlign: "start", hAlign: "start", fill: false, inline: true, ref: forwardedRef, className: clsx(styles.InputGroup, className), "data-input-group-has-end": Boolean(suffix), "data-input-group-has-start": !!prefix, ...otherProps, children: [_jsx("div", { className: styles.Start, children: Children.map(prefix, child => isValidElement(child) && cloneElement(child, {
|
|
10
10
|
dimension,
|
|
11
11
|
})) }), _jsx("div", { className: styles.InputField, children: Children.map(input, child => isValidElement(child) && cloneElement(child, {
|
|
12
12
|
id: seedID('field'),
|
|
13
13
|
dimension,
|
|
14
|
-
})) }), _jsx("div", { className: styles.End, children: Children.map(
|
|
14
|
+
})) }), _jsx("div", { className: styles.End, children: Children.map(suffix, child => isValidElement(child) && cloneElement(child, {
|
|
15
15
|
dimension,
|
|
16
16
|
})) })] })] }));
|
|
17
17
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.LinearProgress,.Progress{position:relative}.Progress{--progress-height:0.25rem;--track-color:var(--dimmed-1);--fill-color:var(--cta-default)
|
|
1
|
+
.LinearProgress,.Progress{position:relative}.Progress{--progress-height:0.25rem;--track-color:var(--dimmed-1);--fill-color:var(--cta-default);appearance:none;background:var(--track-color);border:none;display:block;height:var(--progress-height);overflow:hidden;vertical-align:baseline;width:100%}.Progress[data-progress-dimension=big]{--progress-height:0.50rem}.Progress::-webkit-progress-bar{background-color:transparent}.Progress::-webkit-progress-value{background:var(--fill-color);-webkit-transition:width .2s cubic-bezier(0,0,.34,1);transition:width .2s cubic-bezier(0,0,.34,1)}.Progress::-moz-progress-bar{background:var(--fill-color)}.Progress:not([value])::-moz-progress-bar{background:transparent}.Progress:indeterminate{animation:progress-stripes 2s linear infinite;background-image:linear-gradient(to right,transparent 50%,var(--fill-color) 50%,var(--fill-color) 60%,transparent 60%,transparent 71.5%,var(--fill-color) 71.5%,var(--fill-color) 84%,transparent 84%);background-size:200% 100%}.Percentage{left:var(--offset);position:absolute;transform:translateX(var(--translation));transition:left .2s cubic-bezier(0,0,.34,1)}@keyframes progress-stripes{0%{background-position:left -31.25% top 0;background-size:200% 100%}50%{background-position:left -49% top 0;background-size:800% 100%}to{background-position:left -102% top 0;background-size:400% 100%}}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
2
|
import { Polymorphic } from '../..';
|
|
3
3
|
import { ListItemProps } from './list-item';
|
|
4
|
-
export declare type ListProps = {
|
|
4
|
+
export declare type ListProps = PropsWithChildren<{
|
|
5
5
|
/**
|
|
6
6
|
* Set the dimension of the items in the list. This affects also the marker size.
|
|
7
7
|
*/
|
|
@@ -10,7 +10,7 @@ export declare type ListProps = {
|
|
|
10
10
|
* Set to show or hide the marker indicator beside each item in the list.
|
|
11
11
|
*/
|
|
12
12
|
hideMarker?: boolean;
|
|
13
|
-
}
|
|
13
|
+
}>;
|
|
14
14
|
declare type PolymorphicList = Polymorphic.ForwardRefComponent<'ul', ListProps> & {
|
|
15
15
|
Li: React.ForwardRefExoticComponent<ListItemProps>;
|
|
16
16
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/components/list/list.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/components/list/list.tsx"],"names":[],"mappings":"AACA,OAAO,EAC+C,iBAAiB,EACtE,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAG3C,OAAO,EAAY,aAAa,EAAE,MAAM,aAAa,CAAC;AAEtD,oBAAY,SAAS,GAAG,iBAAiB,CAAC;IACxC;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,KAAK,CAAC;IACxC;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC,CAAA;AAEF,aAAK,eAAe,GAAG,WAAW,CAAC,mBAAmB,CAAC,IAAI,EAAE,SAAS,CAAC,GAAG;IACxE,EAAE,EAAE,KAAK,CAAC,yBAAyB,CAAC,aAAa,CAAC,CAAC;CACpD,CAAC;AAEF,eAAO,MAAM,IAAI,iBA4BI,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.List{--marker-size:1.00rem;--marker-gap:0.50rem}.List[data-list-ordered=false]{list-style:none;padding:0}.List[data-list-size=small]{--marker-size:0.77rem;--marker-gap:0.50rem}.List[data-list-size=big]{--marker-size:1.11rem;--marker-gap:1.00rem}.List[data-list-no-marker=true]{--marker-size:0;--marker-gap:0;list-style:none;padding:0}.ListItem.ListItem{gap:var(--marker-gap)}[data-list-ordered=true] .ListItem.ListItem{display:list-item}[data-list-ordered=true] .ListItem.ListItem::marker{color:var(--dimmed-5)}.Marker{block-size:var(--marker-size);flex-shrink:0;inline-size:var(--marker-size);margin-block-start:calc(var(--marker-size)/2.5)}.Marker[data-list-default-marker=true]{transform:scale(.7)}.List[data-list-size=big] .Marker,.Marker[data-list-default-marker=true]{margin-block-start:calc(var(--marker-size)/3)}
|
|
1
|
+
.List{--marker-size:1.00rem;--marker-gap:0.50rem}.List[data-list-ordered=false]{list-style:none;padding:0}.List[data-list-size=small]{--marker-size:0.77rem;--marker-gap:0.50rem}.List[data-list-size=big]{--marker-size:1.11rem;--marker-gap:1.00rem}.List[data-list-no-marker=true]{--marker-size:0;--marker-gap:0;list-style:none;padding:0}.ListItem.ListItem{gap:var(--marker-gap)}[data-list-ordered=true] .ListItem.ListItem{display:list-item}:is([data-list-ordered=true] .ListItem.ListItem)::marker{color:var(--dimmed-5)}.Marker{block-size:var(--marker-size);flex-shrink:0;inline-size:var(--marker-size);margin-block-start:calc(var(--marker-size)/2.5)}.Marker[data-list-default-marker=true]{transform:scale(.7)}.List[data-list-size=big] .Marker,.Marker[data-list-default-marker=true]{margin-block-start:calc(var(--marker-size)/3)}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
export declare type ModalContentProps = {
|
|
1
|
+
import { PropsWithChildren, ReactNode } from 'react';
|
|
2
|
+
export declare type ModalContentProps = PropsWithChildren<PropsWithClass<{
|
|
3
3
|
/**
|
|
4
4
|
* Set the accessible title of the modal. This is used by screen readers to
|
|
5
5
|
* announce the title of the modal when opened.
|
|
@@ -10,9 +10,22 @@ export declare type ModalContentProps = {
|
|
|
10
10
|
* this is set to `light` by default.
|
|
11
11
|
*/
|
|
12
12
|
theme?: 'dark' | 'light' | 'auto';
|
|
13
|
-
}
|
|
13
|
+
}>>;
|
|
14
14
|
export declare const ModalContent: import("react").ForwardRefExoticComponent<{
|
|
15
15
|
style?: Record<string, any> | undefined;
|
|
16
16
|
className?: string | undefined;
|
|
17
|
-
} &
|
|
17
|
+
} & {
|
|
18
|
+
/**
|
|
19
|
+
* Set the accessible title of the modal. This is used by screen readers to
|
|
20
|
+
* announce the title of the modal when opened.
|
|
21
|
+
*/
|
|
22
|
+
title: ReactNode;
|
|
23
|
+
/**
|
|
24
|
+
* Set the theme of the content card. To ensure contrast with the default overlay color (dark),
|
|
25
|
+
* this is set to `light` by default.
|
|
26
|
+
*/
|
|
27
|
+
theme?: "auto" | "dark" | "light" | undefined;
|
|
28
|
+
} & {
|
|
29
|
+
children?: ReactNode;
|
|
30
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
18
31
|
//# sourceMappingURL=modal-content.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal-content.d.ts","sourceRoot":"","sources":["../../../../src/components/modal/content/modal-content.tsx"],"names":[],"mappings":"AACA,OAAO,EAAc,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"modal-content.d.ts","sourceRoot":"","sources":["../../../../src/components/modal/content/modal-content.tsx"],"names":[],"mappings":"AACA,OAAO,EAAc,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AASjE,oBAAY,iBAAiB,GAAG,iBAAiB,CAAC,cAAc,CAAC;IAC/D;;;OAGG;IACH,KAAK,EAAE,SAAS,CAAC;IACjB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;CACnC,CAAC,CAAC,CAAA;AAEH,eAAO,MAAM,YAAY;;;;IAZvB;;;OAGG;WACI,SAAS;IAChB;;;OAGG;;;;kDA+BH,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
2
|
import { ModalContentProps } from './content/modal-content';
|
|
3
|
-
export declare type ModalProps = {
|
|
3
|
+
export declare type ModalProps = PropsWithChildren<PropsWithClass<{
|
|
4
4
|
/**
|
|
5
5
|
* This enable the modal to be closed by clicking on the overlay.
|
|
6
6
|
* Even if this can be set to `false` we strongly recommend to leave
|
|
7
7
|
* it to `true` as it ensures the accessibility of the modal.
|
|
8
8
|
*/
|
|
9
9
|
closeOnClickOutside?: boolean;
|
|
10
|
-
}
|
|
10
|
+
}>>;
|
|
11
11
|
declare type ModalComponent = React.ForwardRefExoticComponent<ModalProps> & {
|
|
12
12
|
Content: React.ForwardRefExoticComponent<ModalContentProps>;
|
|
13
13
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../../src/components/modal/modal.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../../src/components/modal/modal.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAc,iBAAiB,EAAW,MAAM,OAAO,CAAC;AAK/D,OAAO,EAAgB,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAG1E,oBAAY,UAAU,GAAG,iBAAiB,CAAC,cAAc,CAAC;IACxD;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B,CAAC,CAAC,CAAA;AAEH,aAAK,cAAc,GAAG,KAAK,CAAC,yBAAyB,CAAC,UAAU,CAAC,GAAG;IAClE,OAAO,EAAE,KAAK,CAAC,yBAAyB,CAAC,iBAAiB,CAAC,CAAC;CAC7D,CAAA;AAOD,eAAO,MAAM,KAAK,gBAyDE,CAAC"}
|
|
@@ -1,23 +1,19 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import tkns from '@wonderflow/tokens/platforms/web/tokens.json';
|
|
3
|
-
import { configResponsive, useResponsive } from 'ahooks';
|
|
4
3
|
import clsx from 'clsx';
|
|
5
4
|
import { domMax, LazyMotion, m } from 'framer-motion';
|
|
6
5
|
import { forwardRef, useMemo } from 'react';
|
|
7
6
|
import { FocusOn } from 'react-focus-on';
|
|
8
|
-
import { useOverlayContext } from '../..';
|
|
7
|
+
import { useOverlayContext, useResponsiveContext } from '../..';
|
|
9
8
|
import { ModalContent } from './content/modal-content';
|
|
10
9
|
import styles from './modal.module.css';
|
|
11
10
|
const cssEasingToArray = (cssEasing) => {
|
|
12
11
|
const [x1, y1, x2, y2] = cssEasing.replace(/[^0-9.,]+/g, '').split(',').map(i => parseFloat(i));
|
|
13
12
|
return [x1, y1, x2, y2];
|
|
14
13
|
};
|
|
15
|
-
configResponsive({
|
|
16
|
-
wide: 768,
|
|
17
|
-
});
|
|
18
14
|
export const Modal = forwardRef(({ children, className, closeOnClickOutside = true, ...otherProps }, forwardedRef) => {
|
|
19
15
|
const { titleId, onClose } = useOverlayContext();
|
|
20
|
-
const
|
|
16
|
+
const { matches } = useResponsiveContext();
|
|
21
17
|
const ModalAnimation = useMemo(() => ({
|
|
22
18
|
visible: {
|
|
23
19
|
scale: 1,
|
|
@@ -29,15 +25,15 @@ export const Modal = forwardRef(({ children, className, closeOnClickOutside = tr
|
|
|
29
25
|
},
|
|
30
26
|
},
|
|
31
27
|
hidden: {
|
|
32
|
-
scale:
|
|
33
|
-
opacity:
|
|
34
|
-
y:
|
|
28
|
+
scale: matches.small ? 0.98 : 1,
|
|
29
|
+
opacity: matches.small ? 0 : 1,
|
|
30
|
+
y: matches.small ? 0 : '100%',
|
|
35
31
|
transition: {
|
|
36
32
|
ease: cssEasingToArray(tkns.easing.exit),
|
|
37
|
-
duration:
|
|
33
|
+
duration: matches.small ? parseFloat(tkns.duration[200].replace('s', '')) : parseFloat(tkns.duration[500].replace('s', '')),
|
|
38
34
|
},
|
|
39
35
|
},
|
|
40
|
-
}), [
|
|
36
|
+
}), [matches]);
|
|
41
37
|
return (_jsx("div", { role: "dialog", "aria-modal": "true", "aria-labelledby": titleId, className: clsx(styles.Modal, className), ref: forwardedRef, ...otherProps, children: _jsx(FocusOn, { onClickOutside: closeOnClickOutside ? onClose : undefined, onEscapeKey: onClose, children: _jsx(LazyMotion, { features: domMax, children: _jsx(m.div, { variants: ModalAnimation, initial: "hidden", animate: "visible", exit: "hidden", className: styles.Container, children: children }) }) }) }));
|
|
42
38
|
});
|
|
43
39
|
Modal.displayName = 'Modal';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/overlay-container/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/overlay-container/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"overlay-container.d.ts","sourceRoot":"","sources":["../../../src/components/overlay-container/overlay-container.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAa,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"overlay-container.d.ts","sourceRoot":"","sources":["../../../src/components/overlay-container/overlay-container.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAa,MAAM,OAAO,CAAC;AAQ7C,oBAAY,qBAAqB,GAAG;IAClC;;;;OAIG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;IACzC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,UAAU,CAAC,qBAAqB,CA8C9D,CAAC"}
|
|
@@ -3,8 +3,8 @@ import { AnimatePresence, domMax, LazyMotion, m, } from 'framer-motion';
|
|
|
3
3
|
import { useEffect } from 'react';
|
|
4
4
|
import { createPortal } from 'react-dom';
|
|
5
5
|
import { useUIDSeed } from 'react-uid';
|
|
6
|
+
import { OverlayProvider } from '../..';
|
|
6
7
|
import styles from './overlay-container.module.css';
|
|
7
|
-
import { OverlayProvider } from './overlay-context';
|
|
8
8
|
export const OverlayContainer = ({ children, root = document.body, overlayColor = 'dark', index = 4, obfuscate = true, onClose, }) => {
|
|
9
9
|
const seedID = useUIDSeed();
|
|
10
10
|
useEffect(() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.OverlayContainer{bottom:0;display:block;left:0;position:fixed;right:0;top:0}.OverlayContainer[data-overlay-container-obfuscate=false]{pointer-events:none}.Backdrop{background-color:var(--dimmed-0);bottom:0;left:0;position:fixed;right:0;top:0;z-index:-1}.Backdrop[data-overlay-color=light]{background-color:#f9fafb}.Backdrop[data-overlay-color=dark]{background-color:#202328}
|
|
1
|
+
.OverlayContainer{bottom:0;display:block;left:0;position:fixed;right:0;top:0}.OverlayContainer[data-overlay-container-obfuscate=false]{pointer-events:none}.OverlayContainer[data-overlay-container-obfuscate=false]>*{pointer-events:auto}.Backdrop{background-color:var(--dimmed-0);bottom:0;left:0;position:fixed;right:0;top:0;z-index:-1}.Backdrop[data-overlay-color=light]{background-color:#f9fafb}.Backdrop[data-overlay-color=dark]{background-color:#202328}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/popover/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/popover/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../../src/components/popover/popover.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EAAE,aAAa,EAAY,kBAAkB,EAC3D,MAAM,gBAAgB,CAAC;AAOxB,OAAO,EAKL,SAAS,EAKV,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../../src/components/popover/popover.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EAAE,aAAa,EAAY,kBAAkB,EAC3D,MAAM,gBAAgB,CAAC;AAOxB,OAAO,EAKL,SAAS,EAKV,MAAM,OAAO,CAAC;AAOf,oBAAY,YAAY,GAAG;IACzB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,OAAO,EAAE,SAAS,CAAC;IACnB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE,aAAa,GAAG,aAAa,GAAG,kBAAkB,CAAC;IAC/D;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;OAEG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B,CAAA;AA0BD,eAAO,MAAM,OAAO;;;iEA8HlB,CAAC"}
|
|
@@ -4,6 +4,7 @@ import { useFocusWithin, useKeyPress } from 'ahooks';
|
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import { AnimatePresence, domMax, LazyMotion, m, } from 'framer-motion';
|
|
6
6
|
import { Children, cloneElement, forwardRef, isValidElement, useEffect, useMemo, useRef, useState, } from 'react';
|
|
7
|
+
import { mergeRefs } from 'react-merge-refs';
|
|
7
8
|
import { usePopperTooltip } from 'react-popper-tooltip';
|
|
8
9
|
import { useUIDSeed } from 'react-uid';
|
|
9
10
|
import styles from './popover.module.css';
|
|
@@ -31,8 +32,8 @@ const PopoverAnimation = {
|
|
|
31
32
|
};
|
|
32
33
|
export const Popover = forwardRef(({ children, trigger, offset = 8, placement = 'auto-start', open, disabled, closeOnOutsideClick = true, className, matchTriggerWidth, onOpenChange, ...otherProps }, forwardedRef) => {
|
|
33
34
|
const seedID = useUIDSeed();
|
|
34
|
-
const popoverRef = useRef(forwardedRef);
|
|
35
35
|
const [isOpen, setIsOpen] = useState(false);
|
|
36
|
+
const popoverContainerRef = useRef(null);
|
|
36
37
|
const sameWidth = useMemo(() => ({
|
|
37
38
|
name: 'sameWidth',
|
|
38
39
|
enabled: true,
|
|
@@ -63,6 +64,7 @@ export const Popover = forwardRef(({ children, trigger, offset = 8, placement =
|
|
|
63
64
|
},
|
|
64
65
|
}, {
|
|
65
66
|
placement,
|
|
67
|
+
strategy: 'fixed',
|
|
66
68
|
modifiers: [
|
|
67
69
|
sameWidth,
|
|
68
70
|
{
|
|
@@ -73,7 +75,7 @@ export const Popover = forwardRef(({ children, trigger, offset = 8, placement =
|
|
|
73
75
|
},
|
|
74
76
|
],
|
|
75
77
|
});
|
|
76
|
-
const isFocusWithin = useFocusWithin(
|
|
78
|
+
const isFocusWithin = useFocusWithin(popoverContainerRef, {
|
|
77
79
|
onBlur: (e) => {
|
|
78
80
|
if (e.relatedTarget && visible) {
|
|
79
81
|
setIsOpen(false);
|
|
@@ -85,7 +87,7 @@ export const Popover = forwardRef(({ children, trigger, offset = 8, placement =
|
|
|
85
87
|
if (open !== undefined)
|
|
86
88
|
setIsOpen(open);
|
|
87
89
|
}, [open]);
|
|
88
|
-
return (_jsxs("div", { ref:
|
|
90
|
+
return (_jsxs("div", { ref: mergeRefs([popoverContainerRef, forwardedRef]), className: clsx(styles.Popover, className), "data-popover-has-focus": isFocusWithin, children: [Children.map(trigger, child => isValidElement(child) && cloneElement(child, {
|
|
89
91
|
ref: setTriggerRef,
|
|
90
92
|
id: seedID('popover-trigger'),
|
|
91
93
|
key: seedID('popover-trigger'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.Select{
|
|
1
|
+
.Select{appearance:none;padding:0;position:relative}.Select[data-select-dimension=small]{--field-height:1.50rem;--field-padding:0.33rem;--font-size:0.88rem}.Select[data-select-dimension=regular]{--field-height:2.50rem;--field-padding:1.00rem;--font-size:1.00rem}.Select[data-select-dimension=big]{--field-height:3.00rem;--field-padding:1.00rem;--font-size:1.13rem}.FieldContainer{color:var(--global-vibrancy-foreground);inline-size:100%;position:relative}.Select[aria-disabled=true] .FieldContainer{color:var(--global-disabled-foreground)}.Field{appearance:none;-webkit-backdrop-filter:saturate(180%) blur(62px);backdrop-filter:saturate(180%) blur(62px);background:linear-gradient(to bottom,var(--global-vibrancy-background),var(--global-vibrancy-background));block-size:var(--field-height);border:0;border-radius:.25rem;box-sizing:border-box;color:inherit;display:block;font-family:inherit;font-size:var(--font-size);inline-size:100%;margin:0;overflow:hidden;padding:0 calc(var(--field-padding)*3.5) 0 var(--field-padding);text-overflow:ellipsis}.Field:disabled{background:linear-gradient(to bottom,var(--global-disabled-background),var(--global-disabled-background));color:var(--global-disabled-foreground);cursor:not-allowed}.Field option{color:#000}.Field optgroup{color:initial}.Field[multiple]{block-size:auto;overflow:auto;padding:.5rem 1rem}.Field[multiple] option{color:currentcolor;padding:calc(var(--field-padding)/2) var(--field-padding)}.Field[multiple] option:checked{background:var(--dimmed-4) linear-gradient(to bottom,var(--dimmed-4) 0,var(--dimmed-4) 100%);background-color:var(--dimmed-4);color:var(--dimmed-0)}.Field[multiple] optgroup{color:currentcolor;font-family:inherit;font-size:inherit;line-height:inherit;margin:0 0 1rem}.Icon{border-radius:.25rem;pointer-events:none;position:absolute;right:calc(var(--field-padding) - var(--field-padding)/3);top:calc(var(--field-height)/2);transform:translateY(-50%)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../../src/components/selection-controls/checkbox.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,WAAW,EAAc,mBAAmB,EAC7C,MAAM,OAAO,CAAC;AAIf,oBAAY,aAAa,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,GAAG;IAClE;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAChC;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;CAC3D,CAAA;AAED,eAAO,MAAM,QAAQ;IApBnB;;OAEG;;IAEH;;;OAGG;;IAEH;;OAEG;;IAEH;;;OAGG;wBACgB,YAAY,gBAAgB,CAAC,KAAK,IAAI;
|
|
1
|
+
{"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../../src/components/selection-controls/checkbox.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,WAAW,EAAc,mBAAmB,EAC7C,MAAM,OAAO,CAAC;AAIf,oBAAY,aAAa,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,GAAG;IAClE;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAChC;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;CAC3D,CAAA;AAED,eAAO,MAAM,QAAQ;IApBnB;;OAEG;;IAEH;;;OAGG;;IAEH;;OAEG;;IAEH;;;OAGG;wBACgB,YAAY,gBAAgB,CAAC,KAAK,IAAI;oDA0CzD,CAAC"}
|
|
@@ -3,13 +3,13 @@ import clsx from 'clsx';
|
|
|
3
3
|
import { domAnimation, LazyMotion, m } from 'framer-motion';
|
|
4
4
|
import { forwardRef, useEffect, useRef, } from 'react';
|
|
5
5
|
import styles from './selection-controls.module.css';
|
|
6
|
-
export const Checkbox = forwardRef(({ className, disabled, dimension = 'regular', onChange, indeterminate, ...otherProps }, forwardedRef) => {
|
|
6
|
+
export const Checkbox = forwardRef(({ className, disabled, dimension = 'regular', onChange, indeterminate, hidden, ...otherProps }, forwardedRef) => {
|
|
7
7
|
const ref = useRef(forwardedRef);
|
|
8
8
|
useEffect(() => {
|
|
9
9
|
if (ref.current) {
|
|
10
10
|
ref.current.indeterminate = indeterminate;
|
|
11
11
|
}
|
|
12
12
|
}, [indeterminate]);
|
|
13
|
-
return (_jsx(LazyMotion, { features: domAnimation, strict: true, children: _jsx(m.span, { className: styles.InputWrapper, whileTap: { scale: 1.15 }, transition: { duration: 0.3, ease: 'backOut' }, children: _jsx("input", { type: "checkbox", disabled: disabled, "aria-disabled": disabled, "data-control-dimension": dimension, onChange: onChange, className:
|
|
13
|
+
return (_jsx(LazyMotion, { features: domAnimation, strict: true, children: _jsx(m.span, { className: clsx(styles.InputWrapper, className), whileTap: { scale: 1.15 }, transition: { duration: 0.3, ease: 'backOut' }, "data-radio-control": hidden, children: _jsx("input", { type: "checkbox", disabled: disabled, "aria-disabled": disabled, "data-control-dimension": dimension, onChange: onChange, className: styles.CheckboxInput, ref: ref, hidden: hidden, ...otherProps }) }) }));
|
|
14
14
|
});
|
|
15
15
|
Checkbox.displayName = 'Checkbox';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio.d.ts","sourceRoot":"","sources":["../../../src/components/selection-controls/radio.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAc,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAIrE,oBAAY,UAAU,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,GAAG;IAC/D;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAChC;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;CAC3D,CAAA;AAED,eAAO,MAAM,KAAK;IAfhB;;OAEG;;IAEH;;OAEG;;IAEH;;;OAGG;wBACgB,YAAY,gBAAgB,CAAC,KAAK,IAAI;
|
|
1
|
+
{"version":3,"file":"radio.d.ts","sourceRoot":"","sources":["../../../src/components/selection-controls/radio.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAc,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAIrE,oBAAY,UAAU,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,GAAG;IAC/D;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAChC;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;CAC3D,CAAA;AAED,eAAO,MAAM,KAAK;IAfhB;;OAEG;;IAEH;;OAEG;;IAEH;;;OAGG;wBACgB,YAAY,gBAAgB,CAAC,KAAK,IAAI;oDA+BzD,CAAC"}
|
|
@@ -3,5 +3,5 @@ import clsx from 'clsx';
|
|
|
3
3
|
import { domAnimation, LazyMotion, m } from 'framer-motion';
|
|
4
4
|
import { forwardRef } from 'react';
|
|
5
5
|
import styles from './selection-controls.module.css';
|
|
6
|
-
export const Radio = forwardRef(({ className, disabled, dimension = 'regular', onChange, ...otherProps }, forwardedRef) => (_jsx(LazyMotion, { features: domAnimation, strict: true, children: _jsx(m.span, { className: styles.InputWrapper, whileTap: { scale: 1.15 }, transition: { duration: 0.3, ease: 'backOut' }, children: _jsx("input", { type: "radio", disabled: disabled, "aria-disabled": disabled, "data-control-dimension": dimension, onChange: onChange, className:
|
|
6
|
+
export const Radio = forwardRef(({ className, disabled, dimension = 'regular', onChange, hidden, ...otherProps }, forwardedRef) => (_jsx(LazyMotion, { features: domAnimation, strict: true, children: _jsx(m.span, { className: clsx(styles.InputWrapper, className), whileTap: { scale: 1.15 }, transition: { duration: 0.3, ease: 'backOut' }, "data-radio-control": hidden, children: _jsx("input", { type: "radio", disabled: disabled, "aria-disabled": disabled, "data-control-dimension": dimension, onChange: onChange, className: styles.RadioInput, ref: forwardedRef, hidden: hidden, ...otherProps }) }) })));
|
|
7
7
|
Radio.displayName = 'Radio';
|