@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,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The API a [Combobox](/components/combobox/) shares with its declarative
|
|
3
|
+
* `<nord-combobox-option>` / `<nord-combobox-group>` children so they can
|
|
4
|
+
* register themselves as options (provide/inject), instead of the combobox
|
|
5
|
+
* polling the DOM.
|
|
6
|
+
*/
|
|
7
|
+
export interface ComboboxRegistry {
|
|
8
|
+
/** Register an option element as a selectable option. */
|
|
9
|
+
add: (option: Element) => void;
|
|
10
|
+
/** Remove a previously-registered option element. */
|
|
11
|
+
remove: (option: Element) => void;
|
|
12
|
+
/** Re-read the registered options (after an attribute/content/group change). */
|
|
13
|
+
notify: () => void;
|
|
14
|
+
}
|
|
15
|
+
/** Context the combobox provides to its option/group children. */
|
|
16
|
+
export declare const comboboxRegistryContext: {
|
|
17
|
+
__context__: ComboboxRegistry | undefined;
|
|
18
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { ReactiveControllerHost } from 'lit';
|
|
2
|
+
export interface ActiveDescendantOptions {
|
|
3
|
+
/** The number of navigable rows. */
|
|
4
|
+
count: () => number;
|
|
5
|
+
/** Whether the row at `index` can be activated (skip disabled rows). */
|
|
6
|
+
isEnabled: (index: number) => boolean;
|
|
7
|
+
/** Wrap at the ends. Defaults to `true`. */
|
|
8
|
+
loop?: () => boolean;
|
|
9
|
+
/** The DOM id of the row at `index`, used for `aria-activedescendant`. */
|
|
10
|
+
optionId?: (index: number) => string | undefined;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Tracks the active row of a virtual-focus listbox (combobox / filter dropdown):
|
|
14
|
+
* the focus stays on the input/trigger while an `activeIndex` roams the rows and
|
|
15
|
+
* is surfaced as `aria-activedescendant`. Centralises the `nextEnabledIndex` /
|
|
16
|
+
* `move` / wrap math the combobox and filter-dropdown previously duplicated.
|
|
17
|
+
*/
|
|
18
|
+
export declare class ActiveDescendantController {
|
|
19
|
+
private host;
|
|
20
|
+
private options;
|
|
21
|
+
private _activeIndex;
|
|
22
|
+
constructor(host: ReactiveControllerHost & HTMLElement, options: ActiveDescendantOptions);
|
|
23
|
+
/** The active row index, or `-1` when nothing is active. */
|
|
24
|
+
get activeIndex(): number;
|
|
25
|
+
/** The active row's id for `aria-activedescendant`, or `undefined`. */
|
|
26
|
+
get activeDescendant(): string | undefined;
|
|
27
|
+
/** Set the active index, requesting a host update when it changes. */
|
|
28
|
+
setActiveIndex(index: number): void;
|
|
29
|
+
/** Clear the active row. */
|
|
30
|
+
reset(): void;
|
|
31
|
+
/**
|
|
32
|
+
* The next enabled row from `from` stepping by `dir`, wrapping (when looping)
|
|
33
|
+
* and skipping disabled rows. Returns `-1` if no row is enabled.
|
|
34
|
+
*/
|
|
35
|
+
nextEnabledIndex(from: number, dir: 1 | -1): number;
|
|
36
|
+
/**
|
|
37
|
+
* Move the active row by `delta` (its sign is the direction). Starts from the
|
|
38
|
+
* matching end when nothing is active. Returns `true` if it moved.
|
|
39
|
+
*/
|
|
40
|
+
move(delta: number): boolean;
|
|
41
|
+
/** Activate the first enabled row (Home). Returns `true` if one was found. */
|
|
42
|
+
first(): boolean;
|
|
43
|
+
/** Activate the last enabled row (End). Returns `true` if one was found. */
|
|
44
|
+
last(): boolean;
|
|
45
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { ReactiveController, ReactiveControllerHost } from 'lit';
|
|
2
|
+
export interface CollapseOptions {
|
|
3
|
+
/** Reads the host's open state; diffed after every host update. */
|
|
4
|
+
open: () => boolean;
|
|
5
|
+
/**
|
|
6
|
+
* The CSS custom property set to the measured content height during the
|
|
7
|
+
* animation (e.g. `--n-accordion-panel-height`), for consumers to read.
|
|
8
|
+
*/
|
|
9
|
+
heightVar: string;
|
|
10
|
+
/** The element to animate. Defaults to the host. */
|
|
11
|
+
target?: () => HTMLElement;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Animates a host's `block-size` between `0` and its measured content height as
|
|
15
|
+
* its `open` state toggles — the shared engine behind the accordion and
|
|
16
|
+
* collapsible panels. It measures the live rendered height (so rapid re-toggles
|
|
17
|
+
* continue smoothly rather than snapping), respects reduced motion, and cleans
|
|
18
|
+
* up on disconnect.
|
|
19
|
+
*
|
|
20
|
+
* It owns a {@link TransitionStatusController} (+ a {@link StateAttributesController})
|
|
21
|
+
* so the host also gains `data-open` / `data-closed` / `data-starting-style` /
|
|
22
|
+
* `data-ending-style` state hooks, driven off the same `block-size` transition.
|
|
23
|
+
*/
|
|
24
|
+
export declare class CollapseController implements ReactiveController {
|
|
25
|
+
private host;
|
|
26
|
+
private options;
|
|
27
|
+
private _animating;
|
|
28
|
+
private previousOpen?;
|
|
29
|
+
/** Exposes the transition status (and reflects the state attributes). */
|
|
30
|
+
private transitionStatus;
|
|
31
|
+
private stateAttributes;
|
|
32
|
+
constructor(host: ReactiveControllerHost & HTMLElement, options: CollapseOptions);
|
|
33
|
+
/** Whether a `block-size` transition is currently running. */
|
|
34
|
+
get animating(): boolean;
|
|
35
|
+
get status(): import("./TransitionStatusController.js").TransitionStatus;
|
|
36
|
+
private get target();
|
|
37
|
+
hostConnected(): void;
|
|
38
|
+
hostDisconnected(): void;
|
|
39
|
+
hostUpdated(): void;
|
|
40
|
+
/**
|
|
41
|
+
* Measure the height to animate from. While a transition is in flight the box
|
|
42
|
+
* is mid-collapse/expand, so `scrollHeight` is clipped — use the live rendered
|
|
43
|
+
* height instead so we never snap to a stale full/zero height.
|
|
44
|
+
*/
|
|
45
|
+
private currentHeight;
|
|
46
|
+
private animateOpen;
|
|
47
|
+
private animateClose;
|
|
48
|
+
private handleTransitionEnd;
|
|
49
|
+
private handleTransitionCancel;
|
|
50
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ReactiveController, ReactiveControllerHost } from 'lit';
|
|
2
|
+
export interface FocusableWhenDisabledOptions {
|
|
3
|
+
/** Reads the host's disabled state; re-read after every host update. */
|
|
4
|
+
disabled: () => boolean;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Keeps an interactive host focusable while disabled, mirroring Base UI's
|
|
8
|
+
* accessible-disabled pattern: a disabled control stays in the tab order
|
|
9
|
+
* (`tabindex="0"`) with `aria-disabled="true"`, rather than being removed from
|
|
10
|
+
* it (`tabindex="-1"`), so assistive-technology users can still discover it.
|
|
11
|
+
* Activation must be blocked by the host (it should no-op its click/key handlers
|
|
12
|
+
* while disabled).
|
|
13
|
+
*
|
|
14
|
+
* The host stays the focusable element (these are light-DOM `role="button"`
|
|
15
|
+
* elements that can't delegate focus into a shadow `<button>`).
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* private focusable = new FocusableWhenDisabledController(this, { disabled: () => this.disabled })
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export declare class FocusableWhenDisabledController implements ReactiveController {
|
|
23
|
+
private host;
|
|
24
|
+
private options;
|
|
25
|
+
constructor(host: ReactiveControllerHost & HTMLElement, options: FocusableWhenDisabledOptions);
|
|
26
|
+
hostConnected(): void;
|
|
27
|
+
hostUpdated(): void;
|
|
28
|
+
private sync;
|
|
29
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { ReactiveController, ReactiveControllerHost } from 'lit';
|
|
2
|
+
export interface PopoutLike {
|
|
3
|
+
show: () => Promise<unknown>;
|
|
4
|
+
hide: (moveFocusToButton?: boolean) => Promise<unknown>;
|
|
5
|
+
}
|
|
6
|
+
export interface OpenStateOptions {
|
|
7
|
+
/** Reads the host's `open` state. */
|
|
8
|
+
isOpen: () => boolean;
|
|
9
|
+
/** Writes the host's `open` state. */
|
|
10
|
+
setOpen: (open: boolean) => void;
|
|
11
|
+
/** The `nord-popout` to drive (queried lazily; may be undefined before render). */
|
|
12
|
+
popout: () => PopoutLike | undefined;
|
|
13
|
+
/** True when the host can't be opened (disabled and/or read-only). */
|
|
14
|
+
isInert?: () => boolean;
|
|
15
|
+
/** Side effects to run when the popout has opened (seed state, reset scroll…). */
|
|
16
|
+
onOpen?: () => void;
|
|
17
|
+
/** Side effects to run when the popout has closed (clear search…). */
|
|
18
|
+
onClose?: () => void;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Coordinates a host's `open` property with its `nord-popout` overlay, so all
|
|
22
|
+
* the popout-backed components open/close consistently. Setting `open` drives
|
|
23
|
+
* `popout.show()`/`hide()` (the popout only fires events / manages the top layer
|
|
24
|
+
* through those, not via an attribute); the popout's own `open`/`close` events
|
|
25
|
+
* sync `open` back and the host emits exactly one canonical `open`/`close`.
|
|
26
|
+
* Opening is rejected while the host is inert (disabled / read-only).
|
|
27
|
+
*
|
|
28
|
+
* Wire the popout's events to {@link onPopoutOpen}/{@link onPopoutClose} in the
|
|
29
|
+
* template, and call {@link show}/{@link hide}/{@link toggle} from triggers.
|
|
30
|
+
*/
|
|
31
|
+
export declare class OpenStateController implements ReactiveController {
|
|
32
|
+
private host;
|
|
33
|
+
private options;
|
|
34
|
+
private previousOpen?;
|
|
35
|
+
constructor(host: ReactiveControllerHost & HTMLElement, options: OpenStateOptions);
|
|
36
|
+
hostUpdate(): void;
|
|
37
|
+
hostUpdated(): void;
|
|
38
|
+
/** Open the popout programmatically (no-op when already open or inert). */
|
|
39
|
+
show(): void;
|
|
40
|
+
/** Close the popout programmatically (no-op when already closed). */
|
|
41
|
+
hide(): void;
|
|
42
|
+
/** Toggle the popout (respecting the inert guard). */
|
|
43
|
+
toggle(): void;
|
|
44
|
+
/**
|
|
45
|
+
* Bind to the popout's `@open`. The canonical `open` is property-driven (see
|
|
46
|
+
* `hostUpdated`) — the host opens via {@link show}/{@link toggle} from its
|
|
47
|
+
* trigger — so this only swallows the popout's own bubbling event. (It must
|
|
48
|
+
* NOT set `open` here: the popout's `open` fires asynchronously and could
|
|
49
|
+
* otherwise re-open after a quick close.)
|
|
50
|
+
*/
|
|
51
|
+
onPopoutOpen: (e: Event) => void;
|
|
52
|
+
/**
|
|
53
|
+
* Bind to the popout's `@close`: swallow the popout's own event and sync
|
|
54
|
+
* `open` so the host (via `hostUpdated`) emits the one canonical `close` when
|
|
55
|
+
* the popout closes itself (e.g. light dismiss).
|
|
56
|
+
*/
|
|
57
|
+
onPopoutClose: (e: Event) => void;
|
|
58
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { ReactiveControllerHost } from 'lit';
|
|
2
|
+
export type Orientation = 'vertical' | 'horizontal' | 'both';
|
|
3
|
+
export interface RovingFocusOptions {
|
|
4
|
+
/** The focusable items, in DOM order. */
|
|
5
|
+
items: () => HTMLElement[];
|
|
6
|
+
/** Which arrow keys move focus. Defaults to `vertical`. */
|
|
7
|
+
orientation?: () => Orientation;
|
|
8
|
+
/** Wrap focus at the ends. Defaults to `true`. */
|
|
9
|
+
loop?: () => boolean;
|
|
10
|
+
/** Flips the horizontal arrow direction. Defaults to `false`. */
|
|
11
|
+
isRTL?: () => boolean;
|
|
12
|
+
/** Whether an item can receive focus (skip disabled ones). Defaults to all. */
|
|
13
|
+
isFocusable?: (item: HTMLElement) => boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Manages arrow-key focus movement across a set of items (the shared mechanics
|
|
17
|
+
* behind Base UI's `Composite`). The host calls {@link handleKeydown} from its
|
|
18
|
+
* own `keydown`; the controller moves real DOM focus to the next/previous
|
|
19
|
+
* focusable item, honouring orientation, looping, RTL and Home/End.
|
|
20
|
+
*/
|
|
21
|
+
export declare class RovingFocusController {
|
|
22
|
+
private host;
|
|
23
|
+
private options;
|
|
24
|
+
constructor(host: ReactiveControllerHost & HTMLElement, options: RovingFocusOptions);
|
|
25
|
+
/** Handle a navigation keydown. Returns `true` if it moved focus. */
|
|
26
|
+
handleKeydown(event: KeyboardEvent): boolean;
|
|
27
|
+
/** Focus the first focusable item. */
|
|
28
|
+
focusFirst(): void;
|
|
29
|
+
/** Focus the last focusable item. */
|
|
30
|
+
focusLast(): void;
|
|
31
|
+
private get loop();
|
|
32
|
+
private isFocusable;
|
|
33
|
+
private move;
|
|
34
|
+
/**
|
|
35
|
+
* The next focusable item from `start` (checked first), stepping by `direction`
|
|
36
|
+
* and skipping non-focusable items, wrapping at the ends when `loop`. Returns
|
|
37
|
+
* `-1` if none is found.
|
|
38
|
+
*/
|
|
39
|
+
private nextFocusable;
|
|
40
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { ReactiveController, ReactiveControllerHost } from 'lit';
|
|
2
|
+
/**
|
|
3
|
+
* Maps a single state value to the `data-*` attributes it should set, or `null`
|
|
4
|
+
* to set none. Mirrors Base UI's per-key entries in `stateAttributesMapping`
|
|
5
|
+
* (e.g. a tri-state `valid` that resolves to `data-valid` or `data-invalid`).
|
|
6
|
+
*/
|
|
7
|
+
export type StateAttributeMapper = (value: unknown) => Record<string, string> | null;
|
|
8
|
+
export type StateAttributesMapping = Record<string, StateAttributeMapper>;
|
|
9
|
+
export interface StateAttributesOptions {
|
|
10
|
+
/**
|
|
11
|
+
* Track focus-within on the host and reflect it as `data-focused`. The host
|
|
12
|
+
* keeps the attribute while it or any descendant (including across a shadow
|
|
13
|
+
* boundary) holds focus. Saves each component from wiring its own
|
|
14
|
+
* focusin/focusout listeners.
|
|
15
|
+
*/
|
|
16
|
+
trackFocus?: boolean;
|
|
17
|
+
/** Custom per-key mapping; keys not listed fall back to the boolean default. */
|
|
18
|
+
mapping?: StateAttributesMapping;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Reflects a host's state onto `data-*` attributes after every update — the Lit
|
|
22
|
+
* equivalent of Base UI's `stateAttributesMapping` applied by `useRenderElement`.
|
|
23
|
+
* Each state key toggles `data-<key>` by default; pass `mapping` to customise
|
|
24
|
+
* specific keys. With `trackFocus`, it also tracks focus-within and reflects
|
|
25
|
+
* `data-focused`. The controller only ever touches the attributes it sets itself,
|
|
26
|
+
* so it never clobbers consumer- or Lit-managed ones.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```ts
|
|
30
|
+
* // data-invalid from a property, data-focused tracked automatically
|
|
31
|
+
* new StateAttributesController(this, () => ({ invalid: this.invalid }), { trackFocus: true })
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
export declare class StateAttributesController implements ReactiveController {
|
|
35
|
+
private host;
|
|
36
|
+
private getState;
|
|
37
|
+
private options;
|
|
38
|
+
private owned;
|
|
39
|
+
private hasFocus;
|
|
40
|
+
constructor(host: ReactiveControllerHost & HTMLElement, getState?: () => Record<string, unknown>, options?: StateAttributesOptions);
|
|
41
|
+
hostConnected(): void;
|
|
42
|
+
hostDisconnected(): void;
|
|
43
|
+
hostUpdated(): void;
|
|
44
|
+
private handleFocusIn;
|
|
45
|
+
private handleFocusOut;
|
|
46
|
+
private apply;
|
|
47
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { ReactiveController, ReactiveControllerHost } from 'lit';
|
|
2
|
+
/**
|
|
3
|
+
* The lifecycle of an enter/leave transition.
|
|
4
|
+
* - `closed` / `open` — settled states.
|
|
5
|
+
* - `initial` — the first frame of an enter transition (the "from" styles are
|
|
6
|
+
* applied; removing them on the next frame commits the transition).
|
|
7
|
+
* - `ending` — a leave transition is running.
|
|
8
|
+
*/
|
|
9
|
+
export type TransitionStatus = 'closed' | 'initial' | 'open' | 'ending';
|
|
10
|
+
export interface TransitionStatusOptions {
|
|
11
|
+
/** Reads the host's logical open state; diffed after every host update. */
|
|
12
|
+
open: () => boolean;
|
|
13
|
+
/** The element carrying the CSS transition. Defaults to the host. */
|
|
14
|
+
target?: () => HTMLElement;
|
|
15
|
+
/** Called once a completed enter transition settles to `open`. */
|
|
16
|
+
onOpened?: () => void;
|
|
17
|
+
/** Called once a completed leave transition settles to `closed`. */
|
|
18
|
+
onClosed?: () => void;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Tracks the enter/leave transition status of a host, mirroring Base UI's
|
|
22
|
+
* `useTransitionStatus`. It does not animate or touch the DOM itself — it
|
|
23
|
+
* exposes a `status` and a `state` object (intended to be reflected to
|
|
24
|
+
* `data-open` / `data-closed` / `data-starting-style` / `data-ending-style` via
|
|
25
|
+
* a {@link StateAttributesController}). Reduced motion / SSR skip the
|
|
26
|
+
* intermediate frames and settle synchronously.
|
|
27
|
+
*/
|
|
28
|
+
export declare class TransitionStatusController implements ReactiveController {
|
|
29
|
+
private host;
|
|
30
|
+
private options;
|
|
31
|
+
private _status;
|
|
32
|
+
private previousOpen?;
|
|
33
|
+
private rafId;
|
|
34
|
+
/** Bumped on every enter/leave so a stale pending settle is ignored. */
|
|
35
|
+
private token;
|
|
36
|
+
constructor(host: ReactiveControllerHost & HTMLElement, options: TransitionStatusOptions);
|
|
37
|
+
/** The current transition status. */
|
|
38
|
+
get status(): TransitionStatus;
|
|
39
|
+
/** Whether an enter or leave transition is currently running. */
|
|
40
|
+
get transitioning(): boolean;
|
|
41
|
+
/** The state object to reflect as `data-*` style hooks. */
|
|
42
|
+
get state(): Record<string, boolean>;
|
|
43
|
+
hostUpdated(): void;
|
|
44
|
+
hostDisconnected(): void;
|
|
45
|
+
private enter;
|
|
46
|
+
private leave;
|
|
47
|
+
private cancelRaf;
|
|
48
|
+
}
|
|
@@ -36,6 +36,19 @@ export declare function startOfMonth(date: Date): Date;
|
|
|
36
36
|
export declare function endOfMonth(date: Date): Date;
|
|
37
37
|
export declare function setMonth(date: Date, month: number): Date;
|
|
38
38
|
export declare function setYear(date: Date, year: number): Date;
|
|
39
|
+
export declare function startOfYear(date: Date): Date;
|
|
40
|
+
export declare function endOfYear(date: Date): Date;
|
|
41
|
+
/** The calendar quarter (1–4) a date falls in. */
|
|
42
|
+
export declare function getQuarter(date: Date): number;
|
|
43
|
+
export declare function startOfQuarter(date: Date): Date;
|
|
44
|
+
export declare function endOfQuarter(date: Date): Date;
|
|
45
|
+
/** The inclusive `[start, end]` of quarter `quarter` (1–4) in calendar `year`. */
|
|
46
|
+
export declare function getQuarterRange(quarter: number, year: number): [Date, Date];
|
|
47
|
+
/**
|
|
48
|
+
* Whether quarter `quarter` (1–4) of the current year (relative to `today`) is
|
|
49
|
+
* fully in the past — used to hide not-yet-started current-year quarter presets.
|
|
50
|
+
*/
|
|
51
|
+
export declare function isQuarterCompleted(quarter: number, today: Date): boolean;
|
|
39
52
|
/**
|
|
40
53
|
* Ensures date is within range, returns min or max if out of bounds
|
|
41
54
|
*/
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { CSSResult } from 'lit';
|
|
2
|
+
/**
|
|
3
|
+
* Injects a stylesheet for a light-DOM custom element into its nearest root
|
|
4
|
+
* (the document `<head>` or the enclosing shadow root).
|
|
5
|
+
*
|
|
6
|
+
* Light-DOM components can't scope styles with `:host`/shadow boundaries, so we
|
|
7
|
+
* render a single `<style data-component="tag-name">` element per tag, per root,
|
|
8
|
+
* and rely on the tag name as the top-level selector. Subsequent instances of
|
|
9
|
+
* the same tag in the same root reuse the existing stylesheet.
|
|
10
|
+
*
|
|
11
|
+
* Pass `key` to share one stylesheet across several tags (e.g. a stylesheet with
|
|
12
|
+
* combined selectors): the first caller injects it under that key and later
|
|
13
|
+
* callers (of any tag) reuse it. Defaults to the host's tag name.
|
|
14
|
+
*
|
|
15
|
+
* Mirrors the original pattern in `Table.ts`.
|
|
16
|
+
*/
|
|
17
|
+
export declare function injectLightDomStyles(host: HTMLElement, styles: CSSResult, key?: string): void;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { LitElement, TemplateResult } from 'lit';
|
|
2
|
+
import { nothing } from 'lit';
|
|
3
|
+
import { SlotController } from '../controllers/SlotController.js';
|
|
4
|
+
import '../../visually-hidden/VisuallyHidden.js';
|
|
5
|
+
type Constructor<T = Record<string, unknown>> = new (...args: any[]) => T;
|
|
6
|
+
export declare class FieldControlMixinInterface {
|
|
7
|
+
label: string;
|
|
8
|
+
hint?: string;
|
|
9
|
+
hintBelow: boolean;
|
|
10
|
+
hideLabel: boolean;
|
|
11
|
+
error?: string;
|
|
12
|
+
required: boolean;
|
|
13
|
+
hideRequired: boolean;
|
|
14
|
+
protected inputId: string;
|
|
15
|
+
protected errorId: string;
|
|
16
|
+
protected hintId: string;
|
|
17
|
+
protected labelSlot: SlotController;
|
|
18
|
+
protected hintSlot: SlotController;
|
|
19
|
+
protected errorSlot: SlotController;
|
|
20
|
+
/** True while the control is inside a `<nord-field>` (reactive). */
|
|
21
|
+
readonly insideField: boolean;
|
|
22
|
+
/** `disabled` merged with the field's disabled (either activates it). */
|
|
23
|
+
protected get effectiveDisabled(): boolean;
|
|
24
|
+
/** `invalid` merged from the field and the control's own invalid state. */
|
|
25
|
+
protected get effectiveInvalid(): boolean;
|
|
26
|
+
/** The control's own invalid state. Defaults to `hasError`; override on controls with an `invalid` prop. */
|
|
27
|
+
protected get ownInvalid(): boolean;
|
|
28
|
+
protected get hasHint(): boolean;
|
|
29
|
+
protected get hasError(): boolean;
|
|
30
|
+
protected get isHintBelow(): boolean;
|
|
31
|
+
/** When true, a label click focuses the control instead of activating it. */
|
|
32
|
+
protected get labelFocusOnly(): boolean;
|
|
33
|
+
/** `aria-label` for the inner focusable — shadow-DOM controls inside a field only. */
|
|
34
|
+
protected get controlAriaLabel(): string | undefined;
|
|
35
|
+
/** `aria-labelledby` for the inner focusable — light-DOM controls inside a field only. */
|
|
36
|
+
protected get controlAriaLabelledby(): string | undefined;
|
|
37
|
+
/** `aria-describedby` for the inner focusable — field ids inside a field, built-in ids standalone. */
|
|
38
|
+
protected get controlAriaDescribedby(): string | undefined;
|
|
39
|
+
/** `aria-invalid` for the inner focusable. */
|
|
40
|
+
protected get controlAriaInvalid(): 'true' | undefined;
|
|
41
|
+
protected renderLabel(additionalContent?: TemplateResult): TemplateResult | typeof nothing;
|
|
42
|
+
protected renderHint(): TemplateResult | typeof nothing;
|
|
43
|
+
protected renderError(): TemplateResult | typeof nothing;
|
|
44
|
+
protected getDescribedBy(): string | undefined;
|
|
45
|
+
protected getInvalid(): 'true' | undefined;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Gives a form control its built-in field UI (label, hint, error, required
|
|
49
|
+
* indicator) AND makes it a consumer of the [Field](/components/field/) context.
|
|
50
|
+
*
|
|
51
|
+
* - **Standalone:** the control renders its own label/hint/error from these props.
|
|
52
|
+
* - **Inside `<nord-field>`:** the control suppresses its built-in field UI and
|
|
53
|
+
* the field parts take over. The control reads its accessible name,
|
|
54
|
+
* description and invalid/disabled state from the field context.
|
|
55
|
+
*
|
|
56
|
+
* The control owns `required`; it publishes it up so `<nord-field-label>` can
|
|
57
|
+
* render the indicator.
|
|
58
|
+
*/
|
|
59
|
+
export declare function FieldControlMixin<T extends Constructor<LitElement>>(superClass: T): Constructor<FieldControlMixinInterface> & T;
|
|
60
|
+
export {};
|
|
@@ -1,36 +1,19 @@
|
|
|
1
|
-
import type { LitElement
|
|
1
|
+
import type { LitElement } from 'lit';
|
|
2
|
+
import type { FieldControlMixinInterface } from './FieldControlMixin.js';
|
|
2
3
|
import type { InputMixinInterface } from './InputMixin.js';
|
|
3
4
|
import { FormDataController } from '../controllers/FormDataController.js';
|
|
4
|
-
import { SlotController } from '../controllers/SlotController.js';
|
|
5
|
-
import '../../visually-hidden/VisuallyHidden.js';
|
|
6
5
|
type Constructor<T = Record<string, unknown>> = new (...args: any[]) => T;
|
|
7
|
-
export declare class FormAssociatedMixinInterface {
|
|
8
|
-
label: string;
|
|
9
|
-
required: boolean;
|
|
10
|
-
hideRequired: boolean;
|
|
11
|
-
hint?: string;
|
|
12
|
-
hintBelow: boolean;
|
|
13
|
-
hideLabel: boolean;
|
|
6
|
+
export declare class FormAssociatedMixinInterface extends FieldControlMixinInterface {
|
|
14
7
|
placeholder?: string;
|
|
15
|
-
error?: string;
|
|
16
|
-
protected inputId: string;
|
|
17
|
-
protected errorId: string;
|
|
18
|
-
protected hintId: string;
|
|
19
|
-
protected labelSlot: SlotController;
|
|
20
|
-
protected hintSlot: SlotController;
|
|
21
|
-
protected errorSlot: SlotController;
|
|
22
8
|
protected formData: FormDataController;
|
|
23
9
|
protected get formValue(): string | undefined;
|
|
24
|
-
protected get hasError(): boolean;
|
|
25
|
-
protected get hasHint(): boolean;
|
|
26
|
-
protected get isHintBelow(): boolean;
|
|
27
10
|
protected handleChange(e: Event): void;
|
|
28
11
|
protected handleInput(e: Event): void;
|
|
29
|
-
protected renderLabel(additionalContent?: TemplateResult): TemplateResult;
|
|
30
|
-
protected renderHint(): TemplateResult;
|
|
31
|
-
protected renderError(): TemplateResult;
|
|
32
|
-
protected getDescribedBy(): string | undefined;
|
|
33
|
-
protected getInvalid(): 'true' | undefined;
|
|
34
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* Adds form participation (value submission, input/change events) on top of
|
|
15
|
+
* {@link FieldControlMixin}, which provides the built-in field UI and the
|
|
16
|
+
* `<nord-field>` context integration.
|
|
17
|
+
*/
|
|
35
18
|
export declare function FormAssociatedMixin<T extends Constructor<InputMixinInterface & LitElement>>(superClass: T): Constructor<FormAssociatedMixinInterface> & T;
|
|
36
19
|
export {};
|
|
@@ -11,6 +11,7 @@ export declare class TextSelectableMixinInterface {
|
|
|
11
11
|
select(): void;
|
|
12
12
|
setSelectionRange(start: number | null, end: number | null, direction?: 'forward' | 'backward' | 'none'): void;
|
|
13
13
|
setRangeText(replacement: string, start?: number, end?: number, selectMode?: 'select' | 'start' | 'end' | 'preserve'): void;
|
|
14
|
+
getNativeElement(): Promise<HTMLInputElement | HTMLTextAreaElement | undefined>;
|
|
14
15
|
}
|
|
15
16
|
export declare function TextSelectableMixin<T extends Constructable<InputMixinInterface & LitElement>>(superClass: T): Constructable<TextSelectableMixinInterface> & T;
|
|
16
17
|
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether the user has requested reduced motion via the
|
|
3
|
+
* `prefers-reduced-motion: reduce` media query. Always `false` on the server,
|
|
4
|
+
* where `window` is unavailable. Use it to skip JS-driven animations (CSS
|
|
5
|
+
* `transition` declarations should also guard themselves with the same query).
|
|
6
|
+
*/
|
|
7
|
+
export declare function prefersReducedMotion(): boolean;
|
|
@@ -33,6 +33,7 @@ declare const DatePicker_base: (new (...args: any[]) => import("../common/mixins
|
|
|
33
33
|
*/
|
|
34
34
|
export default class DatePicker extends DatePicker_base {
|
|
35
35
|
static styles: import("lit").CSSResult[];
|
|
36
|
+
private fieldBarrier;
|
|
36
37
|
private toggleButton;
|
|
37
38
|
private closeButton;
|
|
38
39
|
private calendar;
|
|
@@ -119,6 +120,7 @@ export default class DatePicker extends DatePicker_base {
|
|
|
119
120
|
* Controls whether the date picker expands to fill the width of its container.
|
|
120
121
|
*/
|
|
121
122
|
expand: boolean;
|
|
123
|
+
protected get ownInvalid(): boolean;
|
|
122
124
|
firstUpdated(): void;
|
|
123
125
|
render(): import("lit").TemplateResult<1>;
|
|
124
126
|
private createDateFormatters;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { NordEvent } from '../common/events.js';
|
|
2
|
+
/** The payload carried by a {@link DateRangeChangeEvent}. */
|
|
3
|
+
export interface DateRangeChangeDetail {
|
|
4
|
+
/** The committed interval string `YYYY-MM-DD/YYYY-MM-DD`, or `""` when empty. */
|
|
5
|
+
value: string;
|
|
6
|
+
/** The committed start date in ISO-8601 format, or `""` when empty. */
|
|
7
|
+
startDate: string;
|
|
8
|
+
/** The committed end date in ISO-8601 format, or `""` when empty. */
|
|
9
|
+
endDate: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Dispatched by `nord-date-range-picker` when the committed range changes. The
|
|
13
|
+
* live `input` event uses this same shape, while `change` is dispatched once the
|
|
14
|
+
* pending selection is applied (or cleared).
|
|
15
|
+
*/
|
|
16
|
+
export declare class DateRangeChangeEvent extends NordEvent {
|
|
17
|
+
private readonly _detail;
|
|
18
|
+
constructor(name: string, _detail: DateRangeChangeDetail);
|
|
19
|
+
/** Convenience accessor mirroring `CustomEvent.detail`. */
|
|
20
|
+
get detail(): DateRangeChangeDetail;
|
|
21
|
+
/** The committed interval string `YYYY-MM-DD/YYYY-MM-DD`, or `""`. */
|
|
22
|
+
get value(): string;
|
|
23
|
+
/** The committed start date in ISO-8601 format, or `""`. */
|
|
24
|
+
get startDate(): string;
|
|
25
|
+
/** The committed end date in ISO-8601 format, or `""`. */
|
|
26
|
+
get endDate(): string;
|
|
27
|
+
}
|