@wonderflow/react-components 10.9.1 → 10.11.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 +1 -1
- package/dist/components/accordion/accordion-context.d.ts.map +1 -1
- package/dist/components/accordion/accordion-context.js +16 -1
- 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 +17 -3
- package/dist/components/accordion/accordion.d.ts.map +1 -1
- package/dist/components/accordion/accordion.js +15 -0
- package/dist/components/accordion/accordion.module.css +1 -1
- package/dist/components/accordion/accordion.stories.d.ts +18 -2
- package/dist/components/accordion/accordion.stories.d.ts.map +1 -1
- package/dist/components/accordion/accordion.stories.js +1 -1
- 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/aspect-ratio.stories.js +1 -1
- 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 +2 -2
- package/dist/components/autocomplete/autocomplete.d.ts.map +1 -1
- package/dist/components/autocomplete/autocomplete.js +20 -2
- package/dist/components/autocomplete/autocomplete.module.css +1 -1
- package/dist/components/autocomplete/autocomplete.stories.js +2 -2
- 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/avatar.module.css +1 -1
- package/dist/components/avatar/avatar.stories.js +1 -1
- 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/button.module.css +1 -1
- package/dist/components/button/button.stories.js +1 -1
- package/dist/components/button/index.d.ts.map +1 -1
- package/dist/components/button/index.js +15 -0
- 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.map +1 -1
- package/dist/components/chip/chip.js +15 -0
- package/dist/components/chip/chip.module.css +1 -1
- package/dist/components/chip/chip.stories.js +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/circular-progress.module.css +1 -1
- package/dist/components/circular-progress/circular-progress.stories.js +1 -1
- 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/clamp-text.module.css +1 -1
- package/dist/components/clamp-text/clamp-text.stories.js +1 -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/container.module.css +1 -1
- 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/datetime.stories.js +1 -1
- 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/disclosure.module.css +1 -1
- package/dist/components/disclosure/disclosure.stories.js +1 -1
- 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/drawer.stories.js +3 -3
- 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 +15 -0
- package/dist/components/elevator/elevator.stories.js +1 -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/grid.module.css +1 -1
- 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/grid/item/grid-item.module.css +1 -1
- package/dist/components/icon-button/icon-button.d.ts +2 -2
- 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/icon-button.module.css +1 -1
- package/dist/components/icon-button/icon-button.stories.d.ts +1 -1
- package/dist/components/icon-button/icon-button.stories.d.ts.map +1 -1
- package/dist/components/icon-button/icon-button.stories.js +1 -1
- 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.map +1 -1
- package/dist/components/info-state/info-state.js +15 -0
- package/dist/components/info-state/info-state.module.css +1 -1
- package/dist/components/info-state/info-state.stories.js +1 -1
- 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/input-group/input-group.module.css +1 -1
- package/dist/components/input-group/input-group.stories.js +1 -1
- 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/linear-progress/linear-progress.module.css +1 -1
- package/dist/components/linear-progress/linear-progress.stories.js +1 -1
- 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 +3 -3
- package/dist/components/list/list.d.ts.map +1 -1
- package/dist/components/list/list.js +15 -0
- package/dist/components/list/list.module.css +1 -1
- package/dist/components/list/list.stories.js +1 -1
- 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/masonry/masonry.module.css +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-item/menu-item.module.css +1 -1
- package/dist/components/menu/menu-item/menu-item.stories.js +1 -1
- 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/menu/menu.module.css +1 -1
- package/dist/components/menu/menu.stories.js +3 -3
- 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/content/modal-content.module.css +1 -1
- 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/modal/modal.module.css +1 -1
- package/dist/components/modal/modal.stories.js +3 -3
- 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/overlay-container/overlay-container.module.css +1 -1
- 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/pagination/pagination.module.css +1 -1
- package/dist/components/pagination/pagination.stories.js +1 -1
- 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/popover/popover.js +3 -1
- package/dist/components/popover/popover.module.css +1 -1
- package/dist/components/popover/popover.stories.js +6 -6
- 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/prose/prose.module.css +1 -1
- package/dist/components/prose/prose.stories.js +1 -1
- 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/select/select.module.css +1 -1
- package/dist/components/select/select.stories.js +1 -1
- 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/checkbox.stories.js +1 -1
- 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/radio.stories.js +1 -1
- package/dist/components/selection-controls/selection-controls.module.css +1 -1
- package/dist/components/selection-controls/toggle.d.ts.map +1 -1
- package/dist/components/selection-controls/toggle.js +15 -0
- package/dist/components/selection-controls/toggle.stories.js +1 -1
- 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/separator/separator.module.css +1 -1
- 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/skeleton/skeleton.module.css +1 -1
- package/dist/components/skeleton/skeleton.stories.js +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/slider/slider.module.css +1 -1
- package/dist/components/slider/slider.stories.js +1 -1
- 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/snackbar/snackbar.module.css +1 -1
- package/dist/components/snackbar/snackbar.stories.js +1 -1
- 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/spinner/spinner.stories.js +1 -1
- 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/split-button/split-button.module.css +1 -1
- package/dist/components/split-button/split-button.stories.js +1 -1
- 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/stack/stack.module.css +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/star-meter/star-meter.module.css +1 -1
- package/dist/components/star-meter/star-meter.stories.js +1 -1
- 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.map +1 -1
- package/dist/components/symbol/symbol.module.css +1 -1
- package/dist/components/symbol/symbol.stories.js +1 -1
- 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/tab.module.css +1 -1
- package/dist/components/tab/tab.stories.js +1 -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-cell/table-cell.module.css +1 -1
- 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-checkbox/table-checkbox.module.css +1 -1
- 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.module.css +1 -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-header/table-header.module.css +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.module.css +1 -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/text/text.module.css +1 -1
- package/dist/components/text/text.stories.js +1 -1
- package/dist/components/textfield/base-field/base-field.d.ts +2 -2
- package/dist/components/textfield/base-field/base-field.d.ts.map +1 -1
- package/dist/components/textfield/base-field/base-field.js +1 -1
- package/dist/components/textfield/base-field/base-field.module.css +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/textfield/textfield.d.ts +3 -54
- package/dist/components/textfield/textfield.d.ts.map +1 -1
- package/dist/components/textfield/textfield.js +2 -2
- package/dist/components/textfield/textfield.module.css +1 -1
- package/dist/components/textfield/textfield.stories.d.ts +4 -56
- package/dist/components/textfield/textfield.stories.d.ts.map +1 -1
- package/dist/components/textfield/textfield.stories.js +1 -1
- 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/title/title.module.css +1 -1
- package/dist/components/title/title.stories.d.ts +1 -0
- package/dist/components/title/title.stories.d.ts.map +1 -1
- package/dist/components/title/title.stories.js +10 -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 +4 -3
- package/dist/components/toggle-button/toggle-button.d.ts.map +1 -1
- package/dist/components/toggle-button/toggle-button.js +19 -4
- package/dist/components/toggle-button/toggle-button.module.css +1 -1
- package/dist/components/toggle-button/toggle-button.stories.d.ts +2 -11
- package/dist/components/toggle-button/toggle-button.stories.d.ts.map +1 -1
- package/dist/components/toggle-button/toggle-button.stories.js +1 -1
- 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/components/tooltip/tooltip.module.css +1 -1
- package/dist/components/tooltip/tooltip.stories.js +1 -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 +1 -6
- package/dist/types/polymorphic/index.d.ts.map +1 -1
- package/dist/types/polymorphic/index.js +15 -0
- package/package.json +6 -6
|
@@ -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
|
-
.TableHeader{min-block-size:3.5rem;position:relative;z-index:3}
|
|
1
|
+
@layer components{.TableHeader{min-block-size:3.5rem;position:relative;z-index:3}}
|
|
@@ -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":"AAqBA,OAAO,EACL,aAAa,EAA2B,SAAS,EAClD,MAAM,OAAO,CAAC;AACf,OAAO,EACE,MAAM,EAAE,GAAG,EAClB,WAAW,EAGZ,MAAM,aAAa,CAAC;AAarB,OAAO,EAAe,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,EAAmB,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE3E,OAAO,EAC+B,iBAAiB,EACrD,iBAAiB,EAAmB,iBAAiB,EAAE,kBAAkB,EAC1E,MAAM,SAAS,CAAC;AAEjB,oBAAY,UAAU,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,cAAc,GAAG;IAC3E;;OAEG;IACH,OAAO,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC;IAC9B;;OAEG;IACH,IAAI,EAAE,KAAK,CAAC,CAAC,GAAG,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC;IACtC;;OAEG;IACH,oBAAoB,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IACxC;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;OAEG;IACH,cAAc,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IAClC;;OAEG;IACH,oBAAoB,CAAC,EAAE,CAAC,cAAc,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;IAClE;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;OAEG;IACH,KAAK,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAClC;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,CAAC,cAAc,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC;IAChE;;OAEG;IACH,eAAe,CAAC,EAAE,CAAC,cAAc,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC;IAClE;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;OAKG;IACH,sBAAsB,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IAC1C;;;OAGG;IACH,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;QAEI;IACJ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;QAEI;IACJ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;QAGI;IACJ,YAAY,CAAC,EAAE,oBAAoB,CAAC,UAAU,CAAC,CAAC;IAChD;;;;QAII;IACJ,kBAAkB,CAAC,EAAE,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,kBAAkB,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAC3F;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;OAEG;IACH,aAAa,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;IACtC;;QAEI;IACJ,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;IAC9D;;OAEG;IACH,iBAAiB,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;CAC3C,CAAA;AAED,eAAO,MAAM,KAAK,wiBA0XjB,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 { useUpdateEffect } from 'ahooks';
|
|
3
18
|
import clsx from 'clsx';
|
|
4
19
|
import { AnimatePresence, domMax, LazyMotion, m, } from 'framer-motion';
|
|
@@ -14,7 +29,7 @@ import { TableExpand } from './table-expand';
|
|
|
14
29
|
import { TableHeader } from './table-header';
|
|
15
30
|
import { TablePagination } from './table-pagination';
|
|
16
31
|
import { TableRow } from './table-row';
|
|
17
|
-
export const Table = ({ className, style, columns, data = [], selectableRows, selectedRowIds = [], onSelectedRowsChange, stripes, showSeparators = true, title, actions, selectedActions, selectedLabel = selectedRowIds => `Selected items: ${selectedRowIds.length}`, showHeader = false, showTableHead = true, columnsControl = false, defaultHiddenColumns, height, loading, background, expandableRowComponent, emptyComponent, showPagination, isManualSorted, itemsPerPage = 10, totalRows, initialPageIndex = 0, onPaginationChange, onSortChange, pageClusters, initialSortBy = [], onRowExpandChange, ...otherProps }) => {
|
|
32
|
+
export const Table = ({ className, style, columns, data = [], selectableRows, selectedRowIds = [], onSelectedRowsChange, stripes, showSeparators = true, title, actions, selectedActions, selectedLabel = selectedRowIds => `Selected items: ${selectedRowIds.length}`, showHeader = false, showTableHead = true, columnsControl = false, defaultHiddenColumns, height, loading, background, expandableRowComponent, emptyComponent, showPagination, isManualSorted, itemsPerPage = 10, totalRows, initialPageIndex = 0, onPaginationChange, onSortChange, pageClusters, initialSortBy = [], onRowExpandChange, selectSubRows = true, ...otherProps }) => {
|
|
18
33
|
const uid = useUIDSeed();
|
|
19
34
|
const hasSomeExpandableRows = useMemo(() => data.some(d => d.subRows), [data]);
|
|
20
35
|
const isManualPaginated = useMemo(() => Boolean(showPagination && onPaginationChange && totalRows), [showPagination, totalRows, onPaginationChange]);
|
|
@@ -41,6 +56,7 @@ export const Table = ({ className, style, columns, data = [], selectableRows, se
|
|
|
41
56
|
autoResetHiddenColumns: false,
|
|
42
57
|
autoResetPage: false,
|
|
43
58
|
autoResetSortBy: false,
|
|
59
|
+
selectSubRows,
|
|
44
60
|
/**
|
|
45
61
|
* This `paginateExpandedRows` prop prevent expanded rows to
|
|
46
62
|
* be placed in the next page. But it breaks row selection
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.Table{position:relative;width:100%;z-index:0}.TableWrapper{-webkit-overflow-scrolling:touch;overflow:auto}.TableWrapper[data-table-scrolling=true]{background:var(--table-background);max-height:var(--table-height);overscroll-behavior:contain}.TableElement{border-collapse:collapse;font-size:1rem;width:100%}.TableElement[data-table-loading=true]{pointer-events:none;-webkit-user-select:none;user-select:none}.THead{background:var(--table-background);box-shadow:inset 0 -3px 0 var(--dimmed-2);position:sticky;top:0;z-index:2}@media not all and (-webkit-min-device-pixel-ratio:0),not all and (min-resolution:0.001dpcm){@supports (-webkit-appearance:none) and (stroke-color:transparent){.THead{border-bottom:3px solid var(--dimmed-2);box-shadow:none}}}.THead th{padding-bottom:1rem;padding-top:1rem}.Toast{-webkit-backdrop-filter:saturate(180%) blur(62px);backdrop-filter:saturate(180%) blur(62px);background-color:var(--global-vibrancy-background);border-radius:.5rem;left:0;min-block-size:3.5rem;position:absolute;right:0;top:0;z-index:4}.ExpandButton{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}
|
|
1
|
+
@layer components{.Table{position:relative;width:100%;z-index:0}.TableWrapper{-webkit-overflow-scrolling:touch;overflow:auto}.TableWrapper[data-table-scrolling=true]{background:var(--table-background);max-height:var(--table-height);overscroll-behavior:contain}.TableElement{border-collapse:collapse;font-size:1rem;width:100%}.TableElement[data-table-loading=true]{pointer-events:none;-webkit-user-select:none;user-select:none}.THead{background:var(--table-background);box-shadow:inset 0 -3px 0 var(--dimmed-2);position:sticky;top:0;z-index:2}@media not all and (-webkit-min-device-pixel-ratio:0),not all and (min-resolution:0.001dpcm){@supports (-webkit-appearance:none) and (stroke-color:transparent){.THead{border-bottom:3px solid var(--dimmed-2);box-shadow:none}}}.THead th{padding-bottom:1rem;padding-top:1rem}.Toast{-webkit-backdrop-filter:saturate(180%) blur(62px);backdrop-filter:saturate(180%) blur(62px);background-color:var(--global-vibrancy-background);border-radius:.5rem;left:0;min-block-size:3.5rem;position:absolute;right:0;top:0;z-index:4}.ExpandButton{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}}
|
|
@@ -3,20 +3,20 @@ import { ComponentMeta, ComponentStory } from '@storybook/react';
|
|
|
3
3
|
import { Table } from './table';
|
|
4
4
|
declare const story: ComponentMeta<typeof Table>;
|
|
5
5
|
export default story;
|
|
6
|
-
export declare const Simple: ComponentStory<(<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 }: import("./table").TableProps<T>) => JSX.Element)>;
|
|
7
|
-
export declare const SelectedRows: ComponentStory<(<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 }: import("./table").TableProps<T>) => JSX.Element)>;
|
|
8
|
-
export declare const HidingColumn: ComponentStory<(<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 }: import("./table").TableProps<T>) => JSX.Element)>;
|
|
9
|
-
export declare const defaultHiddenColumns: ComponentStory<(<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 }: import("./table").TableProps<T>) => JSX.Element)>;
|
|
10
|
-
export declare const Scrollable: ComponentStory<(<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 }: import("./table").TableProps<T>) => JSX.Element)>;
|
|
11
|
-
export declare const WithTableActions: ComponentStory<(<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 }: import("./table").TableProps<T>) => JSX.Element)>;
|
|
12
|
-
export declare const CustomExpandable: ComponentStory<(<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 }: import("./table").TableProps<T>) => JSX.Element)>;
|
|
13
|
-
export declare const Pagination: ComponentStory<(<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 }: import("./table").TableProps<T>) => JSX.Element)>;
|
|
14
|
-
export declare const RowActions: ComponentStory<(<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 }: import("./table").TableProps<T>) => JSX.Element)>;
|
|
15
|
-
export declare const NoData: ComponentStory<(<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 }: import("./table").TableProps<T>) => JSX.Element)>;
|
|
16
|
-
export declare const ManualPagination: ComponentStory<(<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 }: import("./table").TableProps<T>) => JSX.Element)>;
|
|
17
|
-
export declare const Loading: ComponentStory<(<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 }: import("./table").TableProps<T>) => JSX.Element)>;
|
|
18
|
-
export declare const ManualSorting: ComponentStory<(<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 }: import("./table").TableProps<T>) => JSX.Element)>;
|
|
19
|
-
export declare const ManualPaginationFiltering: ComponentStory<(<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 }: import("./table").TableProps<T>) => JSX.Element)>;
|
|
20
|
-
export declare const PreselectedRows: ComponentStory<(<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 }: import("./table").TableProps<T>) => JSX.Element)>;
|
|
21
|
-
export declare const AsyncData: ComponentStory<(<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 }: import("./table").TableProps<T>) => JSX.Element)>;
|
|
6
|
+
export declare const Simple: ComponentStory<(<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 }: import("./table").TableProps<T>) => JSX.Element)>;
|
|
7
|
+
export declare const SelectedRows: ComponentStory<(<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 }: import("./table").TableProps<T>) => JSX.Element)>;
|
|
8
|
+
export declare const HidingColumn: ComponentStory<(<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 }: import("./table").TableProps<T>) => JSX.Element)>;
|
|
9
|
+
export declare const defaultHiddenColumns: ComponentStory<(<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 }: import("./table").TableProps<T>) => JSX.Element)>;
|
|
10
|
+
export declare const Scrollable: ComponentStory<(<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 }: import("./table").TableProps<T>) => JSX.Element)>;
|
|
11
|
+
export declare const WithTableActions: ComponentStory<(<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 }: import("./table").TableProps<T>) => JSX.Element)>;
|
|
12
|
+
export declare const CustomExpandable: ComponentStory<(<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 }: import("./table").TableProps<T>) => JSX.Element)>;
|
|
13
|
+
export declare const Pagination: ComponentStory<(<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 }: import("./table").TableProps<T>) => JSX.Element)>;
|
|
14
|
+
export declare const RowActions: ComponentStory<(<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 }: import("./table").TableProps<T>) => JSX.Element)>;
|
|
15
|
+
export declare const NoData: ComponentStory<(<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 }: import("./table").TableProps<T>) => JSX.Element)>;
|
|
16
|
+
export declare const ManualPagination: ComponentStory<(<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 }: import("./table").TableProps<T>) => JSX.Element)>;
|
|
17
|
+
export declare const Loading: ComponentStory<(<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 }: import("./table").TableProps<T>) => JSX.Element)>;
|
|
18
|
+
export declare const ManualSorting: ComponentStory<(<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 }: import("./table").TableProps<T>) => JSX.Element)>;
|
|
19
|
+
export declare const ManualPaginationFiltering: ComponentStory<(<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 }: import("./table").TableProps<T>) => JSX.Element)>;
|
|
20
|
+
export declare const PreselectedRows: ComponentStory<(<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 }: import("./table").TableProps<T>) => JSX.Element)>;
|
|
21
|
+
export declare const AsyncData: ComponentStory<(<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 }: import("./table").TableProps<T>) => JSX.Element)>;
|
|
22
22
|
//# sourceMappingURL=table.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.stories.d.ts","sourceRoot":"","sources":["../../../src/components/table/table.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAQjE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAWhC,QAAA,MAAM,KAAK,EAAE,aAAa,CAAC,OAAO,KAAK,CA85BtC,CAAC;AAEF,eAAe,KAAK,CAAC;AAgCrB,eAAO,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"table.stories.d.ts","sourceRoot":"","sources":["../../../src/components/table/table.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAQjE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAWhC,QAAA,MAAM,KAAK,EAAE,aAAa,CAAC,OAAO,KAAK,CA85BtC,CAAC;AAEF,eAAe,KAAK,CAAC;AAgCrB,eAAO,MAAM,MAAM,4kBAAoB,CAAC;AA0BxC,eAAO,MAAM,YAAY,4kBAA6B,CAAC;AAuCvD,eAAO,MAAM,YAAY,4kBAAgC,CAAC;AAM1D,eAAO,MAAM,oBAAoB,4kBAAoB,CAAC;AAOtD,eAAO,MAAM,UAAU,4kBAAoB,CAAC;AAS5C,eAAO,MAAM,gBAAgB,4kBAAoB,CAAC;AAQlD,eAAO,MAAM,gBAAgB,4kBAAoB,CAAC;AAQlD,eAAO,MAAM,UAAU,4kBAA6B,CAAC;AAuDrD,eAAO,MAAM,UAAU,4kBAA8B,CAAC;AAOtD,eAAO,MAAM,MAAM,4kBAAoB,CAAC;AAoDxC,eAAO,MAAM,gBAAgB,4kBAAoC,CAAC;AASlE,eAAO,MAAM,OAAO,4kBAAoB,CAAC;AAyDzC,eAAO,MAAM,aAAa,4kBAAiC,CAAC;AAmD5D,eAAO,MAAM,yBAAyB,4kBAA6C,CAAC;AAkCpF,eAAO,MAAM,eAAe,4kBAAmC,CAAC;AAmChE,eAAO,MAAM,SAAS,4kBAA6B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/table/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/table/types.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EACL,MAAM,EAAE,cAAc,EACtB,UAAU,EACV,iBAAiB,EAClB,MAAM,aAAa,CAAC;AAErB,oBAAY,kBAAkB,GAAG;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAA;AAED,oBAAY,mBAAmB,GAAG;IAChC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;IACnC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAA;AAED,oBAAY,iBAAiB,CAAC,CAAC,IAAI;IACjC,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC;IACd,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,EAAE,CAAC;CACnC,CAAA;AAED,oBAAY,eAAe,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,iBAAiB,CAAC,CAAC,EAAE,mBAAmB,CAAC,CAAA;AAC1G,oBAAY,QAAQ,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,UAAU,CAAC,CAAC,EAAE,mBAAmB,CAAC,CAAA;AAC5F,oBAAY,iBAAiB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,mBAAmB,CAAC,CAAA;AACzG,oBAAY,wBAAwB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,cAAc,CAAC,CAAC,CAAC,GAAG,mBAAmB,CAAA;AACjH,oBAAY,iBAAiB,CAAC,CAAC,IAAI;IACjC,EAAE,EAAE,MAAM,CAAC,CAAC;IACZ,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,CAAA"}
|
|
@@ -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 {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/text/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/text/index.ts"],"names":[],"mappings":"AAgBA,YAAY,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,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 { Text } from './text';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../../src/components/text/text.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../../src/components/text/text.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAI/D,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAI3C,oBAAY,SAAS,GAAG;IACtB;;;OAGG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;IACnC;;OAEG;IACH,SAAS,CAAC,EAAE,UAAU,GAAG,aAAa,GAAG,QAAQ,GAAG,SAAS,CAAC;IAC9D;;;OAGG;IACH,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACnB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;IACvC;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC;CACzC,CAAA;AAED,aAAK,eAAe,GAAG,WAAW,CAAC,mBAAmB,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;AAEvE,eAAO,MAAM,IAAI,iBAoCI,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.Text{font-size:var(--fs-max);max-inline-size:var(--max-w,initial);min-block-size:.01vh;text-align:var(--t-align)}.Text[data-text-dimmed="5"]{color:var(--dimmed-5)}.Text[data-text-dimmed="6"]{color:var(--dimmed-6)}.Text[data-text-dimmed="7"]{color:var(--dimmed-7)}.Text[data-text-sentiment=positive]{color:var(--highlight-green-foreground)}.Text[data-text-sentiment=informative]{color:var(--highlight-blue-foreground)}.Text[data-text-sentiment=danger]{color:var(--highlight-red-foreground)}.Text[data-text-sentiment=warning]{color:var(--highlight-yellow-foreground)}.Text[data-text-size="14"]{--fs-min:0.88rem;--fs-max:0.88rem}.Text[data-text-size="16"]{--fs-min:0.88rem;--fs-max:1.00rem}.Text[data-text-size="18"]{--fs-min:1.00rem;--fs-max:1.13rem}.Text[data-text-size="22"]{--fs-min:1.13rem;--fs-max:1.38rem}.Text[data-text-size="28"]{--fs-min:1.38rem;--fs-max:1.75rem}.Text[data-text-weight=thin]{font-weight:100}.Text[data-text-weight=bold]{font-weight:600}.Text[data-text-responsive=true]{font-size:var(--fs-min)}@media (min-width:48em){.Text[data-text-responsive=true]{font-size:var(--fs-max)}}.Text[data-text-line-height=none]{line-height:1}.Text[data-text-line-height=small]{line-height:1.2}.Text[data-text-line-height=large]{line-height:1.5}
|
|
1
|
+
@layer components{.Text{font-size:var(--fs-max);max-inline-size:var(--max-w,initial);min-block-size:.01vh;text-align:var(--t-align)}.Text[data-text-dimmed="5"]{color:var(--dimmed-5)}.Text[data-text-dimmed="6"]{color:var(--dimmed-6)}.Text[data-text-dimmed="7"]{color:var(--dimmed-7)}.Text[data-text-sentiment=positive]{color:var(--highlight-green-foreground)}.Text[data-text-sentiment=informative]{color:var(--highlight-blue-foreground)}.Text[data-text-sentiment=danger]{color:var(--highlight-red-foreground)}.Text[data-text-sentiment=warning]{color:var(--highlight-yellow-foreground)}.Text[data-text-size="14"]{--fs-min:0.88rem;--fs-max:0.88rem}.Text[data-text-size="16"]{--fs-min:0.88rem;--fs-max:1.00rem}.Text[data-text-size="18"]{--fs-min:1.00rem;--fs-max:1.13rem}.Text[data-text-size="22"]{--fs-min:1.13rem;--fs-max:1.38rem}.Text[data-text-size="28"]{--fs-min:1.38rem;--fs-max:1.75rem}.Text[data-text-weight=thin]{font-weight:100}.Text[data-text-weight=bold]{font-weight:600}.Text[data-text-responsive=true]{font-size:var(--fs-min)}@media (min-width:48em){.Text[data-text-responsive=true]{font-size:var(--fs-max)}}.Text[data-text-line-height=none]{line-height:1}.Text[data-text-line-height=small]{line-height:1.2}.Text[data-text-line-height=large]{line-height:1.5}}
|
|
@@ -7,9 +7,9 @@ export declare type PrimitiveInputType = HTMLInputElement | HTMLTextAreaElement;
|
|
|
7
7
|
/**
|
|
8
8
|
* @internal
|
|
9
9
|
*/
|
|
10
|
-
export declare type BaseFieldProps = InputHTMLAttributes<PrimitiveInputType> & {
|
|
10
|
+
export declare type BaseFieldProps<T = Record<string, unknown>> = InputHTMLAttributes<PrimitiveInputType> & {
|
|
11
11
|
invalid?: boolean;
|
|
12
|
-
};
|
|
12
|
+
} & T;
|
|
13
13
|
/**
|
|
14
14
|
* @internal
|
|
15
15
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-field.d.ts","sourceRoot":"","sources":["../../../../src/components/textfield/base-field/base-field.tsx"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"base-field.d.ts","sourceRoot":"","sources":["../../../../src/components/textfield/base-field/base-field.tsx"],"names":[],"mappings":"AACA,OAAO,EACO,mBAAmB,EAChC,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAGvC;;GAEG;AACH,oBAAY,kBAAkB,GAAG,gBAAgB,GAAG,mBAAmB,CAAA;AAEvE;;GAEG;AACH,oBAAY,cAAc,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,mBAAmB,CAAC,kBAAkB,CAAC,GAAG;IAClG,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,GAAG,CAAC,CAAA;AAEL;;GAEG;AACH,aAAK,oBAAoB,GAAG,WAAW,CAAC,mBAAmB,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;AAErF,eAAO,MAAM,SAAS,sBAYI,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import clsx from 'clsx';
|
|
3
|
-
import { forwardRef } from 'react';
|
|
3
|
+
import { forwardRef, } from 'react';
|
|
4
4
|
import * as styles from './base-field.module.css';
|
|
5
5
|
export const BaseField = forwardRef(({ as: Wrapper = 'input', invalid, className, ...otherProps }, forwardedRef) => (_jsx(Wrapper, { ref: forwardedRef, "data-basefield-invalid": invalid, className: clsx(styles.BaseField, className), ...otherProps })));
|
|
6
6
|
BaseField.displayName = 'BaseField';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.BaseField{appearance:none;background-color:var(--global-background);block-size:var(--field-height);border:1px solid var(--dimmed-2);border-radius:.25rem;box-sizing:border-box;caret-color:var(--cta-default);color:inherit;display:flex;font-family:inherit;font-size:var(--font-size);inline-size:100%;line-height:1;margin:0;overflow:hidden;padding:0 var(--field-padding);text-overflow:ellipsis}[data-textfield-has-icon=true] .BaseField::-webkit-calendar-picker-indicator{opacity:0;position:absolute;right:calc(var(--field-padding)/2)}.BaseField:-moz-ui-invalid{box-shadow:none}.BaseField::placeholder{color:var(--dimmed-5)}.BaseField:focus-visible{border-color:var(--dimmed-5)}.BaseField:disabled{background:linear-gradient(to bottom,var(--global-disabled-background),var(--global-disabled-background));border-color:transparent;color:var(--global-disabled-foreground);cursor:not-allowed}.BaseField:disabled::placeholder{color:var(--dimmed-6)}.BaseField[readonly]{border-style:dashed;box-shadow:none;cursor:default}.BaseField:-webkit-autofill,.BaseField:-webkit-autofill:active,.BaseField:-webkit-autofill:focus,.BaseField:-webkit-autofill:hover{-webkit-text-fill-color:var(--global-vibrancy-foreground);border:1px solid var(--dimmed-2);box-shadow:0 0 0 100px var(--global-background) inset}:is(.BaseField:-webkit-autofill,.BaseField:-webkit-autofill:hover,.BaseField:-webkit-autofill:focus,.BaseField:-webkit-autofill:active)::selection{-webkit-text-fill-color:var(--dimmed-0)}.BaseField:is(:invalid,[data-basefield-invalid=true],:out-of-range),.BaseField:is(:invalid,[data-basefield-invalid=true],:out-of-range):focus-visible{border-color:var(--highlight-red-foreground)}.BaseField[type=number]{appearance:textfield}.BaseField[type=number]::-webkit-inner-spin-button,.BaseField[type=number]::-webkit-outer-spin-button{display:none}.BaseField[type=search]{appearance:none}.BaseField[type=search]::-webkit-search-cancel-button,.BaseField[type=search]::-webkit-search-decoration{appearance:none}textarea.BaseField{block-size:auto;line-height:1.5;min-block-size:2rem;padding:calc(var(--field-padding)/2) calc(var(--field-padding) + 1rem) calc(var(--field-padding)/2) var(--field-padding);resize:vertical}textarea.BaseField::-webkit-datetime-edit-text{opacity:.3}textarea.BaseField::-webkit-calendar-picker-indicator{color:var(--global-foreground)}textarea.BaseField:-moz-ui-invalid{box-shadow:none}textarea.BaseField::-webkit-calendar-picker-indicator:hover{background-color:transparent}
|
|
1
|
+
@layer components{.BaseField{appearance:none;background-color:var(--global-background);block-size:var(--field-height);border:1px solid var(--dimmed-2);border-radius:.25rem;box-sizing:border-box;caret-color:var(--cta-default);color:inherit;display:flex;font-family:inherit;font-size:var(--font-size);inline-size:100%;line-height:1;margin:0;overflow:hidden;padding:0 var(--field-padding);text-overflow:ellipsis}[data-textfield-has-icon=true] .BaseField::-webkit-calendar-picker-indicator{opacity:0;position:absolute;right:calc(var(--field-padding)/2)}.BaseField:-moz-ui-invalid{box-shadow:none}.BaseField::placeholder{color:var(--dimmed-5)}.BaseField:focus-visible{border-color:var(--dimmed-5)}.BaseField:disabled{background:linear-gradient(to bottom,var(--global-disabled-background),var(--global-disabled-background));border-color:transparent;color:var(--global-disabled-foreground);cursor:not-allowed}.BaseField:disabled::placeholder{color:var(--dimmed-6)}.BaseField[readonly]{border-style:dashed;box-shadow:none;cursor:default}.BaseField:-webkit-autofill,.BaseField:-webkit-autofill:active,.BaseField:-webkit-autofill:focus,.BaseField:-webkit-autofill:hover{-webkit-text-fill-color:var(--global-vibrancy-foreground);border:1px solid var(--dimmed-2);box-shadow:0 0 0 100px var(--global-background) inset}:is(.BaseField:-webkit-autofill,.BaseField:-webkit-autofill:hover,.BaseField:-webkit-autofill:focus,.BaseField:-webkit-autofill:active)::selection{-webkit-text-fill-color:var(--dimmed-0)}.BaseField:is(:invalid,[data-basefield-invalid=true],:out-of-range),.BaseField:is(:invalid,[data-basefield-invalid=true],:out-of-range):focus-visible{border-color:var(--highlight-red-foreground)}.BaseField[type=number]{appearance:textfield}.BaseField[type=number]::-webkit-inner-spin-button,.BaseField[type=number]::-webkit-outer-spin-button{display:none}.BaseField[type=search]{appearance:none}.BaseField[type=search]::-webkit-search-cancel-button,.BaseField[type=search]::-webkit-search-decoration{appearance:none}textarea.BaseField{block-size:auto;line-height:1.5;min-block-size:2rem;padding:calc(var(--field-padding)/2) calc(var(--field-padding) + 1rem) calc(var(--field-padding)/2) var(--field-padding);resize:vertical}textarea.BaseField::-webkit-datetime-edit-text{opacity:.3}textarea.BaseField::-webkit-calendar-picker-indicator{color:var(--global-foreground)}textarea.BaseField:-moz-ui-invalid{box-shadow:none}textarea.BaseField::-webkit-calendar-picker-indicator:hover{background-color:transparent}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/textfield/base-field/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/textfield/base-field/index.ts"],"names":[],"mappings":"AAgBA,YAAY,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACvE,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 { BaseField } from './base-field';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/textfield/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/textfield/index.ts"],"names":[],"mappings":"AAgBA,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,SAAS,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 { Textfield } from './textfield';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ChangeEvent } from 'react';
|
|
2
2
|
import { SymbolProps } from '../..';
|
|
3
3
|
import { BaseFieldProps, PrimitiveInputType } from './base-field';
|
|
4
|
-
export declare type TextfieldProps =
|
|
4
|
+
export declare type TextfieldProps<T = Record<string, unknown>> = BaseFieldProps<{
|
|
5
5
|
/**
|
|
6
6
|
* Set the icon to show on the left or right side of the input.
|
|
7
7
|
*/
|
|
@@ -50,57 +50,6 @@ export declare type TextfieldProps = BaseFieldProps & {
|
|
|
50
50
|
* Make the textfield full width, filling the available space.
|
|
51
51
|
*/
|
|
52
52
|
fullWidth?: boolean;
|
|
53
|
-
};
|
|
54
|
-
export declare const Textfield: import("react").ForwardRefExoticComponent<import("react").
|
|
55
|
-
invalid?: boolean | undefined;
|
|
56
|
-
} & {
|
|
57
|
-
/**
|
|
58
|
-
* Set the icon to show on the left or right side of the input.
|
|
59
|
-
*/
|
|
60
|
-
icon?: import("packages/symbols/dist").SymbolNames | import("react").ReactElement<HTMLOrSVGElement, string | import("react").JSXElementConstructor<any>> | undefined;
|
|
61
|
-
/**
|
|
62
|
-
* Set in which side of the field the icon should be displayed.
|
|
63
|
-
*/
|
|
64
|
-
iconPosition?: "left" | "right" | undefined;
|
|
65
|
-
/**
|
|
66
|
-
* Define the accessible label of the input. While this is not
|
|
67
|
-
* mandatory, an input should always have a label. If not using this property
|
|
68
|
-
* you can bind a custom label to the input by using an id.
|
|
69
|
-
*/
|
|
70
|
-
label?: string | undefined;
|
|
71
|
-
/**
|
|
72
|
-
* Set the input type. The value can be anything that
|
|
73
|
-
* is supported by the HTML input element.
|
|
74
|
-
*
|
|
75
|
-
* Read more: https://developer.mozilla.org/en-US/docs/Learn/Forms/HTML5_input_types
|
|
76
|
-
*/
|
|
77
|
-
type?: string | undefined;
|
|
78
|
-
/**
|
|
79
|
-
* Set the input to be a textarea instead of a single line field.
|
|
80
|
-
* This property completely changes the rendered element from an input to a textarea.
|
|
81
|
-
*/
|
|
82
|
-
textarea?: boolean | undefined;
|
|
83
|
-
/**
|
|
84
|
-
* Set the size of the field
|
|
85
|
-
*/
|
|
86
|
-
dimension?: "small" | "regular" | "big" | undefined;
|
|
87
|
-
/**
|
|
88
|
-
* Set the field into a readonly state. When readonly, the field value
|
|
89
|
-
* cannot be edited but it can still be selected and copied.
|
|
90
|
-
*/
|
|
91
|
-
readOnly?: boolean | undefined;
|
|
92
|
-
/**
|
|
93
|
-
* Set the field into a disabled state. When disabled, the field value cannot be
|
|
94
|
-
* edited, selected or copied, but it can still be focused and navigated by AT.
|
|
95
|
-
*/
|
|
96
|
-
disabled?: boolean | undefined;
|
|
97
|
-
/**
|
|
98
|
-
* The callback function that is called when the input value changes.
|
|
99
|
-
*/
|
|
100
|
-
onChange?: ((event: ChangeEvent<PrimitiveInputType>) => void) | undefined;
|
|
101
|
-
/**
|
|
102
|
-
* Make the textfield full width, filling the available space.
|
|
103
|
-
*/
|
|
104
|
-
fullWidth?: boolean | undefined;
|
|
105
|
-
} & import("react").RefAttributes<PrimitiveInputType>>;
|
|
53
|
+
}> & T;
|
|
54
|
+
export declare const Textfield: import("react").ForwardRefExoticComponent<Pick<TextfieldProps<Record<string, unknown>>, string> & import("react").RefAttributes<PrimitiveInputType>>;
|
|
106
55
|
//# sourceMappingURL=textfield.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textfield.d.ts","sourceRoot":"","sources":["../../../src/components/textfield/textfield.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,WAAW,EACZ,MAAM,OAAO,CAAC;AAGf,OAAO,EACuC,WAAW,EACxD,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAa,cAAc,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAG7E,oBAAY,cAAc,GAAG,cAAc,
|
|
1
|
+
{"version":3,"file":"textfield.d.ts","sourceRoot":"","sources":["../../../src/components/textfield/textfield.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,WAAW,EACZ,MAAM,OAAO,CAAC;AAGf,OAAO,EACuC,WAAW,EACxD,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAa,cAAc,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAG7E,oBAAY,cAAc,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,cAAc,CAAC;IACvE;;OAEG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IAC7B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAChC;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,KAAK,CAAC;IACxC;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,kBAAkB,CAAC,KAAK,IAAI,CAAC;IAC5D;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC,GAAG,CAAC,CAAA;AAEN,eAAO,MAAM,SAAS,sJA8GpB,CAAC"}
|
|
@@ -6,7 +6,7 @@ import { IconButton, Stack, Symbol, Text, } from '../..';
|
|
|
6
6
|
import { BaseField } from './base-field';
|
|
7
7
|
import * as styles from './textfield.module.css';
|
|
8
8
|
export const Textfield = forwardRef(({ children, className, disabled = false, icon, label, textarea, readOnly, invalid, id, iconPosition = 'right', dimension = 'regular', type, style, onChange, fullWidth, ...otherProps }, forwardedRef) => {
|
|
9
|
-
const [
|
|
9
|
+
const [isPasswordVisible, setPasswordVisible] = useState(false);
|
|
10
10
|
const seedID = useUIDSeed();
|
|
11
11
|
const isPassword = type === 'password';
|
|
12
12
|
const fieldID = useMemo(() => id ?? seedID('field'), [id, seedID]);
|
|
@@ -31,6 +31,6 @@ export const Textfield = forwardRef(({ children, className, disabled = false, ic
|
|
|
31
31
|
};
|
|
32
32
|
return (_jsxs(Stack, { as: "fieldset", rowGap: 4, className: clsx(styles.Textfield, className), "data-textfield-has-icon": isPassword || Boolean(icon), "data-textfield-icon-position": iconPosition, "data-textfield-dimension": dimension, "data-textfield-invalid": invalid, "data-textfield-fullwidth": fullWidth, "aria-disabled": disabled, hAlign: "stretch", vAlign: "start", tabIndex: disabled ? 0 : undefined, style: style, children: [label && _jsx(Text, { as: "label", size: dimension === 'small' ? 14 : 16, htmlFor: fieldID, children: label }), _jsxs("div", { className: styles.FieldContainer, children: [textarea
|
|
33
33
|
? (_jsx(BaseField, { ref: forwardedRef, as: "textarea", id: fieldID, ...commonProps, ...otherProps }))
|
|
34
|
-
: (_jsx(BaseField, { className: styles.InputField, id: fieldID, ref: forwardedRef, type:
|
|
34
|
+
: (_jsx(BaseField, { className: styles.InputField, id: fieldID, ref: forwardedRef, type: isPasswordVisible ? 'text' : type, spellCheck: isPassword ? false : undefined, ...commonProps, ...otherProps })), isPassword && (_jsx(IconButton, { className: styles.IconButton, dimension: actionSizes[dimension], onClick: handlePasswordVisibility, kind: "flat", "aria-label": "Reveal password", icon: isPasswordVisible ? 'eye-slash' : 'eye' })), !textarea && icon && !isPassword && (_jsx(Symbol, { className: styles.Icon, source: icon, dimension: iconSizes[dimension] }))] })] }));
|
|
35
35
|
});
|
|
36
36
|
Textfield.displayName = 'Textfield';
|