@altinn/altinn-components 0.54.2 → 0.55.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{PersonCircle-DlX_3kRO.js → ChevronUpDown-DqGsU4MC.js} +5 -5
- package/dist/Eye-BrbjRZJp.js +24 -0
- package/dist/InboxFill-vGck_zM_.js +81 -0
- package/dist/InformationSquare-D3WAxfVw.js +24 -0
- package/dist/Trash-DBcymOP9.js +81 -0
- package/dist/assets/AccountMenuButton.css +1 -1
- package/dist/assets/AccountSelector.css +1 -1
- package/dist/assets/AutocompleteBase.css +1 -1
- package/dist/assets/ButtonGroup.css +1 -1
- package/dist/assets/ButtonIcon.css +1 -1
- package/dist/assets/DashboardCard.css +1 -0
- package/dist/assets/DashboardHeader.css +1 -0
- package/dist/assets/DialogListItem.css +1 -1
- package/dist/assets/Dropdown.css +1 -0
- package/dist/assets/DropdownBase.css +1 -1
- package/dist/assets/GlobalHeader.css +1 -1
- package/dist/assets/ItemControls.css +1 -0
- package/dist/assets/ItemLabel.css +1 -0
- package/dist/assets/ItemMedia.css +1 -0
- package/dist/assets/MenuItem.css +1 -1
- package/dist/assets/MenuListDivider.css +1 -0
- package/dist/assets/MenuListHeading.css +1 -0
- package/dist/assets/MenuListItem.css +1 -0
- package/dist/assets/MenuListSearch.css +1 -0
- package/dist/assets/MetaItemIcon.css +1 -1
- package/dist/assets/SearchField.css +1 -1
- package/dist/assets/SeenByLogButton.css +1 -0
- package/dist/assets/Switch.css +1 -0
- package/dist/assets/TabMenu.css +1 -0
- package/dist/assets/Tooltip.css +1 -0
- package/dist/assets/menuList.css +1 -0
- package/dist/components/Account/AccountList.js +1 -1
- package/dist/components/Account/AccountListVirtual.js +4 -4
- package/dist/components/Account/AccountMenu.js +14 -11
- package/dist/components/Account/AccountMenuButton.js +58 -56
- package/dist/components/Attachment/AttachmentLink.js +47 -41
- package/dist/components/Avatar/Avatar.js +11 -12
- package/dist/components/Avatar/AvatarGroup.js +38 -28
- package/dist/components/Banner/Banner.js +20 -38
- package/dist/components/Button/ButtonGroup.js +28 -12
- package/dist/components/Button/ButtonIcon.js +15 -15
- package/dist/components/Button/FloatingActionButton.js +22 -19
- package/dist/components/Byline/Byline.js +1 -1
- package/dist/components/ContextMenu/ContextMenu.js +73 -67
- package/dist/components/Dashboard/DashboardCard.js +24 -21
- package/dist/components/Dashboard/DashboardHeader.js +16 -14
- package/dist/components/Dashboard/index.js +2 -4
- package/dist/components/Datepicker/Datepicker.js +16 -14
- package/dist/components/Datepicker/DatepickerHeader.js +13 -13
- package/dist/components/Dialog/DialogActions.js +9 -9
- package/dist/components/Dialog/DialogAttachments.js +1 -1
- package/dist/components/Dialog/DialogListItem.js +113 -112
- package/dist/components/Dialog/DialogMetadata.js +83 -154
- package/dist/components/Dialog/DialogSeenBy.js +24 -41
- package/dist/components/Dialog/DialogTabs.js +4 -4
- package/dist/components/Dialog/SeenByLog.js +7 -7
- package/dist/components/Dialog/SeenByLogButton.js +12 -6
- package/dist/components/Dropdown/DrawerOrDropdown.js +1 -1
- package/dist/components/Dropdown/Dropdown.js +160 -0
- package/dist/components/Dropdown/DropdownBase.js +12 -12
- package/dist/components/Dropdown/FloatingDropdown.js +119 -74
- package/dist/components/Dropdown/index.js +18 -16
- package/dist/components/DsComponents/index.js +2 -2
- package/dist/components/Forms/SearchField.js +44 -29
- package/dist/components/Forms/Switch.js +10 -8
- package/dist/components/GlobalHeader/AccountSelector.js +55 -55
- package/dist/components/GlobalHeader/GlobalHeader.js +55 -54
- package/dist/components/GlobalHeader/GlobalSearch.js +1 -1
- package/dist/components/GlobalHeader/GlobalSearchButton.js +1 -0
- package/dist/components/GlobalMenu/BackButton.js +1 -1
- package/dist/components/GlobalMenu/GlobalMenu.js +52 -43
- package/dist/components/GlobalMenu/GlobalMenuButton.js +15 -14
- package/dist/components/GlobalMenu/LocaleSwitcher.js +30 -24
- package/dist/components/GlobalMenu_old/BackButton.js +1 -1
- package/dist/components/GlobalMenu_old/CurrentAccount.js +8 -9
- package/dist/components/GlobalMenu_old/EndUserLabel.js +29 -10
- package/dist/components/GlobalMenu_old/GlobalMenu.js +15 -8
- package/dist/components/GlobalMenu_old/GlobalMenuButton.js +1 -1
- package/dist/components/Header/Header.js +6 -6
- package/dist/components/Header/HeaderBase.js +1 -1
- package/dist/components/Header/LocaleSwitcher.js +10 -10
- package/dist/components/Icon/Icon.js +19 -20
- package/dist/components/Icon/ProgressIcon.js +1 -0
- package/dist/components/Icon/index.js +4 -6
- package/dist/components/Item/ItemControls.js +8 -0
- package/dist/components/Item/ItemLabel.js +34 -0
- package/dist/components/Item/ItemMedia.js +33 -0
- package/dist/components/Item/index.js +8 -0
- package/dist/components/Layout/Layout.js +4 -4
- package/dist/components/Menu/Menu.js +67 -45
- package/dist/components/Menu/MenuItem.js +192 -66
- package/dist/components/Menu/MenuItems.js +154 -71
- package/dist/components/Menu/MenuList.js +39 -0
- package/dist/components/Menu/MenuListDivider.js +8 -0
- package/dist/components/Menu/MenuListGroup.js +7 -0
- package/dist/components/Menu/MenuListHeading.js +7 -0
- package/dist/components/Menu/MenuListItem.js +34 -0
- package/dist/components/Menu/MenuListSearch.js +83 -0
- package/dist/components/Menu/MenuOption.js +4 -87
- package/dist/components/Menu/TabMenu.js +15 -0
- package/dist/components/Menu/VirtualizedMenuItems.js +227 -0
- package/dist/components/Menu/aria.js +9 -0
- package/dist/components/Menu/example.data.js +373 -0
- package/dist/components/Menu/example.hooks.js +75 -0
- package/dist/components/Menu/index.js +24 -25
- package/dist/components/Menu/types.js +1 -0
- package/dist/components/Menu/useDropdownMenuController.js +43 -0
- package/dist/components/Menu/useMenuSearch.js +146 -0
- package/dist/components/Menu/useMenuVirtualization.js +5 -0
- package/dist/components/Metadata/MetaItemIcon.js +4 -4
- package/dist/components/Notifications/NotificationItemBase.js +49 -50
- package/dist/components/Page/ContactButtons.js +13 -10
- package/dist/components/Page/PageTabs.js +4 -13
- package/dist/components/Searchbar/Autocomplete.js +34 -32
- package/dist/components/Searchbar/AutocompleteBase.js +3 -3
- package/dist/components/Searchbar/AutocompleteItem.js +29 -42
- package/dist/components/Settings/SettingsItemBase.js +25 -26
- package/dist/components/Settings/UsedByLog.js +6 -6
- package/dist/components/Toolbar/DatepickerFilter.js +87 -0
- package/dist/components/Toolbar/SelectDateFilter.js +51 -0
- package/dist/components/Toolbar/Toolbar.js +18 -104
- package/dist/components/Toolbar/ToolbarFilter.js +69 -73
- package/dist/components/Toolbar/ToolbarFilterAddMenu.js +82 -0
- package/dist/components/Toolbar/ToolbarFilterButton.js +46 -0
- package/dist/components/Toolbar/ToolbarFilterMenu.js +117 -0
- package/dist/components/Toolbar/ToolbarMenu.js +58 -21
- package/dist/components/Toolbar/ToolbarSearch.js +15 -10
- package/dist/components/Toolbar/example.data.js +388 -0
- package/dist/components/Toolbar/example.hooks.js +68 -0
- package/dist/components/Toolbar/formatDateRange.js +19 -0
- package/dist/components/Toolbar/index.js +12 -14
- package/dist/components/Toolbar/useFilter.js +63 -0
- package/dist/components/Tooltip/Tooltip.js +101 -0
- package/dist/components/Tooltip/index.js +4 -0
- package/dist/components/UserListItem/UserListItem.js +15 -13
- package/dist/components/index.js +389 -386
- package/dist/floating-ui.dom-bEgaHJCq.js +997 -0
- package/dist/global.css +1 -1
- package/dist/hooks/useAccountSelector.js +9 -9
- package/dist/hooks/useMenu.js +48 -47
- package/dist/index--jNxJmA8.js +2000 -0
- package/dist/index.js +402 -399
- package/dist/menuList.module-DFH60CqT.js +6 -0
- package/dist/{textfield-DAuYWtUj.js → textfield-Drdr9bio.js} +40 -39
- package/dist/types/lib/components/Account/AccountList.d.ts +2 -2
- package/dist/types/lib/components/Account/AccountList.stories.d.ts +3 -4
- package/dist/types/lib/components/Account/AccountMenu.d.ts +3 -3
- package/dist/types/lib/components/Account/AccountMenu.stories.d.ts +1 -1
- package/dist/types/lib/components/Account/AccountMenuButton.stories.d.ts +10 -2
- package/dist/types/lib/components/Attachment/AttachmentLink.d.ts +3 -1
- package/dist/types/lib/components/Attachment/AttachmentLink.stories.d.ts +1 -1
- package/dist/types/lib/components/Button/ButtonGroup.d.ts +3 -1
- package/dist/types/lib/components/Button/ButtonGroup.stories.d.ts +1 -1
- package/dist/types/lib/components/Button/FloatingActionButton.d.ts +1 -6
- package/dist/types/lib/components/ContextMenu/ContextMenu.d.ts +7 -8
- package/dist/types/lib/components/Dashboard/DashboardCard.d.ts +2 -2
- package/dist/types/lib/components/Dashboard/DashboardHeader.d.ts +2 -2
- package/dist/types/lib/components/Dashboard/index.d.ts +0 -1
- package/dist/types/lib/components/Dialog/DialogTabs.d.ts +2 -4
- package/dist/types/lib/components/Dialog/SeenByLogButton.d.ts +8 -5
- package/dist/types/lib/components/Dropdown/Dropdown.d.ts +22 -0
- package/dist/types/lib/components/Dropdown/Dropdown.stories.d.ts +14 -0
- package/dist/types/lib/components/Dropdown/DropdownBase.d.ts +3 -2
- package/dist/types/lib/components/Dropdown/index.d.ts +1 -0
- package/dist/types/lib/components/Forms/SearchField.d.ts +2 -1
- package/dist/types/lib/components/Forms/SearchField.stories.d.ts +1 -1
- package/dist/types/lib/components/Forms/Switch.d.ts +2 -1
- package/dist/types/lib/components/Forms/Switch.stories.d.ts +1 -1
- package/dist/types/lib/components/GlobalMenu/GlobalMenu.d.ts +1 -1
- package/dist/types/lib/components/GlobalMenu/GlobalMenu.stories.d.ts +1 -3
- package/dist/types/lib/components/GlobalMenu/LocaleSwitcher.d.ts +1 -1
- package/dist/types/lib/components/Header/HeaderButton.d.ts +0 -4
- package/dist/types/lib/components/Header/HeaderButton.stories.d.ts +0 -1
- package/dist/types/lib/components/Icon/Icon.d.ts +3 -2
- package/dist/types/lib/components/Icon/index.d.ts +0 -1
- package/dist/types/lib/components/Item/ItemControls.d.ts +7 -0
- package/dist/types/lib/components/Item/ItemLabel.d.ts +14 -0
- package/dist/types/lib/components/Item/ItemMedia.d.ts +9 -0
- package/dist/types/lib/components/Item/index.d.ts +3 -0
- package/dist/types/lib/components/Menu/Menu.d.ts +4 -7
- package/dist/types/lib/components/Menu/Menu.stories.d.ts +64 -4
- package/dist/types/lib/components/Menu/MenuItem.d.ts +53 -21
- package/dist/types/lib/components/Menu/MenuItems.d.ts +21 -14
- package/dist/types/lib/components/Menu/MenuList.d.ts +21 -0
- package/dist/types/lib/components/Menu/MenuListDivider.d.ts +6 -0
- package/dist/types/lib/components/Menu/MenuListGroup.d.ts +8 -0
- package/dist/types/lib/components/Menu/MenuListHeading.d.ts +8 -0
- package/dist/types/lib/components/Menu/MenuListItem.d.ts +9 -0
- package/dist/types/lib/components/Menu/MenuListSearch.d.ts +15 -0
- package/dist/types/lib/components/Menu/MenuListSearch.stories.d.ts +18 -0
- package/dist/types/lib/components/Menu/MenuOption.d.ts +5 -16
- package/dist/types/lib/components/Menu/TabMenu.d.ts +8 -0
- package/dist/types/lib/components/Menu/VirtualizedMenu.stories.d.ts +22 -0
- package/dist/types/lib/components/Menu/VirtualizedMenuItems.d.ts +2 -0
- package/dist/types/lib/components/Menu/aria.d.ts +1 -0
- package/dist/types/lib/components/Menu/example.hooks.d.ts +24 -0
- package/dist/types/lib/components/Menu/index.d.ts +10 -9
- package/dist/types/lib/components/Menu/types.d.ts +1 -0
- package/dist/types/lib/components/Menu/useDropdownMenuController.d.ts +27 -0
- package/dist/types/lib/components/Menu/useMenuSearch.d.ts +129 -0
- package/dist/types/lib/components/Menu/useMenuVirtualization.d.ts +35 -0
- package/dist/types/lib/components/Page/ContactButtons.d.ts +6 -2
- package/dist/types/lib/components/Page/PageTabs.d.ts +3 -10
- package/dist/types/lib/components/Page/PageTabs.stories.d.ts +1 -1
- package/dist/types/lib/components/Searchbar/AutocompleteItem.d.ts +3 -3
- package/dist/types/lib/components/Searchbar/Searchbar.stories.d.ts +1 -1
- package/dist/types/lib/components/Toolbar/DatepickerFilter.d.ts +15 -0
- package/dist/types/lib/components/Toolbar/SelectDateFilter.d.ts +8 -0
- package/dist/types/lib/components/Toolbar/SelectDateFilter.stories.d.ts +9 -0
- package/dist/types/lib/components/Toolbar/Toolbar.d.ts +6 -19
- package/dist/types/lib/components/Toolbar/Toolbar.stories.d.ts +21 -19
- package/dist/types/lib/components/Toolbar/ToolbarFilter.d.ts +11 -23
- package/dist/types/lib/components/Toolbar/ToolbarFilter.stories.d.ts +6 -13
- package/dist/types/lib/components/Toolbar/ToolbarFilterAddMenu.d.ts +8 -0
- package/dist/types/lib/components/Toolbar/ToolbarFilterButton.d.ts +15 -0
- package/dist/types/lib/components/Toolbar/ToolbarFilterMenu.d.ts +15 -0
- package/dist/types/lib/components/Toolbar/ToolbarMenu.d.ts +5 -10
- package/dist/types/lib/components/Toolbar/ToolbarSearch.d.ts +3 -5
- package/dist/types/lib/components/Toolbar/ToolbarSearch.stories.d.ts +635 -1
- package/dist/types/lib/components/Toolbar/example.hooks.d.ts +41 -0
- package/dist/types/lib/components/Toolbar/formatDateRange.d.ts +10 -0
- package/dist/types/lib/components/Toolbar/index.d.ts +4 -5
- package/dist/types/lib/components/Toolbar/useFilter.d.ts +173 -0
- package/dist/types/lib/components/Tooltip/Tooltip.d.ts +8 -0
- package/dist/types/lib/components/Tooltip/Tooltip.stories.d.ts +9 -0
- package/dist/types/lib/components/Tooltip/index.d.ts +1 -0
- package/dist/types/lib/components/Transmission/Transmission.stories.d.ts +2 -2
- package/dist/types/lib/components/Typography/Heading.d.ts +2 -2
- package/dist/types/lib/components/UserListItem/UserListItem.d.ts +3 -1
- package/dist/types/lib/components/UserListItem/UserListItem.stories.d.ts +7 -1
- package/dist/types/lib/components/index.d.ts +2 -0
- package/dist/types/lib/hooks/useAccountSelector.d.ts +2 -2
- package/dist/types/lib/hooks/useMenu.d.ts +3 -1
- package/dist/{index-De5bF0Gf.js → useMenuVirtualization-DpvWCsyD.js} +216 -165
- package/package.json +1 -1
- package/dist/assets/ContextMenu.css +0 -1
- package/dist/assets/IconOrAvatar.css +0 -1
- package/dist/assets/MenuBase.css +0 -1
- package/dist/assets/MenuHeader.css +0 -1
- package/dist/assets/MenuInputField.css +0 -1
- package/dist/assets/MenuItemBase.css +0 -1
- package/dist/assets/MenuItemIcon.css +0 -1
- package/dist/assets/MenuItemLabel.css +0 -1
- package/dist/assets/MenuItemsVirtual.css +0 -1
- package/dist/assets/MenuOption.css +0 -1
- package/dist/assets/MenuSearch.css +0 -1
- package/dist/assets/PageTabs.css +0 -1
- package/dist/assets/ToolbarBase.css +0 -1
- package/dist/assets/ToolbarButton.css +0 -1
- package/dist/assets/ToolbarDaterange.css +0 -1
- package/dist/assets/ToolbarFilterBase.css +0 -1
- package/dist/components/Dashboard/DashboardIcon.js +0 -11
- package/dist/components/Datepicker/DatepickerBase.js +0 -8
- package/dist/components/GlobalMenu/EndUserLabel.js +0 -13
- package/dist/components/GlobalMenu/LocaleButton.js +0 -13
- package/dist/components/Icon/IconOrAvatar.js +0 -33
- package/dist/components/Menu/MenuBase.js +0 -56
- package/dist/components/Menu/MenuHeader.js +0 -8
- package/dist/components/Menu/MenuInputField.js +0 -31
- package/dist/components/Menu/MenuItemBase.js +0 -58
- package/dist/components/Menu/MenuItemIcon.js +0 -27
- package/dist/components/Menu/MenuItemLabel.js +0 -76
- package/dist/components/Menu/MenuItemsVirtual.js +0 -168
- package/dist/components/Menu/MenuSearch.js +0 -41
- package/dist/components/Toolbar/ToolbarAccountMenu.js +0 -52
- package/dist/components/Toolbar/ToolbarAdd.js +0 -24
- package/dist/components/Toolbar/ToolbarBase.js +0 -8
- package/dist/components/Toolbar/ToolbarButton.js +0 -115
- package/dist/components/Toolbar/ToolbarDaterange.js +0 -58
- package/dist/components/Toolbar/ToolbarFilterBase.js +0 -17
- package/dist/components/Toolbar/ToolbarOptions.js +0 -84
- package/dist/index-DttADHE1.js +0 -2993
- package/dist/types/lib/components/ContextMenu/ContextMenu.stories.d.ts +0 -8
- package/dist/types/lib/components/Dashboard/DashboardIcon.d.ts +0 -7
- package/dist/types/lib/components/Datepicker/DatepickerBase.d.ts +0 -6
- package/dist/types/lib/components/GlobalMenu/EndUserLabel.d.ts +0 -5
- package/dist/types/lib/components/GlobalMenu/LocaleButton.d.ts +0 -3
- package/dist/types/lib/components/Icon/IconOrAvatar.d.ts +0 -13
- package/dist/types/lib/components/Menu/MenuBase.d.ts +0 -42
- package/dist/types/lib/components/Menu/MenuHeader.d.ts +0 -4
- package/dist/types/lib/components/Menu/MenuInputField.d.ts +0 -12
- package/dist/types/lib/components/Menu/MenuItemBase.d.ts +0 -28
- package/dist/types/lib/components/Menu/MenuItemIcon.d.ts +0 -10
- package/dist/types/lib/components/Menu/MenuItemLabel.d.ts +0 -15
- package/dist/types/lib/components/Menu/MenuItemsVirtual.d.ts +0 -2
- package/dist/types/lib/components/Menu/MenuSearch.d.ts +0 -10
- package/dist/types/lib/components/Menu/MenuSearch.stories.d.ts +0 -18
- package/dist/types/lib/components/Toolbar/ToolbarAccountMenu.d.ts +0 -8
- package/dist/types/lib/components/Toolbar/ToolbarAdd.d.ts +0 -8
- package/dist/types/lib/components/Toolbar/ToolbarAdd.stories.d.ts +0 -13
- package/dist/types/lib/components/Toolbar/ToolbarBase.d.ts +0 -5
- package/dist/types/lib/components/Toolbar/ToolbarButton.d.ts +0 -16
- package/dist/types/lib/components/Toolbar/ToolbarButton.stories.d.ts +0 -15
- package/dist/types/lib/components/Toolbar/ToolbarDate.stories.d.ts +0 -26
- package/dist/types/lib/components/Toolbar/ToolbarDaterange.d.ts +0 -11
- package/dist/types/lib/components/Toolbar/ToolbarDaterange.stories.d.ts +0 -15
- package/dist/types/lib/components/Toolbar/ToolbarFilterBase.d.ts +0 -8
- package/dist/types/lib/components/Toolbar/ToolbarMenu.stories.d.ts +0 -19
- package/dist/types/lib/components/Toolbar/ToolbarOptions.d.ts +0 -22
- package/dist/types/lib/components/Toolbar/ToolbarOptions.stories.d.ts +0 -12
- /package/dist/assets/{DatepickerBase.css → Datepicker.css} +0 -0
- /package/dist/types/lib/components/GlobalHeader/{AccountSector.stories.d.ts → AccountSelector.stories.d.ts} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._toggle_nol5i_1{position:relative}._button_nol5i_5{display:flex;align-items:center;justify-content:center;width:2.75rem;padding:.625rem;border-radius:50%}._icon_nol5i_14{font-size:1.5rem}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._icon_1ez59_1,._avatar_1ez59_2,._avatarGroup_1ez59_6{font-size:2.25rem}
|
package/dist/assets/MenuBase.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._menu_twp4i_1{list-style:none;padding:0;margin:0;text-indent:0;display:flex;flex-direction:column;width:100%}._list_twp4i_12,._item_twp4i_18{list-style:none;padding:0;margin:0}._item_twp4i_18[role=separator]{border-top:1px solid var(--ds-color-border-subtle)}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._header_1aaxa_1{padding:.5rem;margin:.5rem 0}._title_1aaxa_6{font-size:.875rem;font-weight:400;line-height:1.25rem;color:var(--ds-color-text-subtle);margin:0}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._field_bgrbp_1{padding:0 .5rem;margin:.5rem 0;display:flex;flex-direction:column;row-gap:.5rem}._label_bgrbp_9{font-size:.875rem;font-weight:400;line-height:1.25rem;color:var(--ds-color-text-subtle);margin:0}._input_bgrbp_17{width:100%;height:2.75rem;font-size:.875rem;line-height:1rem;font-weight:400;padding:9px;border-radius:2px;border:1px solid;border-color:var(--ds-color-border-default)}._input_bgrbp_17{color:var(--ds-color-text-subtle)}._input_bgrbp_17[data-value=true]{color:var(--ds-color-text-default)}._button_bgrbp_37[aria-selected=true]{background-color:var(--ds-color-background-tinted);color:var(--ds-color-text-default)}._close_bgrbp_42{padding:6px 0}._icon_bgrbp_46{border-left:1px solid;border-color:var(--ds-color-background-tinted);display:flex;align-items:center;justify-content:center;font-size:1.25rem;padding:0 6px}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._item_ygbc3_1{font:inherit;color:inherit;padding:0;border:0;text-align:inherit;text-decoration:none;line-height:normal;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;appearance:none;-webkit-user-select:none;user-select:none;cursor:pointer;position:relative;width:100%;display:flex;align-items:center;column-gap:.25rem;margin:.5rem 0;border-radius:2px}._item_ygbc3_1[data-size=md]{min-height:56px}._item_ygbc3_1[data-size=md]{min-height:44px}._item_ygbc3_1[data-size=sm]{min-height:40px}._content_ygbc3_40{display:flex;width:100%;align-items:center;column-gap:6px;padding:6px}._item_ygbc3_1{background-color:transparent}._item_ygbc3_1{pointer-events:none}._item_ygbc3_1[data-interactive=true]{pointer-events:all}._item_ygbc3_1[data-interactive=true]:hover{background-color:var(--ds-color-surface-hover)}._item_ygbc3_1[data-active=true]{background-color:var(--ds-color-background-tinted)}._item_ygbc3_1[data-active=true]{outline:2px solid black}._item_ygbc3_1[data-selected=true],._item_ygbc3_1:active,[data-variant=subtle] ._item_ygbc3_1:hover{background-color:var(--ds-color-surface-hover)}[data-variant=subtle] ._item_ygbc3_1:active{background-color:var(--ds-color-surface-active)}[data-variant=subtle] ._item_ygbc3_1[data-selected=true]{background-color:var(--ds-color-background-default)}._content_ygbc3_40{display:flex;width:100%;align-items:center;column-gap:.5em}._item_ygbc3_1[aria-disabled=true]{opacity:.5;pointer-events:none;outline:none;box-shadow:none;background-color:transparent}._item_ygbc3_1:not([aria-disabled=true]):focus-visible{box-shadow:var(--_ds--focus, var(--dsc-focus-boxShadow));outline:var(--_ds--focus, var(--dsc-focus-outline))}._item_ygbc3_1:not([aria-disabled=true]):focus-visible *{--_ds--focus: }
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._icon_1b18x_1{position:relative;min-width:1em;display:flex;align-items:center;justify-content:center;box-sizing:border-box}._icon_1b18x_1[data-size=lg]{font-size:2.75rem}._icon_1b18x_1[data-size=lg] svg,._icon_1b18x_1[data-size=lg] img{font-size:1.75rem}._icon_1b18x_1[data-size=md]{font-size:2rem}._icon_1b18x_1[data-size=md] svg,._icon_1b18x_1[data-size=md] img{font-size:1.5rem}._icon_1b18x_1[data-size=sm]{font-size:1.5rem}._icon_1b18x_1[data-size=sm] svg,._icon_1b18x_1[data-size=sm] img{font-size:1.25rem}._avatar_1b18x_37{font-size:1em;width:1em;height:1em}._avatarGroup_1b18x_43{font-size:.625em}._badge_1b18x_47{position:absolute;top:0;right:0;margin-top:-.25em;margin-right:-.25em;outline:1px solid white}@supports (-webkit-hyphens: none){._icon_1b18x_1[data-size=lg]{font-size:2.75rem;width:2.75rem;height:2.75rem}._icon_1b18x_1[data-size=lg] svg,._icon_1b18x_1[data-size=lg] img{width:1.75rem;height:1.75rem}._icon_1b18x_1[data-size=lg] ._avatar_1b18x_37{width:2.75rem;height:2.75rem;font-size:2.75rem}._icon_1b18x_1[data-size=md]{font-size:2rem;width:2rem;height:2rem}._icon_1b18x_1[data-size=md] svg,._icon_1b18x_1[data-size=md] img{width:1.5rem;height:1.5rem}._icon_1b18x_1[data-size=md] ._avatar_1b18x_37{width:2rem;height:2rem;font-size:2rem}._icon_1b18x_1[data-size=sm]{font-size:1.5rem;width:1.5rem;height:1.5rem}._icon_1b18x_1[data-size=sm] svg,._icon_1b18x_1[data-size=sm] img{width:1.25rem;height:1.25rem}._icon_1b18x_1[data-size=sm] ._avatar_1b18x_37{width:1.5rem;height:1.5rem;font-size:1.5rem}}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._label_1el1b_1{flex-grow:1;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;padding:0 .125rem}._label_1el1b_1[data-size=lg]{font-size:1.125rem}._label_1el1b_1[data-size=md],._label_1el1b_1[data-size=sm]{font-size:1rem}._title_1el1b_22{display:inline;vertical-align:center}._label_1el1b_1 mark{text-decoration:underline;background-color:transparent;color:inherit}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._virtualScrollRef_nmoqo_1{max-height:400px;overflow-y:auto;padding:.5em;margin:0 -.5em}._virtualMenuListItem_nmoqo_8{position:absolute;top:0;left:0;width:100%}._virtualMenuListItem_nmoqo_8>*{margin:0}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._label_xjlhn_1{flex-grow:1;display:flex;flex-direction:row;align-items:center;justify-content:center;padding:0 .125rem;font-size:1rem;column-gap:.5em;pointer-events:none;word-break:normal;white-space:normal;overflow-wrap:normal}._title_xjlhn_16{color:var(--ds-color-text-default);display:inline;vertical-align:text-top}._titleWrapper_xjlhn_22{display:inline;line-height:1.25}._count_xjlhn_27{margin-left:.5rem;display:inline;font-size:smaller;white-space:nowrap}._radio_xjlhn_34,._checkbox_xjlhn_35{flex-shrink:0;flex-grow:0;position:relative;width:1.25em;height:1.25em;display:flex;align-items:center;justify-content:center;color:transparent}._radio_xjlhn_34{border:1px solid;border-color:var(--ds-color-border-subtle);outline:var(--ds-color-border-subtle) solid 1px;border-radius:50%}._checkbox_xjlhn_35{border:2px solid;border-color:var(--ds-color-border-subtle);border-radius:2px}._radio_xjlhn_34[data-checked=true],._checkbox_xjlhn_35[data-checked=true]{background-color:var(--ds-color-base-default);border:none;outline-color:var(--ds-color-base-default);color:var(--ds-color-base-contrast-default)}._icon_xjlhn_68{font-size:1.25em}@supports (-webkit-hyphens: none){._icon_xjlhn_68{font-size:unset;width:1.25em;height:1.25em}._icon_xjlhn_68 svg,._icon_xjlhn_68 img{width:100%;height:100%}}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._field_1w1s0_1{position:relative;margin:.5rem 0}@media(max-width:1023px){._field_1w1s0_1{font-size:1rem}}
|
package/dist/assets/PageTabs.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._list_gp6cp_1{display:flex;width:100%;row-gap:.5rem;flex-direction:column;list-style:none;padding:0;margin:0}@media(min-width:1024px){._list_gp6cp_1{flex-direction:row;align-items:center;justify-content:start;column-gap:.5rem;width:auto}}._item_gp6cp_21{margin:0;border-top:2px solid;border-bottom:2px solid;border-color:transparent}._item_gp6cp_21[data-selected=true]{background-color:transparent;border-bottom-color:var(--ds-color-base-default)}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._toolbar_17w00_1{display:flex;align-items:center;flex-wrap:wrap;width:100%;gap:.5rem}@media(min-width:1024px){._toolbar_17w00_1{padding:0}._toolbar_17w00_1>*{width:auto}}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._removeButton_fxc8_1>button:hover+*+*{text-decoration:line-through}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._datepicker_ud6cb_1{border-top:1px solid var(--ds-color-border-subtle);padding:0 .5rem}._fields_ud6cb_6{margin:.5rem 0}._description_ud6cb_10{font-size:.875rem}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._base_4n04w_1{position:relative}._expanded_4n04w_5{z-index:2}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
-
import "../../index-p1eeF8LQ.js";
|
|
3
|
-
import "react";
|
|
4
|
-
import "../Button/Button.js";
|
|
5
|
-
import "../RootProvider/RootProvider.js";
|
|
6
|
-
import { MenuItemIcon as i } from "../Menu/MenuItemIcon.js";
|
|
7
|
-
import "../Snackbar/useSnackbar.js";
|
|
8
|
-
const f = ({ loading: o, icon: r, theme: t }) => /* @__PURE__ */ m(i, { icon: r, size: "lg", theme: t, loading: o });
|
|
9
|
-
export {
|
|
10
|
-
f as DashboardIcon
|
|
11
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { c } from "../../index-p1eeF8LQ.js";
|
|
3
|
-
import '../../assets/DatepickerBase.css';const s = "_datepicker_1h8rq_1", a = {
|
|
4
|
-
datepicker: s
|
|
5
|
-
}, p = ({ className: e, children: r }) => /* @__PURE__ */ t("div", { className: c(a.datepicker, e), children: r });
|
|
6
|
-
export {
|
|
7
|
-
p as DatepickerBase
|
|
8
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { jsxs as a, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { S as l } from "../../PersonCircle-DlX_3kRO.js";
|
|
3
|
-
import '../../assets/EndUserLabel.css';const n = "_text_1tx3s_1", o = "_icon_1tx3s_11", c = "_label_1tx3s_15", s = {
|
|
4
|
-
text: n,
|
|
5
|
-
icon: o,
|
|
6
|
-
label: c
|
|
7
|
-
}, x = ({ children: e }) => /* @__PURE__ */ a("p", { className: s.text, children: [
|
|
8
|
-
/* @__PURE__ */ t(l, { className: s.icon, "aria-hidden": !0 }),
|
|
9
|
-
/* @__PURE__ */ t("span", { className: s.label, children: e })
|
|
10
|
-
] });
|
|
11
|
-
export {
|
|
12
|
-
x as EndUserLabel
|
|
13
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
-
import "../../index-p1eeF8LQ.js";
|
|
4
|
-
import "react";
|
|
5
|
-
import "../Button/Button.js";
|
|
6
|
-
import "../RootProvider/RootProvider.js";
|
|
7
|
-
import { MenuItem as r } from "../Menu/MenuItem.js";
|
|
8
|
-
import "../Snackbar/useSnackbar.js";
|
|
9
|
-
import { S as m } from "../../Globe-BcPkcH4E.js";
|
|
10
|
-
const c = ({ onClick: o }) => /* @__PURE__ */ t(r, { size: "sm", icon: m, title: "Språk/language", onClick: o });
|
|
11
|
-
export {
|
|
12
|
-
c as LocaleButton
|
|
13
|
-
};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { isValidElement as p } from "react";
|
|
3
|
-
import "../../index-p1eeF8LQ.js";
|
|
4
|
-
import { Icon as n } from "./Icon.js";
|
|
5
|
-
import { Avatar as f } from "../Avatar/Avatar.js";
|
|
6
|
-
import { AvatarGroup as c } from "../Avatar/AvatarGroup.js";
|
|
7
|
-
import "../Button/Button.js";
|
|
8
|
-
import "../RootProvider/RootProvider.js";
|
|
9
|
-
import "../Snackbar/useSnackbar.js";
|
|
10
|
-
import { S as l } from "../../XMark-tKk6aExO.js";
|
|
11
|
-
import '../../assets/IconOrAvatar.css';const u = "_icon_1ez59_1", _ = "_avatar_1ez59_2", v = "_avatarGroup_1ez59_6", e = {
|
|
12
|
-
icon: u,
|
|
13
|
-
avatar: _,
|
|
14
|
-
avatarGroup: v
|
|
15
|
-
};
|
|
16
|
-
function g(r) {
|
|
17
|
-
return typeof r == "string" || typeof r == "number" || typeof r == "boolean" || r === null || p(r);
|
|
18
|
-
}
|
|
19
|
-
const N = (r) => r.svgElement !== void 0 || r.iconUrl !== void 0, S = ({ loading: r, size: i, icon: t, iconTheme: a, avatar: s, avatarGroup: m }) => {
|
|
20
|
-
if (!t && !s && !m)
|
|
21
|
-
return null;
|
|
22
|
-
if (r)
|
|
23
|
-
return /* @__PURE__ */ o(n, { className: e.icon, svgElement: l, loading: !0 });
|
|
24
|
-
if (t)
|
|
25
|
-
return N(t) ? /* @__PURE__ */ o(n, { className: e.icon, theme: t.theme || a, ...t }) : g(t) ? t : /* @__PURE__ */ o(n, { className: e.icon, svgElement: t, theme: a });
|
|
26
|
-
if (s)
|
|
27
|
-
return /* @__PURE__ */ o(f, { ...s, size: s.size || i, className: e.avatar });
|
|
28
|
-
if (m)
|
|
29
|
-
return /* @__PURE__ */ o(c, { ...m, className: e.avatarGroup });
|
|
30
|
-
};
|
|
31
|
-
export {
|
|
32
|
-
S as IconOrAvatar
|
|
33
|
-
};
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
-
import { c as r } from "../../index-p1eeF8LQ.js";
|
|
3
|
-
import '../../assets/MenuBase.css';const _ = "_menu_twp4i_1", d = "_list_twp4i_12", C = "_item_twp4i_18", p = {
|
|
4
|
-
menu: _,
|
|
5
|
-
list: d,
|
|
6
|
-
item: C
|
|
7
|
-
}, N = ({ as: t = "nav", color: n, variant: e, className: o, children: s, ref: a }) => /* @__PURE__ */ c(t, { className: r(p.menu, o), "data-color": n, "data-variant": e, ref: a, children: s }), f = ({
|
|
8
|
-
as: t = "ul",
|
|
9
|
-
role: n = "group",
|
|
10
|
-
className: e,
|
|
11
|
-
children: o,
|
|
12
|
-
ref: s,
|
|
13
|
-
onMouseEnter: a,
|
|
14
|
-
onMouseLeave: i,
|
|
15
|
-
onBlurCapture: m
|
|
16
|
-
}) => /* @__PURE__ */ c(
|
|
17
|
-
t,
|
|
18
|
-
{
|
|
19
|
-
className: r(p.list, e),
|
|
20
|
-
role: n,
|
|
21
|
-
ref: s,
|
|
22
|
-
onMouseEnter: a,
|
|
23
|
-
onMouseLeave: i,
|
|
24
|
-
onBlurCapture: m,
|
|
25
|
-
children: o
|
|
26
|
-
}
|
|
27
|
-
), h = ({
|
|
28
|
-
as: t = "li",
|
|
29
|
-
role: n = "presentation",
|
|
30
|
-
className: e,
|
|
31
|
-
children: o,
|
|
32
|
-
style: s,
|
|
33
|
-
dataIndex: a,
|
|
34
|
-
disabled: i,
|
|
35
|
-
onMouseEnter: m,
|
|
36
|
-
onMouseLeave: l,
|
|
37
|
-
"aria-checked": u
|
|
38
|
-
}) => /* @__PURE__ */ c(
|
|
39
|
-
t,
|
|
40
|
-
{
|
|
41
|
-
className: r(p.item, e),
|
|
42
|
-
role: n,
|
|
43
|
-
style: s,
|
|
44
|
-
"data-index": a,
|
|
45
|
-
onMouseEnter: m,
|
|
46
|
-
onMouseLeave: l,
|
|
47
|
-
"aria-disabled": i,
|
|
48
|
-
"aria-checked": u,
|
|
49
|
-
children: o
|
|
50
|
-
}
|
|
51
|
-
);
|
|
52
|
-
export {
|
|
53
|
-
N as MenuBase,
|
|
54
|
-
f as MenuList,
|
|
55
|
-
h as MenuListItem
|
|
56
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import '../../assets/MenuHeader.css';const r = "_header_1aaxa_1", s = "_title_1aaxa_6", a = {
|
|
3
|
-
header: r,
|
|
4
|
-
title: s
|
|
5
|
-
}, n = ({ title: t }) => /* @__PURE__ */ e("div", { className: a.header, children: /* @__PURE__ */ e("span", { className: a.title, children: t }) });
|
|
6
|
-
export {
|
|
7
|
-
n as MenuHeader
|
|
8
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { jsxs as o, jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import '../../assets/MenuInputField.css';const r = "_field_bgrbp_1", b = "_label_bgrbp_9", c = "_input_bgrbp_17", e = {
|
|
3
|
-
field: r,
|
|
4
|
-
label: b,
|
|
5
|
-
input: c
|
|
6
|
-
}, _ = ({
|
|
7
|
-
label: t,
|
|
8
|
-
type: n = "text",
|
|
9
|
-
value: l,
|
|
10
|
-
name: a,
|
|
11
|
-
placeholder: i = "Søk",
|
|
12
|
-
onChange: p
|
|
13
|
-
}) => /* @__PURE__ */ o("label", { className: e.field, children: [
|
|
14
|
-
t && /* @__PURE__ */ s("span", { className: e.label, children: t }),
|
|
15
|
-
/* @__PURE__ */ s(
|
|
16
|
-
"input",
|
|
17
|
-
{
|
|
18
|
-
"data-value": l && !0,
|
|
19
|
-
type: n,
|
|
20
|
-
value: l,
|
|
21
|
-
name: a,
|
|
22
|
-
placeholder: i,
|
|
23
|
-
className: e.input,
|
|
24
|
-
onChange: p,
|
|
25
|
-
autoComplete: "off"
|
|
26
|
-
}
|
|
27
|
-
)
|
|
28
|
-
] });
|
|
29
|
-
export {
|
|
30
|
-
_ as MenuInputField
|
|
31
|
-
};
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { c as j } from "../../index-p1eeF8LQ.js";
|
|
3
|
-
import { useRef as z } from "react";
|
|
4
|
-
import '../../assets/MenuItemBase.css';const B = "_item_ygbc3_1", E = "_content_ygbc3_40", r = {
|
|
5
|
-
item: B,
|
|
6
|
-
content: E
|
|
7
|
-
}, R = ({
|
|
8
|
-
interactive: s = !0,
|
|
9
|
-
ariaLabel: o,
|
|
10
|
-
role: c,
|
|
11
|
-
as: i,
|
|
12
|
-
color: m,
|
|
13
|
-
variant: d,
|
|
14
|
-
size: l,
|
|
15
|
-
className: f,
|
|
16
|
-
href: p,
|
|
17
|
-
onClick: e,
|
|
18
|
-
onKeyPress: u,
|
|
19
|
-
tabIndex: _ = 0,
|
|
20
|
-
hidden: y,
|
|
21
|
-
selected: x,
|
|
22
|
-
disabled: t = !1,
|
|
23
|
-
children: v,
|
|
24
|
-
active: b,
|
|
25
|
-
onMouseEnter: g,
|
|
26
|
-
"data-testid": h
|
|
27
|
-
}) => {
|
|
28
|
-
const I = i || "a", N = z(null);
|
|
29
|
-
return /* @__PURE__ */ n(
|
|
30
|
-
I,
|
|
31
|
-
{
|
|
32
|
-
tabIndex: t ? "-1" : _ ?? 0,
|
|
33
|
-
className: j(r.item, f),
|
|
34
|
-
role: c,
|
|
35
|
-
"aria-label": o,
|
|
36
|
-
"data-interactive": !t && s,
|
|
37
|
-
"data-active": b,
|
|
38
|
-
"data-size": l,
|
|
39
|
-
"data-color": m,
|
|
40
|
-
"data-variant": d,
|
|
41
|
-
"aria-hidden": y,
|
|
42
|
-
"aria-disabled": t,
|
|
43
|
-
"data-selected": x,
|
|
44
|
-
href: p,
|
|
45
|
-
onKeyPress: (a) => {
|
|
46
|
-
t || (a.key === "Enter" && e?.(), u?.(a));
|
|
47
|
-
},
|
|
48
|
-
onClick: e,
|
|
49
|
-
onMouseEnter: g,
|
|
50
|
-
"data-testid": h,
|
|
51
|
-
ref: N,
|
|
52
|
-
children: /* @__PURE__ */ n("span", { className: r.content, children: v })
|
|
53
|
-
}
|
|
54
|
-
);
|
|
55
|
-
};
|
|
56
|
-
export {
|
|
57
|
-
R as MenuItemBase
|
|
58
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { jsx as t, jsxs as i } from "react/jsx-runtime";
|
|
2
|
-
import { isValidElement as n } from "react";
|
|
3
|
-
import { Badge as l } from "../Badge/Badge.js";
|
|
4
|
-
import { Icon as s, isIconProps as c } from "../Icon/Icon.js";
|
|
5
|
-
import "../../index-p1eeF8LQ.js";
|
|
6
|
-
import { isAvatarProps as d, Avatar as f } from "../Avatar/Avatar.js";
|
|
7
|
-
import { isAvatarGroupProps as v, AvatarGroup as u } from "../Avatar/AvatarGroup.js";
|
|
8
|
-
import "../Button/Button.js";
|
|
9
|
-
import "../RootProvider/RootProvider.js";
|
|
10
|
-
import "../Snackbar/useSnackbar.js";
|
|
11
|
-
import { S as _ } from "../../XMark-tKk6aExO.js";
|
|
12
|
-
import '../../assets/MenuItemIcon.css';const b = "_icon_1b18x_1", g = "_avatar_1b18x_37", x = "_avatarGroup_1b18x_43", G = "_badge_1b18x_47", o = {
|
|
13
|
-
icon: b,
|
|
14
|
-
avatar: g,
|
|
15
|
-
avatarGroup: x,
|
|
16
|
-
badge: G
|
|
17
|
-
};
|
|
18
|
-
function N(a) {
|
|
19
|
-
return typeof a == "string" || typeof a == "number" || typeof a == "boolean" || a === null || n(a);
|
|
20
|
-
}
|
|
21
|
-
const B = ({ loading: a, size: e, icon: r, theme: m, badge: p }) => r ? a ? /* @__PURE__ */ t("div", { className: o.icon, "data-size": e, children: /* @__PURE__ */ t(s, { svgElement: _, loading: !0 }) }) : /* @__PURE__ */ i("div", { className: o.icon, "data-size": e, children: [
|
|
22
|
-
d(r) && /* @__PURE__ */ t(f, { ...r, className: o.avatar }) || v(r) && /* @__PURE__ */ t(u, { ...r, className: o.avatarGroup }) || c(r) && /* @__PURE__ */ t(s, { ...r, theme: r?.theme || m }) || N(r) && r || /* @__PURE__ */ t(s, { theme: m, svgElement: r }),
|
|
23
|
-
p && /* @__PURE__ */ t(l, { ...p, className: o.badge })
|
|
24
|
-
] }) : null;
|
|
25
|
-
export {
|
|
26
|
-
B as MenuItemIcon
|
|
27
|
-
};
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { jsx as o, jsxs as b, Fragment as g } from "react/jsx-runtime";
|
|
2
|
-
import { c as d } from "../../index-p1eeF8LQ.js";
|
|
3
|
-
import { isValidElement as x } from "react";
|
|
4
|
-
import { Heading as c } from "../Typography/Heading.js";
|
|
5
|
-
import "../Button/Button.js";
|
|
6
|
-
import "../RootProvider/RootProvider.js";
|
|
7
|
-
import { isHeadingProps as s } from "../List/ListItemLabel.js";
|
|
8
|
-
import "../Snackbar/useSnackbar.js";
|
|
9
|
-
import '../../assets/MenuItemLabel.css';const P = "_label_1el1b_1", _ = "_title_1el1b_22", f = {
|
|
10
|
-
label: P,
|
|
11
|
-
title: _
|
|
12
|
-
};
|
|
13
|
-
function u(r) {
|
|
14
|
-
return typeof r == "string" || typeof r == "number" || typeof r == "boolean" || r === null || x(r);
|
|
15
|
-
}
|
|
16
|
-
const y = (r) => {
|
|
17
|
-
const t = {
|
|
18
|
-
as: "span"
|
|
19
|
-
};
|
|
20
|
-
return s(r) ? { ...t, ...r } : u(r) ? {
|
|
21
|
-
...t,
|
|
22
|
-
children: r
|
|
23
|
-
} : null;
|
|
24
|
-
}, h = (r) => {
|
|
25
|
-
const t = {
|
|
26
|
-
as: "span",
|
|
27
|
-
weight: "normal",
|
|
28
|
-
variant: "subtle"
|
|
29
|
-
};
|
|
30
|
-
return s(r) ? { ...t, ...r } : u(r) ? {
|
|
31
|
-
...t,
|
|
32
|
-
children: r
|
|
33
|
-
} : null;
|
|
34
|
-
};
|
|
35
|
-
function A(r) {
|
|
36
|
-
if (typeof r == "string")
|
|
37
|
-
return r;
|
|
38
|
-
if (s(r))
|
|
39
|
-
return r.children;
|
|
40
|
-
}
|
|
41
|
-
const D = ({
|
|
42
|
-
className: r,
|
|
43
|
-
size: t = "sm",
|
|
44
|
-
title: l,
|
|
45
|
-
description: i,
|
|
46
|
-
highlightWords: a,
|
|
47
|
-
loading: m,
|
|
48
|
-
children: p
|
|
49
|
-
}) => {
|
|
50
|
-
const e = l && y(l), n = i && h(i);
|
|
51
|
-
return /* @__PURE__ */ o("span", { className: d(f.label, r), "data-size": t, children: p || /* @__PURE__ */ b(g, { children: [
|
|
52
|
-
e && /* @__PURE__ */ o(
|
|
53
|
-
c,
|
|
54
|
-
{
|
|
55
|
-
...e,
|
|
56
|
-
loading: m,
|
|
57
|
-
highlightWords: a,
|
|
58
|
-
className: f.title,
|
|
59
|
-
weight: e?.weight || t === "lg" ? "medium" : "normal"
|
|
60
|
-
}
|
|
61
|
-
),
|
|
62
|
-
n && /* @__PURE__ */ o(
|
|
63
|
-
c,
|
|
64
|
-
{
|
|
65
|
-
...n,
|
|
66
|
-
loading: m,
|
|
67
|
-
highlightWords: a,
|
|
68
|
-
size: n.size || t === "lg" ? "xs" : "xxs"
|
|
69
|
-
}
|
|
70
|
-
)
|
|
71
|
-
] }) });
|
|
72
|
-
};
|
|
73
|
-
export {
|
|
74
|
-
D as MenuItemLabel,
|
|
75
|
-
A as getAriaLabelFromTitle
|
|
76
|
-
};
|
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as u, jsxs as w } from "react/jsx-runtime";
|
|
3
|
-
import { u as _ } from "../../index-De5bF0Gf.js";
|
|
4
|
-
import { useRef as L, useState as k, useEffect as f, useMemo as A } from "react";
|
|
5
|
-
import "../../index-p1eeF8LQ.js";
|
|
6
|
-
import { useMenu as W } from "../../hooks/useMenu.js";
|
|
7
|
-
import "../Button/Button.js";
|
|
8
|
-
import "../RootProvider/RootProvider.js";
|
|
9
|
-
import { MenuItem as D } from "./MenuItem.js";
|
|
10
|
-
import { MenuSearch as K } from "./MenuSearch.js";
|
|
11
|
-
import { MenuHeader as V } from "./MenuHeader.js";
|
|
12
|
-
import { MenuList as j, MenuListItem as N } from "./MenuBase.js";
|
|
13
|
-
import "../Snackbar/useSnackbar.js";
|
|
14
|
-
import '../../assets/MenuItemsVirtual.css';const F = "_virtualScrollRef_nmoqo_1", O = "_virtualMenuListItem_nmoqo_8", R = {
|
|
15
|
-
virtualScrollRef: F,
|
|
16
|
-
virtualMenuListItem: O
|
|
17
|
-
}, se = ({
|
|
18
|
-
level: M = 0,
|
|
19
|
-
search: y,
|
|
20
|
-
items: E,
|
|
21
|
-
groups: z = {},
|
|
22
|
-
defaultItemSize: T,
|
|
23
|
-
defaultItemColor: b,
|
|
24
|
-
defaultItemVariant: P,
|
|
25
|
-
defaultIconTheme: q,
|
|
26
|
-
keyboardEvents: p,
|
|
27
|
-
scrollRefStyles: $
|
|
28
|
-
}) => {
|
|
29
|
-
const i = L(null), v = i.current?.getBoundingClientRect().top, [x, H] = k(window.innerHeight);
|
|
30
|
-
f(() => {
|
|
31
|
-
const t = () => {
|
|
32
|
-
H(window.innerHeight);
|
|
33
|
-
};
|
|
34
|
-
return window.addEventListener("resize", t), () => {
|
|
35
|
-
window.removeEventListener("resize", t);
|
|
36
|
-
};
|
|
37
|
-
}, []);
|
|
38
|
-
const h = A(() => v && x - v - 8 || 400, [x, v]), B = {
|
|
39
|
-
...{
|
|
40
|
-
maxHeight: h <= 300 ? 300 : h
|
|
41
|
-
},
|
|
42
|
-
...$
|
|
43
|
-
}, { menu: C } = W({
|
|
44
|
-
items: E,
|
|
45
|
-
groups: z,
|
|
46
|
-
groupByKey: "groupId",
|
|
47
|
-
keyboardEvents: p,
|
|
48
|
-
ref: i
|
|
49
|
-
}), d = C.flatMap((t, e) => {
|
|
50
|
-
const r = t?.props || {}, { title: s } = r, m = t?.items?.filter((o) => !o.props?.hidden) || [];
|
|
51
|
-
return [
|
|
52
|
-
...e > 0 || M > 0 ? [{ type: "separator" }] : [],
|
|
53
|
-
...s ? [{ type: "title", title: s }] : [],
|
|
54
|
-
...m.map((o, c) => ({
|
|
55
|
-
type: "item",
|
|
56
|
-
itemProps: o.props || {},
|
|
57
|
-
active: o.active,
|
|
58
|
-
hasChildren: o.props?.expanded && o.props?.items,
|
|
59
|
-
isLastItem: c === m.length - 1
|
|
60
|
-
}))
|
|
61
|
-
];
|
|
62
|
-
}), a = _({
|
|
63
|
-
count: d.length,
|
|
64
|
-
useAnimationFrameWithResizeObserver: !0,
|
|
65
|
-
gap: 8,
|
|
66
|
-
estimateSize: () => 44,
|
|
67
|
-
getScrollElement: () => i.current
|
|
68
|
-
}), g = a.getVirtualItems();
|
|
69
|
-
f(() => {
|
|
70
|
-
for (const t of g) {
|
|
71
|
-
const e = i.current?.querySelector(`[data-index="${t.index}"]`) ?? i.current?.querySelector(`[dataindex="${t.index}"]`) ?? i.current?.querySelector(`[dataIndex="${t.index}"]`);
|
|
72
|
-
e && a.measureElement(e);
|
|
73
|
-
}
|
|
74
|
-
}, [g]);
|
|
75
|
-
const l = L(!1);
|
|
76
|
-
return f(() => {
|
|
77
|
-
const t = (s) => {
|
|
78
|
-
(s.key === "ArrowDown" || s.key === "ArrowUp") && (l.current = !0);
|
|
79
|
-
}, e = () => {
|
|
80
|
-
l.current = !1;
|
|
81
|
-
};
|
|
82
|
-
document.addEventListener("keydown", t, !0);
|
|
83
|
-
const r = i.current;
|
|
84
|
-
return r?.addEventListener("wheel", e, { passive: !0 }), r?.addEventListener("mousedown", e, !0), r?.addEventListener("mousemove", e, !0), r?.addEventListener("touchstart", e, { passive: !0 }), () => {
|
|
85
|
-
document.removeEventListener("keydown", t, !0), r?.removeEventListener("wheel", e), r?.removeEventListener("mousedown", e), r?.removeEventListener("mousemove", e), r?.removeEventListener("touchstart", e);
|
|
86
|
-
};
|
|
87
|
-
}, []), f(() => {
|
|
88
|
-
if (!p || !l.current) return;
|
|
89
|
-
const t = i.current;
|
|
90
|
-
if (!t) return;
|
|
91
|
-
const e = 6, r = d.findIndex((n) => n.type === "item" && n.active);
|
|
92
|
-
if (r < 0) return;
|
|
93
|
-
const s = (n) => (t.querySelector(`[data-index="${n}"]`) || t.querySelector(`[dataindex="${n}"]`) || t.querySelector(`[dataIndex="${n}"]`)) ?? null, m = s(r);
|
|
94
|
-
if (!m) {
|
|
95
|
-
a.scrollToIndex(r, { align: "auto" }), l.current = !1;
|
|
96
|
-
return;
|
|
97
|
-
}
|
|
98
|
-
const o = t.getBoundingClientRect(), c = m.getBoundingClientRect(), S = s(r - 1), I = s(r + 1);
|
|
99
|
-
if (I) {
|
|
100
|
-
const n = I.getBoundingClientRect();
|
|
101
|
-
if (n.bottom > o.bottom) {
|
|
102
|
-
t.scrollTop += n.bottom - o.bottom + e, l.current = !1;
|
|
103
|
-
return;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
if (S) {
|
|
107
|
-
const n = S.getBoundingClientRect();
|
|
108
|
-
if (n.top < o.top) {
|
|
109
|
-
t.scrollTop -= o.top - n.top + e, l.current = !1;
|
|
110
|
-
return;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
c.top < o.top + e ? t.scrollTop -= o.top + e - c.top : c.bottom > o.bottom - e && (t.scrollTop += c.bottom - (o.bottom - e)), l.current = !1;
|
|
114
|
-
}, [d, p, a]), /* @__PURE__ */ u(j, { children: /* @__PURE__ */ w("div", { ref: i, className: R.virtualScrollRef, style: B, children: [
|
|
115
|
-
y && /* @__PURE__ */ u(
|
|
116
|
-
"div",
|
|
117
|
-
{
|
|
118
|
-
style: {
|
|
119
|
-
position: "sticky",
|
|
120
|
-
top: 0,
|
|
121
|
-
zIndex: 10,
|
|
122
|
-
marginTop: "-0.5rem"
|
|
123
|
-
},
|
|
124
|
-
children: /* @__PURE__ */ u(K, { ...y })
|
|
125
|
-
}
|
|
126
|
-
),
|
|
127
|
-
/* @__PURE__ */ u(
|
|
128
|
-
"div",
|
|
129
|
-
{
|
|
130
|
-
style: {
|
|
131
|
-
position: "relative",
|
|
132
|
-
height: `${a.getTotalSize()}px`
|
|
133
|
-
},
|
|
134
|
-
children: g.map((t) => {
|
|
135
|
-
const e = d[t.index];
|
|
136
|
-
return e ? /* @__PURE__ */ w(
|
|
137
|
-
N,
|
|
138
|
-
{
|
|
139
|
-
dataIndex: t.index,
|
|
140
|
-
className: R.virtualMenuListItem,
|
|
141
|
-
style: { transform: `translateY(${t.start}px)` },
|
|
142
|
-
role: e.type === "separator" ? "separator" : void 0,
|
|
143
|
-
children: [
|
|
144
|
-
e.type === "title" && /* @__PURE__ */ u(V, { title: e.title }),
|
|
145
|
-
e.type === "item" && /* @__PURE__ */ u(
|
|
146
|
-
D,
|
|
147
|
-
{
|
|
148
|
-
...e.itemProps,
|
|
149
|
-
size: e.itemProps.size || T,
|
|
150
|
-
color: e.itemProps.color || b,
|
|
151
|
-
variant: e.itemProps.variant || P,
|
|
152
|
-
iconTheme: e.itemProps.iconTheme || q,
|
|
153
|
-
active: e.active,
|
|
154
|
-
tabIndex: e.itemProps.disabled || p ? -1 : 0
|
|
155
|
-
}
|
|
156
|
-
)
|
|
157
|
-
]
|
|
158
|
-
},
|
|
159
|
-
t.key
|
|
160
|
-
) : null;
|
|
161
|
-
})
|
|
162
|
-
}
|
|
163
|
-
)
|
|
164
|
-
] }) });
|
|
165
|
-
};
|
|
166
|
-
export {
|
|
167
|
-
se as MenuItemsVirtual
|
|
168
|
-
};
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
-
import "../../index-p1eeF8LQ.js";
|
|
3
|
-
import "react";
|
|
4
|
-
import { useIsDesktop as a } from "../../hooks/useIsDesktop.js";
|
|
5
|
-
import "../Button/Button.js";
|
|
6
|
-
import "../RootProvider/RootProvider.js";
|
|
7
|
-
import { SearchField as c } from "../Forms/SearchField.js";
|
|
8
|
-
import "../Snackbar/useSnackbar.js";
|
|
9
|
-
import '../../assets/MenuSearch.css';const l = "_field_1w1s0_1", n = {
|
|
10
|
-
field: l
|
|
11
|
-
}, S = ({
|
|
12
|
-
name: e,
|
|
13
|
-
value: r,
|
|
14
|
-
placeholder: t = "Search",
|
|
15
|
-
clearButtonAltText: s = "Clear search",
|
|
16
|
-
onChange: i,
|
|
17
|
-
onClear: p
|
|
18
|
-
}) => {
|
|
19
|
-
const m = a();
|
|
20
|
-
return /* @__PURE__ */ f(
|
|
21
|
-
c,
|
|
22
|
-
{
|
|
23
|
-
size: "xs",
|
|
24
|
-
name: e,
|
|
25
|
-
value: r,
|
|
26
|
-
placeholder: t,
|
|
27
|
-
onChange: i,
|
|
28
|
-
onClear: p,
|
|
29
|
-
clearButtonAltText: s,
|
|
30
|
-
className: n.field,
|
|
31
|
-
autoComplete: "off",
|
|
32
|
-
autoFocus: m,
|
|
33
|
-
onKeyDown: (o) => {
|
|
34
|
-
(o.key === "ArrowUp" || o.key === "ArrowDown") && o.preventDefault();
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
);
|
|
38
|
-
};
|
|
39
|
-
export {
|
|
40
|
-
S as MenuSearch
|
|
41
|
-
};
|