@wonderflow/react-components 10.10.0 → 10.12.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/typography.css +1 -1
- package/core.css +1 -1
- package/dist/components/accordion/accordion-context.d.ts.map +1 -1
- package/dist/components/accordion/accordion-context.js +15 -0
- package/dist/components/accordion/accordion-item.d.ts.map +1 -1
- package/dist/components/accordion/accordion-item.js +15 -0
- package/dist/components/accordion/accordion.d.ts.map +1 -1
- package/dist/components/accordion/accordion.js +15 -0
- package/dist/components/accordion/index.d.ts.map +1 -1
- package/dist/components/accordion/index.js +15 -0
- package/dist/components/aspect-ratio/aspect-ratio.d.ts.map +1 -1
- package/dist/components/aspect-ratio/aspect-ratio.js +15 -0
- package/dist/components/aspect-ratio/index.d.ts +1 -1
- package/dist/components/aspect-ratio/index.d.ts.map +1 -1
- package/dist/components/aspect-ratio/index.js +15 -0
- package/dist/components/autocomplete/autocomplete-option.d.ts.map +1 -1
- package/dist/components/autocomplete/autocomplete-option.js +15 -0
- package/dist/components/autocomplete/autocomplete.d.ts.map +1 -1
- package/dist/components/autocomplete/autocomplete.js +15 -0
- package/dist/components/autocomplete/index.d.ts.map +1 -1
- package/dist/components/autocomplete/index.js +15 -0
- package/dist/components/avatar/avatar.d.ts.map +1 -1
- package/dist/components/avatar/avatar.js +15 -0
- package/dist/components/avatar/index.d.ts.map +1 -1
- package/dist/components/avatar/index.js +15 -0
- package/dist/components/button/button.d.ts.map +1 -1
- package/dist/components/button/button.js +15 -0
- package/dist/components/button/index.d.ts.map +1 -1
- package/dist/components/button/index.js +15 -0
- package/dist/components/card/card.d.ts +1 -1
- package/dist/components/card/card.d.ts.map +1 -1
- package/dist/components/card/card.module.css +1 -1
- package/dist/components/card/index.d.ts.map +1 -1
- package/dist/components/card/index.js +15 -0
- package/dist/components/chip/chip.d.ts +2 -1
- package/dist/components/chip/chip.d.ts.map +1 -1
- package/dist/components/chip/index.d.ts.map +1 -1
- package/dist/components/chip/index.js +15 -0
- package/dist/components/circular-progress/circular-progress.d.ts.map +1 -1
- package/dist/components/circular-progress/circular-progress.js +15 -0
- package/dist/components/circular-progress/index.d.ts.map +1 -1
- package/dist/components/circular-progress/index.js +15 -0
- package/dist/components/clamp-text/clamp-text.d.ts.map +1 -1
- package/dist/components/clamp-text/clamp-text.js +16 -1
- package/dist/components/clamp-text/index.d.ts.map +1 -1
- package/dist/components/clamp-text/index.js +15 -0
- package/dist/components/container/container.d.ts.map +1 -1
- package/dist/components/container/container.js +15 -0
- package/dist/components/container/index.d.ts.map +1 -1
- package/dist/components/container/index.js +15 -0
- package/dist/components/datetime/datetime.d.ts.map +1 -1
- package/dist/components/datetime/datetime.js +15 -0
- package/dist/components/datetime/index.d.ts.map +1 -1
- package/dist/components/datetime/index.js +15 -0
- package/dist/components/disclosure/disclosure.d.ts.map +1 -1
- package/dist/components/disclosure/disclosure.js +15 -0
- package/dist/components/disclosure/index.d.ts.map +1 -1
- package/dist/components/disclosure/index.js +15 -0
- package/dist/components/drawer/drawer.d.ts.map +1 -1
- package/dist/components/drawer/drawer.js +15 -0
- package/dist/components/drawer/drawer.module.css +1 -1
- package/dist/components/drawer/index.d.ts.map +1 -1
- package/dist/components/drawer/index.js +15 -0
- package/dist/components/elevator/elevator.d.ts.map +1 -1
- package/dist/components/elevator/elevator.js +16 -1
- package/dist/components/elevator/index.d.ts.map +1 -1
- package/dist/components/elevator/index.js +15 -0
- package/dist/components/expander/expander.d.ts +20 -0
- package/dist/components/expander/expander.d.ts.map +1 -0
- package/dist/components/expander/expander.js +35 -0
- package/dist/components/expander/expander.module.css +1 -0
- package/dist/components/expander/expander.stories.d.ts +7 -0
- package/dist/components/expander/expander.stories.d.ts.map +1 -0
- package/dist/components/expander/expander.stories.js +16 -0
- package/dist/components/expander/index.d.ts +3 -0
- package/dist/components/expander/index.d.ts.map +1 -0
- package/dist/components/expander/index.js +16 -0
- package/dist/components/grid/index.d.ts.map +1 -1
- package/dist/components/grid/index.js +15 -0
- package/dist/components/grid/item/grid-item.d.ts.map +1 -1
- package/dist/components/grid/item/grid-item.js +15 -0
- package/dist/components/icon-button/icon-button.d.ts.map +1 -1
- package/dist/components/icon-button/icon-button.js +15 -0
- package/dist/components/icon-button/index.d.ts.map +1 -1
- package/dist/components/icon-button/index.js +15 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +16 -0
- package/dist/components/info-state/index.d.ts.map +1 -1
- package/dist/components/info-state/index.js +15 -0
- package/dist/components/info-state/info-state.d.ts +1 -1
- package/dist/components/info-state/info-state.d.ts.map +1 -1
- package/dist/components/info-state/info-state.js +15 -0
- package/dist/components/info-state/info-state.stories.d.ts +5 -5
- package/dist/components/input-group/index.d.ts.map +1 -1
- package/dist/components/input-group/index.js +15 -0
- package/dist/components/input-group/input-group.d.ts.map +1 -1
- package/dist/components/input-group/input-group.js +15 -0
- package/dist/components/linear-progress/index.d.ts.map +1 -1
- package/dist/components/linear-progress/index.js +15 -0
- package/dist/components/linear-progress/linear-progress.d.ts.map +1 -1
- package/dist/components/linear-progress/linear-progress.js +15 -0
- package/dist/components/list/index.d.ts.map +1 -1
- package/dist/components/list/index.js +15 -0
- package/dist/components/list/list-item.d.ts.map +1 -1
- package/dist/components/list/list-item.js +15 -0
- package/dist/components/list/list.d.ts.map +1 -1
- package/dist/components/list/list.js +15 -0
- package/dist/components/masonry/index.d.ts.map +1 -1
- package/dist/components/masonry/index.js +15 -0
- package/dist/components/masonry/masonry.d.ts.map +1 -1
- package/dist/components/menu/index.d.ts.map +1 -1
- package/dist/components/menu/index.js +15 -0
- package/dist/components/menu/menu-item/menu-item-checkbox.d.ts.map +1 -1
- package/dist/components/menu/menu-item/menu-item-checkbox.js +15 -0
- package/dist/components/menu/menu-item/menu-item.d.ts.map +1 -1
- package/dist/components/menu/menu-item/menu-item.js +18 -3
- package/dist/components/menu/menu-separator/menu-separator.d.ts.map +1 -1
- package/dist/components/menu/menu-separator/menu-separator.js +15 -0
- package/dist/components/menu/menu.d.ts.map +1 -1
- package/dist/components/menu/menu.js +15 -0
- package/dist/components/modal/content/modal-content.d.ts +0 -4
- package/dist/components/modal/content/modal-content.d.ts.map +1 -1
- package/dist/components/modal/content/modal-content.js +15 -0
- package/dist/components/modal/index.d.ts.map +1 -1
- package/dist/components/modal/index.js +15 -0
- package/dist/components/modal/modal.d.ts.map +1 -1
- package/dist/components/modal/modal.js +15 -0
- package/dist/components/overlay-container/index.d.ts.map +1 -1
- package/dist/components/overlay-container/index.js +15 -0
- package/dist/components/overlay-container/overlay-container.d.ts.map +1 -1
- package/dist/components/overlay-container/overlay-container.js +15 -0
- package/dist/components/pagination/index.d.ts.map +1 -1
- package/dist/components/pagination/index.js +15 -0
- package/dist/components/pagination/pagination.d.ts.map +1 -1
- package/dist/components/pagination/pagination.js +15 -0
- package/dist/components/popover/index.d.ts.map +1 -1
- package/dist/components/popover/index.js +15 -0
- package/dist/components/popover/popover.d.ts.map +1 -1
- package/dist/components/prose/index.d.ts.map +1 -1
- package/dist/components/prose/index.js +15 -0
- package/dist/components/prose/prose.d.ts.map +1 -1
- package/dist/components/prose/prose.js +15 -0
- package/dist/components/select/index.d.ts.map +1 -1
- package/dist/components/select/index.js +15 -0
- package/dist/components/select/select.d.ts.map +1 -1
- package/dist/components/select/select.js +15 -0
- package/dist/components/selection-controls/checkbox.d.ts.map +1 -1
- package/dist/components/selection-controls/checkbox.js +15 -0
- package/dist/components/selection-controls/index.d.ts.map +1 -1
- package/dist/components/selection-controls/index.js +15 -0
- package/dist/components/selection-controls/radio.d.ts.map +1 -1
- package/dist/components/selection-controls/radio.js +15 -0
- package/dist/components/selection-controls/toggle.d.ts.map +1 -1
- package/dist/components/selection-controls/toggle.js +15 -0
- package/dist/components/separator/index.d.ts.map +1 -1
- package/dist/components/separator/index.js +15 -0
- package/dist/components/separator/separator.d.ts.map +1 -1
- package/dist/components/separator/separator.js +15 -0
- package/dist/components/skeleton/index.d.ts.map +1 -1
- package/dist/components/skeleton/index.js +15 -0
- package/dist/components/skeleton/skeleton.d.ts.map +1 -1
- package/dist/components/slider/index.d.ts.map +1 -1
- package/dist/components/slider/index.js +15 -0
- package/dist/components/slider/slider.d.ts.map +1 -1
- package/dist/components/slider/slider.js +15 -0
- package/dist/components/snackbar/index.d.ts.map +1 -1
- package/dist/components/snackbar/index.js +15 -0
- package/dist/components/snackbar/snackbar.d.ts.map +1 -1
- package/dist/components/snackbar/snackbar.js +15 -0
- package/dist/components/spinner/index.d.ts.map +1 -1
- package/dist/components/spinner/index.js +15 -0
- package/dist/components/spinner/spinner.d.ts.map +1 -1
- package/dist/components/spinner/spinner.js +15 -0
- package/dist/components/split-button/index.d.ts.map +1 -1
- package/dist/components/split-button/index.js +15 -0
- package/dist/components/split-button/split-button.d.ts.map +1 -1
- package/dist/components/split-button/split-button.js +15 -0
- package/dist/components/stack/index.d.ts.map +1 -1
- package/dist/components/stack/index.js +15 -0
- package/dist/components/stack/stack.d.ts.map +1 -1
- package/dist/components/star-meter/index.d.ts.map +1 -1
- package/dist/components/star-meter/index.js +15 -0
- package/dist/components/star-meter/star-meter.d.ts.map +1 -1
- package/dist/components/star-meter/star-meter.js +15 -0
- package/dist/components/symbol/index.d.ts.map +1 -1
- package/dist/components/symbol/index.js +15 -0
- package/dist/components/symbol/symbol.d.ts +1 -1
- package/dist/components/symbol/symbol.d.ts.map +1 -1
- package/dist/components/symbol/symbol.stories.d.ts +2 -2
- package/dist/components/tab/index.d.ts.map +1 -1
- package/dist/components/tab/index.js +15 -0
- package/dist/components/tab/tab.d.ts +2 -1
- package/dist/components/tab/tab.d.ts.map +1 -1
- package/dist/components/tab/tab.js +16 -1
- package/dist/components/tab/tabs-panel.d.ts.map +1 -1
- package/dist/components/tab/tabs-panel.js +15 -0
- package/dist/components/table/index.d.ts.map +1 -1
- package/dist/components/table/index.js +15 -0
- package/dist/components/table/table-cell/index.d.ts.map +1 -1
- package/dist/components/table/table-cell/index.js +15 -0
- package/dist/components/table/table-cell/table-cell.d.ts.map +1 -1
- package/dist/components/table/table-cell/table-cell.js +15 -0
- package/dist/components/table/table-checkbox/index.d.ts.map +1 -1
- package/dist/components/table/table-checkbox/index.js +15 -0
- package/dist/components/table/table-checkbox/table-checkbox.d.ts.map +1 -1
- package/dist/components/table/table-checkbox/table-checkbox.js +15 -0
- package/dist/components/table/table-controls/index.d.ts.map +1 -1
- package/dist/components/table/table-controls/index.js +15 -0
- package/dist/components/table/table-controls/toggle-columns.d.ts.map +1 -1
- package/dist/components/table/table-controls/toggle-columns.js +18 -3
- package/dist/components/table/table-expand/index.d.ts.map +1 -1
- package/dist/components/table/table-expand/index.js +15 -0
- package/dist/components/table/table-expand/table-expand.d.ts +1 -1
- package/dist/components/table/table-expand/table-expand.d.ts.map +1 -1
- package/dist/components/table/table-expand/table-expand.js +0 -1
- package/dist/components/table/table-header/index.d.ts +1 -1
- package/dist/components/table/table-header/index.d.ts.map +1 -1
- package/dist/components/table/table-header/index.js +15 -0
- package/dist/components/table/table-header/table-header.d.ts.map +1 -1
- package/dist/components/table/table-pagination/index.d.ts +1 -1
- package/dist/components/table/table-pagination/index.d.ts.map +1 -1
- package/dist/components/table/table-pagination/index.js +15 -0
- package/dist/components/table/table-pagination/table-pagination.d.ts.map +1 -1
- package/dist/components/table/table-pagination/table-pagination.js +15 -0
- package/dist/components/table/table-row/index.d.ts.map +1 -1
- package/dist/components/table/table-row/index.js +15 -0
- package/dist/components/table/table-row/table-row.d.ts.map +1 -1
- package/dist/components/table/table-row/table-row.js +17 -2
- package/dist/components/table/table.d.ts +5 -1
- package/dist/components/table/table.d.ts.map +1 -1
- package/dist/components/table/table.js +17 -1
- package/dist/components/table/table.stories.d.ts +16 -16
- package/dist/components/table/table.stories.d.ts.map +1 -1
- package/dist/components/table/types.d.ts.map +1 -1
- package/dist/components/table/types.js +15 -0
- package/dist/components/text/index.d.ts.map +1 -1
- package/dist/components/text/index.js +15 -0
- package/dist/components/text/text.d.ts.map +1 -1
- package/dist/components/textfield/base-field/index.d.ts.map +1 -1
- package/dist/components/textfield/base-field/index.js +15 -0
- package/dist/components/textfield/index.d.ts.map +1 -1
- package/dist/components/textfield/index.js +15 -0
- package/dist/components/title/index.d.ts.map +1 -1
- package/dist/components/title/index.js +15 -0
- package/dist/components/title/title.d.ts.map +1 -1
- package/dist/components/title/title.js +16 -1
- package/dist/components/toggle-button/index.d.ts.map +1 -1
- package/dist/components/toggle-button/index.js +15 -0
- package/dist/components/toggle-button/toggle-button.d.ts.map +1 -1
- package/dist/components/toggle-button/toggle-button.js +15 -0
- package/dist/components/tooltip/index.d.ts.map +1 -1
- package/dist/components/tooltip/index.js +15 -0
- package/dist/components/tooltip/tooltip.d.ts.map +1 -1
- package/dist/components/tooltip/tooltip.js +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -0
- package/dist/providers/index.d.ts.map +1 -1
- package/dist/providers/index.js +15 -0
- package/dist/providers/overlay.d.ts.map +1 -1
- package/dist/providers/overlay.js +15 -0
- package/dist/providers/responsive.d.ts.map +1 -1
- package/dist/providers/responsive.js +15 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +15 -0
- package/dist/types/polymorphic/index.d.ts.map +1 -1
- package/dist/types/polymorphic/index.js +15 -0
- package/package.json +10 -9
|
@@ -1 +1,16 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 Wonderflow <authored by Mattia Astorino>
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
1
16
|
export { Symbol } from './symbol';
|
|
@@ -34,7 +34,7 @@ export declare const Symbol: import("react").ForwardRefExoticComponent<SVGAttrib
|
|
|
34
34
|
* Set the size of the icon. To improve readability at any size, the style of the icon
|
|
35
35
|
* is automatically defined based on the dimension.
|
|
36
36
|
*/
|
|
37
|
-
dimension?: 16 | 24 | 32 | 40 | 48 | 56 | 12 | 18 | undefined;
|
|
37
|
+
dimension?: 16 | "16" | 24 | "24" | 32 | "32" | 40 | "40" | 48 | "48" | 56 | "56" | 12 | "12" | 18 | "18" | undefined;
|
|
38
38
|
/**
|
|
39
39
|
* Set the weight of the icon.
|
|
40
40
|
* The default weight is `outline` if `dimension` is greather than `12` or `undefined`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"symbol.d.ts","sourceRoot":"","sources":["../../../src/components/symbol/symbol.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"symbol.d.ts","sourceRoot":"","sources":["../../../src/components/symbol/symbol.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAGlD,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAE/D,OAAO,EAIL,YAAY,EACZ,aAAa,EAEd,MAAM,OAAO,CAAC;AAIf,oBAAY,WAAW,GAAG,aAAa,CAAC,UAAU,GAAG,aAAa,CAAC,GAAG;IACpE;;;;;OAKG;IACH,MAAM,EAAE,WAAW,GAAG,YAAY,CAAC,gBAAgB,CAAC,CAAC;IACrD;;;OAGG;IACH,SAAS,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;IACxC;;;;;MAKE;IACF,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC;CAC1C,CAAA;AAED,eAAO,MAAM,MAAM;IArBjB;;;;;OAKG;YACK,WAAW,GAAG,aAAa,gBAAgB,CAAC;IACpD;;;OAGG;;IAEH;;;;;MAKE;;iDAyCF,CAAC"}
|
|
@@ -5,12 +5,12 @@ declare const story: ComponentMeta<typeof Symbol>;
|
|
|
5
5
|
export default story;
|
|
6
6
|
export declare const Default: ComponentStory<React.ForwardRefExoticComponent<React.SVGAttributes<SVGElement | SVGSVGElement> & {
|
|
7
7
|
source: import("packages/symbols/dist").SymbolNames | React.ReactElement<HTMLOrSVGElement, string | React.JSXElementConstructor<any>>;
|
|
8
|
-
dimension?: 16 | 24 | 32 | 40 | 48 | 56 | 12 | 18 | undefined;
|
|
8
|
+
dimension?: 16 | "16" | 24 | "24" | 32 | "32" | 40 | "40" | 48 | "48" | 56 | "56" | 12 | "12" | 18 | "18" | undefined;
|
|
9
9
|
weight?: "solid" | "outline" | "duotone" | undefined;
|
|
10
10
|
} & React.RefAttributes<SVGSVGElement>>>;
|
|
11
11
|
export declare const CustomSymbol: ComponentStory<React.ForwardRefExoticComponent<React.SVGAttributes<SVGElement | SVGSVGElement> & {
|
|
12
12
|
source: import("packages/symbols/dist").SymbolNames | React.ReactElement<HTMLOrSVGElement, string | React.JSXElementConstructor<any>>;
|
|
13
|
-
dimension?: 16 | 24 | 32 | 40 | 48 | 56 | 12 | 18 | undefined;
|
|
13
|
+
dimension?: 16 | "16" | 24 | "24" | 32 | "32" | 40 | "40" | 48 | "48" | 56 | "56" | 12 | "12" | 18 | "18" | undefined;
|
|
14
14
|
weight?: "solid" | "outline" | "duotone" | undefined;
|
|
15
15
|
} & React.RefAttributes<SVGSVGElement>>>;
|
|
16
16
|
//# sourceMappingURL=symbol.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/tab/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/tab/index.ts"],"names":[],"mappings":"AAgBA,YAAY,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC"}
|
|
@@ -1 +1,16 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 Wonderflow <authored by Mattia Astorino>
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
1
16
|
export { Tab } from './tab';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
2
2
|
import { PropsWithChildren } from 'react';
|
|
3
|
+
import { TabPanelProps } from './tabs-panel';
|
|
3
4
|
export declare type TabProps = PropsWithChildren<PropsWithClass> & {
|
|
4
5
|
/**
|
|
5
6
|
* The value for the selected tab, if controlled
|
|
@@ -37,6 +38,6 @@ export declare type TabProps = PropsWithChildren<PropsWithClass> & {
|
|
|
37
38
|
};
|
|
38
39
|
export declare const Tab: {
|
|
39
40
|
({ className, children, onValueChange, defaultValue, value, loop, dimension, ...otherProps }: TabProps): JSX.Element;
|
|
40
|
-
Panel: FCChildrenClass<
|
|
41
|
+
Panel: FCChildrenClass<TabPanelProps>;
|
|
41
42
|
};
|
|
42
43
|
//# sourceMappingURL=tab.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tab.d.ts","sourceRoot":"","sources":["../../../src/components/tab/tab.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tab.d.ts","sourceRoot":"","sources":["../../../src/components/tab/tab.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,aAAa,MAAM,sBAAsB,CAAC;AAEtD,OAAO,EACqB,iBAAiB,EAC5C,MAAM,OAAO,CAAC;AAMf,OAAO,EAAY,aAAa,EAAE,MAAM,cAAc,CAAC;AAEvD,oBAAY,QAAQ,GAAG,iBAAiB,CAAC,cAAc,CAAC,GAAG;IACzD;;OAEG;IACH,KAAK,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;IACzC;;OAEG;IACH,YAAY,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IACvD;;OAEG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;IACzD;;;OAGG;IACH,GAAG,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IACrC;;;OAGG;IACH,cAAc,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC3D;;;OAGG;IACH,IAAI,CAAC,EAAE,aAAa,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IAC3C;;;;OAIG;IACH,SAAS,CAAC,EAAE,SAAS,GAAG,KAAK,CAAC;CAC/B,CAAC;AAEF,eAAO,MAAM,GAAG;kGASb,QAAQ;;CA2CV,CAAC"}
|
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright 2022 Wonderflow <authored by Mattia Astorino>
|
|
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
|
+
*/
|
|
2
17
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
3
18
|
import { domMax, LazyMotion, m } from 'framer-motion';
|
|
4
19
|
import { Children, isValidElement, useCallback, useState, } from 'react';
|
|
@@ -13,6 +28,6 @@ export const Tab = ({ className, children, onValueChange, defaultValue, value, l
|
|
|
13
28
|
onValueChange?.(value);
|
|
14
29
|
setActiveItem(value);
|
|
15
30
|
}, [onValueChange]);
|
|
16
|
-
return (_jsxs(TabsPrimitive.Root, { defaultValue: defaultValue, onValueChange: handleOnVlaueChange, className: className, value: value, ...otherProps, children: [_jsx(LazyMotion, { features: domMax, strict: true, children: _jsx(TabsPrimitive.List, { className: styles.List, loop: loop, children: Children.map(children, child => isValidElement(child) && (_jsx(TabsPrimitive.Trigger, { value: child.props.value, disabled: child.props.disabled, className: styles.Trigger, "data-tab-dimension": dimension, asChild: true, children: _jsxs(Button, { kind: "flat", dimension: "big", children: [_jsx(Symbol, { source: child.props.icon, dimension: dimension === 'big' ? 24 : 16, weight: dimension === 'big' ? 'duotone' : 'solid' }), child.props.label, (child.props.value === activeItem) && (_jsx(m.span, { className: styles.Highlight, layoutId: uid('tab-highlight') }))] }) }))) }) }), children] }));
|
|
31
|
+
return (_jsxs(TabsPrimitive.Root, { defaultValue: defaultValue, onValueChange: handleOnVlaueChange, className: className, value: value, ...otherProps, children: [_jsx(LazyMotion, { features: domMax, strict: true, children: _jsx(TabsPrimitive.List, { className: styles.List, loop: loop, children: Children.map(children, child => isValidElement(child) && (_jsx(TabsPrimitive.Trigger, { value: child.props.value, disabled: child.props.disabled, className: styles.Trigger, "data-tab-dimension": dimension, asChild: true, children: _jsxs(Button, { kind: "flat", dimension: "big", children: [child.props.icon && _jsx(Symbol, { source: child.props.icon, dimension: dimension === 'big' ? 24 : 16, weight: dimension === 'big' ? 'duotone' : 'solid' }), child.props.label, (child.props.value === activeItem) && (_jsx(m.span, { className: styles.Highlight, layoutId: uid('tab-highlight') }))] }) }))) }) }), children] }));
|
|
17
32
|
};
|
|
18
33
|
Tab.Panel = TabPanel;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabs-panel.d.ts","sourceRoot":"","sources":["../../../src/components/tab/tabs-panel.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tabs-panel.d.ts","sourceRoot":"","sources":["../../../src/components/tab/tabs-panel.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,aAAa,MAAM,sBAAsB,CAAC;AAGtD,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAI3C,oBAAY,aAAa,GAAG;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IAC7B,KAAK,EAAE,aAAa,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAC/C,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,eAAe,CAAC,aAAa,CAanD,CAAC"}
|
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright 2022 Wonderflow <authored by Mattia Astorino>
|
|
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
|
+
*/
|
|
2
17
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
3
18
|
import clsx from 'clsx';
|
|
4
19
|
import * as styles from './tab.module.css';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/table/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/table/index.ts"],"names":[],"mappings":"AAgBA,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -1 +1,16 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 Wonderflow <authored by Mattia Astorino>
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
1
16
|
export { Table } from './table';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/table/table-cell/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/table/table-cell/index.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -1 +1,16 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 Wonderflow <authored by Mattia Astorino>
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
1
16
|
export { TableCell } from './table-cell';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-cell.d.ts","sourceRoot":"","sources":["../../../../src/components/table/table-cell/table-cell.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"table-cell.d.ts","sourceRoot":"","sources":["../../../../src/components/table/table-cell/table-cell.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAE,WAAW,EAAU,MAAM,cAAc,CAAC;AAEnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAG/C,aAAK,cAAc,GAAG;IACpB,SAAS,CAAC,EAAE,mBAAmB,CAAC,aAAa,CAAC,CAAC;IAC/C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,KAAK,CAAC,EAAE,mBAAmB,CAAC,OAAO,CAAC,CAAC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB,CAAA;AAED,aAAK,eAAe,GAAG,WAAW,CAAC,mBAAmB,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC;AAE7E,eAAO,MAAM,SAAS,iBA8CD,CAAC"}
|
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright 2022 Wonderflow <authored by Mattia Astorino>
|
|
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
|
+
*/
|
|
2
17
|
import clsx from 'clsx';
|
|
3
18
|
import { forwardRef } from 'react';
|
|
4
19
|
import { Symbol } from '../../..';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/table/table-checkbox/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/table/table-checkbox/index.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -1 +1,16 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 Wonderflow <authored by Mattia Astorino>
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
1
16
|
export { TableCheckbox } from './table-checkbox';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-checkbox.d.ts","sourceRoot":"","sources":["../../../../src/components/table/table-checkbox/table-checkbox.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"table-checkbox.d.ts","sourceRoot":"","sources":["../../../../src/components/table/table-checkbox/table-checkbox.tsx"],"names":[],"mappings":";AAoBA,eAAO,MAAM,aAAa;;iBAMzB,CAAC"}
|
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright 2022 Wonderflow <authored by Mattia Astorino>
|
|
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
|
+
*/
|
|
2
17
|
import { Checkbox } from '../../..';
|
|
3
18
|
import * as styles from './table-checkbox.module.css';
|
|
4
19
|
export const TableCheckbox = ({ ...otherProps }) => (_jsx(Checkbox, { className: styles.TableCheckbox, dimension: "small", ...otherProps }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/table/table-controls/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/table/table-controls/index.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -1 +1,16 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 Wonderflow <authored by Mattia Astorino>
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
1
16
|
export { ToggleColumnsControl } from './toggle-columns';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle-columns.d.ts","sourceRoot":"","sources":["../../../../src/components/table/table-controls/toggle-columns.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"toggle-columns.d.ts","sourceRoot":"","sources":["../../../../src/components/table/table-controls/toggle-columns.tsx"],"names":[],"mappings":";AAoBA,OAAO,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAEpD,aAAK,yBAAyB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI;IAClE,OAAO,EAAE,KAAK,CAAC,wBAAwB,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5C,cAAc,EAAE,KAAK,CAAC,wBAAwB,CAAC,CAAC,CAAC,CAAC,CAAC;CACpD,CAAA;AAED,eAAO,MAAM,oBAAoB,gHAwDhC,CAAC"}
|
|
@@ -1,15 +1,30 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright 2022 Wonderflow <authored by Mattia Astorino>
|
|
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
|
+
*/
|
|
2
17
|
import { useCallback, useMemo } from 'react';
|
|
3
18
|
import { Button, Menu, Popover } from '../../..';
|
|
4
19
|
export const ToggleColumnsControl = ({ columns, visibleColumns, }) => {
|
|
5
|
-
const
|
|
20
|
+
const hasSomeVisibleColums = useMemo(() => visibleColumns.length !== 0, [visibleColumns]);
|
|
6
21
|
const filteredColumns = useMemo(() => columns.filter(col => !col.isToggable), [columns]);
|
|
7
22
|
const handleToggleAll = useCallback(() => {
|
|
8
23
|
/**
|
|
9
24
|
* If there are visible columns (excluding artificial ones),
|
|
10
25
|
* hide them all by calling `toggleHidden(true)` for each column
|
|
11
26
|
*/
|
|
12
|
-
if (
|
|
27
|
+
if (hasSomeVisibleColums) {
|
|
13
28
|
visibleColumns.forEach(col => col.toggleHidden(true));
|
|
14
29
|
return;
|
|
15
30
|
}
|
|
@@ -18,6 +33,6 @@ export const ToggleColumnsControl = ({ columns, visibleColumns, }) => {
|
|
|
18
33
|
* toggleHidden(false) for each column
|
|
19
34
|
*/
|
|
20
35
|
filteredColumns.forEach(col => col.toggleHidden(false));
|
|
21
|
-
}, [
|
|
36
|
+
}, [hasSomeVisibleColums, filteredColumns, visibleColumns]);
|
|
22
37
|
return (_jsx(Popover, { placement: "bottom-start", trigger: _jsx(Button, { kind: "secondary", children: "Toggle columns" }), children: _jsxs(Menu, { maxHeight: "350px", children: [_jsx(Menu.ItemCheckbox, { value: "toggle-all", onClick: () => handleToggleAll(), checked: true, icon: visibleColumns.length === 0 ? 'check' : 'minus', children: "Toggle All" }), columns.filter(col => !col.isToggable).map((column, i) => (_jsx(Menu.ItemCheckbox, { value: column.id, autoFocus: i === 0, checked: column.isVisible, icon: column.isVisible ? 'check' : undefined, onClick: () => column.toggleHidden(), children: column.render('Header') }, column.id)))] }) }));
|
|
23
38
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/table/table-expand/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/table/table-expand/index.ts"],"names":[],"mappings":"AAgBA,YAAY,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -1 +1,16 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 Wonderflow <authored by Mattia Astorino>
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
1
16
|
export { TableExpand } from './table-expand';
|
|
@@ -3,5 +3,5 @@ export declare type TableExpandProps<T> = {
|
|
|
3
3
|
data: T;
|
|
4
4
|
component: ComponentType<T>;
|
|
5
5
|
};
|
|
6
|
-
export declare const TableExpand: <T,
|
|
6
|
+
export declare const TableExpand: <T extends Record<string, unknown>>({ data, component: Component, }: TableExpandProps<T>) => JSX.Element;
|
|
7
7
|
//# sourceMappingURL=table-expand.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-expand.d.ts","sourceRoot":"","sources":["../../../../src/components/table/table-expand/table-expand.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAItC,oBAAY,gBAAgB,CAAC,CAAC,IAAI;IAChC,IAAI,EAAE,CAAC,CAAC;IACR,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;CAC7B,CAAA;
|
|
1
|
+
{"version":3,"file":"table-expand.d.ts","sourceRoot":"","sources":["../../../../src/components/table/table-expand/table-expand.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAItC,oBAAY,gBAAgB,CAAC,CAAC,IAAI;IAChC,IAAI,EAAE,CAAC,CAAC;IACR,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;CAC7B,CAAA;AAED,eAAO,MAAM,WAAW,0GASrB,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import * as styles from './table-expand.module.css';
|
|
3
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
4
3
|
export const TableExpand = ({ data, component: Component, }) => (_jsx("div", { className: styles.TableExpand, children: _jsx("div", { className: styles.ExpandContent, children: Component ? _jsx(Component, { ...data }) : null }) }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/table/table-header/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/table/table-header/index.ts"],"names":[],"mappings":"AAgBA,YAAY,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -1 +1,16 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 Wonderflow <authored by Mattia Astorino>
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
1
16
|
export { TableHeader } from './table-header';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-header.d.ts","sourceRoot":"","sources":["../../../../src/components/table/table-header/table-header.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"table-header.d.ts","sourceRoot":"","sources":["../../../../src/components/table/table-header/table-header.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,WAAW,EAAS,KAAK,EAAE,MAAM,cAAc,CAAC;AAIzD,oBAAY,gBAAgB,GAAG,cAAc,CAAC,WAAW,CAAC,GAAG;IAC3D,KAAK,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC,gBAAgB,CAAC,OAAO,KAAK,CAAC,CAAC;CAC7D,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,UAAU,CAAC,gBAAgB,CAuBpD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/table/table-pagination/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/table/table-pagination/index.ts"],"names":[],"mappings":"AAgBA,YAAY,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -1 +1,16 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 Wonderflow <authored by Mattia Astorino>
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
1
16
|
export { TablePagination } from './table-pagination';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-pagination.d.ts","sourceRoot":"","sources":["../../../../src/components/table/table-pagination/table-pagination.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"table-pagination.d.ts","sourceRoot":"","sources":["../../../../src/components/table/table-pagination/table-pagination.tsx"],"names":[],"mappings":"AAuBA,oBAAY,oBAAoB,GAAG,cAAc,GAAG;IAClD,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,UAAU,CAAC,oBAAoB,CA4D5D,CAAC"}
|
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright 2022 Wonderflow <authored by Mattia Astorino>
|
|
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
|
+
*/
|
|
2
17
|
import { useMemo } from 'react';
|
|
3
18
|
import { useUIDSeed } from 'react-uid';
|
|
4
19
|
import { Pagination, Select, Stack, Text, } from '../../..';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/table/table-row/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/table/table-row/index.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -1 +1,16 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 Wonderflow <authored by Mattia Astorino>
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
1
16
|
export { TableRow } from './table-row';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-row.d.ts","sourceRoot":"","sources":["../../../../src/components/table/table-row/table-row.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"table-row.d.ts","sourceRoot":"","sources":["../../../../src/components/table/table-row/table-row.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAE,iBAAiB,EAAW,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAI1C,aAAK,aAAa,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,iBAAiB,CAAC,cAAc,CAAC;IACvF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;IACjB,YAAY,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;CACjC,CAAC,CAAC,CAAA;AAEH,eAAO,MAAM,QAAQ,+IA4BpB,CAAC"}
|
|
@@ -1,9 +1,24 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright 2022 Wonderflow <authored by Mattia Astorino>
|
|
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
|
+
*/
|
|
2
17
|
import clsx from 'clsx';
|
|
3
18
|
import { useMemo } from 'react';
|
|
4
19
|
import * as styles from './table-row.module.css';
|
|
5
20
|
export const TableRow = ({ children, className, expanded, rowData, expandedRows, ...otherProps }) => {
|
|
6
|
-
const
|
|
21
|
+
const shouldHighlightRow = useMemo(() => {
|
|
7
22
|
const [currentParentRowId] = rowData?.id.match(/.*(?=\.)/) ?? [];
|
|
8
23
|
const isHighlight = expandedRows?.includes(currentParentRowId) && expandedRows.every((rowId) => {
|
|
9
24
|
const [parentRowMatch] = rowId.match(/.*(?=\.)/) ?? [];
|
|
@@ -11,5 +26,5 @@ export const TableRow = ({ children, className, expanded, rowData, expandedRows,
|
|
|
11
26
|
});
|
|
12
27
|
return Boolean(isHighlight);
|
|
13
28
|
}, [expandedRows, rowData]);
|
|
14
|
-
return (_jsx("tr", { className: clsx(styles.TableRow, className), "data-table-row-expanded": expanded, "data-table-row-highlight":
|
|
29
|
+
return (_jsx("tr", { className: clsx(styles.TableRow, className), "data-table-row-expanded": expanded, "data-table-row-highlight": shouldHighlightRow || undefined, ...otherProps, children: children }));
|
|
15
30
|
};
|
|
@@ -91,6 +91,10 @@ export declare type TableProps<T extends Record<string, unknown>> = PropsWithCla
|
|
|
91
91
|
* all columns have been toggled off.
|
|
92
92
|
*/
|
|
93
93
|
emptyComponent?: ReactNode;
|
|
94
|
+
/**
|
|
95
|
+
* Enable or disable the sub rows selection when the parent row is selected.
|
|
96
|
+
*/
|
|
97
|
+
selectSubRows?: boolean;
|
|
94
98
|
/**
|
|
95
99
|
* Show pagination below the table. This is recommended only for tables with a lot of rows.
|
|
96
100
|
*/
|
|
@@ -136,5 +140,5 @@ export declare type TableProps<T extends Record<string, unknown>> = PropsWithCla
|
|
|
136
140
|
*/
|
|
137
141
|
onRowExpandChange?: (row: Row<T>) => void;
|
|
138
142
|
};
|
|
139
|
-
export declare const Table: <T extends Record<string, unknown>>({ className, style, columns, data, selectableRows, selectedRowIds, onSelectedRowsChange, stripes, showSeparators, title, actions, selectedActions, selectedLabel, showHeader, showTableHead, columnsControl, defaultHiddenColumns, height, loading, background, expandableRowComponent, emptyComponent, showPagination, isManualSorted, itemsPerPage, totalRows, initialPageIndex, onPaginationChange, onSortChange, pageClusters, initialSortBy, onRowExpandChange, ...otherProps }: TableProps<T>) => JSX.Element;
|
|
143
|
+
export declare const Table: <T extends Record<string, unknown>>({ className, style, columns, data, selectableRows, selectedRowIds, onSelectedRowsChange, stripes, showSeparators, title, actions, selectedActions, selectedLabel, showHeader, showTableHead, columnsControl, defaultHiddenColumns, height, loading, background, expandableRowComponent, emptyComponent, showPagination, isManualSorted, itemsPerPage, totalRows, initialPageIndex, onPaginationChange, onSortChange, pageClusters, initialSortBy, onRowExpandChange, selectSubRows, ...otherProps }: TableProps<T>) => JSX.Element;
|
|
140
144
|
//# sourceMappingURL=table.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../src/components/table/table.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../src/components/table/table.tsx"],"names":[],"mappings":"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"}
|