@konstructio/ui 0.1.0-alpha.8 → 0.1.1-alpha.1
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/DatePicker.css +1 -1
- package/dist/{Modal-CrG0m703.js → Modal-0oht63vU.js} +32 -32
- package/dist/assets/icons/components/Search.js +26 -0
- package/dist/assets/icons/components/Warning.js +22 -0
- package/dist/assets/icons/components/index.js +6 -0
- package/dist/{chevron-down-UW8ts6wI.js → chevron-down-CVce9Mvh.js} +2 -2
- package/dist/components/Alert/Alert.js +23 -25
- package/dist/components/Alert/Alert.variants.js +1 -1
- package/dist/components/AlertDialog/AlertDialog.js +1 -1
- package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
- package/dist/components/AlertDialog/components/index.js +1 -1
- package/dist/components/AlertDialog/hooks/useAlertDialog.js +7 -7
- package/dist/components/Autocomplete/Autocomplete.variants.js +3 -4
- package/dist/components/Autocomplete/components/List/List.variants.js +3 -7
- package/dist/components/Autocomplete/hooks/useAutocomplete.js +38 -43
- package/dist/components/Autocomplete/hooks/useNavigationList.js +29 -37
- package/dist/components/Badge/Badge.js +40 -42
- package/dist/components/Badge/Badge.variants.js +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.variants.js +1 -1
- package/dist/components/Breadcrumb/components/Item/Item.js +22 -21
- package/dist/components/Breadcrumb/components/Item/Item.variants.js +1 -1
- package/dist/components/Breadcrumb/hooks/useBreadcrumb.js +1 -1
- package/dist/components/Button/Button.js +15 -15
- package/dist/components/Button/Button.variants.js +10 -77
- package/dist/components/Card/Card.variants.js +3 -5
- package/dist/components/Checkbox/Checkbox.js +48 -47
- package/dist/components/Checkbox/Checkbox.variants.js +3 -4
- package/dist/components/Command/Command.js +2 -2
- package/dist/components/Command/Command.variants.js +1 -1
- package/dist/components/Command/components/Command.js +1 -1
- package/dist/components/Command/components/CommandEmpty.js +1 -1
- package/dist/components/Command/components/CommandGroup.js +1 -1
- package/dist/components/Command/components/CommandInput.js +1 -1
- package/dist/components/Command/components/CommandItem.js +13 -13
- package/dist/components/Command/components/CommandList.js +1 -1
- package/dist/components/Command/components/CommandSeparator.js +1 -1
- package/dist/components/Command/components/DialogContent.js +1 -1
- package/dist/components/Command/components/DialogOverlay.js +1 -1
- package/dist/components/Datepicker/DatePicker.js +1496 -1577
- package/dist/components/Datepicker/DatePicker.variants.js +1 -1
- package/dist/components/Divider/Divider.variants.js +1 -1
- package/dist/components/Dropdown/Dropdown.js +28 -6
- package/dist/components/Dropdown/Dropdown.variants.js +43 -26
- package/dist/components/Dropdown/components/List/List.variants.js +1 -1
- package/dist/components/Dropdown/components/ListItem/ListItem.variants.js +5 -5
- package/dist/components/Dropdown/components/Wrapper.js +96 -86
- package/dist/components/Dropdown/contexts/dropdown.provider.js +12 -12
- package/dist/components/Dropdown/hooks/useDropdown.js +26 -30
- package/dist/components/Dropdown/hooks/useNavigationList.js +25 -31
- package/dist/components/DropdownButton/DropdownButton.js +135 -0
- package/dist/components/Filter/Filter.variants.js +1 -1
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.hook.js +47 -49
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +70 -57
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.hook.js +41 -42
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.js +68 -55
- package/dist/components/Filter/components/ResetButton/ResetButton.js +22 -16
- package/dist/components/Input/Input.js +116 -109
- package/dist/components/Input/Input.variants.js +18 -5
- package/dist/components/Loading/Loading.js +2 -2
- package/dist/components/Loading/Loading.variants.js +1 -2
- package/dist/components/Modal/Modal.js +2 -2
- package/dist/components/Modal/components/Body/Body.js +1 -1
- package/dist/components/Modal/components/Footer/Footer.js +1 -1
- package/dist/components/Modal/components/Header/Header.js +1 -1
- package/dist/components/Modal/components/Wrapper/Wrapper.js +2 -2
- package/dist/components/Modal/components/Wrapper/Wrapper.variants.js +7 -9
- package/dist/components/Modal/components/index.js +1 -1
- package/dist/components/Modal/hooks/useModal.js +16 -17
- package/dist/components/NumberInput/NumberInput.js +91 -91
- package/dist/components/NumberInput/NumberInput.variants.js +1 -1
- package/dist/components/PieChart/PieChart.js +5138 -0
- package/dist/components/ProgressBar/ProgressBar.js +58 -26
- package/dist/components/ProgressBar/ProgressBar.variants.js +1 -1
- package/dist/components/Radio/Radio.js +64 -48
- package/dist/components/Radio/Radio.variants.js +3 -3
- package/dist/components/RadioCard/RadioCard.js +26 -23
- package/dist/components/RadioCard/RadioCard.variants.js +1 -1
- package/dist/components/RadioCardGroup/RadioCardGroup.js +28 -28
- package/dist/components/RadioCardGroup/RadioCardGroup.variants.js +1 -1
- package/dist/components/RadioGroup/RadioGroup.js +37 -37
- package/dist/components/RadioGroup/RadioGroup.variants.js +1 -1
- package/dist/components/Range/Range.js +1 -1
- package/dist/components/Range/Range.variants.js +2 -3
- package/dist/components/Sidebar/Sidebar.js +4 -3
- package/dist/components/Sidebar/Sidebar.variants.js +1 -1
- package/dist/components/Sidebar/components/Footer/Footer.js +5 -4
- package/dist/components/Sidebar/components/Footer/Footer.variants.js +1 -1
- package/dist/components/Sidebar/components/Logo/Logo.js +6 -5
- package/dist/components/Sidebar/components/Logo/Logo.variants.js +1 -1
- package/dist/components/Sidebar/components/Navigation/Navigation.js +5 -4
- package/dist/components/Sidebar/components/Navigation/Navigation.variants.js +1 -1
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.js +14 -13
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.variants.js +1 -1
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.js +13 -12
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.variants.js +1 -1
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.js +5 -6
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.variants.js +1 -1
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.js +9 -8
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.variants.js +1 -1
- package/dist/components/Sidebar/components/Wrapper/Wrapper.js +15 -14
- package/dist/components/Slider/Slider.js +1 -1
- package/dist/components/Slider/Slider.variants.js +2 -8
- package/dist/components/Switch/Switch.js +54 -54
- package/dist/components/Switch/Switch.variants.js +2 -3
- package/dist/components/Table/Table.variants.js +1 -1
- package/dist/components/Tabs/Tabs.js +20 -16
- package/dist/components/Tabs/Tabs.variants.js +3 -5
- package/dist/components/Tabs/components/Content.js +10 -13
- package/dist/components/Tabs/components/List.js +9 -8
- package/dist/components/Tabs/components/Trigger.js +12 -16
- package/dist/components/Tabs/components/index.js +8 -0
- package/dist/components/Tag/Tag.js +1 -1
- package/dist/components/Tag/Tag.variants.js +1 -1
- package/dist/components/TagSelect/TagSelect.variants.js +1 -1
- package/dist/components/TagSelect/components/Item/Item.variants.js +1 -1
- package/dist/components/TagSelect/components/List/List.variants.js +1 -1
- package/dist/components/TagSelect/hooks/useTagSelect.js +14 -16
- package/dist/components/TextArea/TextArea.variants.js +4 -5
- package/dist/components/TimePicker/TimePicker.variants.js +6 -7
- package/dist/components/TimePicker/components/HoursList/HoursList.js +21 -26
- package/dist/components/TimePicker/components/MeridianList/MeridianList.js +19 -20
- package/dist/components/TimePicker/components/MinutesList/MinutesList.js +24 -25
- package/dist/components/TimePicker/components/Wrapper/Wrapper.js +33 -34
- package/dist/components/TimePicker/components/WrapperList/WrapperList.variants.js +1 -1
- package/dist/components/Toast/Toast.js +223 -232
- package/dist/components/Toast/Toast.variants.js +8 -11
- package/dist/components/Tooltip/Tooltip.js +1 -1
- package/dist/components/Tooltip/Tooltip.variants.js +7 -14
- package/dist/components/Tooltip/hooks/useTooltip.js +8 -9
- package/dist/components/Typography/Typography.js +26 -31
- package/dist/components/Typography/Typography.variants.js +1 -1
- package/dist/components/index.js +78 -66
- package/dist/contexts/theme.provider.js +28 -29
- package/dist/{createLucideIcon-ByJ0JZvK.js → createLucideIcon-BpsAkT97.js} +4 -4
- package/dist/index-0ioNhtNM.js +10 -0
- package/dist/{index-CvfCCTEO.js → index-BAraV3ai.js} +7 -7
- package/dist/index-BXuxPoz7.js +435 -0
- package/dist/index-BfXxHr_2.js +125 -0
- package/dist/index-C1g_chDT.js +70 -0
- package/dist/{index-BCGvACM9.js → index-C9T9HQaa.js} +1 -1
- package/dist/{index-Bc1LNrRD.js → index-CZnD2QxM.js} +1 -1
- package/dist/index-CrBonFvu.js +144 -0
- package/dist/{index-rUBNhTeF.js → index-Cvx4lqTq.js} +2 -2
- package/dist/{index-BNmRGtA6.js → index-D29mdTf5.js} +3 -3
- package/dist/{index-Dkt8F6CZ.js → index-D3xzCzcO.js} +12 -12
- package/dist/index-DB2XhXHn.js +431 -0
- package/dist/{index-B5MIi2tR.js → index-DQH6odE9.js} +2 -3
- package/dist/index-Oq5GlCHP.js +131 -0
- package/dist/{index-Cs8Lv8Wj.js → index-bwWKd82e.js} +1 -1
- package/dist/{index--EmNlyHx.js → index-iXyXtdgP.js} +1 -1
- package/dist/index.d.ts +159 -9
- package/dist/index.js +88 -76
- package/dist/package.json +41 -37
- package/dist/styles.css +1 -1
- package/dist/ui/civo-theme.css +261 -241
- package/dist/ui/kubefirst-theme.css +4 -4
- package/dist/ui/theme.css +0 -2
- package/dist/{useBreadcrumb-DMERrNkJ.js → useBreadcrumb-B8DnuqkR.js} +254 -261
- package/dist/utils/index.js +25 -26
- package/package.json +41 -37
- package/dist/index-BNU3RH-3.js +0 -133
- package/dist/index-BvCZBMfr.js +0 -432
- package/dist/index-Cq1I1cG9.js +0 -129
- package/dist/index-DLYwlPRZ.js +0 -440
- package/dist/index-DNRcvRTB.js +0 -145
- package/dist/index-Dm-ooN_M.js +0 -71
- package/dist/index-DwYXX2sM.js +0 -13
package/dist/DatePicker.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.rdp-root{--rdp-accent-color: blue;--rdp-accent-background-color: #f0f0ff;--rdp-day-height: 44px;--rdp-day-width: 44px;--rdp-day_button-border-radius: 100%;--rdp-day_button-border: 2px solid transparent;--rdp-day_button-height: 42px;--rdp-day_button-width: 42px;--rdp-selected-border: 2px solid var(--rdp-accent-color);--rdp-disabled-opacity: .5;--rdp-outside-opacity: .75;--rdp-today-color: var(--rdp-accent-color);--rdp-dropdown-gap: .5rem;--rdp-months-gap: 2rem;--rdp-nav_button-disabled-opacity: .5;--rdp-nav_button-height: 2.25rem;--rdp-nav_button-width: 2.25rem;--rdp-nav-height: 2.75rem;--rdp-range_middle-background-color: var(--rdp-accent-background-color);--rdp-range_middle-color: inherit;--rdp-range_start-color: white;--rdp-range_start-background: linear-gradient(var(--rdp-gradient-direction), transparent 50%, var(--rdp-range_middle-background-color) 50%);--rdp-range_start-date-background-color: var(--rdp-accent-color);--rdp-range_end-background: linear-gradient(var(--rdp-gradient-direction), var(--rdp-range_middle-background-color) 50%, transparent 50%);--rdp-range_end-color: white;--rdp-range_end-date-background-color: var(--rdp-accent-color);--rdp-week_number-border-radius: 100%;--rdp-week_number-border: 2px solid transparent;--rdp-week_number-height: var(--rdp-day-height);--rdp-week_number-opacity: .75;--rdp-week_number-width: var(--rdp-day-width);--rdp-weeknumber-text-align: center;--rdp-weekday-opacity: .75;--rdp-weekday-padding: .5rem 0rem;--rdp-weekday-text-align: center;--rdp-gradient-direction: 90deg;--rdp-animation_duration: .3s;--rdp-animation_timing: cubic-bezier(.4, 0, .2, 1)}.rdp-root[dir=rtl]{--rdp-gradient-direction: -90deg}.rdp-root[data-broadcast-calendar=true]{--rdp-outside-opacity: unset}.rdp-root{position:relative;box-sizing:border-box}.rdp-root *{box-sizing:border-box}.rdp-day{width:var(--rdp-day-width);height:var(--rdp-day-height);text-align:center}.rdp-day_button{background:none;padding:0;margin:0;cursor:pointer;font:inherit;color:inherit;justify-content:center;align-items:center;display:flex;width:var(--rdp-day_button-width);height:var(--rdp-day_button-height);border:var(--rdp-day_button-border);border-radius:var(--rdp-day_button-border-radius)}.rdp-day_button:disabled{cursor:revert}.rdp-caption_label{z-index:1;position:relative;display:inline-flex;align-items:center;white-space:nowrap;border:0}.rdp-dropdown:focus-visible~.rdp-caption_label{outline:5px auto Highlight;outline:5px auto -webkit-focus-ring-color}.rdp-button_next,.rdp-button_previous{border:none;background:none;padding:0;margin:0;cursor:pointer;font:inherit;color:inherit;-moz-appearance:none;-webkit-appearance:none;display:inline-flex;align-items:center;justify-content:center;position:relative;appearance:none;width:var(--rdp-nav_button-width);height:var(--rdp-nav_button-height)}.rdp-button_next:disabled,.rdp-button_next[aria-disabled=true],.rdp-button_previous:disabled,.rdp-button_previous[aria-disabled=true]{cursor:revert;opacity:var(--rdp-nav_button-disabled-opacity)}.rdp-chevron{display:inline-block;fill:var(--rdp-accent-color)}.rdp-root[dir=rtl] .rdp-nav .rdp-chevron{transform:rotate(180deg);transform-origin:50%}.rdp-dropdowns{position:relative;display:inline-flex;align-items:center;gap:var(--rdp-dropdown-gap)}.rdp-dropdown{z-index:2;opacity:0
|
|
1
|
+
.rdp-root{--rdp-accent-color: blue;--rdp-accent-background-color: #f0f0ff;--rdp-day-height: 44px;--rdp-day-width: 44px;--rdp-day_button-border-radius: 100%;--rdp-day_button-border: 2px solid transparent;--rdp-day_button-height: 42px;--rdp-day_button-width: 42px;--rdp-selected-border: 2px solid var(--rdp-accent-color);--rdp-disabled-opacity: .5;--rdp-outside-opacity: .75;--rdp-today-color: var(--rdp-accent-color);--rdp-dropdown-gap: .5rem;--rdp-months-gap: 2rem;--rdp-nav_button-disabled-opacity: .5;--rdp-nav_button-height: 2.25rem;--rdp-nav_button-width: 2.25rem;--rdp-nav-height: 2.75rem;--rdp-range_middle-background-color: var(--rdp-accent-background-color);--rdp-range_middle-color: inherit;--rdp-range_start-color: white;--rdp-range_start-background: linear-gradient( var(--rdp-gradient-direction), transparent 50%, var(--rdp-range_middle-background-color) 50% );--rdp-range_start-date-background-color: var(--rdp-accent-color);--rdp-range_end-background: linear-gradient( var(--rdp-gradient-direction), var(--rdp-range_middle-background-color) 50%, transparent 50% );--rdp-range_end-color: white;--rdp-range_end-date-background-color: var(--rdp-accent-color);--rdp-week_number-border-radius: 100%;--rdp-week_number-border: 2px solid transparent;--rdp-week_number-height: var(--rdp-day-height);--rdp-week_number-opacity: .75;--rdp-week_number-width: var(--rdp-day-width);--rdp-weeknumber-text-align: center;--rdp-weekday-opacity: .75;--rdp-weekday-padding: .5rem 0rem;--rdp-weekday-text-align: center;--rdp-gradient-direction: 90deg;--rdp-animation_duration: .3s;--rdp-animation_timing: cubic-bezier(.4, 0, .2, 1)}.rdp-root[dir=rtl]{--rdp-gradient-direction: -90deg}.rdp-root[data-broadcast-calendar=true]{--rdp-outside-opacity: unset}.rdp-root{position:relative;box-sizing:border-box}.rdp-root *{box-sizing:border-box}.rdp-day{width:var(--rdp-day-width);height:var(--rdp-day-height);text-align:center}.rdp-day_button{background:none;padding:0;margin:0;cursor:pointer;font:inherit;color:inherit;justify-content:center;align-items:center;display:flex;width:var(--rdp-day_button-width);height:var(--rdp-day_button-height);border:var(--rdp-day_button-border);border-radius:var(--rdp-day_button-border-radius)}.rdp-day_button:disabled{cursor:revert}.rdp-caption_label{z-index:1;position:relative;display:inline-flex;align-items:center;white-space:nowrap;border:0}.rdp-dropdown:focus-visible~.rdp-caption_label{outline:5px auto Highlight;outline:5px auto -webkit-focus-ring-color}.rdp-button_next,.rdp-button_previous{border:none;background:none;padding:0;margin:0;cursor:pointer;font:inherit;color:inherit;-moz-appearance:none;-webkit-appearance:none;display:inline-flex;align-items:center;justify-content:center;position:relative;appearance:none;width:var(--rdp-nav_button-width);height:var(--rdp-nav_button-height)}.rdp-button_next:disabled,.rdp-button_next[aria-disabled=true],.rdp-button_previous:disabled,.rdp-button_previous[aria-disabled=true]{cursor:revert;opacity:var(--rdp-nav_button-disabled-opacity)}.rdp-chevron{display:inline-block;fill:var(--rdp-accent-color)}.rdp-root[dir=rtl] .rdp-nav .rdp-chevron{transform:rotate(180deg);transform-origin:50%}.rdp-dropdowns{position:relative;display:inline-flex;align-items:center;gap:var(--rdp-dropdown-gap)}.rdp-dropdown{z-index:2;opacity:0;appearance:none;position:absolute;inset-block-start:0;inset-block-end:0;inset-inline-start:0;width:100%;margin:0;padding:0;cursor:inherit;border:none;line-height:inherit}.rdp-dropdown_root{position:relative;display:inline-flex;align-items:center}.rdp-dropdown_root[data-disabled=true] .rdp-chevron{opacity:var(--rdp-disabled-opacity)}.rdp-month_caption{display:flex;align-content:center;height:var(--rdp-nav-height);font-weight:700;font-size:large}.rdp-root[data-nav-layout=around] .rdp-month,.rdp-root[data-nav-layout=after] .rdp-month{position:relative}.rdp-root[data-nav-layout=around] .rdp-month_caption{justify-content:center;margin-inline-start:var(--rdp-nav_button-width);margin-inline-end:var(--rdp-nav_button-width);position:relative}.rdp-root[data-nav-layout=around] .rdp-button_previous{position:absolute;inset-inline-start:0;top:0;height:var(--rdp-nav-height);display:inline-flex}.rdp-root[data-nav-layout=around] .rdp-button_next{position:absolute;inset-inline-end:0;top:0;height:var(--rdp-nav-height);display:inline-flex;justify-content:center}.rdp-months{position:relative;display:flex;flex-wrap:wrap;gap:var(--rdp-months-gap);max-width:fit-content}.rdp-month_grid{border-collapse:collapse}.rdp-nav{position:absolute;inset-block-start:0;inset-inline-end:0;display:flex;align-items:center;height:var(--rdp-nav-height)}.rdp-weekday{opacity:var(--rdp-weekday-opacity);padding:var(--rdp-weekday-padding);font-weight:500;font-size:smaller;text-align:var(--rdp-weekday-text-align);text-transform:var(--rdp-weekday-text-transform)}.rdp-week_number{opacity:var(--rdp-week_number-opacity);font-weight:400;font-size:small;height:var(--rdp-week_number-height);width:var(--rdp-week_number-width);border:var(--rdp-week_number-border);border-radius:var(--rdp-week_number-border-radius);text-align:var(--rdp-weeknumber-text-align)}.rdp-today:not(.rdp-outside){color:var(--rdp-today-color)}.rdp-selected{font-weight:700;font-size:large}.rdp-selected .rdp-day_button{border:var(--rdp-selected-border)}.rdp-outside{opacity:var(--rdp-outside-opacity)}.rdp-disabled{opacity:var(--rdp-disabled-opacity)}.rdp-hidden{visibility:hidden;color:var(--rdp-range_start-color)}.rdp-range_start{background:var(--rdp-range_start-background)}.rdp-range_start .rdp-day_button{background-color:var(--rdp-range_start-date-background-color);color:var(--rdp-range_start-color)}.rdp-range_middle{background-color:var(--rdp-range_middle-background-color)}.rdp-range_middle .rdp-day_button{border:unset;border-radius:unset;color:var(--rdp-range_middle-color)}.rdp-range_end{background:var(--rdp-range_end-background);color:var(--rdp-range_end-color)}.rdp-range_end .rdp-day_button{color:var(--rdp-range_start-color);background-color:var(--rdp-range_end-date-background-color)}.rdp-range_start.rdp-range_end{background:revert}.rdp-focusable{cursor:pointer}@keyframes rdp-slide_in_left{0%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes rdp-slide_in_right{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes rdp-slide_out_left{0%{transform:translate(0)}to{transform:translate(-100%)}}@keyframes rdp-slide_out_right{0%{transform:translate(0)}to{transform:translate(100%)}}.rdp-weeks_before_enter{animation:rdp-slide_in_left var(--rdp-animation_duration) var(--rdp-animation_timing) forwards}.rdp-weeks_before_exit{animation:rdp-slide_out_left var(--rdp-animation_duration) var(--rdp-animation_timing) forwards}.rdp-weeks_after_enter{animation:rdp-slide_in_right var(--rdp-animation_duration) var(--rdp-animation_timing) forwards}.rdp-weeks_after_exit{animation:rdp-slide_out_right var(--rdp-animation_duration) var(--rdp-animation_timing) forwards}.rdp-root[dir=rtl] .rdp-weeks_after_enter{animation:rdp-slide_in_left var(--rdp-animation_duration) var(--rdp-animation_timing) forwards}.rdp-root[dir=rtl] .rdp-weeks_before_exit{animation:rdp-slide_out_right var(--rdp-animation_duration) var(--rdp-animation_timing) forwards}.rdp-root[dir=rtl] .rdp-weeks_before_enter{animation:rdp-slide_in_right var(--rdp-animation_duration) var(--rdp-animation_timing) forwards}.rdp-root[dir=rtl] .rdp-weeks_after_exit{animation:rdp-slide_out_left var(--rdp-animation_duration) var(--rdp-animation_timing) forwards}@keyframes rdp-fade_in{0%{opacity:0}to{opacity:1}}@keyframes rdp-fade_out{0%{opacity:1}to{opacity:0}}.rdp-caption_after_enter{animation:rdp-fade_in var(--rdp-animation_duration) var(--rdp-animation_timing) forwards}.rdp-caption_after_exit{animation:rdp-fade_out var(--rdp-animation_duration) var(--rdp-animation_timing) forwards}.rdp-caption_before_enter{animation:rdp-fade_in var(--rdp-animation_duration) var(--rdp-animation_timing) forwards}.rdp-caption_before_exit{animation:rdp-fade_out var(--rdp-animation_duration) var(--rdp-animation_timing) forwards}
|
|
@@ -1,47 +1,47 @@
|
|
|
1
1
|
import { Body as b } from "./components/Modal/components/Body/Body.js";
|
|
2
2
|
import { Footer as g } from "./components/Modal/components/Footer/Footer.js";
|
|
3
3
|
import { Header as v } from "./components/Modal/components/Header/Header.js";
|
|
4
|
-
import { jsx as a, jsxs as
|
|
4
|
+
import { jsx as a, jsxs as c } from "react/jsx-runtime";
|
|
5
5
|
import { Children as s, isValidElement as m, useEffect as w } from "react";
|
|
6
|
-
import { r as x } from "./index-
|
|
7
|
-
import { R as A } from "./index
|
|
6
|
+
import { r as x } from "./index-C9T9HQaa.js";
|
|
7
|
+
import { R as A } from "./index-iXyXtdgP.js";
|
|
8
8
|
import { R as E } from "./Combination-VYaRRJBZ.js";
|
|
9
9
|
import { cn as p } from "./utils/index.js";
|
|
10
10
|
import { buttonCloseVariants as N, modalVariants as R } from "./components/Modal/components/Wrapper/Wrapper.variants.js";
|
|
11
11
|
import { X as k } from "./x-BPcqkRZd.js";
|
|
12
12
|
const B = ({
|
|
13
13
|
children: e,
|
|
14
|
-
theme:
|
|
14
|
+
theme: t,
|
|
15
15
|
className: d,
|
|
16
|
-
buttonCloseClassName:
|
|
17
|
-
onClose:
|
|
16
|
+
buttonCloseClassName: n,
|
|
17
|
+
onClose: i
|
|
18
18
|
}) => {
|
|
19
|
-
const
|
|
20
|
-
(
|
|
19
|
+
const l = s.toArray(e).find(
|
|
20
|
+
(o) => m(o) && o.type === r.Header
|
|
21
21
|
), f = s.toArray(e).find(
|
|
22
|
-
(
|
|
22
|
+
(o) => m(o) && o.type === r.Body
|
|
23
23
|
), y = s.toArray(e).find(
|
|
24
|
-
(
|
|
24
|
+
(o) => m(o) && o.type === r.Footer
|
|
25
25
|
), u = s.toArray(e).filter(
|
|
26
|
-
(
|
|
27
|
-
|
|
26
|
+
(o) => !m(o) || ![r.Header, r.Body, r.Footer].includes(
|
|
27
|
+
o.type
|
|
28
28
|
)
|
|
29
29
|
);
|
|
30
|
-
return /* @__PURE__ */ a(E, { children: /* @__PURE__ */
|
|
30
|
+
return /* @__PURE__ */ a(E, { children: /* @__PURE__ */ c(
|
|
31
31
|
"div",
|
|
32
32
|
{
|
|
33
33
|
className: "fixed inset-0 grid place-content-center",
|
|
34
|
-
"data-theme":
|
|
34
|
+
"data-theme": t,
|
|
35
35
|
children: [
|
|
36
36
|
/* @__PURE__ */ a(
|
|
37
37
|
"div",
|
|
38
38
|
{
|
|
39
39
|
className: "absolute inset-0 bg-black opacity-75 animate-in fade-in-0",
|
|
40
|
-
onClick:
|
|
40
|
+
onClick: i,
|
|
41
41
|
role: "presentation"
|
|
42
42
|
}
|
|
43
43
|
),
|
|
44
|
-
/* @__PURE__ */
|
|
44
|
+
/* @__PURE__ */ c(
|
|
45
45
|
"div",
|
|
46
46
|
{
|
|
47
47
|
className: p(
|
|
@@ -52,16 +52,16 @@ const B = ({
|
|
|
52
52
|
role: "dialog",
|
|
53
53
|
"aria-modal": "true",
|
|
54
54
|
children: [
|
|
55
|
-
|
|
56
|
-
/* @__PURE__ */
|
|
55
|
+
l,
|
|
56
|
+
/* @__PURE__ */ c(
|
|
57
57
|
"button",
|
|
58
58
|
{
|
|
59
59
|
className: p(
|
|
60
60
|
N({
|
|
61
|
-
className:
|
|
61
|
+
className: n
|
|
62
62
|
})
|
|
63
63
|
),
|
|
64
|
-
onClick:
|
|
64
|
+
onClick: i,
|
|
65
65
|
children: [
|
|
66
66
|
/* @__PURE__ */ a(k, {}),
|
|
67
67
|
/* @__PURE__ */ a(A, { children: "Dismiss modal" })
|
|
@@ -76,23 +76,23 @@ const B = ({
|
|
|
76
76
|
]
|
|
77
77
|
}
|
|
78
78
|
) });
|
|
79
|
-
},
|
|
80
|
-
const
|
|
81
|
-
|
|
79
|
+
}, r = ({ isOpen: e, onClose: t, ...d }) => (w(() => {
|
|
80
|
+
const n = new AbortController(), i = (l) => {
|
|
81
|
+
l.code === "Escape" && t?.();
|
|
82
82
|
};
|
|
83
|
-
return window.addEventListener("keydown",
|
|
84
|
-
signal:
|
|
83
|
+
return window.addEventListener("keydown", i, {
|
|
84
|
+
signal: n.signal
|
|
85
85
|
}), () => {
|
|
86
|
-
|
|
86
|
+
n.abort();
|
|
87
87
|
};
|
|
88
|
-
}, [
|
|
89
|
-
/* @__PURE__ */ a(B, { ...d, onClose:
|
|
88
|
+
}, [t]), e ? x.createPortal(
|
|
89
|
+
/* @__PURE__ */ a(B, { ...d, onClose: t }),
|
|
90
90
|
document.body
|
|
91
91
|
) : null);
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
92
|
+
r.Header = v;
|
|
93
|
+
r.Body = b;
|
|
94
|
+
r.Footer = g;
|
|
95
95
|
export {
|
|
96
|
-
|
|
96
|
+
r as M,
|
|
97
97
|
B as W
|
|
98
98
|
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsxs as l, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
const e = ({ className: r }) => /* @__PURE__ */ l(
|
|
3
|
+
"svg",
|
|
4
|
+
{
|
|
5
|
+
width: "20",
|
|
6
|
+
height: "20",
|
|
7
|
+
viewBox: "0 0 20 20",
|
|
8
|
+
fill: "currentColor",
|
|
9
|
+
className: r,
|
|
10
|
+
children: [
|
|
11
|
+
/* @__PURE__ */ i("g", { id: "Icon", clipPath: "url(#clip0_252_122)", children: /* @__PURE__ */ i(
|
|
12
|
+
"path",
|
|
13
|
+
{
|
|
14
|
+
id: "Vector",
|
|
15
|
+
d: "M12.9167 11.6667H12.2583L12.025 11.4417C12.8417 10.4917 13.3333 9.25833 13.3333 7.91667C13.3333 4.925 10.9083 2.5 7.91667 2.5C4.925 2.5 2.5 4.925 2.5 7.91667C2.5 10.9083 4.925 13.3333 7.91667 13.3333C9.25833 13.3333 10.4917 12.8417 11.4417 12.025L11.6667 12.2583V12.9167L15.8333 17.075L17.075 15.8333L12.9167 11.6667ZM7.91667 11.6667C5.84167 11.6667 4.16667 9.99167 4.16667 7.91667C4.16667 5.84167 5.84167 4.16667 7.91667 4.16667C9.99167 4.16667 11.6667 5.84167 11.6667 7.91667C11.6667 9.99167 9.99167 11.6667 7.91667 11.6667Z",
|
|
16
|
+
fill: "currentColor"
|
|
17
|
+
}
|
|
18
|
+
) }),
|
|
19
|
+
/* @__PURE__ */ i("defs", { children: /* @__PURE__ */ i("clipPath", { id: "clip0_252_122", children: /* @__PURE__ */ i("rect", { width: "20", height: "20", fill: "currentColor" }) }) })
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
export {
|
|
24
|
+
e as SearchIcon,
|
|
25
|
+
e as default
|
|
26
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
const l = ({ className: C }) => /* @__PURE__ */ r(
|
|
3
|
+
"svg",
|
|
4
|
+
{
|
|
5
|
+
width: "20",
|
|
6
|
+
height: "20",
|
|
7
|
+
viewBox: "0 0 20 20",
|
|
8
|
+
fill: "currentColor",
|
|
9
|
+
className: C,
|
|
10
|
+
children: /* @__PURE__ */ r("g", { children: /* @__PURE__ */ r(
|
|
11
|
+
"path",
|
|
12
|
+
{
|
|
13
|
+
d: "M9.16663 12.5H10.8333V14.1667H9.16663V12.5ZM9.16663 5.83335H10.8333V10.8334H9.16663V5.83335ZM9.99163 1.66669C5.39163 1.66669 1.66663 5.40002 1.66663 10C1.66663 14.6 5.39163 18.3334 9.99163 18.3334C14.6 18.3334 18.3333 14.6 18.3333 10C18.3333 5.40002 14.6 1.66669 9.99163 1.66669ZM9.99996 16.6667C6.31663 16.6667 3.33329 13.6834 3.33329 10C3.33329 6.31669 6.31663 3.33335 9.99996 3.33335C13.6833 3.33335 16.6666 6.31669 16.6666 10C16.6666 13.6834 13.6833 16.6667 9.99996 16.6667Z",
|
|
14
|
+
fill: "currentColor"
|
|
15
|
+
}
|
|
16
|
+
) })
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
export {
|
|
20
|
+
l as Warning,
|
|
21
|
+
l as default
|
|
22
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as o } from "./createLucideIcon-
|
|
1
|
+
import { c as o } from "./createLucideIcon-BpsAkT97.js";
|
|
2
2
|
/**
|
|
3
|
-
* @license lucide-react v0.
|
|
3
|
+
* @license lucide-react v0.542.0 - ISC
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the ISC license.
|
|
6
6
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -1,53 +1,51 @@
|
|
|
1
|
-
import { jsx as l, jsxs as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { V as
|
|
4
|
-
import { cn as
|
|
5
|
-
import { closeButtonVariants as
|
|
6
|
-
import { X as
|
|
7
|
-
const
|
|
8
|
-
theme:
|
|
1
|
+
import { jsx as l, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as f, useState as h, useMemo as b, isValidElement as C, useCallback as V, useEffect as v } from "react";
|
|
3
|
+
import { V as k } from "../../index-iXyXtdgP.js";
|
|
4
|
+
import { cn as a } from "../../utils/index.js";
|
|
5
|
+
import { closeButtonVariants as w, alertVariants as x } from "./Alert.variants.js";
|
|
6
|
+
import { X as y } from "../../x-BPcqkRZd.js";
|
|
7
|
+
const R = ({
|
|
8
|
+
theme: i,
|
|
9
9
|
type: o,
|
|
10
10
|
content: t,
|
|
11
11
|
isVisible: n = !0,
|
|
12
|
-
showCloseButton:
|
|
12
|
+
showCloseButton: m = !1
|
|
13
13
|
}) => {
|
|
14
|
-
const r =
|
|
15
|
-
() =>
|
|
14
|
+
const r = f(null), [c, d] = h(n), u = b(
|
|
15
|
+
() => C(t) ? t : /* @__PURE__ */ l("p", { children: t }),
|
|
16
16
|
[t]
|
|
17
|
-
),
|
|
17
|
+
), p = V(() => {
|
|
18
18
|
const e = r.current;
|
|
19
19
|
e && e.setAttribute("data-state", "hidden");
|
|
20
20
|
}, []);
|
|
21
|
-
return
|
|
22
|
-
var s;
|
|
21
|
+
return v(() => {
|
|
23
22
|
const e = new AbortController();
|
|
24
|
-
return
|
|
23
|
+
return r.current?.addEventListener(
|
|
25
24
|
"animationend",
|
|
26
25
|
() => {
|
|
27
|
-
|
|
28
|
-
(a = r.current) == null || a.style.setProperty("display", "none"), p(!1);
|
|
26
|
+
r.current?.style.setProperty("display", "none"), d(!1);
|
|
29
27
|
},
|
|
30
28
|
{ signal: e.signal }
|
|
31
29
|
), () => e.abort();
|
|
32
|
-
}, []),
|
|
30
|
+
}, []), c ? /* @__PURE__ */ s(
|
|
33
31
|
"div",
|
|
34
32
|
{
|
|
35
33
|
ref: r,
|
|
36
|
-
className:
|
|
34
|
+
className: a(x({ type: o, isVisible: n })),
|
|
37
35
|
"data-state": n ? "visible" : "hidden",
|
|
38
|
-
"data-theme":
|
|
36
|
+
"data-theme": i,
|
|
39
37
|
role: "alert",
|
|
40
38
|
"aria-live": "polite",
|
|
41
39
|
children: [
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
/* @__PURE__ */ l(
|
|
45
|
-
/* @__PURE__ */ l(
|
|
40
|
+
u,
|
|
41
|
+
m ? /* @__PURE__ */ s("button", { role: "button", onClick: p, children: [
|
|
42
|
+
/* @__PURE__ */ l(y, { className: a(w({ type: o })) }),
|
|
43
|
+
/* @__PURE__ */ l(k, { children: "Dismiss alert" })
|
|
46
44
|
] }) : null
|
|
47
45
|
]
|
|
48
46
|
}
|
|
49
47
|
) : null;
|
|
50
48
|
};
|
|
51
49
|
export {
|
|
52
|
-
|
|
50
|
+
R as Alert
|
|
53
51
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as a, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { R as A, A as D, P as v, O as j, C as k, T, D as w, a as P, b as R } from "../../index-
|
|
2
|
+
import { R as A, A as D, P as v, O as j, C as k, T, D as w, a as P, b as R } from "../../index-Oq5GlCHP.js";
|
|
3
3
|
import { Button as l } from "../Button/Button.js";
|
|
4
4
|
import { cn as t } from "../../utils/index.js";
|
|
5
5
|
import { useAlertDialog as z } from "./hooks/useAlertDialog.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { useState as
|
|
2
|
-
const
|
|
3
|
-
const [
|
|
4
|
-
|
|
5
|
-
}, [
|
|
6
|
-
return { isOpen:
|
|
1
|
+
import { useState as c, useCallback as s } from "react";
|
|
2
|
+
const p = ({ onConfirm: t }) => {
|
|
3
|
+
const [n, e] = c(!1), a = s(() => e(!0), []), l = s(() => e(!1), []), o = s(() => {
|
|
4
|
+
t?.(), e(!1);
|
|
5
|
+
}, [t]);
|
|
6
|
+
return { isOpen: n, handleCancel: l, handleConfirm: o, handleOpen: a };
|
|
7
7
|
};
|
|
8
8
|
export {
|
|
9
|
-
|
|
9
|
+
p as useAlertDialog
|
|
10
10
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as a } from "../../index-
|
|
1
|
+
import { c as a } from "../../index-D29mdTf5.js";
|
|
2
2
|
const t = a(
|
|
3
3
|
[
|
|
4
4
|
"flex",
|
|
@@ -19,7 +19,6 @@ const t = a(
|
|
|
19
19
|
"py-1",
|
|
20
20
|
"px-2",
|
|
21
21
|
"focus:ring-kubefirst-primary",
|
|
22
|
-
"colony:focus:focus:ring-red-400",
|
|
23
22
|
"civo:focus:focus:ring-blue-400"
|
|
24
23
|
],
|
|
25
24
|
{
|
|
@@ -32,7 +31,7 @@ const t = a(
|
|
|
32
31
|
variant: "default"
|
|
33
32
|
}
|
|
34
33
|
}
|
|
35
|
-
),
|
|
34
|
+
), e = a(
|
|
36
35
|
["pl-1", "mb-2", "text-base", "cursor-pointer"],
|
|
37
36
|
{
|
|
38
37
|
variants: {
|
|
@@ -47,5 +46,5 @@ const t = a(
|
|
|
47
46
|
);
|
|
48
47
|
export {
|
|
49
48
|
t as autocompleteVariants,
|
|
50
|
-
|
|
49
|
+
e as labelVariants
|
|
51
50
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as t } from "../../../../index-
|
|
1
|
+
import { c as t } from "../../../../index-D29mdTf5.js";
|
|
2
2
|
const e = t(["max-h-[250px]", "overflow-y-auto"], {
|
|
3
3
|
variants: {
|
|
4
4
|
variant: {
|
|
@@ -20,14 +20,12 @@ const e = t(["max-h-[250px]", "overflow-y-auto"], {
|
|
|
20
20
|
variant: "default"
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
),
|
|
23
|
+
), i = t(
|
|
24
24
|
[
|
|
25
25
|
"focus-visible:outline-none",
|
|
26
26
|
"focus:bg-purple-100",
|
|
27
27
|
"hover:bg-purple-100",
|
|
28
28
|
"border-transparent",
|
|
29
|
-
"colony:focus:bg-red-100",
|
|
30
|
-
"colony:hover:bg-red-100",
|
|
31
29
|
"civo:focus:bg-blue-100",
|
|
32
30
|
"civo:hover:bg-blue-100"
|
|
33
31
|
],
|
|
@@ -51,8 +49,6 @@ const e = t(["max-h-[250px]", "overflow-y-auto"], {
|
|
|
51
49
|
"text-left",
|
|
52
50
|
"focus:bg-purple-100",
|
|
53
51
|
"hover:bg-purple-100",
|
|
54
|
-
"colony:focus:bg-red-100",
|
|
55
|
-
"colony:hover:bg-red-100",
|
|
56
52
|
"civo:focus:bg-blue-100",
|
|
57
53
|
"civo:hover:bg-blue-100"
|
|
58
54
|
],
|
|
@@ -70,6 +66,6 @@ const e = t(["max-h-[250px]", "overflow-y-auto"], {
|
|
|
70
66
|
export {
|
|
71
67
|
n as buttonVariants,
|
|
72
68
|
r as emptyListVariants,
|
|
73
|
-
|
|
69
|
+
i as listItemVariants,
|
|
74
70
|
e as listVariants
|
|
75
71
|
};
|
|
@@ -1,81 +1,76 @@
|
|
|
1
|
-
import { useState as
|
|
2
|
-
import { filterByValue as
|
|
3
|
-
const
|
|
4
|
-
options:
|
|
5
|
-
inputRef:
|
|
1
|
+
import { useState as i, useEffect as d, useCallback as g } from "react";
|
|
2
|
+
import { filterByValue as k } from "../../../utils/index.js";
|
|
3
|
+
const A = ({
|
|
4
|
+
options: l,
|
|
5
|
+
inputRef: n,
|
|
6
6
|
wrapperRef: o,
|
|
7
|
-
onChange:
|
|
7
|
+
onChange: a
|
|
8
8
|
}) => {
|
|
9
|
-
const [
|
|
10
|
-
|
|
11
|
-
var s;
|
|
9
|
+
const [f, m] = i(() => l ?? []), [h, s] = i(!1), [E, b] = i("");
|
|
10
|
+
d(() => {
|
|
12
11
|
const t = new AbortController();
|
|
13
|
-
return
|
|
12
|
+
return n.current?.addEventListener("focus", () => s(!0), {
|
|
14
13
|
signal: t.signal
|
|
15
14
|
}), () => {
|
|
16
15
|
t.abort();
|
|
17
16
|
};
|
|
18
|
-
}, [
|
|
19
|
-
const t = new AbortController(),
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
var a;
|
|
24
|
-
(a = o.current) != null && a.contains(e.target) || n(!1);
|
|
17
|
+
}, [n]), d(() => {
|
|
18
|
+
const t = new AbortController(), r = (e) => {
|
|
19
|
+
e.key === "Escape" && (s(!1), n.current?.blur());
|
|
20
|
+
}, u = (e) => {
|
|
21
|
+
o.current?.contains(e.target) || s(!1);
|
|
25
22
|
};
|
|
26
|
-
return document.addEventListener("keydown",
|
|
23
|
+
return document.addEventListener("keydown", r, {
|
|
27
24
|
signal: t.signal
|
|
28
|
-
}), document.addEventListener("mousedown",
|
|
25
|
+
}), document.addEventListener("mousedown", u, {
|
|
29
26
|
signal: t.signal
|
|
30
27
|
}), () => {
|
|
31
28
|
t.abort();
|
|
32
29
|
};
|
|
33
|
-
}, [
|
|
34
|
-
var s;
|
|
30
|
+
}, [n, o]), d(() => {
|
|
35
31
|
const t = new AbortController();
|
|
36
|
-
return
|
|
32
|
+
return o.current?.addEventListener(
|
|
37
33
|
"focusout",
|
|
38
|
-
(
|
|
39
|
-
|
|
40
|
-
(e = o.current) != null && e.contains(c.relatedTarget) || n(!1);
|
|
34
|
+
(r) => {
|
|
35
|
+
o.current?.contains(r.relatedTarget) || s(!1);
|
|
41
36
|
},
|
|
42
37
|
{ signal: t.signal }
|
|
43
38
|
), () => {
|
|
44
39
|
t.abort();
|
|
45
40
|
};
|
|
46
41
|
}, [o]);
|
|
47
|
-
const
|
|
42
|
+
const c = g(
|
|
48
43
|
(t) => {
|
|
49
44
|
if (t.length === 0)
|
|
50
|
-
|
|
45
|
+
m(l);
|
|
51
46
|
else {
|
|
52
|
-
const
|
|
47
|
+
const r = l.map(({ value: e }) => e), u = k(r, t).map(
|
|
53
48
|
(e) => ({ value: e })
|
|
54
49
|
);
|
|
55
|
-
|
|
50
|
+
m(u);
|
|
56
51
|
}
|
|
57
52
|
},
|
|
58
|
-
[
|
|
59
|
-
),
|
|
53
|
+
[l]
|
|
54
|
+
), v = g(
|
|
60
55
|
(t) => {
|
|
61
|
-
|
|
56
|
+
b(t.target.value), c(t.target.value), a?.(t.target.value);
|
|
62
57
|
},
|
|
63
|
-
[
|
|
64
|
-
),
|
|
58
|
+
[c, a]
|
|
59
|
+
), O = g(
|
|
65
60
|
(t) => {
|
|
66
|
-
|
|
61
|
+
b(t), c(t), a?.(t), s(!1);
|
|
67
62
|
},
|
|
68
|
-
[
|
|
63
|
+
[c, a]
|
|
69
64
|
);
|
|
70
65
|
return {
|
|
71
|
-
inputRef:
|
|
72
|
-
newOptions:
|
|
73
|
-
showOptions:
|
|
74
|
-
value:
|
|
75
|
-
handleChange:
|
|
76
|
-
handleSelectValue:
|
|
66
|
+
inputRef: n,
|
|
67
|
+
newOptions: f,
|
|
68
|
+
showOptions: h,
|
|
69
|
+
value: E,
|
|
70
|
+
handleChange: v,
|
|
71
|
+
handleSelectValue: O
|
|
77
72
|
};
|
|
78
73
|
};
|
|
79
74
|
export {
|
|
80
|
-
|
|
75
|
+
A as useAutocomplete
|
|
81
76
|
};
|
|
@@ -1,78 +1,70 @@
|
|
|
1
|
-
import { useRef as
|
|
2
|
-
const
|
|
3
|
-
ulRef:
|
|
4
|
-
inputRef:
|
|
5
|
-
wrapperRef:
|
|
6
|
-
options:
|
|
1
|
+
import { useRef as b, useEffect as l } from "react";
|
|
2
|
+
const w = ({
|
|
3
|
+
ulRef: t,
|
|
4
|
+
inputRef: o,
|
|
5
|
+
wrapperRef: u,
|
|
6
|
+
options: a
|
|
7
7
|
}) => {
|
|
8
|
-
const r =
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const e = ((o = c.current) == null ? void 0 : o.querySelectorAll("li")) ?? [], t = new AbortController(), u = () => {
|
|
8
|
+
const r = b(0);
|
|
9
|
+
l(() => {
|
|
10
|
+
const e = t.current?.querySelectorAll("li") ?? [], c = new AbortController(), n = () => {
|
|
12
11
|
r.current < e.length - 1 ? (r.current = r.current + 1, e[r.current].focus()) : (r.current = 0, e[0].focus());
|
|
13
|
-
},
|
|
14
|
-
|
|
15
|
-
r.current > 0 ? (r.current = r.current - 1, e[r.current].focus()) : (r.current = 0, (s = l.current) == null || s.focus());
|
|
12
|
+
}, i = () => {
|
|
13
|
+
r.current > 0 ? (r.current = r.current - 1, e[r.current].focus()) : (r.current = 0, o.current?.focus());
|
|
16
14
|
};
|
|
17
|
-
return
|
|
15
|
+
return t.current?.addEventListener(
|
|
18
16
|
"keydown",
|
|
19
17
|
(s) => {
|
|
20
|
-
var w;
|
|
21
18
|
switch (s.preventDefault(), s.key) {
|
|
22
19
|
case "ArrowDown": {
|
|
23
|
-
|
|
20
|
+
n();
|
|
24
21
|
break;
|
|
25
22
|
}
|
|
26
23
|
case "Tab": {
|
|
27
|
-
s.shiftKey ?
|
|
24
|
+
s.shiftKey ? i() : n();
|
|
28
25
|
break;
|
|
29
26
|
}
|
|
30
27
|
case "ArrowUp": {
|
|
31
|
-
r.current === 0 ?
|
|
28
|
+
r.current === 0 ? o.current?.focus() : i();
|
|
32
29
|
break;
|
|
33
30
|
}
|
|
34
31
|
case "Enter": {
|
|
35
|
-
|
|
36
|
-
a == null || a.click();
|
|
32
|
+
e[r.current].querySelector("button")?.click();
|
|
37
33
|
break;
|
|
38
34
|
}
|
|
39
35
|
}
|
|
40
36
|
},
|
|
41
|
-
{ signal:
|
|
37
|
+
{ signal: c.signal }
|
|
42
38
|
), () => {
|
|
43
|
-
|
|
39
|
+
c.abort();
|
|
44
40
|
};
|
|
45
|
-
}, [
|
|
46
|
-
var t;
|
|
41
|
+
}, [o, t, a, r]), l(() => {
|
|
47
42
|
const e = new AbortController();
|
|
48
|
-
return
|
|
43
|
+
return o.current?.addEventListener(
|
|
49
44
|
"keydown",
|
|
50
|
-
(
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
o && o.focus();
|
|
45
|
+
(c) => {
|
|
46
|
+
if (c.key === "ArrowDown") {
|
|
47
|
+
const n = t.current?.querySelector("li");
|
|
48
|
+
n && n.focus();
|
|
55
49
|
}
|
|
56
50
|
},
|
|
57
51
|
{ signal: e.signal }
|
|
58
52
|
), () => {
|
|
59
53
|
e.abort();
|
|
60
54
|
};
|
|
61
|
-
}, [
|
|
62
|
-
var t;
|
|
55
|
+
}, [o, t, a]), l(() => {
|
|
63
56
|
const e = new AbortController();
|
|
64
|
-
return
|
|
57
|
+
return u.current?.addEventListener(
|
|
65
58
|
"mouseenter",
|
|
66
59
|
() => {
|
|
67
|
-
|
|
68
|
-
(((n = c.current) == null ? void 0 : n.querySelectorAll("li")) ?? []).forEach((o) => o.blur());
|
|
60
|
+
(t.current?.querySelectorAll("li") ?? []).forEach((n) => n.blur());
|
|
69
61
|
},
|
|
70
62
|
{ signal: e.signal }
|
|
71
63
|
), () => {
|
|
72
64
|
e.abort();
|
|
73
65
|
};
|
|
74
|
-
}, [
|
|
66
|
+
}, [t, u]);
|
|
75
67
|
};
|
|
76
68
|
export {
|
|
77
|
-
|
|
69
|
+
w as useNavigationUlList
|
|
78
70
|
};
|