@nordhealth/components 4.26.2 → 5.0.0-alpha.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/custom-elements.json +53898 -21499
- package/lib/Accordion.js +2 -0
- package/lib/Accordion.js.map +1 -0
- package/lib/AccordionHeader.js +2 -0
- package/lib/AccordionHeader.js.map +1 -0
- package/lib/AccordionItem.js +2 -0
- package/lib/AccordionItem.js.map +1 -0
- package/lib/AccordionPanel.js +2 -0
- package/lib/AccordionPanel.js.map +1 -0
- package/lib/AccordionTrigger.js +2 -0
- package/lib/AccordionTrigger.js.map +1 -0
- package/lib/ActiveDescendantController-BnMqM79O.js +2 -0
- package/lib/ActiveDescendantController-BnMqM79O.js.map +1 -0
- package/lib/Aside.js +5 -7
- package/lib/Aside.js.map +1 -1
- package/lib/AsideDrawer.js +7 -11
- package/lib/AsideDrawer.js.map +1 -1
- package/lib/AsideTrigger.js +3 -4
- package/lib/AsideTrigger.js.map +1 -1
- package/lib/Autocomplete.js +2 -0
- package/lib/Autocomplete.js.map +1 -0
- package/lib/Avatar.js +1 -1
- package/lib/Avatar.js.map +1 -1
- package/lib/Badge.js +1 -1
- package/lib/Badge.js.map +1 -1
- package/lib/Banner.js +1 -1
- package/lib/Banner.js.map +1 -1
- package/lib/Button.js +7 -12
- package/lib/Button.js.map +1 -1
- package/lib/ButtonGroup.js +1 -1
- package/lib/ButtonGroup.js.map +1 -1
- package/lib/Calendar-C1SxrlzN.js +2 -0
- package/lib/Calendar-C1SxrlzN.js.map +1 -0
- package/lib/Calendar.js +1 -1
- package/lib/Card.js +1 -1
- package/lib/Card.js.map +1 -1
- package/lib/Checkbox.js +1 -1
- package/lib/Checkbox.js.map +1 -1
- package/lib/CollapseController-BtKNFNyJ.js +2 -0
- package/lib/CollapseController-BtKNFNyJ.js.map +1 -0
- package/lib/Collapsible.js +2 -0
- package/lib/Collapsible.js.map +1 -0
- package/lib/CollapsiblePanel.js +2 -0
- package/lib/CollapsiblePanel.js.map +1 -0
- package/lib/CollapsibleTrigger.js +2 -0
- package/lib/CollapsibleTrigger.js.map +1 -0
- package/lib/Combobox-By4h1Sp-.js +2 -0
- package/lib/Combobox-By4h1Sp-.js.map +1 -0
- package/lib/Combobox.js +2 -0
- package/lib/Combobox.js.map +1 -0
- package/lib/ComboboxBase.js +2 -0
- package/lib/ComboboxBase.js.map +1 -0
- package/lib/ComboboxEvents.js +2 -0
- package/lib/ComboboxEvents.js.map +1 -0
- package/lib/ComboboxGroup.js +2 -0
- package/lib/ComboboxGroup.js.map +1 -0
- package/lib/ComboboxOption.js +2 -0
- package/lib/ComboboxOption.js.map +1 -0
- package/lib/CommandMenu.js +1 -1
- package/lib/CommandMenu.js.map +1 -1
- package/lib/CommandMenuAction.js +1 -1
- package/lib/CommandMenuAction.js.map +1 -1
- package/lib/Component-BJ5O5n8k.js +2 -0
- package/lib/Component-BJ5O5n8k.js.map +1 -0
- package/lib/DatePicker.js +1 -1
- package/lib/DatePicker.js.map +1 -1
- package/lib/DateRangeChangeEvent.js +2 -0
- package/lib/DateRangeChangeEvent.js.map +1 -0
- package/lib/DateRangePicker.js +2 -0
- package/lib/DateRangePicker.js.map +1 -0
- package/lib/DateRangeSelectEvent.js +2 -0
- package/lib/DateRangeSelectEvent.js.map +1 -0
- package/lib/Divider.js +1 -1
- package/lib/Divider.js.map +1 -1
- package/lib/DraftComponentMixin-4qug5Rky.js +2 -0
- package/lib/DraftComponentMixin-4qug5Rky.js.map +1 -0
- package/lib/Drawer.js +1 -1
- package/lib/Drawer.js.map +1 -1
- package/lib/Dropdown.js +1 -1
- package/lib/Dropdown.js.map +1 -1
- package/lib/DropdownGroup.js +1 -1
- package/lib/DropdownGroup.js.map +1 -1
- package/lib/DropdownItem-BYbOLth6.js +2 -0
- package/lib/DropdownItem-BYbOLth6.js.map +1 -0
- package/lib/DropdownItem.js +1 -1
- package/lib/DropdownItem.js.map +1 -1
- package/lib/DropdownSubmenu.js +1 -1
- package/lib/DropdownSubmenu.js.map +1 -1
- package/lib/EmptyState.js +1 -1
- package/lib/EmptyState.js.map +1 -1
- package/lib/Field.js +2 -0
- package/lib/Field.js.map +1 -0
- package/lib/FieldContent.js +2 -0
- package/lib/FieldContent.js.map +1 -0
- package/lib/FieldControlMixin-BXNZJXu9.js +2 -0
- package/lib/FieldControlMixin-BXNZJXu9.js.map +1 -0
- package/lib/FieldDescription.js +2 -0
- package/lib/FieldDescription.js.map +1 -0
- package/lib/FieldError.js +2 -0
- package/lib/FieldError.js.map +1 -0
- package/lib/FieldGroup.js +2 -0
- package/lib/FieldGroup.js.map +1 -0
- package/lib/FieldLabel.js +2 -0
- package/lib/FieldLabel.js.map +1 -0
- package/lib/FieldLegend.js +2 -0
- package/lib/FieldLegend.js.map +1 -0
- package/lib/FieldSeparator.js +2 -0
- package/lib/FieldSeparator.js.map +1 -0
- package/lib/FieldSet.js +2 -0
- package/lib/FieldSet.js.map +1 -0
- package/lib/FieldTitle.js +2 -0
- package/lib/FieldTitle.js.map +1 -0
- package/lib/Fieldset2.js +2 -0
- package/lib/Fieldset2.js.map +1 -0
- package/lib/FilterAddButton.js +2 -0
- package/lib/FilterAddButton.js.map +1 -0
- package/lib/FilterAddButtonEvents.js +2 -0
- package/lib/FilterAddButtonEvents.js.map +1 -0
- package/lib/FilterBar.js +2 -0
- package/lib/FilterBar.js.map +1 -0
- package/lib/FilterDateRange.js +2 -0
- package/lib/FilterDateRange.js.map +1 -0
- package/lib/FilterDateRangeEvents.js +2 -0
- package/lib/FilterDateRangeEvents.js.map +1 -0
- package/lib/FilterDropdown.js +2 -0
- package/lib/FilterDropdown.js.map +1 -0
- package/lib/FilterDropdownEvents.js +2 -0
- package/lib/FilterDropdownEvents.js.map +1 -0
- package/lib/FilterField.js +2 -0
- package/lib/FilterField.js.map +1 -0
- package/lib/FilterFieldEvents.js +2 -0
- package/lib/FilterFieldEvents.js.map +1 -0
- package/lib/FilterInput.js +2 -0
- package/lib/FilterInput.js.map +1 -0
- package/lib/FilterResetButton.js +2 -0
- package/lib/FilterResetButton.js.map +1 -0
- package/lib/FocusableWhenDisabledController-C_Mn1mfN.js +2 -0
- package/lib/FocusableWhenDisabledController-C_Mn1mfN.js.map +1 -0
- package/lib/Footer.js +1 -1
- package/lib/Footer.js.map +1 -1
- package/lib/FormAssociatedMixin-D9aPREgv.js +2 -0
- package/lib/FormAssociatedMixin-D9aPREgv.js.map +1 -0
- package/lib/FormField-CMgEFZCK.js +2 -0
- package/lib/FormField-CMgEFZCK.js.map +1 -0
- package/lib/Header.js +1 -1
- package/lib/Header.js.map +1 -1
- package/lib/Icon.js +1 -1
- package/lib/Icon.js.map +1 -1
- package/lib/Input.js +1 -1
- package/lib/Input.js.map +1 -1
- package/lib/Item.js +2 -0
- package/lib/Item.js.map +1 -0
- package/lib/ItemActions.js +2 -0
- package/lib/ItemActions.js.map +1 -0
- package/lib/ItemContent.js +2 -0
- package/lib/ItemContent.js.map +1 -0
- package/lib/ItemDescription.js +2 -0
- package/lib/ItemDescription.js.map +1 -0
- package/lib/ItemFooter.js +2 -0
- package/lib/ItemFooter.js.map +1 -0
- package/lib/ItemGroup.js +2 -0
- package/lib/ItemGroup.js.map +1 -0
- package/lib/ItemHeader.js +2 -0
- package/lib/ItemHeader.js.map +1 -0
- package/lib/ItemMedia.js +2 -0
- package/lib/ItemMedia.js.map +1 -0
- package/lib/ItemSeparator.js +2 -0
- package/lib/ItemSeparator.js.map +1 -0
- package/lib/ItemTitle.js +2 -0
- package/lib/ItemTitle.js.map +1 -0
- package/lib/Kbd.js +2 -0
- package/lib/Kbd.js.map +1 -0
- package/lib/KbdGroup.js +2 -0
- package/lib/KbdGroup.js.map +1 -0
- package/lib/Layout.js +1 -3
- package/lib/Layout.js.map +1 -1
- package/lib/LocalizeController.js +1 -1
- package/lib/LocalizeController.js.map +1 -1
- package/lib/Message.js +1 -1
- package/lib/Message.js.map +1 -1
- package/lib/Meter.js +2 -0
- package/lib/Meter.js.map +1 -0
- package/lib/Modal.js +1 -1
- package/lib/Modal.js.map +1 -1
- package/lib/ModalController.js +1 -1
- package/lib/ModalController.js.map +1 -1
- package/lib/NavGroup.js +1 -1
- package/lib/NavGroup.js.map +1 -1
- package/lib/NavItem.js +1 -1
- package/lib/NavItem.js.map +1 -1
- package/lib/NavToggle-BY83xpx0.js +2 -0
- package/lib/NavToggle-BY83xpx0.js.map +1 -0
- package/lib/NavToggle.js +1 -1
- package/lib/Navigation.js +1 -1
- package/lib/Navigation.js.map +1 -1
- package/lib/Notification.js +1 -1
- package/lib/Notification.js.map +1 -1
- package/lib/NotificationGroup.js +1 -1
- package/lib/NotificationGroup.js.map +1 -1
- package/lib/NumberField.js +2 -0
- package/lib/NumberField.js.map +1 -0
- package/lib/NumberFieldEvents.js +2 -0
- package/lib/NumberFieldEvents.js.map +1 -0
- package/lib/OpenStateController-CCnZ7up6.js +2 -0
- package/lib/OpenStateController-CCnZ7up6.js.map +1 -0
- package/lib/OtpField.js +2 -0
- package/lib/OtpField.js.map +1 -0
- package/lib/OtpFieldEvents.js +2 -0
- package/lib/OtpFieldEvents.js.map +1 -0
- package/lib/Pagination.js +2 -0
- package/lib/Pagination.js.map +1 -0
- package/lib/PaginationContent.js +2 -0
- package/lib/PaginationContent.js.map +1 -0
- package/lib/PaginationEllipsis.js +2 -0
- package/lib/PaginationEllipsis.js.map +1 -0
- package/lib/PaginationItem.js +2 -0
- package/lib/PaginationItem.js.map +1 -0
- package/lib/PaginationLink.js +2 -0
- package/lib/PaginationLink.js.map +1 -0
- package/lib/PaginationNext.js +2 -0
- package/lib/PaginationNext.js.map +1 -0
- package/lib/PaginationPrevious.js +2 -0
- package/lib/PaginationPrevious.js.map +1 -0
- package/lib/Popout-DpN7PP9h.js +2 -0
- package/lib/Popout-DpN7PP9h.js.map +1 -0
- package/lib/Popout.js +1 -1
- package/lib/Progress.js +1 -1
- package/lib/Progress.js.map +1 -1
- package/lib/ProgressBar.js +1 -1
- package/lib/ProgressBar.js.map +1 -1
- package/lib/Qrcode.js +2 -2
- package/lib/Radio.js +1 -1
- package/lib/Radio.js.map +1 -1
- package/lib/Range.js +1 -1
- package/lib/Range.js.map +1 -1
- package/lib/ReadonlyMixin-BdJPGtQ3.js +2 -0
- package/lib/ReadonlyMixin-BdJPGtQ3.js.map +1 -0
- package/lib/ResizeController-14PUwRQy.js +2 -0
- package/lib/ResizeController-14PUwRQy.js.map +1 -0
- package/lib/ScrollArea.js +2 -0
- package/lib/ScrollArea.js.map +1 -0
- package/lib/SegmentedControl.js +1 -1
- package/lib/SegmentedControl.js.map +1 -1
- package/lib/SegmentedControlItem.js +23 -40
- package/lib/SegmentedControlItem.js.map +1 -1
- package/lib/Select.js +1 -1
- package/lib/Select.js.map +1 -1
- package/lib/Skeleton.js +1 -1
- package/lib/Skeleton.js.map +1 -1
- package/lib/Spinner.js +1 -1
- package/lib/Spinner.js.map +1 -1
- package/lib/Stack.js +1 -1
- package/lib/Stack.js.map +1 -1
- package/lib/StateAttributesController-BIh96sXZ.js +2 -0
- package/lib/StateAttributesController-BIh96sXZ.js.map +1 -0
- package/lib/Sticky-CZImMrGj.js +2 -0
- package/lib/Sticky-CZImMrGj.js.map +1 -0
- package/lib/Tab.js +1 -1
- package/lib/Tab.js.map +1 -1
- package/lib/TabGroup.js +1 -1
- package/lib/TabGroup.js.map +1 -1
- package/lib/TabPanel.js +1 -1
- package/lib/TabPanel.js.map +1 -1
- package/lib/Table.js +1 -1
- package/lib/Table.js.map +1 -1
- package/lib/Tag.js +1 -1
- package/lib/Tag.js.map +1 -1
- package/lib/TagGroup.js +1 -1
- package/lib/TagGroup.js.map +1 -1
- package/lib/TextField-CSKvieoG.js +2 -0
- package/lib/TextField-CSKvieoG.js.map +1 -0
- package/lib/TextSelectableMixin-Cfv__lHS.js.map +1 -1
- package/lib/Textarea.js +1 -1
- package/lib/Textarea.js.map +1 -1
- package/lib/TimePicker.js +2 -0
- package/lib/TimePicker.js.map +1 -0
- package/lib/Toast.js +1 -1
- package/lib/Toast.js.map +1 -1
- package/lib/ToastGroup.js +1 -1
- package/lib/ToastGroup.js.map +1 -1
- package/lib/Toggle.js +1 -1
- package/lib/Toggle.js.map +1 -1
- package/lib/Tooltip.js +1 -1
- package/lib/Tooltip.js.map +1 -1
- package/lib/TopBar.js +1 -1
- package/lib/TopBar.js.map +1 -1
- package/lib/Truncate.js +1 -1
- package/lib/Truncate.js.map +1 -1
- package/lib/VisuallyHidden.js +1 -1
- package/lib/bundle.js +91 -91
- package/lib/bundle.js.map +1 -1
- package/lib/combobox-context.js +2 -0
- package/lib/combobox-context.js.map +1 -0
- package/lib/context-consumer-BJVUulGf.js +7 -0
- package/lib/context-consumer-BJVUulGf.js.map +1 -0
- package/lib/context-provider-D8lrPLVi.js +12 -0
- package/lib/context-provider-D8lrPLVi.js.map +1 -0
- package/lib/context-request-event-CCRlXoeR.js +7 -0
- package/lib/context-request-event-CCRlXoeR.js.map +1 -0
- package/lib/create-context-CJ69ntlY.js +7 -0
- package/lib/create-context-CJ69ntlY.js.map +1 -0
- package/lib/currency.js +2 -0
- package/lib/currency.js.map +1 -0
- package/lib/date-adapter.js +1 -1
- package/lib/dates-C-ZvzXaC.js +2 -0
- package/lib/dates-C-ZvzXaC.js.map +1 -0
- package/lib/dates.js +2 -0
- package/lib/dates.js.map +1 -0
- package/lib/dismiss.js +2 -0
- package/lib/dismiss.js.map +1 -0
- package/lib/en-us.js +1 -1
- package/lib/en-us.js.map +1 -1
- package/lib/fi-fi.js +1 -1
- package/lib/fi-fi.js.map +1 -1
- package/lib/field-context.js +2 -0
- package/lib/field-context.js.map +1 -0
- package/lib/filter-chip-C97zd4PT.js +2 -0
- package/lib/filter-chip-C97zd4PT.js.map +1 -0
- package/lib/format.js +2 -0
- package/lib/format.js.map +1 -0
- package/lib/index.js +1 -1
- package/lib/interface-add-small-B-hv2v9J.js +2 -0
- package/lib/interface-add-small-B-hv2v9J.js.map +1 -0
- package/lib/interface-calendar-Cw2bJfbS.js +2 -0
- package/lib/interface-calendar-Cw2bJfbS.js.map +1 -0
- package/lib/interface-close-BvKnv9eh.js +2 -0
- package/lib/interface-close-BvKnv9eh.js.map +1 -0
- package/lib/interface-dropdown-small-CYvgxudU.js +2 -0
- package/lib/interface-dropdown-small-CYvgxudU.js.map +1 -0
- package/lib/interface-filter-CCsx9-u6.js +2 -0
- package/lib/interface-filter-CCsx9-u6.js.map +1 -0
- package/lib/interface-remove-small-DUaWSs90.js +2 -0
- package/lib/interface-remove-small-DUaWSs90.js.map +1 -0
- package/lib/light-dom-styles-DXsbiKU9.js +2 -0
- package/lib/light-dom-styles-DXsbiKU9.js.map +1 -0
- package/lib/localization.js +1 -1
- package/lib/localization.js.map +1 -1
- package/lib/localization10.js +2 -0
- package/lib/localization10.js.map +1 -0
- package/lib/localization11.js +2 -0
- package/lib/localization11.js.map +1 -0
- package/lib/localization12.js +2 -0
- package/lib/localization12.js.map +1 -0
- package/lib/localization13.js +2 -0
- package/lib/localization13.js.map +1 -0
- package/lib/localization14.js +2 -0
- package/lib/localization14.js.map +1 -0
- package/lib/localization15.js +2 -0
- package/lib/localization15.js.map +1 -0
- package/lib/localization16.js +2 -0
- package/lib/localization16.js.map +1 -0
- package/lib/localization17.js +2 -0
- package/lib/localization17.js.map +1 -0
- package/lib/localization18.js +2 -0
- package/lib/localization18.js.map +1 -0
- package/lib/localization19.js +2 -0
- package/lib/localization19.js.map +1 -0
- package/lib/localization2.js +1 -1
- package/lib/localization2.js.map +1 -1
- package/lib/localization20.js +2 -0
- package/lib/localization20.js.map +1 -0
- package/lib/localization21.js +2 -0
- package/lib/localization21.js.map +1 -0
- package/lib/localization22.js +2 -0
- package/lib/localization22.js.map +1 -0
- package/lib/localization3.js +1 -1
- package/lib/localization3.js.map +1 -1
- package/lib/localization4.js +1 -1
- package/lib/localization4.js.map +1 -1
- package/lib/localization5.js +1 -1
- package/lib/localization5.js.map +1 -1
- package/lib/localization6.js +1 -1
- package/lib/localization6.js.map +1 -1
- package/lib/localization7.js +1 -1
- package/lib/localization7.js.map +1 -1
- package/lib/localization8.js +1 -1
- package/lib/localization8.js.map +1 -1
- package/lib/localization9.js +1 -1
- package/lib/localization9.js.map +1 -1
- package/lib/navigation-search-CBbIGzo2.js +2 -0
- package/lib/navigation-search-CBbIGzo2.js.map +1 -0
- package/lib/paginate.js +2 -0
- package/lib/paginate.js.map +1 -0
- package/lib/parse.js +2 -0
- package/lib/parse.js.map +1 -0
- package/lib/primitives-Dj0vyf1-.js +2 -0
- package/lib/primitives-Dj0vyf1-.js.map +1 -0
- package/lib/react.d.ts +505 -0
- package/lib/src/accordion/Accordion.d.ts +121 -0
- package/lib/src/accordion/AccordionHeader.d.ts +28 -0
- package/lib/src/accordion/AccordionItem.d.ts +68 -0
- package/lib/src/accordion/AccordionPanel.d.ts +35 -0
- package/lib/src/accordion/AccordionTrigger.d.ts +47 -0
- package/lib/src/aside-drawer/AsideDrawer.d.ts +2 -0
- package/lib/src/aside-trigger/AsideTrigger.d.ts +2 -0
- package/lib/src/autocomplete/Autocomplete.d.ts +190 -0
- package/lib/src/autocomplete/localization.d.ts +5 -0
- package/lib/src/badge/Badge.d.ts +1 -1
- package/lib/src/banner/Banner.d.ts +3 -0
- package/lib/src/button-group/ButtonGroup.d.ts +1 -1
- package/lib/src/calendar/Calendar.d.ts +44 -0
- package/lib/src/calendar/DateRangeSelectEvent.d.ts +16 -0
- package/lib/src/collapsible/Collapsible.d.ts +69 -0
- package/lib/src/collapsible/CollapsiblePanel.d.ts +35 -0
- package/lib/src/collapsible/CollapsibleTrigger.d.ts +38 -0
- package/lib/src/combobox/Combobox.d.ts +131 -0
- package/lib/src/combobox/ComboboxBase.d.ts +421 -0
- package/lib/src/combobox/ComboboxEvents.d.ts +25 -0
- package/lib/src/combobox/ComboboxGroup.d.ts +34 -0
- package/lib/src/combobox/ComboboxOption.d.ts +47 -0
- package/lib/src/combobox/combobox-context.d.ts +18 -0
- package/lib/src/combobox/localization.d.ts +6 -0
- package/lib/src/common/controllers/ActiveDescendantController.d.ts +45 -0
- package/lib/src/common/controllers/CollapseController.d.ts +50 -0
- package/lib/src/common/controllers/FocusableWhenDisabledController.d.ts +29 -0
- package/lib/src/common/controllers/OpenStateController.d.ts +58 -0
- package/lib/src/common/controllers/RovingFocusController.d.ts +40 -0
- package/lib/src/common/controllers/StateAttributesController.d.ts +47 -0
- package/lib/src/common/controllers/TransitionStatusController.d.ts +48 -0
- package/lib/src/common/dates.d.ts +13 -0
- package/lib/src/common/light-dom-styles.d.ts +17 -0
- package/lib/src/common/mixins/FieldControlMixin.d.ts +60 -0
- package/lib/src/common/mixins/FormAssociatedMixin.d.ts +8 -25
- package/lib/src/common/mixins/TextSelectableMixin.d.ts +1 -0
- package/lib/src/common/prefers-reduced-motion.d.ts +7 -0
- package/lib/src/date-picker/DatePicker.d.ts +2 -0
- package/lib/src/date-range-picker/DateRangeChangeEvent.d.ts +27 -0
- package/lib/src/date-range-picker/DateRangePicker.d.ts +307 -0
- package/lib/src/date-range-picker/localization.d.ts +42 -0
- package/lib/src/dropdown/Dropdown.d.ts +1 -1
- package/lib/src/dropdown-group/DropdownGroup.d.ts +3 -1
- package/lib/src/dropdown-item/DropdownItem.d.ts +3 -1
- package/lib/src/dropdown-submenu/DropdownSubmenu.d.ts +2 -0
- package/lib/src/field/Field.d.ts +102 -0
- package/lib/src/field/FieldContent.d.ts +22 -0
- package/lib/src/field/FieldDescription.d.ts +21 -0
- package/lib/src/field/FieldError.d.ts +25 -0
- package/lib/src/field/FieldGroup.d.ts +25 -0
- package/lib/src/field/FieldLabel.d.ts +41 -0
- package/lib/src/field/FieldLegend.d.ts +20 -0
- package/lib/src/field/FieldSeparator.d.ts +21 -0
- package/lib/src/field/FieldSet.d.ts +28 -0
- package/lib/src/field/FieldTitle.d.ts +21 -0
- package/lib/src/field/field-context.d.ts +47 -0
- package/lib/src/fieldset/Fieldset.d.ts +12 -4
- package/lib/src/filter-add-button/FilterAddButton.d.ts +91 -0
- package/lib/src/filter-add-button/FilterAddButtonEvents.d.ts +17 -0
- package/lib/src/filter-add-button/localization.d.ts +4 -0
- package/lib/src/filter-bar/FilterBar.d.ts +37 -0
- package/lib/src/filter-date-range/FilterDateRange.d.ts +96 -0
- package/lib/src/filter-date-range/FilterDateRangeEvents.d.ts +37 -0
- package/lib/src/filter-date-range/localization.d.ts +11 -0
- package/lib/src/filter-dropdown/FilterDropdown.d.ts +247 -0
- package/lib/src/filter-dropdown/FilterDropdownEvents.d.ts +57 -0
- package/lib/src/filter-dropdown/localization.d.ts +14 -0
- package/lib/src/filter-field/FilterField.d.ts +89 -0
- package/lib/src/filter-field/FilterFieldEvents.d.ts +18 -0
- package/lib/src/filter-field/localization.d.ts +8 -0
- package/lib/src/filter-input/FilterInput.d.ts +102 -0
- package/lib/src/filter-input/localization.d.ts +5 -0
- package/lib/src/filter-reset-button/FilterResetButton.d.ts +50 -0
- package/lib/src/filter-reset-button/localization.d.ts +4 -0
- package/lib/src/index.d.ts +59 -0
- package/lib/src/input/Input.d.ts +2 -1
- package/lib/src/item/Item.d.ts +44 -0
- package/lib/src/item/ItemActions.d.ts +20 -0
- package/lib/src/item/ItemContent.d.ts +22 -0
- package/lib/src/item/ItemDescription.d.ts +20 -0
- package/lib/src/item/ItemFooter.d.ts +20 -0
- package/lib/src/item/ItemGroup.d.ts +22 -0
- package/lib/src/item/ItemHeader.d.ts +20 -0
- package/lib/src/item/ItemMedia.d.ts +28 -0
- package/lib/src/item/ItemSeparator.d.ts +21 -0
- package/lib/src/item/ItemTitle.d.ts +19 -0
- package/lib/src/kbd/Kbd.d.ts +54 -0
- package/lib/src/kbd/KbdGroup.d.ts +22 -0
- package/lib/src/layout/Layout.d.ts +2 -2
- package/lib/src/localization/en-us.d.ts +85 -0
- package/lib/src/localization/translation.d.ts +85 -0
- package/lib/src/meter/Meter.d.ts +76 -0
- package/lib/src/nav-group/NavGroup.d.ts +2 -0
- package/lib/src/nav-item/NavItem.d.ts +2 -0
- package/lib/src/nav-toggle/NavToggle.d.ts +3 -1
- package/lib/src/notification-group/NotificationGroup.d.ts +2 -0
- package/lib/src/number-field/NumberField.d.ts +377 -0
- package/lib/src/number-field/NumberFieldEvents.d.ts +37 -0
- package/lib/src/number-field/currency.d.ts +24 -0
- package/lib/src/number-field/format.d.ts +8 -0
- package/lib/src/number-field/localization.d.ts +6 -0
- package/lib/src/number-field/parse.d.ts +44 -0
- package/lib/src/number-field/validate.d.ts +24 -0
- package/lib/src/otp-field/OtpField.d.ts +177 -0
- package/lib/src/otp-field/OtpFieldEvents.d.ts +38 -0
- package/lib/src/otp-field/localization.d.ts +4 -0
- package/lib/src/pagination/Pagination.d.ts +51 -0
- package/lib/src/pagination/PaginationContent.d.ts +27 -0
- package/lib/src/pagination/PaginationEllipsis.d.ts +27 -0
- package/lib/src/pagination/PaginationItem.d.ts +24 -0
- package/lib/src/pagination/PaginationLink.d.ts +30 -0
- package/lib/src/pagination/PaginationNext.d.ts +24 -0
- package/lib/src/pagination/PaginationPrevious.d.ts +24 -0
- package/lib/src/pagination/localization.d.ts +4 -0
- package/lib/src/pagination/paginate.d.ts +20 -0
- package/lib/src/popout/Popout.d.ts +9 -0
- package/lib/src/scroll-area/ScrollArea.d.ts +101 -0
- package/lib/src/segmented-control-item/SegmentedControlItem.d.ts +2 -0
- package/lib/src/storybook-utils/dates.d.ts +2 -0
- package/lib/src/storybook-utils/dismiss.d.ts +1 -0
- package/lib/src/storybook-utils/story-descriptions.d.ts +2 -0
- package/lib/src/tab-group/TabGroup.d.ts +2 -0
- package/lib/src/tab-panel/TabPanel.d.ts +2 -0
- package/lib/src/tag-group/TagGroup.d.ts +2 -0
- package/lib/src/time-picker/TimePicker.d.ts +105 -0
- package/lib/src/time-picker/localization.d.ts +4 -0
- package/lib/src/toast-group/ToastGroup.d.ts +11 -0
- package/lib/story-descriptions.js +2 -0
- package/lib/story-descriptions.js.map +1 -0
- package/lib/translation.js +1 -1
- package/lib/translation.js.map +1 -1
- package/lib/validate.js +2 -0
- package/lib/validate.js.map +1 -0
- package/lib/vue.d.ts +407 -0
- package/package.json +9 -12
- package/lib/Calendar-ChNZdVRO.js +0 -2
- package/lib/Calendar-ChNZdVRO.js.map +0 -1
- package/lib/Component-DSU3Qp0O.js +0 -2
- package/lib/Component-DSU3Qp0O.js.map +0 -1
- package/lib/DropdownItem-Cb-7cHMg.js +0 -2
- package/lib/DropdownItem-Cb-7cHMg.js.map +0 -1
- package/lib/Fieldset.js +0 -2
- package/lib/Fieldset.js.map +0 -1
- package/lib/FormAssociatedMixin-B4Qj-CQN.js +0 -2
- package/lib/FormAssociatedMixin-B4Qj-CQN.js.map +0 -1
- package/lib/FormField-BFaVzUjk.js +0 -2
- package/lib/FormField-BFaVzUjk.js.map +0 -1
- package/lib/NavToggle-DzKbd-El.js +0 -2
- package/lib/NavToggle-DzKbd-El.js.map +0 -1
- package/lib/Popout-CYqn_dZu.js +0 -2
- package/lib/Popout-CYqn_dZu.js.map +0 -1
- package/lib/Sticky-DqnqENYN.js +0 -2
- package/lib/Sticky-DqnqENYN.js.map +0 -1
- package/lib/TextField-B955GOhe.js +0 -2
- package/lib/TextField-B955GOhe.js.map +0 -1
- package/lib/dates-CAAlPKZi.js +0 -2
- package/lib/dates-CAAlPKZi.js.map +0 -1
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
import type { PropertyValues, TemplateResult } from 'lit';
|
|
2
|
+
import { LitElement } from 'lit';
|
|
3
|
+
import '../button/Button.js';
|
|
4
|
+
import '../button-group/ButtonGroup.js';
|
|
5
|
+
import '../input/Input.js';
|
|
6
|
+
import '../popout/Popout.js';
|
|
7
|
+
import '../spinner/Spinner.js';
|
|
8
|
+
import '../visually-hidden/VisuallyHidden.js';
|
|
9
|
+
export { FilterDropdownChangeEvent, FilterDropdownClearEvent, FilterDropdownLoadMoreEvent, FilterDropdownRemoveEvent, FilterDropdownSearchChangeEvent, } from './FilterDropdownEvents.js';
|
|
10
|
+
/** The size of the trigger and popout. */
|
|
11
|
+
export type FilterDropdownSize = 's' | 'm' | 'l';
|
|
12
|
+
/**
|
|
13
|
+
* A flat, selectable option. With `children` it becomes a tree-style option: the
|
|
14
|
+
* parent stays selectable and the children render indented beneath it.
|
|
15
|
+
*/
|
|
16
|
+
export interface FilterDropdownSelectableOption {
|
|
17
|
+
/** The value submitted with `change` and tracked in `value`. */
|
|
18
|
+
value: string;
|
|
19
|
+
/** The human-readable text shown in the list. */
|
|
20
|
+
label: string;
|
|
21
|
+
/** When `true`, the option cannot be selected. */
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
/** Tree-style child options, rendered indented under this option. */
|
|
24
|
+
children?: FilterDropdownSelectableOption[];
|
|
25
|
+
/** Arbitrary data; lets `optionsValueKey`/`optionsLabelKey` overrides work. */
|
|
26
|
+
[key: string]: unknown;
|
|
27
|
+
}
|
|
28
|
+
/** A heading-labelled cluster of options, rendered with a divider. */
|
|
29
|
+
export interface FilterDropdownGroupOption {
|
|
30
|
+
/** The heading shown above the group's options. */
|
|
31
|
+
heading: string;
|
|
32
|
+
/** The options within the group. */
|
|
33
|
+
children: FilterDropdownSelectableOption[];
|
|
34
|
+
/** When `true`, all options within the group cannot be selected. */
|
|
35
|
+
disabled?: boolean;
|
|
36
|
+
}
|
|
37
|
+
/** Any option shape accepted by the dropdown: flat, grouped, or tree. */
|
|
38
|
+
export type FilterDropdownOption = FilterDropdownSelectableOption | FilterDropdownGroupOption;
|
|
39
|
+
declare const FilterDropdown_base: typeof LitElement;
|
|
40
|
+
/**
|
|
41
|
+
* Filter Dropdown is a full-featured filter control: a chip trigger that opens a
|
|
42
|
+
* popout list of options. It owns its selection and tracks `value`, unlike the
|
|
43
|
+
* composition-first [Filter Field](/components/filter-field/) — pass it `options`
|
|
44
|
+
* and listen for `change`. It ports the Provet Cloud filter dropdown.
|
|
45
|
+
*
|
|
46
|
+
* Options come in three shapes: a flat list (`{ value, label }`), groups
|
|
47
|
+
* (`{ heading, children }`) rendered with dividers, and tree-style options
|
|
48
|
+
* (a selectable option with `children`) where the parent stays selectable and the
|
|
49
|
+
* children render indented. Single mode tracks a string value and closes on
|
|
50
|
+
* select; `multiple` tracks an array, shows checkboxes and keeps the popout open.
|
|
51
|
+
*
|
|
52
|
+
* @status draft
|
|
53
|
+
* @category form
|
|
54
|
+
* @lightDom true
|
|
55
|
+
*
|
|
56
|
+
* @fires {FilterDropdownChangeEvent} change - Dispatched when the committed selection changes via user interaction.
|
|
57
|
+
* @fires {FilterDropdownSearchChangeEvent} search-change - Dispatched as the user types when `searchable` (use with `internal-search="false"` for async search).
|
|
58
|
+
* @fires {FilterDropdownClearEvent} clear - Dispatched when the selection is cleared, before `change`.
|
|
59
|
+
* @fires {FilterDropdownRemoveEvent} remove - Dispatched when the filter is removed (only when `removable`).
|
|
60
|
+
* @fires {FilterDropdownLoadMoreEvent} load-more - Dispatched when the list is scrolled near its end (infinite scroll).
|
|
61
|
+
* @fires {NordEvent} open - Dispatched when the popout is opened.
|
|
62
|
+
* @fires {NordEvent} close - Dispatched when the popout is closed.
|
|
63
|
+
*
|
|
64
|
+
* @localization filterIconLabel - Accessible label for the leading filter icon.
|
|
65
|
+
* @localization selectionLabel - The chip prefix shown before the highlighted value (e.g. "Status is").
|
|
66
|
+
* @localization searchLabel - Accessible label for the search input.
|
|
67
|
+
* @localization clearLabel - Accessible label for the clear button.
|
|
68
|
+
* @localization removeLabel - Accessible label for the remove button.
|
|
69
|
+
* @localization selectAll - Label for the select-all row.
|
|
70
|
+
* @localization deselectAll - Label for the select-all row when everything is selected.
|
|
71
|
+
* @localization noResults - Message shown when no options match the search.
|
|
72
|
+
* @localization unknown - Fallback label for a selected value with no matching option.
|
|
73
|
+
* @localization countSuffix - Suffix appended to the first label when several options are selected.
|
|
74
|
+
*
|
|
75
|
+
* @cssprop [--n-filter-dropdown-list-inline-size=250px] - Controls the inline size, or width, of the popout list. Defaults vary by `size`.
|
|
76
|
+
*
|
|
77
|
+
* @parent FilterBar
|
|
78
|
+
*/
|
|
79
|
+
export default class FilterDropdown extends FilterDropdown_base {
|
|
80
|
+
private filterDropdownId;
|
|
81
|
+
private localize;
|
|
82
|
+
private listRef;
|
|
83
|
+
private popout?;
|
|
84
|
+
private triggerButton?;
|
|
85
|
+
private dismiss;
|
|
86
|
+
private activeDescendant;
|
|
87
|
+
private openState;
|
|
88
|
+
/**
|
|
89
|
+
* The label naming what this filter targets, shown on the chip.
|
|
90
|
+
*/
|
|
91
|
+
label: string;
|
|
92
|
+
/**
|
|
93
|
+
* A name identifying what this dropdown filters, for form/identification.
|
|
94
|
+
*/
|
|
95
|
+
name: string;
|
|
96
|
+
/**
|
|
97
|
+
* The icon shown on the trigger.
|
|
98
|
+
*/
|
|
99
|
+
icon: string;
|
|
100
|
+
/**
|
|
101
|
+
* The size of the trigger and popout. Defaults to `s` to match the other
|
|
102
|
+
* filter controls.
|
|
103
|
+
*/
|
|
104
|
+
size: FilterDropdownSize;
|
|
105
|
+
/**
|
|
106
|
+
* The options to show. Either a flat list (`{ value, label }`), groups
|
|
107
|
+
* (`{ heading, children }`), or tree-style options (a selectable option with
|
|
108
|
+
* `children`).
|
|
109
|
+
*/
|
|
110
|
+
options: FilterDropdownOption[];
|
|
111
|
+
/**
|
|
112
|
+
* The key on each option object to read the value from. Defaults to `value`.
|
|
113
|
+
*/
|
|
114
|
+
optionsValueKey: string;
|
|
115
|
+
/**
|
|
116
|
+
* The key on each option object to read the label from. Defaults to `label`.
|
|
117
|
+
*/
|
|
118
|
+
optionsLabelKey: string;
|
|
119
|
+
/**
|
|
120
|
+
* The committed value. A single string in single-select mode, or an array of
|
|
121
|
+
* strings when `multiple`.
|
|
122
|
+
*/
|
|
123
|
+
value: string | string[];
|
|
124
|
+
/**
|
|
125
|
+
* Allows selecting more than one option. Selected options show a checkbox
|
|
126
|
+
* indicator and the popout stays open after each selection.
|
|
127
|
+
*/
|
|
128
|
+
multiple: boolean;
|
|
129
|
+
/**
|
|
130
|
+
* Shows a search input at the top of the popout to filter the options.
|
|
131
|
+
*/
|
|
132
|
+
searchable: boolean;
|
|
133
|
+
/**
|
|
134
|
+
* Whether options are filtered client-side by their label. Defaults to `true`.
|
|
135
|
+
* Set to `false` for async search: the component then emits `search-change` and
|
|
136
|
+
* leaves filtering to the consumer (who updates `options`).
|
|
137
|
+
*/
|
|
138
|
+
internalSearch: boolean;
|
|
139
|
+
/**
|
|
140
|
+
* Shows a "Select all" control at the top of the popout. Only applies with
|
|
141
|
+
* `multiple`.
|
|
142
|
+
*/
|
|
143
|
+
selectAll: boolean;
|
|
144
|
+
/**
|
|
145
|
+
* Shows a clear (✕) button while there is a selection. Pressing it clears the
|
|
146
|
+
* value (firing `clear` then `change`) without removing the dropdown.
|
|
147
|
+
*/
|
|
148
|
+
clearable: boolean;
|
|
149
|
+
/**
|
|
150
|
+
* Whether the whole dropdown can be removed. When `true` the trailing
|
|
151
|
+
* affordance clears the value and fires `remove`; the consumer removes the
|
|
152
|
+
* dropdown from the DOM. Takes precedence over `clearable`.
|
|
153
|
+
*/
|
|
154
|
+
removable: boolean;
|
|
155
|
+
/**
|
|
156
|
+
* Makes the component disabled. This prevents users from being able to
|
|
157
|
+
* interact with it and conveys its inactive state to assistive technologies.
|
|
158
|
+
*/
|
|
159
|
+
disabled: boolean;
|
|
160
|
+
/**
|
|
161
|
+
* Shows a spinner in the popout while asynchronous results are loading. Pair
|
|
162
|
+
* with `internal-search="false"` for async search.
|
|
163
|
+
*/
|
|
164
|
+
loading: boolean;
|
|
165
|
+
/**
|
|
166
|
+
* Whether the popout is open. Set it to open or close the popout
|
|
167
|
+
* programmatically.
|
|
168
|
+
*/
|
|
169
|
+
open: boolean;
|
|
170
|
+
/**
|
|
171
|
+
* Message shown when no options match the search. Defaults to "No results.".
|
|
172
|
+
*/
|
|
173
|
+
noResultsMessage: string;
|
|
174
|
+
/**
|
|
175
|
+
* Fallback label shown for a selected value that has no matching option.
|
|
176
|
+
*/
|
|
177
|
+
labelForUnknown: string;
|
|
178
|
+
/** The current search text. */
|
|
179
|
+
private search;
|
|
180
|
+
/** Set after a keyboard move so the active row is scrolled into view. */
|
|
181
|
+
private scrollActivePending;
|
|
182
|
+
/**
|
|
183
|
+
* Set once a near-end scroll has emitted `load-more`; blocks further emits
|
|
184
|
+
* from the same gesture until the consumer responds (by toggling `loading` or
|
|
185
|
+
* appending to `options`). Cleared in `updated` when either changes.
|
|
186
|
+
*/
|
|
187
|
+
private loadMoreRequested;
|
|
188
|
+
connectedCallback(): void;
|
|
189
|
+
protected createRenderRoot(): this;
|
|
190
|
+
/** Normalises `value` to an array regardless of single/multiple shape. */
|
|
191
|
+
private get valueAsArray();
|
|
192
|
+
/** Whether there is any committed selection. */
|
|
193
|
+
private get isInactive();
|
|
194
|
+
private getOptionValue;
|
|
195
|
+
private getOptionLabel;
|
|
196
|
+
/** Whether any option is a group (has a heading) or a tree (has children). */
|
|
197
|
+
private get hasGroupedOptions();
|
|
198
|
+
/** Lowercased search needle, or empty when not filtering internally. */
|
|
199
|
+
private get needle();
|
|
200
|
+
private matchesSearch;
|
|
201
|
+
/**
|
|
202
|
+
* Flattens grouped/tree options into render sections while preserving visual
|
|
203
|
+
* hierarchy: groups keep their heading; tree children are emitted right after
|
|
204
|
+
* their (still-selectable) parent and marked `indent`. Runs of standalone
|
|
205
|
+
* options are coalesced into one section so no divider appears between them.
|
|
206
|
+
* Applies the internal search filter as it goes.
|
|
207
|
+
*/
|
|
208
|
+
private get sections();
|
|
209
|
+
/** The flat option list in render order, used for keyboard navigation. */
|
|
210
|
+
private get flatOptions();
|
|
211
|
+
/** Every selectable value (skipping disabled options), for select-all. */
|
|
212
|
+
private get allSelectableValues();
|
|
213
|
+
private get isAllSelected();
|
|
214
|
+
/** Resolves a value to its label across flat, grouped and tree options. */
|
|
215
|
+
private labelForValue;
|
|
216
|
+
/** The summary shown on the chip when there is a selection. */
|
|
217
|
+
private get selectionLabel();
|
|
218
|
+
private isSelected;
|
|
219
|
+
/** Open the popout. */
|
|
220
|
+
show(): void;
|
|
221
|
+
/** Close the popout. */
|
|
222
|
+
hide(): void;
|
|
223
|
+
/** Focus the trigger button. */
|
|
224
|
+
focus(options?: FocusOptions): void;
|
|
225
|
+
private handleTriggerClick;
|
|
226
|
+
protected updated(changed: PropertyValues): void;
|
|
227
|
+
private commit;
|
|
228
|
+
private toggle;
|
|
229
|
+
private toggleSelectAll;
|
|
230
|
+
private clear;
|
|
231
|
+
private handleClear;
|
|
232
|
+
private handleRemove;
|
|
233
|
+
private handleSearchInput;
|
|
234
|
+
private handleListScroll;
|
|
235
|
+
private handleKeydown;
|
|
236
|
+
private get listInlineSizeClass();
|
|
237
|
+
private renderIndicator;
|
|
238
|
+
private renderOption;
|
|
239
|
+
private optionId;
|
|
240
|
+
private renderList;
|
|
241
|
+
render(): TemplateResult<1>;
|
|
242
|
+
}
|
|
243
|
+
declare global {
|
|
244
|
+
interface HTMLElementTagNameMap {
|
|
245
|
+
'nord-filter-dropdown': FilterDropdown;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { NordEvent } from '../common/events.js';
|
|
2
|
+
/**
|
|
3
|
+
* Dispatched when the committed selection changes via user interaction (picking
|
|
4
|
+
* an option, toggling a checkbox, select-all, or clearing). Carries the new
|
|
5
|
+
* `value`: a single string in single-select mode, or an array of strings in
|
|
6
|
+
* `multiple` mode.
|
|
7
|
+
*/
|
|
8
|
+
export declare class FilterDropdownChangeEvent extends NordEvent {
|
|
9
|
+
/** The new committed value. */
|
|
10
|
+
readonly value: string | string[];
|
|
11
|
+
static eventName: string;
|
|
12
|
+
constructor(
|
|
13
|
+
/** The new committed value. */
|
|
14
|
+
value: string | string[]);
|
|
15
|
+
/** Convenience accessor mirroring `CustomEvent.detail`. */
|
|
16
|
+
get detail(): string | string[];
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Dispatched as the user types into the search input. Carries the current search
|
|
20
|
+
* text so a consumer running external (async) search can update `options`. Only
|
|
21
|
+
* fired when `searchable` is set.
|
|
22
|
+
*/
|
|
23
|
+
export declare class FilterDropdownSearchChangeEvent extends NordEvent {
|
|
24
|
+
/** The current search text. */
|
|
25
|
+
readonly value: string;
|
|
26
|
+
static eventName: string;
|
|
27
|
+
constructor(
|
|
28
|
+
/** The current search text. */
|
|
29
|
+
value: string);
|
|
30
|
+
/** Convenience accessor mirroring `CustomEvent.detail`. */
|
|
31
|
+
get detail(): string;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Dispatched when the selection is cleared via the clear affordance or `clear()`,
|
|
35
|
+
* before the accompanying `change` event.
|
|
36
|
+
*/
|
|
37
|
+
export declare class FilterDropdownClearEvent extends NordEvent {
|
|
38
|
+
static eventName: string;
|
|
39
|
+
constructor();
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Dispatched when the filter is removed via the remove affordance (only when
|
|
43
|
+
* `removable`). The consumer removes the dropdown from the DOM in the handler.
|
|
44
|
+
* The selection is cleared (firing `change`) before this event.
|
|
45
|
+
*/
|
|
46
|
+
export declare class FilterDropdownRemoveEvent extends NordEvent {
|
|
47
|
+
static eventName: string;
|
|
48
|
+
constructor();
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Dispatched when the option list is scrolled near its end, so a consumer can
|
|
52
|
+
* load the next page of options (infinite scroll).
|
|
53
|
+
*/
|
|
54
|
+
export declare class FilterDropdownLoadMoreEvent extends NordEvent {
|
|
55
|
+
static eventName: string;
|
|
56
|
+
constructor();
|
|
57
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare const filterDropdownLocalization: {
|
|
2
|
+
filterIconLabel: string;
|
|
3
|
+
/** The chip prefix shown before the highlighted value, e.g. "Status is". */
|
|
4
|
+
selectionLabel: (label: string) => string;
|
|
5
|
+
searchLabel: string;
|
|
6
|
+
clearLabel: string;
|
|
7
|
+
removeLabel: string;
|
|
8
|
+
selectAll: string;
|
|
9
|
+
deselectAll: string;
|
|
10
|
+
noResults: string;
|
|
11
|
+
unknown: string;
|
|
12
|
+
countSuffix: (extra: number) => string;
|
|
13
|
+
};
|
|
14
|
+
export default filterDropdownLocalization;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import '../button/Button.js';
|
|
3
|
+
import '../button-group/ButtonGroup.js';
|
|
4
|
+
import '../visually-hidden/VisuallyHidden.js';
|
|
5
|
+
export { FilterFieldClearEvent, FilterFieldRemoveEvent } from './FilterFieldEvents.js';
|
|
6
|
+
declare const FilterField_base: typeof LitElement;
|
|
7
|
+
/**
|
|
8
|
+
* Filter Field is the presentation-only filter **chip**: a joined pill showing a
|
|
9
|
+
* leading icon, the filter's `label`, the active selection summary (`value`) and
|
|
10
|
+
* a clear or remove affordance, dashed while inactive. It is the shared chip used
|
|
11
|
+
* across the filter family and the building block for custom filters.
|
|
12
|
+
*
|
|
13
|
+
* It owns no popout and tracks no value — drop it into a popout-owning control as
|
|
14
|
+
* its `slot="trigger"` (the host opens/positions the popout and sets
|
|
15
|
+
* `aria-controls`/`aria-haspopup`/`aria-expanded` on this element). Show the
|
|
16
|
+
* active selection with `value`, reset it in response to `clear`, and remove the
|
|
17
|
+
* whole field in response to `remove`. Your app owns the active filters and any
|
|
18
|
+
* URL/query state.
|
|
19
|
+
*
|
|
20
|
+
* @status draft
|
|
21
|
+
* @category form
|
|
22
|
+
* @lightDom true
|
|
23
|
+
*
|
|
24
|
+
* @fires {FilterFieldClearEvent} clear - Dispatched when the clear affordance is pressed.
|
|
25
|
+
* @fires {FilterFieldRemoveEvent} remove - Dispatched when the remove affordance is pressed.
|
|
26
|
+
*
|
|
27
|
+
* @localization filterIconLabel - Accessible label for the leading filter icon.
|
|
28
|
+
* @localization selectionLabel - The chip prefix shown before the highlighted value (e.g. "Status is").
|
|
29
|
+
* @localization clearLabel - Accessible label for the clear button.
|
|
30
|
+
* @localization removeLabel - Accessible label for the remove button.
|
|
31
|
+
*
|
|
32
|
+
* @parent FilterBar
|
|
33
|
+
*/
|
|
34
|
+
export default class FilterField extends FilterField_base {
|
|
35
|
+
private localize;
|
|
36
|
+
private triggerButton?;
|
|
37
|
+
private ariaObserver?;
|
|
38
|
+
/** The label naming what this filter targets, shown on the chip. */
|
|
39
|
+
label: string;
|
|
40
|
+
/**
|
|
41
|
+
* A short summary of the active selection (e.g. the selected option's label,
|
|
42
|
+
* or "3 selected"). When set the chip is shown as active and the clear button
|
|
43
|
+
* appears; leave it empty for an inactive filter. The chip does not derive this
|
|
44
|
+
* — set it from your app's state.
|
|
45
|
+
*/
|
|
46
|
+
value: string;
|
|
47
|
+
/**
|
|
48
|
+
* Forces the active (solid) treatment without a `value` summary, for filters
|
|
49
|
+
* that are on but have nothing short to show.
|
|
50
|
+
*/
|
|
51
|
+
active: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Shows a clear (✕) button while the chip is active. Defaults to `true`. Has no
|
|
54
|
+
* effect when `removable` is set.
|
|
55
|
+
*/
|
|
56
|
+
clearable: boolean;
|
|
57
|
+
/** The leading icon shown on the chip. */
|
|
58
|
+
icon: string;
|
|
59
|
+
/** Identifies the filter (e.g. for your app's active-filter state). */
|
|
60
|
+
name: string;
|
|
61
|
+
/**
|
|
62
|
+
* Whether the whole field can be removed. When `true` the trailing affordance
|
|
63
|
+
* is a remove button that fires `remove`; otherwise it is a clear button (shown
|
|
64
|
+
* only when there is a value) that fires `clear`.
|
|
65
|
+
*/
|
|
66
|
+
removable: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Makes the component disabled. This prevents users from being able to
|
|
69
|
+
* interact with it and conveys its inactive state to assistive technologies.
|
|
70
|
+
*/
|
|
71
|
+
disabled: boolean;
|
|
72
|
+
/** The size of the chip controls. */
|
|
73
|
+
size: 's' | 'm' | 'l';
|
|
74
|
+
connectedCallback(): void;
|
|
75
|
+
disconnectedCallback(): void;
|
|
76
|
+
protected createRenderRoot(): this;
|
|
77
|
+
protected updated(): void;
|
|
78
|
+
private forwardAria;
|
|
79
|
+
/** Whether the filter currently has an active selection. */
|
|
80
|
+
private get isActive();
|
|
81
|
+
private handleClear;
|
|
82
|
+
private handleRemove;
|
|
83
|
+
render(): import("lit").TemplateResult<1>;
|
|
84
|
+
}
|
|
85
|
+
declare global {
|
|
86
|
+
interface HTMLElementTagNameMap {
|
|
87
|
+
'nord-filter-field': FilterField;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { NordEvent } from '../common/events.js';
|
|
2
|
+
/**
|
|
3
|
+
* Dispatched when the filter's value is cleared via the clear affordance. The
|
|
4
|
+
* field holds no value itself, so the consumer resets the composed control (and
|
|
5
|
+
* any active-filter/URL state) in the handler.
|
|
6
|
+
*/
|
|
7
|
+
export declare class FilterFieldClearEvent extends NordEvent {
|
|
8
|
+
static eventName: string;
|
|
9
|
+
constructor();
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Dispatched when the filter is removed via the remove affordance. The consumer
|
|
13
|
+
* removes the field from the bar (and clears its filter) in the handler.
|
|
14
|
+
*/
|
|
15
|
+
export declare class FilterFieldRemoveEvent extends NordEvent {
|
|
16
|
+
static eventName: string;
|
|
17
|
+
constructor();
|
|
18
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
declare const filterFieldLocalization: {
|
|
2
|
+
filterIconLabel: string;
|
|
3
|
+
/** The chip prefix shown before the highlighted value, e.g. "Status is". */
|
|
4
|
+
selectionLabel: (label: string) => string;
|
|
5
|
+
clearLabel: string;
|
|
6
|
+
removeLabel: string;
|
|
7
|
+
};
|
|
8
|
+
export default filterFieldLocalization;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import type { PropertyValues } from 'lit';
|
|
2
|
+
import { LitElement } from 'lit';
|
|
3
|
+
import '../button/Button.js';
|
|
4
|
+
import '../popout/Popout.js';
|
|
5
|
+
declare const FilterInput_base: (new (...args: any[]) => import("../common/mixins/SizeMixin.js").SizeMixinInterface) & (new (...args: any[]) => import("../common/mixins/FormAssociatedMixin.js").FormAssociatedMixinInterface) & (new (...args: any[]) => import("../common/mixins/ReadonlyMixin.js").ReadonlyMixinInterface) & (new (...args: any[]) => import("../common/mixins/InputMixin.js").InputMixinInterface) & (new (...args: any[]) => import("../common/mixins/FocusableMixin.js").FocusableMixinInterface) & typeof LitElement;
|
|
6
|
+
/**
|
|
7
|
+
* Filter Input is a compact search/text field for filtering a collection. It
|
|
8
|
+
* replaces the small ad-hoc search inputs that sit in toolbars and table
|
|
9
|
+
* headers. By default it renders inline as a small search field with a leading
|
|
10
|
+
* search icon; set `mode="chip"` to collapse it behind a chip button that opens
|
|
11
|
+
* the input in a popout, which is handy in a crowded [Filter Bar](/components/filter-bar/).
|
|
12
|
+
*
|
|
13
|
+
* It emits intent only: `input` as the user types and `change` when the value is
|
|
14
|
+
* committed. Your app owns the active filters and any URL/query state — read the
|
|
15
|
+
* value from the event target (or bind `value`) and filter accordingly.
|
|
16
|
+
*
|
|
17
|
+
* It is a control only, like [Combobox](/components/combobox/): compose it inside
|
|
18
|
+
* a [Field](/components/field/) for a visible label, or set `label` for an
|
|
19
|
+
* accessible name when used standalone.
|
|
20
|
+
*
|
|
21
|
+
* @status draft
|
|
22
|
+
* @category form
|
|
23
|
+
* @lightDom true
|
|
24
|
+
*
|
|
25
|
+
* @fires {NordEvent} input - Dispatched as the user types into the input.
|
|
26
|
+
* @fires {NordEvent} change - Dispatched when the value is committed.
|
|
27
|
+
* @fires {NordEvent} open - Dispatched when the chip-mode popout is opened.
|
|
28
|
+
* @fires {NordEvent} close - Dispatched when the chip-mode popout is closed.
|
|
29
|
+
*
|
|
30
|
+
* @slot start - Leading icon/content; defaults to a search icon.
|
|
31
|
+
* @slot end - Trailing icon/content before the clear button.
|
|
32
|
+
*
|
|
33
|
+
* @localization searchLabel - Default accessible label for the input when no `label` is set.
|
|
34
|
+
* @localization clearLabel - Accessible label for the clear button.
|
|
35
|
+
*
|
|
36
|
+
* @cssprop [--n-filter-input-inline-size] - Controls the inline size, or width, of the inline input.
|
|
37
|
+
*
|
|
38
|
+
* @parent FilterBar
|
|
39
|
+
*/
|
|
40
|
+
export default class FilterInput extends FilterInput_base {
|
|
41
|
+
private filterInputId;
|
|
42
|
+
private localize;
|
|
43
|
+
private popout?;
|
|
44
|
+
private startZone?;
|
|
45
|
+
private endZone?;
|
|
46
|
+
private slotObserver?;
|
|
47
|
+
private dismiss;
|
|
48
|
+
private openState;
|
|
49
|
+
/**
|
|
50
|
+
* How the input is presented.
|
|
51
|
+
*
|
|
52
|
+
* - `inline` (default) renders the search field directly.
|
|
53
|
+
* - `chip` collapses the field behind a chip button that opens a popout
|
|
54
|
+
* containing the input.
|
|
55
|
+
*/
|
|
56
|
+
mode: 'inline' | 'chip';
|
|
57
|
+
/**
|
|
58
|
+
* Whether the chip-mode popout is open. Only meaningful with `mode="chip"`.
|
|
59
|
+
*/
|
|
60
|
+
open: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* The size of the search control. Defaults to `s` to match the other filter
|
|
63
|
+
* controls in a compact filter bar; set `m` or `l` to enlarge it.
|
|
64
|
+
*/
|
|
65
|
+
size: 's' | 'm' | 'l';
|
|
66
|
+
/**
|
|
67
|
+
* Whether to show a clear (✕) button while there is a value. Clearing resets
|
|
68
|
+
* the value to `''`, then fires `input` and `change`.
|
|
69
|
+
*/
|
|
70
|
+
clearable: boolean;
|
|
71
|
+
connectedCallback(): void;
|
|
72
|
+
disconnectedCallback(): void;
|
|
73
|
+
protected createRenderRoot(): HTMLDivElement | this;
|
|
74
|
+
/**
|
|
75
|
+
* Relocates the host's `slot="start"`/`slot="end"` children into the matching
|
|
76
|
+
* landing zone inside the control. Only direct host children are considered,
|
|
77
|
+
* and a child already sitting in its zone is left untouched, so repeated
|
|
78
|
+
* updates are idempotent and don't disturb focus or pointer state.
|
|
79
|
+
*/
|
|
80
|
+
private relocateSlots;
|
|
81
|
+
protected updated(changed: PropertyValues): void;
|
|
82
|
+
/**
|
|
83
|
+
* The accessible name for the input: the enclosing Field's label, the host
|
|
84
|
+
* `aria-label`, the `label` prop, or the default term.
|
|
85
|
+
*/
|
|
86
|
+
private get inputAccessibleName();
|
|
87
|
+
/** Open the chip popout. */
|
|
88
|
+
show(): void;
|
|
89
|
+
/** Close the chip popout. */
|
|
90
|
+
hide(): void;
|
|
91
|
+
private handleTriggerClick;
|
|
92
|
+
private handleClear;
|
|
93
|
+
/** The search field itself, shared by both modes. */
|
|
94
|
+
private renderInput;
|
|
95
|
+
render(): import("lit").TemplateResult<1>;
|
|
96
|
+
}
|
|
97
|
+
declare global {
|
|
98
|
+
interface HTMLElementTagNameMap {
|
|
99
|
+
'nord-filter-input': FilterInput;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
export {};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import '../button/Button.js';
|
|
3
|
+
declare const FilterResetButton_base: typeof LitElement;
|
|
4
|
+
/**
|
|
5
|
+
* Filter Reset Button clears every active filter at once. It is a thin,
|
|
6
|
+
* intent-only control: it renders a plain button and dispatches a `reset` event
|
|
7
|
+
* when pressed. Your app owns the active filters and is responsible for clearing
|
|
8
|
+
* them (and any URL/query state) in the handler — the button holds no state of
|
|
9
|
+
* its own.
|
|
10
|
+
*
|
|
11
|
+
* Disable it while there is nothing to reset by binding `disabled` to whether any
|
|
12
|
+
* filter is active (e.g. `?disabled=${!hasFilters}`). Mirrors the Provet Cloud
|
|
13
|
+
* filter reset button.
|
|
14
|
+
*
|
|
15
|
+
* @status draft
|
|
16
|
+
* @category form
|
|
17
|
+
* @lightDom true
|
|
18
|
+
*
|
|
19
|
+
* @fires {NordEvent} reset - Dispatched when the button is pressed to clear all active filters.
|
|
20
|
+
*
|
|
21
|
+
* @localization label - The text label for the reset button.
|
|
22
|
+
*
|
|
23
|
+
* @cssprop [--n-filter-reset-button-color=var(--n-color-text-highlight)] - Controls the text and icon color while the button is enabled.
|
|
24
|
+
*
|
|
25
|
+
* @parent FilterBar
|
|
26
|
+
*/
|
|
27
|
+
export default class FilterResetButton extends FilterResetButton_base {
|
|
28
|
+
private localize;
|
|
29
|
+
/**
|
|
30
|
+
* Makes the component disabled. This prevents users from being able to
|
|
31
|
+
* interact with it and conveys its inactive state to assistive technologies.
|
|
32
|
+
* Bind it to whether any filter is active so the control is only enabled when
|
|
33
|
+
* there is something to reset.
|
|
34
|
+
*/
|
|
35
|
+
disabled: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* The size of the button.
|
|
38
|
+
*/
|
|
39
|
+
size: 's' | 'm' | 'l';
|
|
40
|
+
connectedCallback(): void;
|
|
41
|
+
protected createRenderRoot(): this;
|
|
42
|
+
private handleClick;
|
|
43
|
+
render(): import("lit").TemplateResult<1>;
|
|
44
|
+
}
|
|
45
|
+
declare global {
|
|
46
|
+
interface HTMLElementTagNameMap {
|
|
47
|
+
'nord-filter-reset-button': FilterResetButton;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
export {};
|