@allxsmith/bestax-bulma 5.55.0 → 5.57.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/dist/bestax.css +1 -1
- package/dist/bestax.css.map +1 -1
- package/dist/esm/columns/Column.js +1 -0
- package/dist/esm/columns/Column.js.map +1 -1
- package/dist/esm/columns/Columns.js +1 -0
- package/dist/esm/columns/Columns.js.map +1 -1
- package/dist/esm/components/Avatar.js +1 -0
- package/dist/esm/components/Avatar.js.map +1 -1
- package/dist/esm/components/Avatars.js +1 -0
- package/dist/esm/components/Avatars.js.map +1 -1
- package/dist/esm/components/Badge.js +1 -0
- package/dist/esm/components/Badge.js.map +1 -1
- package/dist/esm/components/Breadcrumb.js +1 -0
- package/dist/esm/components/Breadcrumb.js.map +1 -1
- package/dist/esm/components/Card.js +1 -0
- package/dist/esm/components/Card.js.map +1 -1
- package/dist/esm/components/Carousel.js +1 -0
- package/dist/esm/components/Carousel.js.map +1 -1
- package/dist/esm/components/Collapse.js +1 -0
- package/dist/esm/components/Collapse.js.map +1 -1
- package/dist/esm/components/Collapses.js +1 -0
- package/dist/esm/components/Collapses.js.map +1 -1
- package/dist/esm/components/Command.js +1 -0
- package/dist/esm/components/Command.js.map +1 -1
- package/dist/esm/components/ContextMenu.js +1 -0
- package/dist/esm/components/ContextMenu.js.map +1 -1
- package/dist/esm/components/DataTable.js +1 -0
- package/dist/esm/components/DataTable.js.map +1 -1
- package/dist/esm/components/Dialog.js +1 -0
- package/dist/esm/components/Dialog.js.map +1 -1
- package/dist/esm/components/Dropdown.js +1 -0
- package/dist/esm/components/Dropdown.js.map +1 -1
- package/dist/esm/components/EmptyState.js +1 -0
- package/dist/esm/components/EmptyState.js.map +1 -1
- package/dist/esm/components/HoverCard.js +1 -0
- package/dist/esm/components/HoverCard.js.map +1 -1
- package/dist/esm/components/Loading.js +1 -0
- package/dist/esm/components/Loading.js.map +1 -1
- package/dist/esm/components/Menu.js +1 -0
- package/dist/esm/components/Menu.js.map +1 -1
- package/dist/esm/components/Message.js +1 -0
- package/dist/esm/components/Message.js.map +1 -1
- package/dist/esm/components/Modal.js +1 -0
- package/dist/esm/components/Modal.js.map +1 -1
- package/dist/esm/components/Navbar.js +1 -0
- package/dist/esm/components/Navbar.js.map +1 -1
- package/dist/esm/components/Pagination.js +1 -0
- package/dist/esm/components/Pagination.js.map +1 -1
- package/dist/esm/components/Panel.js +1 -0
- package/dist/esm/components/Panel.js.map +1 -1
- package/dist/esm/components/Popover.js +1 -0
- package/dist/esm/components/Popover.js.map +1 -1
- package/dist/esm/components/Reveal.js +1 -0
- package/dist/esm/components/Reveal.js.map +1 -1
- package/dist/esm/components/ScrollArea.js +1 -0
- package/dist/esm/components/ScrollArea.js.map +1 -1
- package/dist/esm/components/SegmentedControl.js +1 -0
- package/dist/esm/components/SegmentedControl.js.map +1 -1
- package/dist/esm/components/Sidebar.js +1 -0
- package/dist/esm/components/Sidebar.js.map +1 -1
- package/dist/esm/components/Steps.js +1 -0
- package/dist/esm/components/Steps.js.map +1 -1
- package/dist/esm/components/Tabs.js +1 -0
- package/dist/esm/components/Tabs.js.map +1 -1
- package/dist/esm/components/Timeline.js +1 -0
- package/dist/esm/components/Timeline.js.map +1 -1
- package/dist/esm/components/Toast.js +1 -0
- package/dist/esm/components/Toast.js.map +1 -1
- package/dist/esm/components/Tooltip.js +1 -0
- package/dist/esm/components/Tooltip.js.map +1 -1
- package/dist/esm/components/TreeView.js +1 -0
- package/dist/esm/components/TreeView.js.map +1 -1
- package/dist/esm/components/collapsesContext.js +1 -0
- package/dist/esm/components/collapsesContext.js.map +1 -1
- package/dist/esm/components/useDataTable.js +28 -0
- package/dist/esm/components/useDataTable.js.map +1 -1
- package/dist/esm/elements/Block.js +1 -0
- package/dist/esm/elements/Block.js.map +1 -1
- package/dist/esm/elements/Box.js +1 -0
- package/dist/esm/elements/Box.js.map +1 -1
- package/dist/esm/elements/Button.js +1 -0
- package/dist/esm/elements/Button.js.map +1 -1
- package/dist/esm/elements/Buttons.js +1 -0
- package/dist/esm/elements/Buttons.js.map +1 -1
- package/dist/esm/elements/Code.js +1 -0
- package/dist/esm/elements/Code.js.map +1 -1
- package/dist/esm/elements/ColorSwatch.js +1 -0
- package/dist/esm/elements/ColorSwatch.js.map +1 -1
- package/dist/esm/elements/Content.js +1 -0
- package/dist/esm/elements/Content.js.map +1 -1
- package/dist/esm/elements/Delete.js +1 -0
- package/dist/esm/elements/Delete.js.map +1 -1
- package/dist/esm/elements/DescriptionList.js +1 -0
- package/dist/esm/elements/DescriptionList.js.map +1 -1
- package/dist/esm/elements/Divider.js +1 -0
- package/dist/esm/elements/Divider.js.map +1 -1
- package/dist/esm/elements/Emphasis.js +1 -0
- package/dist/esm/elements/Emphasis.js.map +1 -1
- package/dist/esm/elements/Figure.js +1 -0
- package/dist/esm/elements/Figure.js.map +1 -1
- package/dist/esm/elements/Icon.js +1 -0
- package/dist/esm/elements/Icon.js.map +1 -1
- package/dist/esm/elements/IconText.js +1 -0
- package/dist/esm/elements/IconText.js.map +1 -1
- package/dist/esm/elements/Image.js +1 -0
- package/dist/esm/elements/Image.js.map +1 -1
- package/dist/esm/elements/Kbd.js +1 -0
- package/dist/esm/elements/Kbd.js.map +1 -1
- package/dist/esm/elements/Link.js +1 -0
- package/dist/esm/elements/Link.js.map +1 -1
- package/dist/esm/elements/LinkButton.js +1 -0
- package/dist/esm/elements/LinkButton.js.map +1 -1
- package/dist/esm/elements/ListItem.js +1 -0
- package/dist/esm/elements/ListItem.js.map +1 -1
- package/dist/esm/elements/Loader.js +1 -0
- package/dist/esm/elements/Loader.js.map +1 -1
- package/dist/esm/elements/Notification.js +1 -0
- package/dist/esm/elements/Notification.js.map +1 -1
- package/dist/esm/elements/OrderedList.js +1 -0
- package/dist/esm/elements/OrderedList.js.map +1 -1
- package/dist/esm/elements/Paragraph.js +1 -0
- package/dist/esm/elements/Paragraph.js.map +1 -1
- package/dist/esm/elements/Pre.js +1 -0
- package/dist/esm/elements/Pre.js.map +1 -1
- package/dist/esm/elements/Progress.js +1 -0
- package/dist/esm/elements/Progress.js.map +1 -1
- package/dist/esm/elements/RingProgress.js +1 -0
- package/dist/esm/elements/RingProgress.js.map +1 -1
- package/dist/esm/elements/Skeleton.js +1 -0
- package/dist/esm/elements/Skeleton.js.map +1 -1
- package/dist/esm/elements/Span.js +1 -0
- package/dist/esm/elements/Span.js.map +1 -1
- package/dist/esm/elements/Strong.js +1 -0
- package/dist/esm/elements/Strong.js.map +1 -1
- package/dist/esm/elements/SubTitle.js +1 -0
- package/dist/esm/elements/SubTitle.js.map +1 -1
- package/dist/esm/elements/Table.js +1 -0
- package/dist/esm/elements/Table.js.map +1 -1
- package/dist/esm/elements/Tag.js +1 -0
- package/dist/esm/elements/Tag.js.map +1 -1
- package/dist/esm/elements/Tags.js +1 -0
- package/dist/esm/elements/Tags.js.map +1 -1
- package/dist/esm/elements/Tbody.js +1 -0
- package/dist/esm/elements/Tbody.js.map +1 -1
- package/dist/esm/elements/Td.js +1 -0
- package/dist/esm/elements/Td.js.map +1 -1
- package/dist/esm/elements/Tfoot.js +1 -0
- package/dist/esm/elements/Tfoot.js.map +1 -1
- package/dist/esm/elements/Th.js +1 -0
- package/dist/esm/elements/Th.js.map +1 -1
- package/dist/esm/elements/Thead.js +1 -0
- package/dist/esm/elements/Thead.js.map +1 -1
- package/dist/esm/elements/Title.js +1 -0
- package/dist/esm/elements/Title.js.map +1 -1
- package/dist/esm/elements/ToggleButton.js +1 -0
- package/dist/esm/elements/ToggleButton.js.map +1 -1
- package/dist/esm/elements/Tr.js +1 -0
- package/dist/esm/elements/Tr.js.map +1 -1
- package/dist/esm/elements/UnorderedList.js +1 -0
- package/dist/esm/elements/UnorderedList.js.map +1 -1
- package/dist/esm/elements/iconProps.js +1 -0
- package/dist/esm/elements/iconProps.js.map +1 -1
- package/dist/esm/form/Autocomplete.js +1 -0
- package/dist/esm/form/Autocomplete.js.map +1 -1
- package/dist/esm/form/Checkbox.js +1 -0
- package/dist/esm/form/Checkbox.js.map +1 -1
- package/dist/esm/form/CheckboxCard.js +1 -0
- package/dist/esm/form/CheckboxCard.js.map +1 -1
- package/dist/esm/form/Checkboxes.js +1 -0
- package/dist/esm/form/Checkboxes.js.map +1 -1
- package/dist/esm/form/ColorInput.js +69 -0
- package/dist/esm/form/ColorInput.js.map +1 -0
- package/dist/esm/form/ColorInputBase.js +199 -0
- package/dist/esm/form/ColorInputBase.js.map +1 -0
- package/dist/esm/form/ColorPicker.js +5 -20
- package/dist/esm/form/ColorPicker.js.map +1 -1
- package/dist/esm/form/Combobox.js +1 -0
- package/dist/esm/form/Combobox.js.map +1 -1
- package/dist/esm/form/Control.js +1 -0
- package/dist/esm/form/Control.js.map +1 -1
- package/dist/esm/form/DateInput.js +1 -0
- package/dist/esm/form/DateInput.js.map +1 -1
- package/dist/esm/form/DateInputBase.js +1 -0
- package/dist/esm/form/DateInputBase.js.map +1 -1
- package/dist/esm/form/DateRangeInput.js +1 -0
- package/dist/esm/form/DateRangeInput.js.map +1 -1
- package/dist/esm/form/DateRangeInputBase.js +1 -0
- package/dist/esm/form/DateRangeInputBase.js.map +1 -1
- package/dist/esm/form/DateTimeInput.js +1 -0
- package/dist/esm/form/DateTimeInput.js.map +1 -1
- package/dist/esm/form/DateTimeInputBase.js +1 -0
- package/dist/esm/form/DateTimeInputBase.js.map +1 -1
- package/dist/esm/form/Dropzone.js +1 -0
- package/dist/esm/form/Dropzone.js.map +1 -1
- package/dist/esm/form/Field.js +1 -0
- package/dist/esm/form/Field.js.map +1 -1
- package/dist/esm/form/Fieldset.js +1 -0
- package/dist/esm/form/Fieldset.js.map +1 -1
- package/dist/esm/form/File.js +1 -0
- package/dist/esm/form/File.js.map +1 -1
- package/dist/esm/form/FormContext.js +1 -0
- package/dist/esm/form/FormContext.js.map +1 -1
- package/dist/esm/form/Input.js +1 -0
- package/dist/esm/form/Input.js.map +1 -1
- package/dist/esm/form/InputBase.js +1 -0
- package/dist/esm/form/InputBase.js.map +1 -1
- package/dist/esm/form/Numberinput.js +1 -0
- package/dist/esm/form/Numberinput.js.map +1 -1
- package/dist/esm/form/PinInput.js +1 -0
- package/dist/esm/form/PinInput.js.map +1 -1
- package/dist/esm/form/Radio.js +1 -0
- package/dist/esm/form/Radio.js.map +1 -1
- package/dist/esm/form/RadioCard.js +1 -0
- package/dist/esm/form/RadioCard.js.map +1 -1
- package/dist/esm/form/Radios.js +1 -0
- package/dist/esm/form/Radios.js.map +1 -1
- package/dist/esm/form/Rate.js +1 -0
- package/dist/esm/form/Rate.js.map +1 -1
- package/dist/esm/form/Select.js +1 -0
- package/dist/esm/form/Select.js.map +1 -1
- package/dist/esm/form/SelectBase.js +1 -0
- package/dist/esm/form/SelectBase.js.map +1 -1
- package/dist/esm/form/Slider.js +1 -0
- package/dist/esm/form/Slider.js.map +1 -1
- package/dist/esm/form/Switch.js +1 -0
- package/dist/esm/form/Switch.js.map +1 -1
- package/dist/esm/form/Taginput.js +1 -0
- package/dist/esm/form/Taginput.js.map +1 -1
- package/dist/esm/form/TextArea.js +1 -0
- package/dist/esm/form/TextArea.js.map +1 -1
- package/dist/esm/form/TextAreaBase.js +1 -0
- package/dist/esm/form/TextAreaBase.js.map +1 -1
- package/dist/esm/form/TimeInput.js +1 -0
- package/dist/esm/form/TimeInput.js.map +1 -1
- package/dist/esm/form/TimeInputBase.js +1 -0
- package/dist/esm/form/TimeInputBase.js.map +1 -1
- package/dist/esm/form/_colorInternals/EyeDropperButton.js +41 -0
- package/dist/esm/form/_colorInternals/EyeDropperButton.js.map +1 -0
- package/dist/esm/form/_colorInternals/pickerState.js +5 -4
- package/dist/esm/form/_colorInternals/pickerState.js.map +1 -1
- package/dist/esm/form/_pickerInternals/Calendar.js +1 -0
- package/dist/esm/form/_pickerInternals/Calendar.js.map +1 -1
- package/dist/esm/form/_pickerInternals/PickerPopover.js +1 -0
- package/dist/esm/form/_pickerInternals/PickerPopover.js.map +1 -1
- package/dist/esm/form/_pickerInternals/TimeWheels.js +1 -0
- package/dist/esm/form/_pickerInternals/TimeWheels.js.map +1 -1
- package/dist/esm/form/_pickerInternals/useLocaleDefaults.js +1 -0
- package/dist/esm/form/_pickerInternals/useLocaleDefaults.js.map +1 -1
- package/dist/esm/form/_pickerInternals/useNativeMobilePicker.js +1 -0
- package/dist/esm/form/_pickerInternals/useNativeMobilePicker.js.map +1 -1
- package/dist/esm/form/_pickerInternals/useSegmentedEntry.js +1 -0
- package/dist/esm/form/_pickerInternals/useSegmentedEntry.js.map +1 -1
- package/dist/esm/form/controlLoading.js +1 -0
- package/dist/esm/form/controlLoading.js.map +1 -1
- package/dist/esm/form/groupFieldset.js +1 -0
- package/dist/esm/form/groupFieldset.js.map +1 -1
- package/dist/esm/form/useAutoLabelId.js +1 -0
- package/dist/esm/form/useAutoLabelId.js.map +1 -1
- package/dist/esm/grid/Cell.js +1 -0
- package/dist/esm/grid/Cell.js.map +1 -1
- package/dist/esm/grid/Grid.js +1 -0
- package/dist/esm/grid/Grid.js.map +1 -1
- package/dist/esm/helpers/ClientOnly.js +1 -0
- package/dist/esm/helpers/ClientOnly.js.map +1 -1
- package/dist/esm/helpers/Config.js +1 -0
- package/dist/esm/helpers/Config.js.map +1 -1
- package/dist/esm/helpers/LocaleProvider.js +1 -0
- package/dist/esm/helpers/LocaleProvider.js.map +1 -1
- package/dist/esm/helpers/Theme.js +1 -0
- package/dist/esm/helpers/Theme.js.map +1 -1
- package/dist/esm/helpers/flattenChildren.js +1 -0
- package/dist/esm/helpers/flattenChildren.js.map +1 -1
- package/dist/esm/helpers/inertProps.js +1 -0
- package/dist/esm/helpers/inertProps.js.map +1 -1
- package/dist/esm/helpers/localeFormat.js +1 -0
- package/dist/esm/helpers/localeFormat.js.map +1 -1
- package/dist/esm/helpers/overlayStack.js +1 -0
- package/dist/esm/helpers/overlayStack.js.map +1 -1
- package/dist/esm/helpers/portal.js +1 -0
- package/dist/esm/helpers/portal.js.map +1 -1
- package/dist/esm/helpers/scrollLock.js +1 -0
- package/dist/esm/helpers/scrollLock.js.map +1 -1
- package/dist/esm/helpers/statusRegion.js +1 -0
- package/dist/esm/helpers/statusRegion.js.map +1 -1
- package/dist/esm/helpers/typeahead.js +1 -0
- package/dist/esm/helpers/typeahead.js.map +1 -1
- package/dist/esm/helpers/useAnchoredPosition.js +1 -0
- package/dist/esm/helpers/useAnchoredPosition.js.map +1 -1
- package/dist/esm/helpers/useBulmaClasses.js +1 -0
- package/dist/esm/helpers/useBulmaClasses.js.map +1 -1
- package/dist/esm/helpers/useClientLayoutEffect.js +1 -0
- package/dist/esm/helpers/useClientLayoutEffect.js.map +1 -1
- package/dist/esm/helpers/useColorClasses.js +1 -0
- package/dist/esm/helpers/useColorClasses.js.map +1 -1
- package/dist/esm/helpers/useComboboxEngine.js +1 -0
- package/dist/esm/helpers/useComboboxEngine.js.map +1 -1
- package/dist/esm/helpers/useContextMenuTrigger.js +1 -0
- package/dist/esm/helpers/useContextMenuTrigger.js.map +1 -1
- package/dist/esm/helpers/useFlexboxClasses.js +1 -0
- package/dist/esm/helpers/useFlexboxClasses.js.map +1 -1
- package/dist/esm/helpers/useFocusTrap.js +1 -0
- package/dist/esm/helpers/useFocusTrap.js.map +1 -1
- package/dist/esm/helpers/useHoverOpen.js +1 -0
- package/dist/esm/helpers/useHoverOpen.js.map +1 -1
- package/dist/esm/helpers/useInertSiblings.js +1 -0
- package/dist/esm/helpers/useInertSiblings.js.map +1 -1
- package/dist/esm/helpers/useIsHydrated.js +1 -0
- package/dist/esm/helpers/useIsHydrated.js.map +1 -1
- package/dist/esm/helpers/useLatestRef.js +1 -0
- package/dist/esm/helpers/useLatestRef.js.map +1 -1
- package/dist/esm/helpers/useMenuKeys.js +1 -0
- package/dist/esm/helpers/useMenuKeys.js.map +1 -1
- package/dist/esm/helpers/useOtherClasses.js +1 -0
- package/dist/esm/helpers/useOtherClasses.js.map +1 -1
- package/dist/esm/helpers/useSpacingClasses.js +1 -0
- package/dist/esm/helpers/useSpacingClasses.js.map +1 -1
- package/dist/esm/helpers/useTreeView.js +1 -0
- package/dist/esm/helpers/useTreeView.js.map +1 -1
- package/dist/esm/helpers/useTypographyClasses.js +1 -0
- package/dist/esm/helpers/useTypographyClasses.js.map +1 -1
- package/dist/esm/helpers/useVisibilityClasses.js +1 -0
- package/dist/esm/helpers/useVisibilityClasses.js.map +1 -1
- package/dist/esm/layout/Container.js +1 -0
- package/dist/esm/layout/Container.js.map +1 -1
- package/dist/esm/layout/Footer.js +1 -0
- package/dist/esm/layout/Footer.js.map +1 -1
- package/dist/esm/layout/Hero.js +1 -0
- package/dist/esm/layout/Hero.js.map +1 -1
- package/dist/esm/layout/Level.js +1 -0
- package/dist/esm/layout/Level.js.map +1 -1
- package/dist/esm/layout/Media.js +1 -0
- package/dist/esm/layout/Media.js.map +1 -1
- package/dist/esm/layout/Section.js +1 -0
- package/dist/esm/layout/Section.js.map +1 -1
- package/dist/esm/layout/Splitter.js +1 -0
- package/dist/esm/layout/Splitter.js.map +1 -1
- package/dist/extras.css +1 -1
- package/dist/extras.css.map +1 -1
- package/dist/index.cjs +300 -22
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +2 -0
- package/dist/index.esm.js.map +1 -1
- package/dist/types/components/DataTable.d.ts +1 -1
- package/dist/types/components/useDataTable.d.ts +36 -0
- package/dist/types/form/ColorInput.d.ts +76 -0
- package/dist/types/form/ColorInputBase.d.ts +108 -0
- package/dist/types/form/ColorPicker.d.ts +5 -0
- package/dist/types/form/_colorInternals/EyeDropperButton.d.ts +8 -0
- package/dist/types/form/_colorInternals/pickerState.d.ts +7 -1
- package/dist/types/index.d.ts +4 -0
- package/dist/types-cjs/components/DataTable.d.ts +1 -1
- package/dist/types-cjs/components/useDataTable.d.ts +36 -0
- package/dist/types-cjs/form/ColorInput.d.ts +76 -0
- package/dist/types-cjs/form/ColorInputBase.d.ts +108 -0
- package/dist/types-cjs/form/ColorPicker.d.ts +5 -0
- package/dist/types-cjs/form/_colorInternals/EyeDropperButton.d.ts +8 -0
- package/dist/types-cjs/form/_colorInternals/pickerState.d.ts +7 -1
- package/dist/types-cjs/index.d.ts +4 -0
- package/dist/versions/bestax-no-dark-mode.css +1 -1
- package/dist/versions/bestax-no-dark-mode.css.map +1 -1
- package/dist/versions/bestax-no-helpers-prefixed.css +1 -1
- package/dist/versions/bestax-no-helpers-prefixed.css.map +1 -1
- package/dist/versions/bestax-no-helpers.css +1 -1
- package/dist/versions/bestax-no-helpers.css.map +1 -1
- package/dist/versions/bestax-prefixed.css +1 -1
- package/dist/versions/bestax-prefixed.css.map +1 -1
- package/package.json +2 -1
- package/src/scss/form/_colorinput.scss +109 -0
- package/src/scss/form/_index.scss +1 -0
package/dist/index.esm.js
CHANGED
|
@@ -110,6 +110,8 @@ export { DateTimeInputBase } from './esm/form/DateTimeInputBase.js';
|
|
|
110
110
|
export { DateTimeInput } from './esm/form/DateTimeInput.js';
|
|
111
111
|
export { DateRangeInputBase } from './esm/form/DateRangeInputBase.js';
|
|
112
112
|
export { DateRangeInput } from './esm/form/DateRangeInput.js';
|
|
113
|
+
export { ColorInputBase } from './esm/form/ColorInputBase.js';
|
|
114
|
+
export { ColorInput } from './esm/form/ColorInput.js';
|
|
113
115
|
export { useInsideControl, useInsideField } from './esm/form/FormContext.js';
|
|
114
116
|
export { Cell } from './esm/grid/Cell.js';
|
|
115
117
|
export { Grid } from './esm/grid/Grid.js';
|
package/dist/index.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -3,7 +3,7 @@ import { BulmaClassesProps } from '../helpers/useBulmaClasses.js';
|
|
|
3
3
|
import { TrProps } from '../elements/Tr.js';
|
|
4
4
|
import { type DataTableColumn, type DataTableModel, type DataTableStateOptions } from './useDataTable.js';
|
|
5
5
|
export { useDataTable } from './useDataTable.js';
|
|
6
|
-
export type { DataTableCellContext, DataTableCellProps, DataTableCheckboxProps, DataTableColumn, DataTableColumnMeta, DataTableFilters, DataTableHeaderCellProps, DataTableLabels, DataTableModel, DataTablePaginationProps, DataTableResolvedLabels, DataTableRowScope, DataTableSearchProps, DataTableSelectionMode, DataTableSort, DataTableSortButtonProps, DataTableSortDirection, DataTableState, DataTableStateOptions, UseDataTableOptions, } from './useDataTable.js';
|
|
6
|
+
export type { DataTableCSVOptions, DataTableCellContext, DataTableCellProps, DataTableCheckboxProps, DataTableColumn, DataTableColumnMeta, DataTableFilters, DataTableHeaderCellProps, DataTableLabels, DataTableModel, DataTablePaginationProps, DataTableResolvedLabels, DataTableRowScope, DataTableSearchProps, DataTableSelectionMode, DataTableSort, DataTableSortButtonProps, DataTableSortDirection, DataTableState, DataTableStateOptions, UseDataTableOptions, } from './useDataTable.js';
|
|
7
7
|
/**
|
|
8
8
|
* Props for the DataTable component. The helper props, `className`, the
|
|
9
9
|
* `ref` and the other attributes go on the wrapper `<div>`, which holds the
|
|
@@ -335,6 +335,32 @@ export interface DataTablePaginationProps {
|
|
|
335
335
|
current: number;
|
|
336
336
|
onPageChange: (page: number) => void;
|
|
337
337
|
}
|
|
338
|
+
/** What `toCSV` writes. */
|
|
339
|
+
export interface DataTableCSVOptions {
|
|
340
|
+
/**
|
|
341
|
+
* Which rows, in the order the table shows them: the ones the search and
|
|
342
|
+
* filters let through, from every page, by default, or `all`, `page` or
|
|
343
|
+
* `selected`.
|
|
344
|
+
*
|
|
345
|
+
* @defaultValue 'filtered'
|
|
346
|
+
*/
|
|
347
|
+
rows?: DataTableRowScope;
|
|
348
|
+
/** The ids of the columns to write, in that order. Every column, in the order shown, by default. */
|
|
349
|
+
columns?: string[];
|
|
350
|
+
/**
|
|
351
|
+
* Writes the columns' headers as the first line.
|
|
352
|
+
*
|
|
353
|
+
* @defaultValue true
|
|
354
|
+
*/
|
|
355
|
+
header?: boolean;
|
|
356
|
+
/**
|
|
357
|
+
* What separates the fields. A semicolon suits a spreadsheet that reads
|
|
358
|
+
* a comma as the decimal point, as Excel does in much of Europe.
|
|
359
|
+
*
|
|
360
|
+
* @defaultValue ','
|
|
361
|
+
*/
|
|
362
|
+
delimiter?: string;
|
|
363
|
+
}
|
|
338
364
|
/**
|
|
339
365
|
* A table: what `useDataTable` returns, what `DataTable`'s `toolbar` is
|
|
340
366
|
* given, and what its `table` takes. It reads the rows and the state, changes
|
|
@@ -367,6 +393,16 @@ export interface DataTableModel<TRow> {
|
|
|
367
393
|
getText: (row: TRow, columnId: string) => string;
|
|
368
394
|
/** What names a row: its row header's text, or its first column's. */
|
|
369
395
|
getRowLabel: (row: TRow) => string;
|
|
396
|
+
/**
|
|
397
|
+
* The rows as CSV, from the columns' text (`format`, not `cell`), with a
|
|
398
|
+
* line break of `\r\n` between rows and fields quoted as RFC 4180 asks.
|
|
399
|
+
* A field that starts with `=`, `+`, `-`, `@`, a tab or a carriage return
|
|
400
|
+
* gets a `'` in front, so a spreadsheet shows it as text rather than
|
|
401
|
+
* running it as a formula, unless it's a plain number such as `-12.5`.
|
|
402
|
+
* Excel takes a file as UTF-8 only when it starts with a byte order mark,
|
|
403
|
+
* so put `\uFEFF` in front of the text when you save it for Excel.
|
|
404
|
+
*/
|
|
405
|
+
toCSV: (options?: DataTableCSVOptions) => string;
|
|
370
406
|
/** Whether a row is selected. */
|
|
371
407
|
isSelected: (row: TRow) => boolean;
|
|
372
408
|
/** Sets the sort. */
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FieldProps } from './Field.js';
|
|
3
|
+
import { ControlBaseProps } from './Control.js';
|
|
4
|
+
import { ColorInputBaseProps } from './ColorInputBase.js';
|
|
5
|
+
/**
|
|
6
|
+
* Props for the ColorInput convenience wrapper. Extends
|
|
7
|
+
* `ColorInputBaseProps` with Field-level (label, horizontal, message) and
|
|
8
|
+
* Control-level (loading, expanded) props. Inside an existing `Control` it
|
|
9
|
+
* renders no `Control` of its own, so its Control-level props do nothing
|
|
10
|
+
* there and warn in development; set them on that `Control` instead. Inside
|
|
11
|
+
* an outer `Field`, or a `Control` with no `Field` around it, it renders no
|
|
12
|
+
* `Field` of its own either. The exception is `label`, `message`,
|
|
13
|
+
* `horizontal` or `fieldClassName` in that bare `Control`: it keeps a `Field`
|
|
14
|
+
* for them, nested in the `.control`, and warns in development. Wrap the
|
|
15
|
+
* `Control` in a `Field` instead, and set the `label`, `horizontal` and class
|
|
16
|
+
* name on that `Field`.
|
|
17
|
+
*
|
|
18
|
+
* @helperProps Helper props go on the `.colorinput` `<div>`, with
|
|
19
|
+
* `className`. The other attributes go on the text `<input>`.
|
|
20
|
+
* @extraProp {string} [name] - Form field name. The field submits the text it shows, the value in `format`, or nothing when it's empty.
|
|
21
|
+
* @extraProp {boolean} [required=false] - Marks the field required, so an empty one fails the form's constraint validation.
|
|
22
|
+
* @extraProp {React.Ref<HTMLInputElement>} [ref] - Forwarded to the text `<input>`.
|
|
23
|
+
*/
|
|
24
|
+
export interface ColorInputProps extends ColorInputBaseProps {
|
|
25
|
+
/** Field label (component auto-wraps in a `Field` if not already inside). Automatically associated with the text field via `htmlFor`, using your `id` when provided, otherwise a generated one. Dropped inside an outer `Field`, whose own label associates instead when that `Field` generates a target id (not `grouped`/`hasAddons`, no explicit `labelProps.htmlFor`) and you set no `id` here. */
|
|
26
|
+
label?: React.ReactNode;
|
|
27
|
+
/** Size for the label. */
|
|
28
|
+
labelSize?: FieldProps['labelSize'];
|
|
29
|
+
/** Props for the label element. An explicit `htmlFor` here overrides the automatic association (no id is generated then). */
|
|
30
|
+
labelProps?: FieldProps['labelProps'];
|
|
31
|
+
/** Render the field with horizontal layout. */
|
|
32
|
+
horizontal?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Shows a loading spinner on the `Control` it renders, and hides the
|
|
35
|
+
* launcher (`triggerIcon`) while it does. Inside your own `Control` it
|
|
36
|
+
* renders none, so this draws nothing and warns in development; set
|
|
37
|
+
* `isLoading` on that `Control`.
|
|
38
|
+
*/
|
|
39
|
+
isLoading?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Shows the launcher on the field's end that toggles the panel. Hidden by
|
|
42
|
+
* default while a spinner shows at the same edge: this component's
|
|
43
|
+
* `isLoading` when it renders its own `Control`, or the enclosing
|
|
44
|
+
* `Control`'s `isLoading` inside one.
|
|
45
|
+
* @defaultValue true
|
|
46
|
+
*/
|
|
47
|
+
triggerIcon?: boolean;
|
|
48
|
+
/** Expand the control to fill its container. */
|
|
49
|
+
isExpanded?: boolean;
|
|
50
|
+
/** Size of the wrapping Control. */
|
|
51
|
+
controlSize?: ControlBaseProps['size'];
|
|
52
|
+
/** Help/validation text below the field. */
|
|
53
|
+
message?: React.ReactNode;
|
|
54
|
+
/** Color modifier for the help message. */
|
|
55
|
+
messageColor?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';
|
|
56
|
+
/** Additional CSS classes for the Field wrapper. */
|
|
57
|
+
fieldClassName?: string;
|
|
58
|
+
/** Additional CSS classes for the Control wrapper. */
|
|
59
|
+
controlClassName?: string;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* The `ColorInput` component is a form field for a color: type it, or open a color picker from its launcher or its swatch.
|
|
63
|
+
*
|
|
64
|
+
* The value is a CSS color string, HSL by default, or empty. The panel is
|
|
65
|
+
* the `ColorPicker`'s square, hue slider and, when asked for, alpha slider,
|
|
66
|
+
* swatches and eye dropper, in the same popover the date pickers use.
|
|
67
|
+
*
|
|
68
|
+
* @function
|
|
69
|
+
* @param {ColorInputProps} props - Props for the ColorInput.
|
|
70
|
+
* @returns {JSX.Element}
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* <ColorInput label="Brand color" defaultValue="hsl(202, 67%, 36%)" swatches="bulma" />
|
|
74
|
+
*/
|
|
75
|
+
export declare const ColorInput: React.ForwardRefExoticComponent<ColorInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
76
|
+
export default ColorInput;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BulmaClassesProps } from '../helpers/useBulmaClasses.js';
|
|
3
|
+
import { type ColorFormat, type ColorPickerLabels, type ColorPickerSwatch } from './ColorPicker.js';
|
|
4
|
+
import { type PickerPosition } from './_pickerInternals/pickerTypes.js';
|
|
5
|
+
/**
|
|
6
|
+
* Props for the raw ColorInput base. Use the higher-level `ColorInput` for
|
|
7
|
+
* Field/Control composition; `ColorInputBase` is the field and its popover
|
|
8
|
+
* only.
|
|
9
|
+
*
|
|
10
|
+
* @helperProps Helper props go on the `.colorinput` `<div>`, with
|
|
11
|
+
* `className`. The other attributes go on the text `<input>`.
|
|
12
|
+
* @extraProp {string} [name] - Form field name. The field submits the text it shows, the value in `format`, or nothing when it's empty.
|
|
13
|
+
* @extraProp {boolean} [required=false] - Marks the field required, so an empty one fails the form's constraint validation.
|
|
14
|
+
* @extraProp {React.Ref<HTMLInputElement>} [ref] - Forwarded to the text `<input>`.
|
|
15
|
+
*/
|
|
16
|
+
export interface ColorInputBaseProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'value' | 'defaultValue' | 'onChange' | 'size' | 'color' | 'type' | 'popover'>, Omit<BulmaClassesProps, 'color'> {
|
|
17
|
+
/**
|
|
18
|
+
* The color, controlled, as a CSS color the picker reads (hex, `rgb()`,
|
|
19
|
+
* `hsl()` or a color name), or `''` for none.
|
|
20
|
+
*/
|
|
21
|
+
value?: string;
|
|
22
|
+
/** The color to start with, uncontrolled; empty without one. */
|
|
23
|
+
defaultValue?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Called with the color, in `format`, as it changes: on every step of a
|
|
26
|
+
* drag in the panel, on a key or a swatch, and when typed text is
|
|
27
|
+
* committed. Clearing the field calls it with `''`.
|
|
28
|
+
*/
|
|
29
|
+
onChange?: (value: string) => void;
|
|
30
|
+
/**
|
|
31
|
+
* Called with the color, in `format`, once a change is done: when a drag
|
|
32
|
+
* ends, and with `onChange` for everything else. The place to save it.
|
|
33
|
+
*/
|
|
34
|
+
onChangeEnd?: (value: string) => void;
|
|
35
|
+
/**
|
|
36
|
+
* How the value is written: `'hsl'` (`hsl(171, 100%, 41%)`), `'hex'` or
|
|
37
|
+
* `'rgb'`, with alpha as `hsla()`, `#rrggbbaa` and `rgba()`. Typed text in
|
|
38
|
+
* any of them is written back in this one.
|
|
39
|
+
* @defaultValue 'hsl'
|
|
40
|
+
*/
|
|
41
|
+
format?: ColorFormat;
|
|
42
|
+
/** Adds an alpha slider to the panel and writes the alpha into the value. */
|
|
43
|
+
alpha?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Preset colors in the panel: a list of CSS colors, each a string or
|
|
46
|
+
* `{ color, label }`, or `"bulma"` for the page's theme colors.
|
|
47
|
+
*/
|
|
48
|
+
swatches?: ColorPickerSwatch[] | 'bulma';
|
|
49
|
+
/**
|
|
50
|
+
* Adds a button to the panel that picks a color from anywhere on the
|
|
51
|
+
* screen, where the browser has the EyeDropper API.
|
|
52
|
+
*/
|
|
53
|
+
eyeDropper?: boolean;
|
|
54
|
+
/** Fired when the panel opens. */
|
|
55
|
+
onOpen?: () => void;
|
|
56
|
+
/** Fired when the panel closes. */
|
|
57
|
+
onClose?: () => void;
|
|
58
|
+
/**
|
|
59
|
+
* Opens the panel when the field takes focus, and moves focus into it.
|
|
60
|
+
* Off by default, since typing a value is the quick way in and the
|
|
61
|
+
* launcher, a click on the swatch or Alt+ArrowDown open it.
|
|
62
|
+
*/
|
|
63
|
+
openOnFocus?: boolean;
|
|
64
|
+
/** Closes the panel once a swatch is chosen. */
|
|
65
|
+
closeOnSwatchClick?: boolean;
|
|
66
|
+
/** The panel's place relative to the field. */
|
|
67
|
+
position?: PickerPosition;
|
|
68
|
+
/**
|
|
69
|
+
* Renders the panel through a portal, into the `portalContainer` a
|
|
70
|
+
* `ConfigProvider` sets, `document.body` by default.
|
|
71
|
+
*/
|
|
72
|
+
appendToBody?: boolean;
|
|
73
|
+
/** Bulma color modifier for the field. */
|
|
74
|
+
color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';
|
|
75
|
+
/** The field's size. */
|
|
76
|
+
size?: 'small' | 'medium' | 'large';
|
|
77
|
+
/** Renders the field with rounded ends. */
|
|
78
|
+
isRounded?: boolean;
|
|
79
|
+
/** Disables the field and its panel. A disabled `Fieldset` does too. */
|
|
80
|
+
disabled?: boolean;
|
|
81
|
+
/** Makes the field read-only, with no panel. */
|
|
82
|
+
readOnly?: boolean;
|
|
83
|
+
/** Text shown while the field is empty. */
|
|
84
|
+
placeholder?: string;
|
|
85
|
+
/**
|
|
86
|
+
* Shows the launcher on the field's end that toggles the panel. Hidden by
|
|
87
|
+
* default while a `Control` it sits in shows its `isLoading` spinner,
|
|
88
|
+
* which shares that edge.
|
|
89
|
+
* @defaultValue true
|
|
90
|
+
*/
|
|
91
|
+
triggerIcon?: boolean;
|
|
92
|
+
/** The launcher's glyph. */
|
|
93
|
+
triggerIconName?: string;
|
|
94
|
+
/** The strings it says, each with an English default. */
|
|
95
|
+
labels?: ColorPickerLabels;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* The raw ColorInput: a text field with a swatch and a launcher that opens a color picker in a popover, without Field/Control wrapping.
|
|
99
|
+
*
|
|
100
|
+
* Use `ColorInput` for the convenience wrapper.
|
|
101
|
+
*
|
|
102
|
+
* @function
|
|
103
|
+
* @param {ColorInputBaseProps} props - Props for ColorInputBase.
|
|
104
|
+
* @param {React.Ref<HTMLInputElement>} ref - Forwarded ref to the text `<input>`.
|
|
105
|
+
* @returns {JSX.Element} The rendered field.
|
|
106
|
+
*/
|
|
107
|
+
export declare const ColorInputBase: React.ForwardRefExoticComponent<ColorInputBaseProps & React.RefAttributes<HTMLInputElement>>;
|
|
108
|
+
export default ColorInputBase;
|
|
@@ -69,6 +69,11 @@ export interface ColorPickerLabels {
|
|
|
69
69
|
* @defaultValue 'Pick a color from the screen'
|
|
70
70
|
*/
|
|
71
71
|
eyeDropper?: string;
|
|
72
|
+
/**
|
|
73
|
+
* Names `ColorInput`'s launcher and the panel it opens.
|
|
74
|
+
* @defaultValue 'Choose color'
|
|
75
|
+
*/
|
|
76
|
+
chooseColor?: string;
|
|
72
77
|
}
|
|
73
78
|
/**
|
|
74
79
|
* Props for ColorPicker.Area. The helper props, the other attributes and the
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A button that picks a color from anywhere on the screen, for the picker
|
|
3
|
+
* around it. It renders only once the page has hydrated, where the browser
|
|
4
|
+
* has the EyeDropper API, and inside a picker that asked for it.
|
|
5
|
+
*/
|
|
6
|
+
export declare function EyeDropperButton({ className }: {
|
|
7
|
+
className?: string;
|
|
8
|
+
}): import("react").JSX.Element | null;
|
|
@@ -53,10 +53,16 @@ export interface PickerOptions {
|
|
|
53
53
|
swatches: ColorPickerSwatch[] | 'bulma' | undefined;
|
|
54
54
|
eyeDropper: boolean;
|
|
55
55
|
labels: ColorPickerLabels | undefined;
|
|
56
|
+
/**
|
|
57
|
+
* Whether the field the picker serves is empty, as ColorInput's can be.
|
|
58
|
+
* The picker still shows a color then, and any change, even to that same
|
|
59
|
+
* color, is reported, so it fills the field.
|
|
60
|
+
*/
|
|
61
|
+
empty?: boolean;
|
|
56
62
|
}
|
|
57
63
|
/**
|
|
58
64
|
* Holds a picker's color and builds what its parts read. Controlled, the
|
|
59
65
|
* color shown follows `value`; a value the picker handed out comes back as
|
|
60
66
|
* the exact color it was, thumbs and all.
|
|
61
67
|
*/
|
|
62
|
-
export declare function useColorPicker({ value, defaultValue, onChange, onChangeEnd, format, alpha, disabled, swatches, eyeDropper, labels, }: PickerOptions): ColorPickerContextValue;
|
|
68
|
+
export declare function useColorPicker({ value, defaultValue, onChange, onChangeEnd, format, alpha, disabled, swatches, eyeDropper, labels, empty, }: PickerOptions): ColorPickerContextValue;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -123,6 +123,10 @@ export { DateRangeInputBase } from './form/DateRangeInputBase.js';
|
|
|
123
123
|
export type { DateRangeInputBaseProps, DateRangeValue, } from './form/DateRangeInputBase.js';
|
|
124
124
|
export { DateRangeInput } from './form/DateRangeInput.js';
|
|
125
125
|
export type { DateRangeInputProps } from './form/DateRangeInput.js';
|
|
126
|
+
export { ColorInputBase } from './form/ColorInputBase.js';
|
|
127
|
+
export type { ColorInputBaseProps } from './form/ColorInputBase.js';
|
|
128
|
+
export { ColorInput } from './form/ColorInput.js';
|
|
129
|
+
export type { ColorInputProps } from './form/ColorInput.js';
|
|
126
130
|
export { useInsideField, useInsideControl } from './form/FormContext.js';
|
|
127
131
|
export type { FormFieldProps } from './form/fieldProps.js';
|
|
128
132
|
export * from './grid/Cell.js';
|
|
@@ -3,7 +3,7 @@ import { BulmaClassesProps } from '../helpers/useBulmaClasses.js';
|
|
|
3
3
|
import { TrProps } from '../elements/Tr.js';
|
|
4
4
|
import { type DataTableColumn, type DataTableModel, type DataTableStateOptions } from './useDataTable.js';
|
|
5
5
|
export { useDataTable } from './useDataTable.js';
|
|
6
|
-
export type { DataTableCellContext, DataTableCellProps, DataTableCheckboxProps, DataTableColumn, DataTableColumnMeta, DataTableFilters, DataTableHeaderCellProps, DataTableLabels, DataTableModel, DataTablePaginationProps, DataTableResolvedLabels, DataTableRowScope, DataTableSearchProps, DataTableSelectionMode, DataTableSort, DataTableSortButtonProps, DataTableSortDirection, DataTableState, DataTableStateOptions, UseDataTableOptions, } from './useDataTable.js';
|
|
6
|
+
export type { DataTableCSVOptions, DataTableCellContext, DataTableCellProps, DataTableCheckboxProps, DataTableColumn, DataTableColumnMeta, DataTableFilters, DataTableHeaderCellProps, DataTableLabels, DataTableModel, DataTablePaginationProps, DataTableResolvedLabels, DataTableRowScope, DataTableSearchProps, DataTableSelectionMode, DataTableSort, DataTableSortButtonProps, DataTableSortDirection, DataTableState, DataTableStateOptions, UseDataTableOptions, } from './useDataTable.js';
|
|
7
7
|
/**
|
|
8
8
|
* Props for the DataTable component. The helper props, `className`, the
|
|
9
9
|
* `ref` and the other attributes go on the wrapper `<div>`, which holds the
|
|
@@ -335,6 +335,32 @@ export interface DataTablePaginationProps {
|
|
|
335
335
|
current: number;
|
|
336
336
|
onPageChange: (page: number) => void;
|
|
337
337
|
}
|
|
338
|
+
/** What `toCSV` writes. */
|
|
339
|
+
export interface DataTableCSVOptions {
|
|
340
|
+
/**
|
|
341
|
+
* Which rows, in the order the table shows them: the ones the search and
|
|
342
|
+
* filters let through, from every page, by default, or `all`, `page` or
|
|
343
|
+
* `selected`.
|
|
344
|
+
*
|
|
345
|
+
* @defaultValue 'filtered'
|
|
346
|
+
*/
|
|
347
|
+
rows?: DataTableRowScope;
|
|
348
|
+
/** The ids of the columns to write, in that order. Every column, in the order shown, by default. */
|
|
349
|
+
columns?: string[];
|
|
350
|
+
/**
|
|
351
|
+
* Writes the columns' headers as the first line.
|
|
352
|
+
*
|
|
353
|
+
* @defaultValue true
|
|
354
|
+
*/
|
|
355
|
+
header?: boolean;
|
|
356
|
+
/**
|
|
357
|
+
* What separates the fields. A semicolon suits a spreadsheet that reads
|
|
358
|
+
* a comma as the decimal point, as Excel does in much of Europe.
|
|
359
|
+
*
|
|
360
|
+
* @defaultValue ','
|
|
361
|
+
*/
|
|
362
|
+
delimiter?: string;
|
|
363
|
+
}
|
|
338
364
|
/**
|
|
339
365
|
* A table: what `useDataTable` returns, what `DataTable`'s `toolbar` is
|
|
340
366
|
* given, and what its `table` takes. It reads the rows and the state, changes
|
|
@@ -367,6 +393,16 @@ export interface DataTableModel<TRow> {
|
|
|
367
393
|
getText: (row: TRow, columnId: string) => string;
|
|
368
394
|
/** What names a row: its row header's text, or its first column's. */
|
|
369
395
|
getRowLabel: (row: TRow) => string;
|
|
396
|
+
/**
|
|
397
|
+
* The rows as CSV, from the columns' text (`format`, not `cell`), with a
|
|
398
|
+
* line break of `\r\n` between rows and fields quoted as RFC 4180 asks.
|
|
399
|
+
* A field that starts with `=`, `+`, `-`, `@`, a tab or a carriage return
|
|
400
|
+
* gets a `'` in front, so a spreadsheet shows it as text rather than
|
|
401
|
+
* running it as a formula, unless it's a plain number such as `-12.5`.
|
|
402
|
+
* Excel takes a file as UTF-8 only when it starts with a byte order mark,
|
|
403
|
+
* so put `\uFEFF` in front of the text when you save it for Excel.
|
|
404
|
+
*/
|
|
405
|
+
toCSV: (options?: DataTableCSVOptions) => string;
|
|
370
406
|
/** Whether a row is selected. */
|
|
371
407
|
isSelected: (row: TRow) => boolean;
|
|
372
408
|
/** Sets the sort. */
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FieldProps } from './Field.js';
|
|
3
|
+
import { ControlBaseProps } from './Control.js';
|
|
4
|
+
import { ColorInputBaseProps } from './ColorInputBase.js';
|
|
5
|
+
/**
|
|
6
|
+
* Props for the ColorInput convenience wrapper. Extends
|
|
7
|
+
* `ColorInputBaseProps` with Field-level (label, horizontal, message) and
|
|
8
|
+
* Control-level (loading, expanded) props. Inside an existing `Control` it
|
|
9
|
+
* renders no `Control` of its own, so its Control-level props do nothing
|
|
10
|
+
* there and warn in development; set them on that `Control` instead. Inside
|
|
11
|
+
* an outer `Field`, or a `Control` with no `Field` around it, it renders no
|
|
12
|
+
* `Field` of its own either. The exception is `label`, `message`,
|
|
13
|
+
* `horizontal` or `fieldClassName` in that bare `Control`: it keeps a `Field`
|
|
14
|
+
* for them, nested in the `.control`, and warns in development. Wrap the
|
|
15
|
+
* `Control` in a `Field` instead, and set the `label`, `horizontal` and class
|
|
16
|
+
* name on that `Field`.
|
|
17
|
+
*
|
|
18
|
+
* @helperProps Helper props go on the `.colorinput` `<div>`, with
|
|
19
|
+
* `className`. The other attributes go on the text `<input>`.
|
|
20
|
+
* @extraProp {string} [name] - Form field name. The field submits the text it shows, the value in `format`, or nothing when it's empty.
|
|
21
|
+
* @extraProp {boolean} [required=false] - Marks the field required, so an empty one fails the form's constraint validation.
|
|
22
|
+
* @extraProp {React.Ref<HTMLInputElement>} [ref] - Forwarded to the text `<input>`.
|
|
23
|
+
*/
|
|
24
|
+
export interface ColorInputProps extends ColorInputBaseProps {
|
|
25
|
+
/** Field label (component auto-wraps in a `Field` if not already inside). Automatically associated with the text field via `htmlFor`, using your `id` when provided, otherwise a generated one. Dropped inside an outer `Field`, whose own label associates instead when that `Field` generates a target id (not `grouped`/`hasAddons`, no explicit `labelProps.htmlFor`) and you set no `id` here. */
|
|
26
|
+
label?: React.ReactNode;
|
|
27
|
+
/** Size for the label. */
|
|
28
|
+
labelSize?: FieldProps['labelSize'];
|
|
29
|
+
/** Props for the label element. An explicit `htmlFor` here overrides the automatic association (no id is generated then). */
|
|
30
|
+
labelProps?: FieldProps['labelProps'];
|
|
31
|
+
/** Render the field with horizontal layout. */
|
|
32
|
+
horizontal?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Shows a loading spinner on the `Control` it renders, and hides the
|
|
35
|
+
* launcher (`triggerIcon`) while it does. Inside your own `Control` it
|
|
36
|
+
* renders none, so this draws nothing and warns in development; set
|
|
37
|
+
* `isLoading` on that `Control`.
|
|
38
|
+
*/
|
|
39
|
+
isLoading?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Shows the launcher on the field's end that toggles the panel. Hidden by
|
|
42
|
+
* default while a spinner shows at the same edge: this component's
|
|
43
|
+
* `isLoading` when it renders its own `Control`, or the enclosing
|
|
44
|
+
* `Control`'s `isLoading` inside one.
|
|
45
|
+
* @defaultValue true
|
|
46
|
+
*/
|
|
47
|
+
triggerIcon?: boolean;
|
|
48
|
+
/** Expand the control to fill its container. */
|
|
49
|
+
isExpanded?: boolean;
|
|
50
|
+
/** Size of the wrapping Control. */
|
|
51
|
+
controlSize?: ControlBaseProps['size'];
|
|
52
|
+
/** Help/validation text below the field. */
|
|
53
|
+
message?: React.ReactNode;
|
|
54
|
+
/** Color modifier for the help message. */
|
|
55
|
+
messageColor?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';
|
|
56
|
+
/** Additional CSS classes for the Field wrapper. */
|
|
57
|
+
fieldClassName?: string;
|
|
58
|
+
/** Additional CSS classes for the Control wrapper. */
|
|
59
|
+
controlClassName?: string;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* The `ColorInput` component is a form field for a color: type it, or open a color picker from its launcher or its swatch.
|
|
63
|
+
*
|
|
64
|
+
* The value is a CSS color string, HSL by default, or empty. The panel is
|
|
65
|
+
* the `ColorPicker`'s square, hue slider and, when asked for, alpha slider,
|
|
66
|
+
* swatches and eye dropper, in the same popover the date pickers use.
|
|
67
|
+
*
|
|
68
|
+
* @function
|
|
69
|
+
* @param {ColorInputProps} props - Props for the ColorInput.
|
|
70
|
+
* @returns {JSX.Element}
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* <ColorInput label="Brand color" defaultValue="hsl(202, 67%, 36%)" swatches="bulma" />
|
|
74
|
+
*/
|
|
75
|
+
export declare const ColorInput: React.ForwardRefExoticComponent<ColorInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
76
|
+
export default ColorInput;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BulmaClassesProps } from '../helpers/useBulmaClasses.js';
|
|
3
|
+
import { type ColorFormat, type ColorPickerLabels, type ColorPickerSwatch } from './ColorPicker.js';
|
|
4
|
+
import { type PickerPosition } from './_pickerInternals/pickerTypes.js';
|
|
5
|
+
/**
|
|
6
|
+
* Props for the raw ColorInput base. Use the higher-level `ColorInput` for
|
|
7
|
+
* Field/Control composition; `ColorInputBase` is the field and its popover
|
|
8
|
+
* only.
|
|
9
|
+
*
|
|
10
|
+
* @helperProps Helper props go on the `.colorinput` `<div>`, with
|
|
11
|
+
* `className`. The other attributes go on the text `<input>`.
|
|
12
|
+
* @extraProp {string} [name] - Form field name. The field submits the text it shows, the value in `format`, or nothing when it's empty.
|
|
13
|
+
* @extraProp {boolean} [required=false] - Marks the field required, so an empty one fails the form's constraint validation.
|
|
14
|
+
* @extraProp {React.Ref<HTMLInputElement>} [ref] - Forwarded to the text `<input>`.
|
|
15
|
+
*/
|
|
16
|
+
export interface ColorInputBaseProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'value' | 'defaultValue' | 'onChange' | 'size' | 'color' | 'type' | 'popover'>, Omit<BulmaClassesProps, 'color'> {
|
|
17
|
+
/**
|
|
18
|
+
* The color, controlled, as a CSS color the picker reads (hex, `rgb()`,
|
|
19
|
+
* `hsl()` or a color name), or `''` for none.
|
|
20
|
+
*/
|
|
21
|
+
value?: string;
|
|
22
|
+
/** The color to start with, uncontrolled; empty without one. */
|
|
23
|
+
defaultValue?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Called with the color, in `format`, as it changes: on every step of a
|
|
26
|
+
* drag in the panel, on a key or a swatch, and when typed text is
|
|
27
|
+
* committed. Clearing the field calls it with `''`.
|
|
28
|
+
*/
|
|
29
|
+
onChange?: (value: string) => void;
|
|
30
|
+
/**
|
|
31
|
+
* Called with the color, in `format`, once a change is done: when a drag
|
|
32
|
+
* ends, and with `onChange` for everything else. The place to save it.
|
|
33
|
+
*/
|
|
34
|
+
onChangeEnd?: (value: string) => void;
|
|
35
|
+
/**
|
|
36
|
+
* How the value is written: `'hsl'` (`hsl(171, 100%, 41%)`), `'hex'` or
|
|
37
|
+
* `'rgb'`, with alpha as `hsla()`, `#rrggbbaa` and `rgba()`. Typed text in
|
|
38
|
+
* any of them is written back in this one.
|
|
39
|
+
* @defaultValue 'hsl'
|
|
40
|
+
*/
|
|
41
|
+
format?: ColorFormat;
|
|
42
|
+
/** Adds an alpha slider to the panel and writes the alpha into the value. */
|
|
43
|
+
alpha?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Preset colors in the panel: a list of CSS colors, each a string or
|
|
46
|
+
* `{ color, label }`, or `"bulma"` for the page's theme colors.
|
|
47
|
+
*/
|
|
48
|
+
swatches?: ColorPickerSwatch[] | 'bulma';
|
|
49
|
+
/**
|
|
50
|
+
* Adds a button to the panel that picks a color from anywhere on the
|
|
51
|
+
* screen, where the browser has the EyeDropper API.
|
|
52
|
+
*/
|
|
53
|
+
eyeDropper?: boolean;
|
|
54
|
+
/** Fired when the panel opens. */
|
|
55
|
+
onOpen?: () => void;
|
|
56
|
+
/** Fired when the panel closes. */
|
|
57
|
+
onClose?: () => void;
|
|
58
|
+
/**
|
|
59
|
+
* Opens the panel when the field takes focus, and moves focus into it.
|
|
60
|
+
* Off by default, since typing a value is the quick way in and the
|
|
61
|
+
* launcher, a click on the swatch or Alt+ArrowDown open it.
|
|
62
|
+
*/
|
|
63
|
+
openOnFocus?: boolean;
|
|
64
|
+
/** Closes the panel once a swatch is chosen. */
|
|
65
|
+
closeOnSwatchClick?: boolean;
|
|
66
|
+
/** The panel's place relative to the field. */
|
|
67
|
+
position?: PickerPosition;
|
|
68
|
+
/**
|
|
69
|
+
* Renders the panel through a portal, into the `portalContainer` a
|
|
70
|
+
* `ConfigProvider` sets, `document.body` by default.
|
|
71
|
+
*/
|
|
72
|
+
appendToBody?: boolean;
|
|
73
|
+
/** Bulma color modifier for the field. */
|
|
74
|
+
color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';
|
|
75
|
+
/** The field's size. */
|
|
76
|
+
size?: 'small' | 'medium' | 'large';
|
|
77
|
+
/** Renders the field with rounded ends. */
|
|
78
|
+
isRounded?: boolean;
|
|
79
|
+
/** Disables the field and its panel. A disabled `Fieldset` does too. */
|
|
80
|
+
disabled?: boolean;
|
|
81
|
+
/** Makes the field read-only, with no panel. */
|
|
82
|
+
readOnly?: boolean;
|
|
83
|
+
/** Text shown while the field is empty. */
|
|
84
|
+
placeholder?: string;
|
|
85
|
+
/**
|
|
86
|
+
* Shows the launcher on the field's end that toggles the panel. Hidden by
|
|
87
|
+
* default while a `Control` it sits in shows its `isLoading` spinner,
|
|
88
|
+
* which shares that edge.
|
|
89
|
+
* @defaultValue true
|
|
90
|
+
*/
|
|
91
|
+
triggerIcon?: boolean;
|
|
92
|
+
/** The launcher's glyph. */
|
|
93
|
+
triggerIconName?: string;
|
|
94
|
+
/** The strings it says, each with an English default. */
|
|
95
|
+
labels?: ColorPickerLabels;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* The raw ColorInput: a text field with a swatch and a launcher that opens a color picker in a popover, without Field/Control wrapping.
|
|
99
|
+
*
|
|
100
|
+
* Use `ColorInput` for the convenience wrapper.
|
|
101
|
+
*
|
|
102
|
+
* @function
|
|
103
|
+
* @param {ColorInputBaseProps} props - Props for ColorInputBase.
|
|
104
|
+
* @param {React.Ref<HTMLInputElement>} ref - Forwarded ref to the text `<input>`.
|
|
105
|
+
* @returns {JSX.Element} The rendered field.
|
|
106
|
+
*/
|
|
107
|
+
export declare const ColorInputBase: React.ForwardRefExoticComponent<ColorInputBaseProps & React.RefAttributes<HTMLInputElement>>;
|
|
108
|
+
export default ColorInputBase;
|
|
@@ -69,6 +69,11 @@ export interface ColorPickerLabels {
|
|
|
69
69
|
* @defaultValue 'Pick a color from the screen'
|
|
70
70
|
*/
|
|
71
71
|
eyeDropper?: string;
|
|
72
|
+
/**
|
|
73
|
+
* Names `ColorInput`'s launcher and the panel it opens.
|
|
74
|
+
* @defaultValue 'Choose color'
|
|
75
|
+
*/
|
|
76
|
+
chooseColor?: string;
|
|
72
77
|
}
|
|
73
78
|
/**
|
|
74
79
|
* Props for ColorPicker.Area. The helper props, the other attributes and the
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A button that picks a color from anywhere on the screen, for the picker
|
|
3
|
+
* around it. It renders only once the page has hydrated, where the browser
|
|
4
|
+
* has the EyeDropper API, and inside a picker that asked for it.
|
|
5
|
+
*/
|
|
6
|
+
export declare function EyeDropperButton({ className }: {
|
|
7
|
+
className?: string;
|
|
8
|
+
}): import("react").JSX.Element | null;
|
|
@@ -53,10 +53,16 @@ export interface PickerOptions {
|
|
|
53
53
|
swatches: ColorPickerSwatch[] | 'bulma' | undefined;
|
|
54
54
|
eyeDropper: boolean;
|
|
55
55
|
labels: ColorPickerLabels | undefined;
|
|
56
|
+
/**
|
|
57
|
+
* Whether the field the picker serves is empty, as ColorInput's can be.
|
|
58
|
+
* The picker still shows a color then, and any change, even to that same
|
|
59
|
+
* color, is reported, so it fills the field.
|
|
60
|
+
*/
|
|
61
|
+
empty?: boolean;
|
|
56
62
|
}
|
|
57
63
|
/**
|
|
58
64
|
* Holds a picker's color and builds what its parts read. Controlled, the
|
|
59
65
|
* color shown follows `value`; a value the picker handed out comes back as
|
|
60
66
|
* the exact color it was, thumbs and all.
|
|
61
67
|
*/
|
|
62
|
-
export declare function useColorPicker({ value, defaultValue, onChange, onChangeEnd, format, alpha, disabled, swatches, eyeDropper, labels, }: PickerOptions): ColorPickerContextValue;
|
|
68
|
+
export declare function useColorPicker({ value, defaultValue, onChange, onChangeEnd, format, alpha, disabled, swatches, eyeDropper, labels, empty, }: PickerOptions): ColorPickerContextValue;
|
|
@@ -123,6 +123,10 @@ export { DateRangeInputBase } from './form/DateRangeInputBase.js';
|
|
|
123
123
|
export type { DateRangeInputBaseProps, DateRangeValue, } from './form/DateRangeInputBase.js';
|
|
124
124
|
export { DateRangeInput } from './form/DateRangeInput.js';
|
|
125
125
|
export type { DateRangeInputProps } from './form/DateRangeInput.js';
|
|
126
|
+
export { ColorInputBase } from './form/ColorInputBase.js';
|
|
127
|
+
export type { ColorInputBaseProps } from './form/ColorInputBase.js';
|
|
128
|
+
export { ColorInput } from './form/ColorInput.js';
|
|
129
|
+
export type { ColorInputProps } from './form/ColorInput.js';
|
|
126
130
|
export { useInsideField, useInsideControl } from './form/FormContext.js';
|
|
127
131
|
export type { FormFieldProps } from './form/fieldProps.js';
|
|
128
132
|
export * from './grid/Cell.js';
|