@wonderflow/react-components 10.20.0 → 11.0.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/core/basic.css +1 -1
- package/core.css +1 -1
- package/dist/components/accordion/accordion.test.js +0 -15
- package/dist/components/aspect-ratio/aspect-ratio.test.js +0 -15
- package/dist/components/autocomplete/autocomplete.d.ts +4 -0
- package/dist/components/autocomplete/autocomplete.d.ts.map +1 -1
- package/dist/components/autocomplete/autocomplete.js +2 -4
- package/dist/components/autocomplete/autocomplete.module.css +1 -1
- package/dist/components/autocomplete/autocomplete.test.js +0 -15
- package/dist/components/avatar/avatar.module.css +1 -1
- package/dist/components/avatar/avatar.test.js +0 -15
- package/dist/components/button/button.d.ts +1 -2
- package/dist/components/button/button.d.ts.map +1 -1
- package/dist/components/button/button.module.css +1 -1
- package/dist/components/button/button.stories.d.ts +4 -4
- package/dist/components/button/button.stories.d.ts.map +1 -1
- package/dist/components/button/button.test.js +0 -15
- package/dist/components/card/card.d.ts.map +1 -1
- package/dist/components/card/card.js +1 -1
- package/dist/components/card/card.module.css +1 -1
- package/dist/components/card/card.test.js +0 -15
- package/dist/components/chip/chip.module.css +1 -1
- package/dist/components/chip/chip.test.js +0 -15
- package/dist/components/circular-progress/circular-progress.test.js +0 -15
- package/dist/components/clamp-text/clamp-text.test.js +0 -15
- package/dist/components/container/container.d.ts +1 -1
- package/dist/components/container/container.d.ts.map +1 -1
- package/dist/components/container/container.module.css +1 -1
- package/dist/components/container/container.stories.d.ts +4 -5
- package/dist/components/container/container.stories.d.ts.map +1 -1
- package/dist/components/container/container.stories.js +11 -14
- package/dist/components/container/container.test.js +0 -15
- package/dist/components/datetime/datetime.test.js +0 -15
- package/dist/components/disclosure/disclosure.module.css +1 -1
- package/dist/components/disclosure/disclosure.test.d.ts.map +1 -1
- package/dist/components/disclosure/disclosure.test.js +0 -15
- package/dist/components/elevator/elevator.test.js +0 -15
- package/dist/components/expander/expander.test.js +0 -15
- package/dist/components/grid/grid.test.js +0 -15
- package/dist/components/info-state/info-state.d.ts.map +1 -1
- package/dist/components/info-state/info-state.js +1 -9
- package/dist/components/info-state/info-state.module.css +1 -1
- package/dist/components/info-state/info-state.stories.d.ts +31 -31
- package/dist/components/info-state/info-state.stories.d.ts.map +1 -1
- package/dist/components/info-state/info-state.stories.js +5 -5
- package/dist/components/info-state/info-state.test.js +0 -15
- package/dist/components/input-group/input-group.test.js +0 -15
- package/dist/components/linear-progress/linear-progress.module.css +1 -1
- package/dist/components/linear-progress/linear-progress.test.js +0 -15
- package/dist/components/list/list.module.css +1 -1
- package/dist/components/list/list.test.js +0 -15
- package/dist/components/masonry/masonry.test.js +0 -15
- package/dist/components/menu/menu-item/menu-item.d.ts.map +1 -1
- package/dist/components/menu/menu-item/menu-item.js +3 -1
- package/dist/components/menu/menu-item/menu-item.module.css +1 -1
- package/dist/components/menu/menu-item/menu-item.stories.d.ts.map +1 -1
- package/dist/components/menu/menu-item/menu-item.stories.js +1 -0
- package/dist/components/menu/menu.test.js +0 -15
- package/dist/components/modal/content/modal-content.d.ts +7 -8
- package/dist/components/modal/content/modal-content.d.ts.map +1 -1
- package/dist/components/modal/content/modal-content.js +3 -7
- package/dist/components/modal/content/modal-content.module.css +1 -1
- package/dist/components/modal/footer/modal-footer.d.ts +32 -0
- package/dist/components/modal/footer/modal-footer.d.ts.map +1 -0
- package/dist/components/modal/footer/modal-footer.js +22 -0
- package/dist/components/modal/footer/modal-footer.module.css +1 -0
- package/dist/components/modal/header/modal-header.d.ts +20 -0
- package/dist/components/modal/header/modal-header.d.ts.map +1 -0
- package/dist/components/modal/header/modal-header.js +26 -0
- package/dist/components/modal/header/modal-header.module.css +1 -0
- package/dist/components/modal/modal.d.ts +79 -7
- package/dist/components/modal/modal.d.ts.map +1 -1
- package/dist/components/modal/modal.js +16 -6
- package/dist/components/modal/modal.module.css +1 -1
- package/dist/components/modal/modal.stories.d.ts +69 -5
- package/dist/components/modal/modal.stories.d.ts.map +1 -1
- package/dist/components/modal/modal.stories.js +145 -10
- package/dist/components/modal/modal.test.d.ts +2 -0
- package/dist/components/modal/modal.test.d.ts.map +1 -0
- package/dist/components/modal/modal.test.js +60 -0
- package/dist/components/overlay-container/overlay-container.test.d.ts +2 -0
- package/dist/components/overlay-container/overlay-container.test.d.ts.map +1 -0
- package/dist/components/overlay-container/overlay-container.test.js +19 -0
- package/dist/components/pagination/pagination.test.js +0 -15
- package/dist/components/popover/popover.d.ts +4 -0
- package/dist/components/popover/popover.d.ts.map +1 -1
- package/dist/components/popover/popover.js +6 -8
- package/dist/components/popover/popover.module.css +1 -1
- package/dist/components/popover/popover.stories.d.ts +13 -9
- package/dist/components/popover/popover.stories.d.ts.map +1 -1
- package/dist/components/popover/popover.stories.js +8 -2
- package/dist/components/popover/popover.test.js +0 -15
- package/dist/components/prose/prose.test.js +0 -15
- package/dist/components/select/select.js +1 -1
- package/dist/components/select/select.module.css +1 -1
- package/dist/components/select/select.test.js +0 -15
- package/dist/components/selection-controls/selection-controls.test.js +0 -15
- package/dist/components/separator/separator.test.js +0 -15
- package/dist/components/skeleton/skeleton.test.js +0 -15
- package/dist/components/slider/slider.test.js +0 -15
- package/dist/components/snackbar/snackbar.test.js +0 -15
- package/dist/components/spinner/spinner.test.js +0 -15
- package/dist/components/split-button/split-button.test.js +0 -15
- package/dist/components/stack/stack.test.js +0 -15
- package/dist/components/star-meter/star-meter.module.css +1 -1
- package/dist/components/star-meter/star-meter.test.js +0 -15
- package/dist/components/symbol/symbol.test.js +0 -15
- package/dist/components/tab/tab.js +1 -1
- package/dist/components/tab/tab.module.css +1 -1
- package/dist/components/tab/tab.stories.d.ts +1 -0
- package/dist/components/tab/tab.stories.d.ts.map +1 -1
- package/dist/components/tab/tab.stories.js +4 -17
- package/dist/components/tab/tab.test.js +0 -15
- package/dist/components/table/table-cell/table-cell.test.js +0 -15
- package/dist/components/table/table-checkbox/table-checkbox.test.js +0 -15
- package/dist/components/table/table-controls/table-controls.test.js +0 -15
- package/dist/components/table/table-header/table-header.test.js +0 -15
- package/dist/components/table/table-pagination/table-pagination.test.js +0 -15
- package/dist/components/table/table-row/table-row.test.js +0 -15
- package/dist/components/table/table.module.css +1 -1
- package/dist/components/table/table.stories.d.ts.map +1 -1
- package/dist/components/table/table.stories.js +1 -0
- package/dist/components/table/table.test.js +0 -15
- package/dist/components/text/text.module.css +1 -1
- package/dist/components/text/text.test.js +0 -15
- package/dist/components/textfield/textfield.module.css +1 -1
- package/dist/components/textfield/textfield.test.js +0 -15
- package/dist/components/title/title.module.css +1 -1
- package/dist/components/title/title.test.js +0 -15
- package/dist/components/toggle-button/toggle-button.test.js +0 -15
- package/dist/components/tooltip/tooltip.d.ts +4 -0
- package/dist/components/tooltip/tooltip.d.ts.map +1 -1
- package/dist/components/tooltip/tooltip.js +2 -4
- package/dist/components/tooltip/tooltip.module.css +1 -1
- package/dist/components/tooltip/tooltip.stories.d.ts +1 -1
- package/dist/components/tooltip/tooltip.stories.d.ts.map +1 -1
- package/dist/components/tooltip/tooltip.stories.js +4 -3
- package/dist/components/tooltip/tooltip.test.js +0 -15
- package/dist/hooks/index.d.ts +3 -1
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +3 -1
- package/dist/hooks/useBreakpoints.d.ts +11 -0
- package/dist/hooks/useBreakpoints.d.ts.map +1 -0
- package/dist/hooks/useBreakpoints.js +84 -0
- package/dist/hooks/useBreakpoints.test.d.ts +2 -0
- package/dist/hooks/useBreakpoints.test.d.ts.map +1 -0
- package/dist/hooks/useBreakpoints.test.js +35 -0
- package/dist/hooks/useBreakpointsConfig.d.ts +12 -0
- package/dist/hooks/useBreakpointsConfig.d.ts.map +1 -0
- package/dist/hooks/useBreakpointsConfig.js +31 -0
- package/dist/hooks/useBreakpointsConfig.test.d.ts +2 -0
- package/dist/hooks/useBreakpointsConfig.test.d.ts.map +1 -0
- package/dist/hooks/useBreakpointsConfig.test.js +16 -0
- package/dist/hooks/useSSR.d.ts +5 -0
- package/dist/hooks/useSSR.d.ts.map +1 -0
- package/dist/hooks/useSSR.js +24 -0
- package/dist/hooks/useSSR.test.d.ts +2 -0
- package/dist/hooks/useSSR.test.d.ts.map +1 -0
- package/dist/hooks/useSSR.test.js +11 -0
- package/dist/providers/providers.test.js +11 -17
- package/package.json +5 -4
- package/dist/hooks/usePopupWrapper.d.ts +0 -4
- package/dist/hooks/usePopupWrapper.d.ts.map +0 -1
- package/dist/hooks/usePopupWrapper.js +0 -42
package/core/basic.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer core{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%
|
|
1
|
+
@layer core{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% 44%/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
|
-
@layer core, utilities, components, overrides;@layer core{@layer core{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%
|
|
1
|
+
@layer core, utilities, components, overrides;@layer core{@layer core{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% 44%/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}}}@layer core{[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)}}@layer core{@layer core{p{font-size:1rem;line-height:1.5;min-block-size:.01vh}small{font-size:.7em}b,strong{font-weight:600}a:any-link{color:var(--global-interactive-text);text-decoration:none;word-break:break-word}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)}a:any-link:not([class]):focus,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{-webkit-text-decoration:underline dashed var(--cta-default);text-decoration:underline dashed var(--cta-default)}label,legend{font-size:inherit}code:not([class*=language-]){color:var(--highlight-magenta-foreground);display:inline-block;font-family:monospace;font-size:.9em;padding:0 4px 3px;position:relative}code:not([class*=language-]):before{background-color:var(--highlight-magenta-background);border-radius:.25rem;content:"";display:block;inset:0 0 2px 0;opacity:.3;position:absolute;z-index:-1}}}
|
|
@@ -1,19 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright 2023 Wonderflow Design Team
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
2
|
import { fireEvent, render } from '@testing-library/react';
|
|
18
3
|
import { Accordion } from './accordion';
|
|
19
4
|
import { AccordionItem } from './accordion-item';
|
|
@@ -1,19 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright 2023 Wonderflow Design Team
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
2
|
import { render } from '@testing-library/react';
|
|
18
3
|
import { AspectRatio } from './aspect-ratio';
|
|
19
4
|
describe('<AspectRatio>', () => {
|
|
@@ -25,6 +25,10 @@ export declare type AutocompleteProps = PropsWithClass<TextfieldProps<{
|
|
|
25
25
|
* Show skeletons while loading options.
|
|
26
26
|
*/
|
|
27
27
|
busy?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Set the root element to render the Autocomplete into.
|
|
30
|
+
*/
|
|
31
|
+
root?: HTMLElement;
|
|
28
32
|
}>>;
|
|
29
33
|
declare type AutocompleteComponent = ForwardRefExoticComponent<AutocompleteProps> & {
|
|
30
34
|
Option: ForwardRefExoticComponent<AutocompleteOptionProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"autocomplete.d.ts","sourceRoot":"","sources":["../../../src/components/autocomplete/autocomplete.tsx"],"names":[],"mappings":"AAuBA,OAAO,EAC+B,yBAAyB,EAG7D,SAAS,EAEV,MAAM,OAAO,CAAC;AAMf,OAAO,EACmC,cAAc,EACvD,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"autocomplete.d.ts","sourceRoot":"","sources":["../../../src/components/autocomplete/autocomplete.tsx"],"names":[],"mappings":"AAuBA,OAAO,EAC+B,yBAAyB,EAG7D,SAAS,EAEV,MAAM,OAAO,CAAC;AAMf,OAAO,EACmC,cAAc,EACvD,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAiB,SAAS,EAAE,MAAM,SAAS,CAAC;AAEnD,OAAO,EAAsB,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAEpF,aAAK,SAAS,GAAG;IACf,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf,CAAA;AAED,oBAAY,iBAAiB,GAAG,cAAc,CAAC,cAAc,CAAC;IAC5D;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC;IACtC;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC,WAAW,CAAC,CAAC;IACnC;;;OAGG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;CACpB,CAAC,CAAC,CAAC;AAEJ,aAAK,qBAAqB,GAAG,yBAAyB,CAAC,iBAAiB,CAAC,GAAG;IAC1E,MAAM,EAAE,yBAAyB,CAAC,uBAAuB,CAAC,CAAC;CAC5D,CAAA;AAqBD,eAAO,MAAM,YAAY,uBAwKE,CAAC"}
|
|
@@ -22,7 +22,6 @@ import { mergeRefs } from 'react-merge-refs';
|
|
|
22
22
|
import { usePopperTooltip } from 'react-popper-tooltip';
|
|
23
23
|
import { useUIDSeed } from 'react-uid';
|
|
24
24
|
import { Menu, Skeleton, Stack, Text, Textfield, } from '../..';
|
|
25
|
-
import { usePopUpWrapper } from '../../hooks';
|
|
26
25
|
import * as styles from './autocomplete.module.css';
|
|
27
26
|
import { AutocompleteOption } from './autocomplete-option';
|
|
28
27
|
const AutocompleteAnimation = {
|
|
@@ -43,7 +42,7 @@ const AutocompleteAnimation = {
|
|
|
43
42
|
},
|
|
44
43
|
},
|
|
45
44
|
};
|
|
46
|
-
export const Autocomplete = forwardRef(({ children, onChange, disabled, readOnly, value: val, busy, maxHeight = '200px', emptyContent = 'No items to show', ...otherProps }, forwardedRef) => {
|
|
45
|
+
export const Autocomplete = forwardRef(({ children, onChange, disabled, readOnly, value: val, busy, maxHeight = '200px', emptyContent = 'No items to show', root = document.body, ...otherProps }, forwardedRef) => {
|
|
47
46
|
const seedID = useUIDSeed();
|
|
48
47
|
const autocompleteRef = useRef(null);
|
|
49
48
|
const [isOpen, setIsOpen] = useState(false);
|
|
@@ -51,7 +50,6 @@ export const Autocomplete = forwardRef(({ children, onChange, disabled, readOnly
|
|
|
51
50
|
const [value, setValue] = useState(val ? String(val) : '');
|
|
52
51
|
const [optionsValues, setOptionValues] = useState([]);
|
|
53
52
|
const isInteractive = useMemo(() => !disabled && !readOnly, [disabled, readOnly]);
|
|
54
|
-
const { wrapper } = usePopUpWrapper('autocomplete-popup-root');
|
|
55
53
|
const debounceQuery = useDebounce(query, { wait: 100 });
|
|
56
54
|
const filteredOptions = useMemo(() => {
|
|
57
55
|
const items = Children.toArray(children);
|
|
@@ -113,7 +111,7 @@ export const Autocomplete = forwardRef(({ children, onChange, disabled, readOnly
|
|
|
113
111
|
? _jsx(Stack, { hPadding: 8, as: "span", children: _jsx(Skeleton, { count: 3 }) })
|
|
114
112
|
: Children.map(filteredOptions, child => isValidElement(child) && cloneElement(child, {
|
|
115
113
|
onClick: handleOptionClick,
|
|
116
|
-
}))] }) }) }) }) }),
|
|
114
|
+
}))] }) }) }) }) }), root)] }));
|
|
117
115
|
});
|
|
118
116
|
Autocomplete.Option = AutocompleteOption;
|
|
119
117
|
Autocomplete.displayName = 'Autocomplete';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer components{.Autocomplete{display:contents}.PopUp{z-index:
|
|
1
|
+
@layer components{.Autocomplete{display:contents}.PopUp{z-index:5}.OptionsList{-webkit-overflow-scrolling:touch;max-block-size:var(--max-h);overflow:auto;overscroll-behavior:contain}}
|
|
@@ -1,19 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright 2023 Wonderflow Design Team
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
2
|
import { fireEvent, render, waitFor } from '@testing-library/react';
|
|
18
3
|
import { Autocomplete } from './autocomplete';
|
|
19
4
|
describe('<Autocomplete>', () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer components{.Avatar{--size:1.
|
|
1
|
+
@layer components{.Avatar{--size:1.500rem;align-items:flex-end;aspect-ratio:1/1;background-color:var(--highlight-blue-background);border-radius:100%;display:flex;inline-size:var(--size);justify-content:center;overflow:hidden;position:relative}.Avatar[data-avatar-dimension=regular]{--size:2.500rem}.Avatar[data-avatar-dimension=big]{--size:3.000rem}.Avatar img{bottom:0;left:0;max-width:100%;object-fit:cover;position:absolute;right:0;top:0}.Placeholder{height:calc(var(--size) - 25%)}}
|
|
@@ -1,19 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright 2023 Wonderflow Design Team
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
2
|
import { render } from '@testing-library/react';
|
|
18
3
|
import { Avatar } from './avatar';
|
|
19
4
|
describe('<Avatar>', () => {
|
|
@@ -48,9 +48,8 @@ export declare type ButtonProps = {
|
|
|
48
48
|
*/
|
|
49
49
|
onClick?: (event: MouseEvent<HTMLButtonElement | HTMLAnchorElement>) => void;
|
|
50
50
|
};
|
|
51
|
-
declare type PolymorphicButton = Polymorphic.ForwardRefComponent<'button', ButtonProps>;
|
|
51
|
+
export declare type PolymorphicButton = Polymorphic.ForwardRefComponent<'button', ButtonProps>;
|
|
52
52
|
export declare const Button: PolymorphicButton;
|
|
53
53
|
export declare type ButtonsGroupProps = PropsWithClass & Pick<ButtonProps, 'dimension' | 'kind'>;
|
|
54
54
|
export declare const ButtonsGroup: FCChildren<ButtonsGroupProps>;
|
|
55
|
-
export {};
|
|
56
55
|
//# sourceMappingURL=button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/button/button.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAC+C,UAAU,EAC/D,MAAM,OAAO,CAAC;AAEf,OAAO,EACL,WAAW,EACH,WAAW,EACpB,MAAM,cAAc,CAAC;AAItB,oBAAY,WAAW,GAAG;IACxB;;;OAGG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,MAAM,CAAC;IACxC;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,KAAK,CAAC;IACxC;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IAC7B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAChC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC;IACrC;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,iBAAiB,GAAG,iBAAiB,CAAC,KAAK,IAAI,CAAC;CAC9E,CAAA;AAED,
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/button/button.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAC+C,UAAU,EAC/D,MAAM,OAAO,CAAC;AAEf,OAAO,EACL,WAAW,EACH,WAAW,EACpB,MAAM,cAAc,CAAC;AAItB,oBAAY,WAAW,GAAG;IACxB;;;OAGG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,MAAM,CAAC;IACxC;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,KAAK,CAAC;IACxC;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IAC7B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAChC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC;IACrC;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,iBAAiB,GAAG,iBAAiB,CAAC,KAAK,IAAI,CAAC;CAC9E,CAAA;AAED,oBAAY,iBAAiB,GAAG,WAAW,CAAC,mBAAmB,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;AAEvF,eAAO,MAAM,MAAM,mBAkEI,CAAC;AAExB,oBAAY,iBAAiB,GAAG,cAAc,GAAG,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,MAAM,CAAC,CAAA;AAExF,eAAO,MAAM,YAAY,EAAE,UAAU,CAAC,iBAAiB,CAetD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer components{.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}.Button:not([aria-pressed=true],[aria-disabled=true],[aria-busy=true]):active{transform:scale(.98);transform-origin:center}.Button[data-button-dimension=big]{block-size:3rem;font-size:1.
|
|
1
|
+
@layer components{.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}.Button:not([aria-pressed=true],[aria-disabled=true],[aria-busy=true]):active{transform:scale(.98);transform-origin:center}.Button[data-button-dimension=big]{block-size:3rem;font-size:1.125rem;padding:.75rem 1.5rem}.Button[data-button-dimension=regular]{block-size:2.5rem;font-size:1rem;padding:.5rem 1rem}.Button[data-button-dimension=small]{grid-gap:.25rem;block-size:1.5rem;font-size:.875rem;padding:.125rem .5rem}.Button[data-button-kind=primary]{background:var(--cta-default);color:var(--cta-foreground)}.Button[data-button-kind=primary]:where([aria-pressed=true]),.Button[data-button-kind=primary]:where([aria-pressed=true]:hover){background:#9e0018;color:#fff}.Button[data-button-kind=primary]:not([aria-pressed=true],[aria-disabled=true],[aria-busy=true]):is(:hover){background:var(--cta-dark)}.Button[data-button-kind=secondary]{-webkit-backdrop-filter:saturate(180%) blur(62px);backdrop-filter:saturate(180%) blur(62px);background-color:var(--global-vibrancy-background);color:var(--global-vibrancy-foreground)}.Button[data-button-kind=secondary]:where([aria-pressed=true]),.Button[data-button-kind=secondary]:where([aria-pressed=true]:hover){background:var(--dimmed-7);color:var(--dimmed-0)}.Button[data-button-kind=secondary]:not([aria-pressed=true],[aria-disabled=true],[aria-busy=true]):is(:hover){background-color:var(--global-vibrancy-background-hard);color:var(--global-vibrancy-foreground)}.Button[data-button-kind=flat]{color:var(--global-vibrancy-foreground)}.Button[data-button-kind=flat]:where([aria-pressed=true]),.Button[data-button-kind=flat]:where([aria-pressed=true]:is(:active,:focus)){background:var(--dimmed-7);color:var(--dimmed-0)}.Button[data-button-kind=flat]: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)}.Button[data-button-kind=flat]:not([aria-pressed=true],[aria-disabled=true],[aria-busy=true]):is(:hover){background-color:var(--global-vibrancy-background)}.Button[data-button-fullwidth=true]{inline-size:100%}.Button[data-button-icon-position=right]{flex-direction:row-reverse}.Button[aria-disabled=true],.Button[aria-disabled=true]: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}.Button[aria-busy=true]{pointer-events:none}.Button[aria-busy=true]>: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}}
|
|
@@ -2,8 +2,8 @@ import { ComponentMeta, ComponentStory } from '@storybook/react';
|
|
|
2
2
|
import { Button } from './button';
|
|
3
3
|
declare const story: ComponentMeta<typeof Button>;
|
|
4
4
|
export default story;
|
|
5
|
-
export declare const Default: ComponentStory<import("
|
|
6
|
-
export declare const WithIcon: ComponentStory<import("
|
|
7
|
-
export declare const WithCustomIcon: ComponentStory<import("
|
|
8
|
-
export declare const Grouped: ComponentStory<import("
|
|
5
|
+
export declare const Default: ComponentStory<import("./button").PolymorphicButton>;
|
|
6
|
+
export declare const WithIcon: ComponentStory<import("./button").PolymorphicButton>;
|
|
7
|
+
export declare const WithCustomIcon: ComponentStory<import("./button").PolymorphicButton>;
|
|
8
|
+
export declare const Grouped: ComponentStory<import("./button").PolymorphicButton>;
|
|
9
9
|
//# sourceMappingURL=button.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.stories.d.ts","sourceRoot":"","sources":["../../../src/components/button/button.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGjE,OAAO,EAAE,MAAM,EAAgB,MAAM,UAAU,CAAC;AAEhD,QAAA,MAAM,KAAK,EAAE,aAAa,CAAC,OAAO,MAAM,CAgCvC,CAAC;AAEF,eAAe,KAAK,CAAC;AAgBrB,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"button.stories.d.ts","sourceRoot":"","sources":["../../../src/components/button/button.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGjE,OAAO,EAAE,MAAM,EAAgB,MAAM,UAAU,CAAC;AAEhD,QAAA,MAAM,KAAK,EAAE,aAAa,CAAC,OAAO,MAAM,CAgCvC,CAAC;AAEF,eAAe,KAAK,CAAC;AAgBrB,eAAO,MAAM,OAAO,sDAAoB,CAAC;AAKzC,eAAO,MAAM,QAAQ,sDAAoB,CAAC;AAO1C,eAAO,MAAM,cAAc,sDAAoB,CAAC;AAkBhD,eAAO,MAAM,OAAO,sDAAyB,CAAC"}
|
|
@@ -1,19 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright 2023 Wonderflow Design Team
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
2
|
import { fireEvent, render } from '@testing-library/react';
|
|
18
3
|
import { Button, ButtonsGroup } from './button';
|
|
19
4
|
describe('<Button>', () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../../src/components/card/card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAGpE,OAAO,EAA6B,SAAS,EAAE,MAAM,OAAO,CAAC;AAE7D,OAAO,EAAE,WAAW,EAAS,UAAU,EAAE,MAAM,cAAc,CAAC;AAI9D,oBAAY,SAAS,GAAG,IAAI,CAC5B,UAAU,EACV,MAAM,GAAG,WAAW,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC,GACpD;IACA;;OAEG;IACH,OAAO,CAAC,EAAE,KAAK,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;IACvC;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC;IACvC;;OAEG;IACH,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACnB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAA;AAED,aAAK,eAAe,GAAG,WAAW,CAAC,mBAAmB,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;AAEzE,eAAO,MAAM,IAAI,
|
|
1
|
+
{"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../../src/components/card/card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAGpE,OAAO,EAA6B,SAAS,EAAE,MAAM,OAAO,CAAC;AAE7D,OAAO,EAAE,WAAW,EAAS,UAAU,EAAE,MAAM,cAAc,CAAC;AAI9D,oBAAY,SAAS,GAAG,IAAI,CAC5B,UAAU,EACV,MAAM,GAAG,WAAW,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC,GACpD;IACA;;OAEG;IACH,OAAO,CAAC,EAAE,KAAK,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;IACvC;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC;IACvC;;OAEG;IACH,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACnB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAA;AAED,aAAK,eAAe,GAAG,WAAW,CAAC,mBAAmB,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;AAEzE,eAAO,MAAM,IAAI,iBA8DI,CAAC"}
|
|
@@ -9,5 +9,5 @@ export const Card = forwardRef(({ as: Wrapper = 'div', children, className, padd
|
|
|
9
9
|
'--padding': padding && tkns.space[padding],
|
|
10
10
|
'--radius': radius && tkns.radius[radius],
|
|
11
11
|
};
|
|
12
|
-
return (_jsx(Wrapper, { ref: forwardedRef, className: clsx(styles.Card, className), style: { ...dynamicStyle, ...style }, "data-card-dimmed": dimmed, "data-card-bordered": bordered, "data-card-vibrant": vibrant, "data-card-highlight-hover": highlightOnHover, ...otherProps, children: _jsxs(Stack, { direction: "row", fill: false, vAlign: vAlign, hAlign: hAlign, columnGap: columnGap, rowGap: rowGap, wrap: wrap, children: [left && _jsx("div", { className: styles.Left, children: left }), children && (_jsx("div", { className: styles.Content, children: children })), right && (_jsx("div", { className: styles.Right, children: right }))] }) }));
|
|
12
|
+
return (_jsx(Wrapper, { ref: forwardedRef, className: clsx(styles.Card, className), style: { ...dynamicStyle, ...style }, "data-card-dimmed": dimmed, "data-card-bordered": bordered, "data-card-vibrant": vibrant, "data-card-highlight-hover": highlightOnHover, ...otherProps, children: _jsxs(Stack, { direction: "row", className: clsx(styles.Row, className), fill: false, vAlign: vAlign, hAlign: hAlign, columnGap: columnGap, rowGap: rowGap, wrap: wrap, children: [left && _jsx("div", { className: styles.Left, children: left }), children && (_jsx("div", { className: styles.Content, children: children })), right && (_jsx("div", { className: styles.Right, children: right }))] }) }));
|
|
13
13
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer components{.Card{background-color:var(--global-background);border-radius:var(--radius);padding:var(--padding);position:relative}.Card[data-card-highlight-hover=true]:is(:hover,:focus-visible){background-color:var(--dimmed-0)}.Card[data-card-bordered=true]{border:1px solid var(--dimmed-1)}.Card[data-card-dimmed="0"]{background-color:var(--dimmed-0)}.Card[data-card-dimmed="0"][data-card-highlight-hover=true]:is(:hover,:focus-visible){background-color:var(--global-background)}.Card[data-card-dimmed="1"]{background-color:var(--dimmed-1)}.Card[data-card-dimmed="1"][data-card-highlight-hover=true]:is(:hover,:focus-visible){background-color:var(--dimmed-0)}.Card[data-card-dimmed="1"][data-card-bordered=true]{border:1px solid var(--dimmed-2)}.Card[data-card-dimmed="2"]{background-color:var(--dimmed-2)}.Card[data-card-dimmed="2"][data-card-highlight-hover=true]:is(:hover,:focus-visible){background-color:var(--dimmed-1)}.Card[data-card-dimmed="2"][data-card-bordered=true]{border:1px solid var(--dimmed-3)}.Card[data-card-vibrant=true]{-webkit-backdrop-filter:saturate(180%) blur(62px);backdrop-filter:saturate(180%) blur(62px);background-color:var(--global-vibrancy-background)}.Card[data-card-vibrant=true][data-card-highlight-hover=true]:is(:hover,:focus-visible){background-color:var(--global-vibrancy-background-soft)}.Card[data-card-vibrant=true][data-card-dimmed="0"]{background-color:var(--global-vibrancy-background-soft)}.Card[data-card-vibrant=true][data-card-dimmed="0"][data-card-highlight-hover=true]:is(:hover,:focus-visible){background-color:var(--global-background)}.Card[data-card-vibrant=true][data-card-dimmed="1"]{background-color:var(--global-vibrancy-background)}.Card[data-card-vibrant=true][data-card-dimmed="1"][data-card-highlight-hover=true]:is(:hover,:focus-visible){background-color:var(--global-vibrancy-background-soft)}.Card[data-card-vibrant=true][data-card-dimmed="2"]{background-color:var(--global-vibrancy-background-hard)}.Card[data-card-vibrant=true][data-card-dimmed="2"][data-card-highlight-hover=true]:is(:hover,:focus-visible){background-color:var(--global-vibrancy-background)}.Left{flex-shrink:0}.Content{flex-grow:1}.Right{flex-shrink:0}}
|
|
1
|
+
@layer components{.Card{background-color:var(--global-background);border-radius:var(--radius);padding:var(--padding);position:relative}.Card[data-card-highlight-hover=true]:is(:hover,:focus-visible){background-color:var(--dimmed-0)}.Card[data-card-bordered=true]{border:1px solid var(--dimmed-1)}.Card[data-card-dimmed="0"]{background-color:var(--dimmed-0)}.Card[data-card-dimmed="0"][data-card-highlight-hover=true]:is(:hover,:focus-visible){background-color:var(--global-background)}.Card[data-card-dimmed="1"]{background-color:var(--dimmed-1)}.Card[data-card-dimmed="1"][data-card-highlight-hover=true]:is(:hover,:focus-visible){background-color:var(--dimmed-0)}.Card[data-card-dimmed="1"][data-card-bordered=true]{border:1px solid var(--dimmed-2)}.Card[data-card-dimmed="2"]{background-color:var(--dimmed-2)}.Card[data-card-dimmed="2"][data-card-highlight-hover=true]:is(:hover,:focus-visible){background-color:var(--dimmed-1)}.Card[data-card-dimmed="2"][data-card-bordered=true]{border:1px solid var(--dimmed-3)}.Card[data-card-vibrant=true]{-webkit-backdrop-filter:saturate(180%) blur(62px);backdrop-filter:saturate(180%) blur(62px);background-color:var(--global-vibrancy-background)}.Card[data-card-vibrant=true][data-card-highlight-hover=true]:is(:hover,:focus-visible){background-color:var(--global-vibrancy-background-soft)}.Card[data-card-vibrant=true][data-card-dimmed="0"]{background-color:var(--global-vibrancy-background-soft)}.Card[data-card-vibrant=true][data-card-dimmed="0"][data-card-highlight-hover=true]:is(:hover,:focus-visible){background-color:var(--global-background)}.Card[data-card-vibrant=true][data-card-dimmed="1"]{background-color:var(--global-vibrancy-background)}.Card[data-card-vibrant=true][data-card-dimmed="1"][data-card-highlight-hover=true]:is(:hover,:focus-visible){background-color:var(--global-vibrancy-background-soft)}.Card[data-card-vibrant=true][data-card-dimmed="2"]{background-color:var(--global-vibrancy-background-hard)}.Card[data-card-vibrant=true][data-card-dimmed="2"][data-card-highlight-hover=true]:is(:hover,:focus-visible){background-color:var(--global-vibrancy-background)}.Row{height:100%}.Left{flex-shrink:0}.Content{flex-grow:1;height:100%}.Right{flex-shrink:0}}
|
|
@@ -1,19 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright 2023 Wonderflow Design Team
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
2
|
import { render } from '@testing-library/react';
|
|
18
3
|
import { Symbol } from '../symbol';
|
|
19
4
|
import { Card } from './card';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer components{.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:.
|
|
1
|
+
@layer components{.Chip{background-color:var(--highlight-gray-background);block-size:2rem;border-radius:3rem;color:var(--highlight-gray-foreground);font-size:1rem;font-weight:600;overflow:hidden;padding:.25rem .5rem;white-space:nowrap}.Chip[data-chip-dimension=small]{block-size:1.5rem;font-size:.875rem}.Chip[data-chip-dimension=big]{font-size:1.125rem}.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}}
|
|
@@ -1,19 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright 2023 Wonderflow Design Team
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
2
|
import { fireEvent, render } from '@testing-library/react';
|
|
18
3
|
import { Chip } from './chip';
|
|
19
4
|
describe('<Chip>', () => {
|
|
@@ -1,19 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright 2023 Wonderflow Design Team
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
2
|
import { render } from '@testing-library/react';
|
|
18
3
|
import { CircularProgress } from './circular-progress';
|
|
19
4
|
describe('<CircularProgress>', () => {
|
|
@@ -1,19 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright 2023 Wonderflow Design Team
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
2
|
/* eslint-disable max-len */
|
|
18
3
|
import { fireEvent, render } from '@testing-library/react';
|
|
19
4
|
import { ClampText } from './clamp-text';
|
|
@@ -3,7 +3,7 @@ export declare type ContainerProps = {
|
|
|
3
3
|
/**
|
|
4
4
|
* Set the horizontal max-width of the container.
|
|
5
5
|
*/
|
|
6
|
-
dimension?: 'full' | 'small' | 'medium' | 'large';
|
|
6
|
+
dimension?: 'full' | 'extra-small' | 'small' | 'medium' | 'large' | 'extra-large' | 'fixed';
|
|
7
7
|
/**
|
|
8
8
|
* Set or remove the container's predefined horizontal padding.
|
|
9
9
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container.d.ts","sourceRoot":"","sources":["../../../src/components/container/container.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAI3C,oBAAY,cAAc,GAAG;IAC3B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"container.d.ts","sourceRoot":"","sources":["../../../src/components/container/container.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAI3C,oBAAY,cAAc,GAAG;IAC3B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,aAAa,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,aAAa,GAAG,OAAO,CAAC;IAC5F;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAA;AAED,aAAK,oBAAoB,GAAG,WAAW,CAAC,mBAAmB,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC;AAEnF,eAAO,MAAM,SAAS,sBAiBI,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer components{.Container{inline-size:100%;margin:0 auto;padding:0
|
|
1
|
+
@layer components{.Container{inline-size:100%;margin:0 auto;padding:0 1.5rem}.Container[data-container-dimension=extra-small]{max-inline-size:27rem}@media (min-width:80em){.Container[data-container-dimension=extra-small]{padding:0 2rem}}.Container[data-container-dimension=small]{max-inline-size:45rem}@media (min-width:80em){.Container[data-container-dimension=small]{padding:0 2rem}}.Container[data-container-dimension=medium]{max-inline-size:57rem}@media (min-width:80em){.Container[data-container-dimension=medium]{padding:0 2rem}}.Container[data-container-dimension=large]{max-inline-size:76rem}@media (min-width:80em){.Container[data-container-dimension=large]{padding:0 2rem}}.Container[data-container-dimension=extra-large]{max-inline-size:95rem}@media (min-width:80em){.Container[data-container-dimension=extra-large]{padding:0 2rem}}.Container[data-container-dimension=full]{max-inline-size:100%}@media (min-width:80em){.Container[data-container-dimension=full]{padding:0 2rem}}.Container[data-container-dimension=fixed]{max-inline-size:27rem;padding:0 1.5rem}@media (min-width:48em){.Container[data-container-dimension=fixed]{max-inline-size:45rem}}@media (min-width:60em){.Container[data-container-dimension=fixed]{max-inline-size:57rem}}@media (min-width:80em){.Container[data-container-dimension=fixed]{max-inline-size:76rem;padding:0 2rem}}@media (min-width:100em){.Container[data-container-dimension=fixed]{max-inline-size:95rem}}.Container[data-container-padding=false]{padding:0}}
|
|
@@ -2,9 +2,8 @@ import { ComponentMeta, ComponentStory } from '@storybook/react';
|
|
|
2
2
|
import { Container } from './container';
|
|
3
3
|
declare const story: ComponentMeta<typeof Container>;
|
|
4
4
|
export default story;
|
|
5
|
-
export declare const
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const
|
|
9
|
-
export declare const AsSection: ComponentStory<import("../../types/polymorphic").ForwardRefComponent<"div", import("./container").ContainerProps>>;
|
|
5
|
+
export declare const WithPadding: ComponentStory<import("../../types/polymorphic").ForwardRefComponent<"div", import("../..").ContainerProps>>;
|
|
6
|
+
export declare const NoPadding: ComponentStory<import("../../types/polymorphic").ForwardRefComponent<"div", import("../..").ContainerProps>>;
|
|
7
|
+
export declare const AsSection: ComponentStory<import("../../types/polymorphic").ForwardRefComponent<"div", import("../..").ContainerProps>>;
|
|
8
|
+
export declare const Comparison: ComponentStory<import("../../types/polymorphic").ForwardRefComponent<"div", import("../..").ContainerProps>>;
|
|
10
9
|
//# sourceMappingURL=container.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container.stories.d.ts","sourceRoot":"","sources":["../../../src/components/container/container.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"container.stories.d.ts","sourceRoot":"","sources":["../../../src/components/container/container.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAIjE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,QAAA,MAAM,KAAK,EAAE,aAAa,CAAC,OAAO,SAAS,CAsB1C,CAAC;AAEF,eAAe,KAAK,CAAC;AAqCrB,eAAO,MAAM,WAAW,qHAAoB,CAAC;AAO7C,eAAO,MAAM,SAAS,qHAAoB,CAAC;AAM3C,eAAO,MAAM,SAAS,qHAAoB,CAAC;AAK3C,eAAO,MAAM,UAAU,qHAA8B,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Stack, Text } from '../..';
|
|
2
3
|
import { Container } from './container';
|
|
3
4
|
const story = {
|
|
4
5
|
title: 'Layouts/Container',
|
|
@@ -14,27 +15,22 @@ const story = {
|
|
|
14
15
|
},
|
|
15
16
|
},
|
|
16
17
|
dimension: {
|
|
17
|
-
options: ['
|
|
18
|
+
options: ['extra-small', 'small', 'medium', 'large', 'extra-large', 'fixed', 'full'],
|
|
19
|
+
control: { type: 'select' },
|
|
18
20
|
},
|
|
19
21
|
},
|
|
20
22
|
args: {
|
|
21
23
|
dimension: 'full',
|
|
24
|
+
padding: true,
|
|
22
25
|
},
|
|
23
26
|
};
|
|
24
27
|
export default story;
|
|
25
28
|
const Template = args => _jsx(Container, { ...args });
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
export const Large = Template.bind({});
|
|
32
|
-
Large.args = {
|
|
33
|
-
dimension: 'large',
|
|
34
|
-
className: 'ContainerEx',
|
|
35
|
-
};
|
|
36
|
-
export const FullWidth = Template.bind({});
|
|
37
|
-
FullWidth.args = {
|
|
29
|
+
const TemplateComparison = () => (_jsxs(Stack, { rowGap: 24, children: [_jsxs(Stack, { rowGap: 8, hAlign: "center", children: [_jsx(Text, { size: 14, children: "Container Extra Small" }), _jsx(Container, { dimension: "extra-small", className: "ContainerEx" })] }), _jsxs(Stack, { rowGap: 8, hAlign: "center", children: [_jsx(Text, { size: 14, children: "Container Small" }), _jsx(Container, { dimension: "small", className: "ContainerEx" })] }), _jsxs(Stack, { rowGap: 8, hAlign: "center", children: [_jsx(Text, { size: 14, children: "Container Medium" }), _jsx(Container, { dimension: "medium", className: "ContainerEx" })] }), _jsxs(Stack, { rowGap: 8, hAlign: "center", children: [_jsx(Text, { size: 14, children: "Container Large" }), _jsx(Container, { dimension: "large", className: "ContainerEx" })] }), _jsxs(Stack, { rowGap: 8, hAlign: "center", children: [_jsx(Text, { size: 14, children: "Container Extra Large" }), _jsx(Container, { dimension: "extra-large", className: "ContainerEx" })] }), _jsxs(Stack, { rowGap: 8, hAlign: "center", children: [_jsx(Text, { size: 14, children: "Container Fixed" }), _jsx(Container, { dimension: "fixed", className: "ContainerEx" })] }), _jsxs(Stack, { rowGap: 8, hAlign: "center", children: [_jsx(Text, { size: 14, children: "Container Full" }), _jsx(Container, { dimension: "full", className: "ContainerEx" })] })] }));
|
|
30
|
+
export const WithPadding = Template.bind({});
|
|
31
|
+
WithPadding.args = {
|
|
32
|
+
dimension: 'full',
|
|
33
|
+
padding: true,
|
|
38
34
|
className: 'ContainerEx',
|
|
39
35
|
};
|
|
40
36
|
export const NoPadding = Template.bind({});
|
|
@@ -46,3 +42,4 @@ export const AsSection = Template.bind({});
|
|
|
46
42
|
AsSection.args = {
|
|
47
43
|
className: 'ContainerEx',
|
|
48
44
|
};
|
|
45
|
+
export const Comparison = TemplateComparison.bind({});
|
|
@@ -1,19 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright 2023 Wonderflow Design Team
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
2
|
import { render } from '@testing-library/react';
|
|
18
3
|
import { Container } from './container';
|
|
19
4
|
describe('<Container>', () => {
|
|
@@ -1,19 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright 2023 Wonderflow Design Team
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
2
|
import { render } from '@testing-library/react';
|
|
18
3
|
import { Datetime } from './datetime';
|
|
19
4
|
describe('<DateTime>', () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer components{.Disclosure{--icon-size:1.11rem;--icon-padding:0.
|
|
1
|
+
@layer components{.Disclosure{--icon-size:1.11rem;--icon-padding:0.500rem;--padding:calc(var(--icon-size) + var(--icon-padding) + var(--icon-size)/2);--icon-top-offset:calc(var(--icon-size)/2);display:block;position:relative;transform:translateZ(0);z-index:0}.Disclosure *{box-sizing:border-box}.Disclosure[data-disclosure-dimension=small]{--icon-top-offset:calc(var(--icon-size)/1.5);--icon-size:0.750rem}.Disclosure[data-disclosure-dimension=regular]{--icon-size:1.000rem}.Disclosure[data-disclosure-dimension=big]{--icon-top-offset:calc(var(--icon-size)/4);--icon-size:1.500rem;--icon-padding:1.000rem}.Summary{color:var(--dimmed-9);display:list-item;outline-offset:-2px;padding:.125rem 0;position:relative;touch-action:manipulation;-webkit-user-select:none;user-select:none}.Disclosure[data-disclosure-icon-position=right][data-disclosure-expandable=true] .Summary{padding-inline-end:var(--padding)}.Disclosure[data-disclosure-icon-position=left][data-disclosure-expandable=true] .Summary{padding-inline-start:var(--padding)}.Disclosure[data-disclosure-expandable=true] .Summary{cursor:pointer}.Summary::marker{content:""}.Summary::-webkit-details-marker{display:none}.ExpandIcon{block-size:var(--icon-size);content:"";inline-size:var(--icon-size);position:absolute;right:calc(var(--icon-size)/2);top:var(--icon-top-offset);transform-box:fill-box;transform-origin:50% center;transition:transform .1s cubic-bezier(.3,.07,.34,1)}.Disclosure[data-disclosure-icon-position=left] .ExpandIcon{left:calc(var(--icon-size)/2);right:auto}.Disclosure[open]>.Summary>.ExpandIcon{transform:rotate(90deg)}.Content{box-sizing:border-box}.Disclosure[data-disclosure-icon-position=left] .Content[data-disclosure-padding=true]{padding-inline-start:var(--padding)}.Disclosure[data-disclosure-icon-position=right] .Content[data-disclosure-padding=true]{padding-right:var(--padding)}.Content[data-disclosure-height=true]{-webkit-overflow-scrolling:touch;max-block-size:var(--max-height);overflow:auto;overscroll-behavior:contain}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"disclosure.test.d.ts","sourceRoot":"","sources":["../../../src/components/disclosure/disclosure.test.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"disclosure.test.d.ts","sourceRoot":"","sources":["../../../src/components/disclosure/disclosure.test.tsx"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC"}
|
|
@@ -1,19 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright 2023 Wonderflow Design Team
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
2
|
import '@testing-library/jest-dom';
|
|
18
3
|
import { fireEvent, render, screen, waitFor, } from '@testing-library/react';
|
|
19
4
|
import { Disclosure } from './disclosure';
|
|
@@ -1,19 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright 2023 Wonderflow Design Team
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
2
|
/* eslint-disable max-len */
|
|
18
3
|
import { render } from '@testing-library/react';
|
|
19
4
|
import { Elevator } from './elevator';
|
|
@@ -1,19 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright 2023 Wonderflow Design Team
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
2
|
/* eslint-disable max-len */
|
|
18
3
|
import { fireEvent, render } from '@testing-library/react';
|
|
19
4
|
import { Expander } from './expander';
|