altum 0.0.5 → 0.0.6
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/CHANGELOG.md +18 -0
- package/dist/base/FieldPopup/FieldPopup.js +1 -1
- package/dist/base/PeriodHeader/PeriodHeader.js +1 -1
- package/dist/base/ToggleControlBase/ToggleControlBase.js +1 -1
- package/dist/base/ToggleControlBase/ToggleControlBase.module.css.js +1 -1
- package/dist/components/Accordion/Accordion.js +1 -1
- package/dist/components/ActionList/ActionList.js +1 -1
- package/dist/components/ActionList/ActionList.module.css.js +1 -1
- package/dist/components/ActionSheetTrigger/ActionSheetTrigger.js +1 -1
- package/dist/components/ActionSheetTrigger/ActionSheetTrigger.module.css.js +1 -1
- package/dist/components/Alert/Alert.js +1 -1
- package/dist/components/Alert/Alert.module.css.js +1 -1
- package/dist/components/Badge/Badge.js +1 -1
- package/dist/components/Badge/Badge.module.css.js +1 -1
- package/dist/components/Box/Box.js +1 -1
- package/dist/components/Box/Box.module.css.js +1 -1
- package/dist/components/Bubble/Bubble.js +1 -1
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/Button/Button.module.css.js +1 -1
- package/dist/components/ButtonGroup/ButtonGroup.js +1 -1
- package/dist/components/ButtonIcon/OverlayCloseButton.js +1 -0
- package/dist/components/Calendar/Calendar.context.js +1 -1
- package/dist/components/Calendar/Calendar.module.css.js +1 -1
- package/dist/components/Calendar/Calendar.slots.js +1 -1
- package/dist/components/Calendar/Calendar.utils.js +1 -1
- package/dist/components/Calendar/Calendar.views.js +1 -1
- package/dist/components/CalendarBoard/CalendarBoard.MonthView.js +1 -1
- package/dist/components/CalendarBoard/CalendarBoard.Schedule.js +1 -1
- package/dist/components/CalendarBoard/CalendarBoard.YearView.js +2 -2
- package/dist/components/CalendarBoard/CalendarBoard.chrome.js +1 -1
- package/dist/components/CalendarBoard/CalendarBoard.module.css.js +1 -1
- package/dist/components/CalendarBoard/calendar.schedule.js +1 -1
- package/dist/components/Card/Card.js +1 -1
- package/dist/components/Card/Card.module.css.js +1 -1
- package/dist/components/Chip/Chip.js +1 -1
- package/dist/components/Chip/Chip.module.css.js +1 -1
- package/dist/components/ColorSwatchGroup/ColorSwatchGroup.js +1 -1
- package/dist/components/CommandPalette/CommandPalette.js +1 -1
- package/dist/components/CommandPalette/CommandPalette.module.css.js +1 -1
- package/dist/components/ConfirmDialog/ConfirmDialog.js +1 -1
- package/dist/components/DateField/DateField.js +1 -1
- package/dist/components/DateField/DateField.utils.js +1 -1
- package/dist/components/DateRangeField/DateRangeField.js +1 -1
- package/dist/components/DayStripCalendar/DayStripCalendar.js +1 -1
- package/dist/components/DialogLayout/DialogLayout.js +1 -0
- package/dist/components/DialogLayout/DialogLayout.module.css.js +1 -0
- package/dist/components/Dropdown/Dropdown.js +1 -1
- package/dist/components/Dropdown/Dropdown.module.css.js +1 -1
- package/dist/components/Dropdown/DropdownMobileSheet.js +1 -1
- package/dist/components/FileList/FileList.js +1 -1
- package/dist/components/ImageCrop/ImageCrop.js +1 -1
- package/dist/components/ImageCrop/ImageCrop.module.css.js +1 -1
- package/dist/components/ImageGallery/ImageGallery.js +1 -1
- package/dist/components/ImageGallery/ImageGallery.module.css.js +1 -1
- package/dist/components/ImageLightbox/ImageLightbox.js +1 -1
- package/dist/components/ImageLightbox/ImageLightbox.module.css.js +1 -1
- package/dist/components/Layout/Layout.js +1 -1
- package/dist/components/Layout/Layout.module.css.js +1 -1
- package/dist/components/Link/Link.js +1 -1
- package/dist/components/Listbox/Listbox.js +1 -1
- package/dist/components/Listbox/Listbox.module.css.js +1 -1
- package/dist/components/LiveRegion/LiveRegion.js +1 -0
- package/dist/components/LocaleProvider/LocaleProvider.js +1 -1
- package/dist/components/MaskedField/MaskedField.js +1 -1
- package/dist/components/MaskedField/MaskedField.module.css.js +1 -1
- package/dist/components/Menu/Menu.js +1 -1
- package/dist/components/Menu/Menu.module.css.js +1 -1
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/Modal/Modal.module.css.js +1 -1
- package/dist/components/Notification/Notification.js +1 -1
- package/dist/components/Notification/Notification.module.css.js +1 -1
- package/dist/components/Notification/toast.js +1 -1
- package/dist/components/NumberField/NumberField.js +1 -1
- package/dist/components/Overflow/Overflow.js +1 -1
- package/dist/components/Overflow/Overflow.module.css.js +1 -1
- package/dist/components/Overlay/Overlay.frame.js +1 -0
- package/dist/components/Overlay/Overlay.js +1 -1
- package/dist/components/Overlay/Overlay.module.css.js +1 -1
- package/dist/components/Pagination/Pagination.js +1 -1
- package/dist/components/PasswordField/PasswordField.js +1 -1
- package/dist/components/PinInput/PinInput.js +1 -1
- package/dist/components/PinInput/PinInput.module.css.js +1 -1
- package/dist/components/Popover/Popover.js +1 -1
- package/dist/components/Popover/Popover.module.css.js +1 -1
- package/dist/components/PopupSwitch/PopupSwitch.js +1 -0
- package/dist/components/PopupSwitch/PopupSwitch.module.css.js +1 -0
- package/dist/components/PopupSwitch/PopupSwitch.utils.js +1 -0
- package/dist/components/PullToRefresh/PullToRefresh.js +1 -1
- package/dist/components/Rating/Rating.js +1 -1
- package/dist/components/SearchField/SearchField.js +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.js +1 -1
- package/dist/components/Select/Select.js +1 -1
- package/dist/components/Select/Select.module.css.js +1 -1
- package/dist/components/SelectionGroup/SelectionGroup.js +1 -1
- package/dist/components/Sheet/Sheet.js +1 -1
- package/dist/components/Sheet/Sheet.module.css.js +1 -1
- package/dist/components/Sidebar/Sidebar.js +1 -1
- package/dist/components/Sidebar/Sidebar.module.css.js +1 -1
- package/dist/components/SkipLink/SkipLink.js +1 -1
- package/dist/components/Slider/Slider.js +1 -1
- package/dist/components/SortableList/SortableList.js +1 -1
- package/dist/components/SortableList/SortableList.module.css.js +1 -1
- package/dist/components/Spinner/Spinner.js +1 -1
- package/dist/components/Steps/Steps.js +1 -1
- package/dist/components/SuggestField/SuggestField.js +1 -1
- package/dist/components/Table/Table.js +1 -1
- package/dist/components/Table/TableRowActions.js +1 -1
- package/dist/components/Table/TableView.js +1 -1
- package/dist/components/TextField/TextField.js +1 -1
- package/dist/components/TextField/TextField.module.css.js +1 -1
- package/dist/components/TextareaField/TextareaField.js +1 -1
- package/dist/components/TextareaField/TextareaField.module.css.js +1 -1
- package/dist/components/ThemeProvider/ThemeProvider.js +1 -1
- package/dist/components/ThemeProvider/ThemeProvider.module.css.js +1 -1
- package/dist/components/TimeField/TimeField.js +1 -1
- package/dist/components/Tooltip/Tooltip.js +1 -1
- package/dist/components/Tooltip/Tooltip.module.css.js +1 -1
- package/dist/components/UploadZone/UploadZone.js +1 -1
- package/dist/components/VirtualList/VirtualList.js +1 -1
- package/dist/components/VirtualList/VirtualList.module.css.js +1 -1
- package/dist/components/VirtualList/VirtualList.utils.js +1 -1
- package/dist/components/VisuallyHidden/VisuallyHidden.js +1 -1
- package/dist/components/WheelTimePicker/WheelTimePicker.js +1 -1
- package/dist/entries/icons.js +1 -1
- package/dist/entries/utils.js +1 -1
- package/dist/hooks/useAutoResize.js +1 -1
- package/dist/hooks/useOtpInputs.js +1 -1
- package/dist/hooks/useTrackThumb.js +1 -1
- package/dist/icons/icons/IconChevronUpDown.js +1 -0
- package/dist/index.js +1 -1
- package/dist/locales/en.js +1 -1
- package/dist/locales/localeContext.js +1 -1
- package/dist/locales/ru.js +1 -1
- package/dist/locales/slices/actionList.en.js +1 -0
- package/dist/locales/slices/actionList.ru.js +1 -0
- package/dist/locales/slices/bubble.en.js +1 -0
- package/dist/locales/slices/bubble.ru.js +1 -0
- package/dist/locales/slices/buttonGroup.en.js +1 -0
- package/dist/locales/slices/buttonGroup.ru.js +1 -0
- package/dist/locales/slices/calendar.en.js +1 -0
- package/dist/locales/slices/calendar.ru.js +1 -0
- package/dist/locales/slices/calendarBoard.en.js +1 -0
- package/dist/locales/slices/calendarBoard.ru.js +1 -0
- package/dist/locales/slices/chip.en.js +1 -0
- package/dist/locales/slices/chip.ru.js +1 -0
- package/dist/locales/slices/commandPalette.en.js +1 -0
- package/dist/locales/slices/commandPalette.ru.js +1 -0
- package/dist/locales/slices/common.en.js +1 -0
- package/dist/locales/slices/common.ru.js +1 -0
- package/dist/locales/slices/confirmDialog.en.js +1 -0
- package/dist/locales/slices/confirmDialog.ru.js +1 -0
- package/dist/locales/slices/customSelect.en.js +1 -0
- package/dist/locales/slices/customSelect.ru.js +1 -0
- package/dist/locales/slices/dateRangeField.en.js +1 -0
- package/dist/locales/slices/dateRangeField.ru.js +1 -0
- package/dist/locales/slices/dayStrip.en.js +1 -0
- package/dist/locales/slices/dayStrip.ru.js +1 -0
- package/dist/locales/slices/fileList.en.js +1 -0
- package/dist/locales/slices/fileList.ru.js +1 -0
- package/dist/locales/slices/imageCrop.en.js +1 -0
- package/dist/locales/slices/imageCrop.ru.js +1 -0
- package/dist/locales/slices/imageGallery.en.js +1 -0
- package/dist/locales/slices/imageGallery.ru.js +1 -0
- package/dist/locales/slices/imageLightbox.en.js +1 -0
- package/dist/locales/slices/imageLightbox.ru.js +1 -0
- package/dist/locales/slices/listbox.en.js +1 -0
- package/dist/locales/slices/listbox.ru.js +1 -0
- package/dist/locales/slices/menu.en.js +1 -0
- package/dist/locales/slices/menu.ru.js +1 -0
- package/dist/locales/slices/modal.en.js +1 -0
- package/dist/locales/slices/modal.ru.js +1 -0
- package/dist/locales/slices/numberField.en.js +1 -0
- package/dist/locales/slices/numberField.ru.js +1 -0
- package/dist/locales/slices/overflow.en.js +1 -0
- package/dist/locales/slices/overflow.ru.js +1 -0
- package/dist/locales/slices/pagination.en.js +1 -0
- package/dist/locales/slices/pagination.ru.js +1 -0
- package/dist/locales/slices/password.en.js +1 -0
- package/dist/locales/slices/password.ru.js +1 -0
- package/dist/locales/slices/pinInput.en.js +1 -0
- package/dist/locales/slices/pinInput.ru.js +1 -0
- package/dist/locales/slices/pullToRefresh.en.js +1 -0
- package/dist/locales/slices/pullToRefresh.ru.js +1 -0
- package/dist/locales/slices/rating.en.js +1 -0
- package/dist/locales/slices/rating.ru.js +1 -0
- package/dist/locales/slices/searchField.en.js +1 -0
- package/dist/locales/slices/searchField.ru.js +1 -0
- package/dist/locales/slices/select.en.js +1 -0
- package/dist/locales/slices/select.ru.js +1 -0
- package/dist/locales/slices/sheet.en.js +1 -0
- package/dist/locales/slices/sheet.ru.js +1 -0
- package/dist/locales/slices/sidebar.en.js +1 -0
- package/dist/locales/slices/sidebar.ru.js +1 -0
- package/dist/locales/slices/skipLink.en.js +1 -0
- package/dist/locales/slices/skipLink.ru.js +1 -0
- package/dist/locales/slices/slider.en.js +1 -0
- package/dist/locales/slices/slider.ru.js +1 -0
- package/dist/locales/slices/sortable.en.js +1 -0
- package/dist/locales/slices/sortable.ru.js +1 -0
- package/dist/locales/slices/spinner.en.js +1 -0
- package/dist/locales/slices/spinner.ru.js +1 -0
- package/dist/locales/slices/steps.en.js +1 -0
- package/dist/locales/slices/steps.ru.js +1 -0
- package/dist/locales/slices/suggestField.en.js +1 -0
- package/dist/locales/slices/suggestField.ru.js +1 -0
- package/dist/locales/slices/table.en.js +1 -0
- package/dist/locales/slices/table.ru.js +1 -0
- package/dist/locales/slices/timeField.en.js +1 -0
- package/dist/locales/slices/timeField.ru.js +1 -0
- package/dist/locales/slices/upload.en.js +1 -0
- package/dist/locales/slices/upload.ru.js +1 -0
- package/dist/locales/slices/virtualList.en.js +1 -0
- package/dist/locales/slices/virtualList.ru.js +1 -0
- package/dist/styles/calendarChrome.module.css.js +1 -1
- package/dist/styles/status.module.css.js +1 -1
- package/dist/styles/visuallyHidden.module.css.js +1 -0
- package/dist/utils/date.js +1 -1
- package/dist/utils/fieldMessage.js +1 -0
- package/dist/utils/visitElementTree.js +1 -1
- package/docs/COMPONENTS.md +12 -10
- package/docs/LAYOUT.md +6 -6
- package/docs/THEMING.md +5 -12
- package/package.json +1 -1
- package/types/entries/icons.d.ts +3 -1
- package/types/entries/locales.d.ts +1 -6
- package/types/entries/utils.d.ts +2 -1
- package/types/index.d.ts +527 -620
- package/dist/base/ChevronButton/ChevronButton.js +0 -1
- package/dist/base/DialogBase/DialogBase.js +0 -1
- package/dist/base/DialogBase/DialogBase.module.css.js +0 -1
- package/dist/components/CustomSelect/CustomSelect.Filter.js +0 -1
- package/dist/components/CustomSelect/CustomSelect.List.js +0 -1
- package/dist/components/CustomSelect/CustomSelect.Shell.js +0 -1
- package/dist/components/CustomSelect/CustomSelect.Shell.module.css.js +0 -1
- package/dist/components/CustomSelect/CustomSelect.context.js +0 -1
- package/dist/components/CustomSelect/CustomSelect.js +0 -1
- package/dist/components/CustomSelect/CustomSelect.module.css.js +0 -1
- package/dist/components/CustomSelect/useCustomSelectComboboxKeyboard.js +0 -1
- package/dist/components/FocusTrap/FocusTrap.js +0 -1
- package/dist/components/Overflow/OverflowActionsMode.js +0 -1
- package/dist/components/Overflow/OverflowMeasure.js +0 -1
- package/dist/components/Overflow/OverflowMore.js +0 -1
- package/dist/components/Overlay/Overlay.Dismiss.js +0 -1
- package/dist/components/Overlay/Overlay.Positioner.js +0 -1
- package/dist/components/Overlay/Overlay.types.js +0 -1
- package/dist/components/SortableList/SortableList.types.js +0 -1
- package/dist/components/SortableList/useSortableListDnD.js +0 -1
- package/dist/components/TimeField/TimeField.module.css.js +0 -1
- package/dist/hooks/useDigitMask.js +0 -1
- package/dist/styles/srOnly.module.css.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{jsx as r}from"react/jsx-runtime";import{forwardRef as f}from"react";import{IconChevronLeft as h}from"../../icons/icons/IconChevronLeft.js";import{IconChevronRight as m}from"../../icons/icons/IconChevronRight.js";const e=f(function({direction:t,children:o,type:n="button",...i},d){return r("button",{ref:d,type:n,...i,children:o??(t==="prev"?r(h,{size:16,"aria-hidden":!0}):r(m,{size:16,"aria-hidden":!0}))})});e.displayName="ChevronButton";export{e as ChevronButton};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{jsx as l,jsxs as x}from"react/jsx-runtime";import{forwardRef as c,useContext as I,createContext as E}from"react";import{Box as b}from"../../components/Box/Box.js";import{ButtonIcon as T}from"../../components/ButtonIcon/ButtonIcon.js";import{IconCross as k}from"../../icons/icons/IconCross.js";import{useLocale as F}from"../../locales/localeContext.js";import{cn as d}from"../../utils/cn.js";import{composeEventHandlers as h}from"../../utils/composeEvents.js";import{markDialogTitle as S}from"../../utils/visitElementTree.js";import t from"./DialogBase.module.css.js";const C=E(null);function m(o){const e=I(C);if(!e)throw new Error(`${o} \u0434\u043E\u043B\u0436\u0435\u043D \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C\u0441\u044F \u0432\u043D\u0443\u0442\u0440\u0438 DialogBase`);return e}function g({onClose:o,titleId:e,onDragHandlePointerDown:a,children:n}){return l(C.Provider,{value:{onClose:o,titleId:e,onDragHandlePointerDown:a},children:n})}g.displayName="DialogBase.Provider";const N=c(function({onClose:o,titleId:e,onDragHandlePointerDown:a,className:n,children:r,variant:i="floating",...s},u){return l(b,{ref:u,variant:i,className:d(t.shell,n),...s,children:l(g,{onClose:o,titleId:e,onDragHandlePointerDown:a,children:r})})});N.displayName="DialogBase.Surface";const y=c(function({children:o,className:e,contentClassName:a,style:n,showClose:r=!0,onPointerDown:i,...s},u){const{onDragHandlePointerDown:f}=m("DialogBase.Header");return x("header",{ref:u,className:d(t.header,e),style:n,...s,onPointerDown:h(i,f),children:[l("div",{className:d(t.headerContent,a),children:o}),r?l(p,{}):null]})}),D=c(function({children:o,className:e,style:a,as:n="h3",...r},i){const{titleId:s}=m("DialogBase.Title");return l(n,{ref:i,className:d(t.title,e),style:a,...r,id:s,children:o})}),p=c(function({className:o,style:e,onClick:a,"aria-label":n,"data-drag-ignore":r,...i},s){const{t:u}=F(),f=n??u("common.close"),{onClose:P,onDragHandlePointerDown:v}=m("DialogBase.Close"),H=v||r!=null?{"data-drag-ignore":""}:void 0;return l(T,{ref:s,appearance:"diskClose",className:o,style:e,...H,...i,"aria-label":f,onClick:h(a,()=>P()),icon:l(k,{size:16,"aria-hidden":!0})})}),B=c(function({children:o,className:e,style:a,...n},r){return l("div",{ref:r,className:d(t.body,e),style:a,...n,children:o})}),j={start:t.alignStart,center:t.alignCenter,end:t.alignEnd,"space-between":t.alignSpaceBetween},w=c(function({children:o,className:e,style:a,align:n="end",...r},i){return l("footer",{ref:i,className:d(t.footer,j[n],e),style:a,...r,children:o})});y.displayName="DialogBase.Header",D.displayName="DialogBase.Title",S(D),p.displayName="DialogBase.Close",B.displayName="DialogBase.Body",w.displayName="DialogBase.Footer";const z={Provider:g,Surface:N,Header:y,Title:D,Close:p,Body:B,Footer:w};export{z as DialogBase,m as useDialogBaseContext};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{injectCss as t}from"../../utils/injectCss.js";var e=".CAazc{flex:1 1 auto;flex-direction:column;min-height:0;min-width:0;overflow-x:hidden;overflow-y:auto}.-lJ3g,.CAazc{box-sizing:border-box;display:flex}.-lJ3g{align-items:center;background-color:var(--altum-color-dropdown-bg);flex-shrink:0;gap:var(--altum-g-space-4);padding:var(--altum-dialog-header-padding);position:sticky;top:0;z-index:var(--altum-g-z-raised,1)}.-lJ3g ._7xtIm{display:flex;flex:1 1 auto;flex-direction:column;gap:var(--altum-g-space-1);min-width:0}.DOyGx{font-size:var(--altum-dialog-title-size);font-weight:var(--altum-dialog-title-weight);line-height:1.3;margin:0}.-oZ5f{flex:1 0 auto;font-size:var(--altum-dialog-body-size);line-height:1.5;min-width:0;padding:var(--altum-dialog-body-padding)}.-oZ5f,.CERRD{box-sizing:border-box}.CERRD{align-items:center;background-color:var(--altum-color-dropdown-bg);bottom:0;display:flex;flex-shrink:0;gap:var(--altum-g-space-3);padding:var(--altum-dialog-footer-padding);position:sticky;z-index:var(--altum-g-z-raised,1)}.CERRD.IncFF{justify-content:flex-start}.CERRD.BUXOa{justify-content:center}.CERRD.oE2t5{justify-content:flex-end}.CERRD.h20Yj{justify-content:space-between}";const a={shell:"CAazc",header:"-lJ3g",headerContent:"_7xtIm",title:"DOyGx",body:"-oZ5f",footer:"CERRD",alignStart:"IncFF",alignCenter:"BUXOa",alignEnd:"oE2t5",alignSpaceBetween:"h20Yj"};t(e);export{a as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{jsx as m}from"react/jsx-runtime";import{forwardRef as K,useRef as b,useEffect as g}from"react";import{cn as D}from"../../utils/cn.js";import{handleEnterKeyDown as E}from"../../utils/keyboard.js";import{composeEventHandlers as c}from"../../utils/composeEvents.js";import{useLocale as N}from"../../locales/localeContext.js";import{composeRefs as O}from"../../utils/composeRefs.js";import{useCustomSelectFilterContext as R,useCustomSelectSelectionContext as z,useCustomSelectOpenContext as P}from"./CustomSelect.context.js";import{SearchField as Q}from"../SearchField/SearchField.js";import j from"./CustomSelect.module.css.js";const i=K(function({placeholder:n,label:u,className:a,autoFocus:t=!0,onKeyDown:f,onChange:p,size:d="sm",...C},S){const{t:h}=N(),o=n??h("customSelect.filterPlaceholder"),{filterQuery:F,setFilterQuery:v,filteredOptions:x}=R("CustomSelect.Filter"),{listboxId:y,selectOption:w}=z("CustomSelect.Filter"),{open:r}=P("CustomSelect.Filter"),l=b(null);return g(()=>{r&&t&&l.current?.focus({preventScroll:!0})},[t,r]),m("div",{className:D(j.filterWrapper,a),children:m(Q,{...C,ref:O(S,l),size:d,keepPlaceholder:!0,"aria-label":u??o,placeholder:o,value:F,autoComplete:"off",onChange:c(p,e=>{v(e.target.value)}),onKeyDown:c(f,e=>{E(e,()=>{const s=x[0];s&&w(s.value)})}),"aria-controls":y})})});i.displayName="CustomSelect.Filter";export{i as CustomSelectFilter};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{jsx as b}from"react/jsx-runtime";import{forwardRef as h,useCallback as k}from"react";import{Listbox as v}from"../Listbox/Listbox.js";import{composeRefs as w}from"../../utils/composeRefs.js";import{useLocale as R}from"../../locales/localeContext.js";import{useCustomSelectFilterContext as y,useCustomSelectSelectionContext as T,useCustomSelectOpenContext as j}from"./CustomSelect.context.js";const s=h(function({options:i,groups:l,id:r,noOptionsText:m,...e},n){const{t:u}=R(),c=m??u("customSelect.noOptions"),{filteredOptions:p}=y("CustomSelect.List"),{valueArray:a,selectionMode:t,listboxId:f,selectOption:C,registerListboxRef:o,groups:d}=T("CustomSelect.List"),{interactive:S}=j("CustomSelect.List"),x=k(O=>{o(O)},[o]),L=i??p,g=l??d;return b(v,{ref:w(n,x),id:r??f,...e,options:L,groups:g,value:a,multiple:t==="multiple",showCheck:e.showCheck??t==="multiple",loading:e.loading??!1,noOptionsText:c,disabled:!S,onSelect:C})});s.displayName="CustomSelect.List";export{s as CustomSelectList};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{jsx as r,jsxs as T}from"react/jsx-runtime";import{forwardRef as u}from"react";import{TextField as H,FieldBaseIcon as M}from"../TextField/TextField.js";import{cn as n}from"../../utils/cn.js";import e from"./CustomSelect.Shell.module.css.js";const C=u(function({open:l=!1,readOnly:s=!1,className:o,arrowClassName:a=e.arrow,arrowOpenClassName:d=e.open,readOnlyArrowClassName:i=e.readOnly,...c},p){return r("svg",{ref:p,className:n(a,l&&d,s&&i,o),viewBox:"0 0 24 24",...c,"aria-hidden":"true",children:r("path",{d:"M6 9l6 6 6-6"})})});C.displayName="CustomSelect.Chevron";const w=u(function({children:l,className:s,...o},a){return r("span",{ref:a,className:n(e.placeholder,s),...o,children:l})});w.displayName="CustomSelect.Placeholder";const x=u(function({triggerRef:l,triggerAttrs:s,id:o,label:a,size:d="md",width:i="md",error:c,description:p,disabled:m=!1,readOnly:g=!1,open:f,isInteractive:N,hasValue:y,className:v="",popupRole:S="listbox",children:O,sizerContent:z="\xA0",prefix:A,onClear:P,clearLabel:R,triggerClassName:D="",triggerAs:b="button",triggerProps:F,wrapperProps:I,...K},V){const{className:j,onClick:k,onKeyDown:B,...L}=s,h=b==="button";return T(H,{as:b,ref:l,wrapperRef:V,label:a,size:d,width:i,error:c,description:p,disabled:m,readOnly:g,prefix:A,postfix:r(M,{children:r(C,{open:f,readOnly:g})}),onClear:P,clearLabel:R,id:o,hasValue:y,active:f,className:n(e.trigger,D),wrapperClassName:n(j,!!a&&e.labeled,i!=="full"&&e.fitContent,v),wrapperProps:{...K,...I},...L,...F,role:h?void 0:"combobox",tabIndex:h||m?void 0:0,"aria-disabled":h?void 0:m||void 0,"aria-haspopup":S,"aria-expanded":f,onClick:t=>{if(!N){t.preventDefault();return}k?.(t)},onKeyDown:t=>{N&&B?.(t)},children:[r("span",{className:e.triggerSizer,"aria-hidden":"true",children:z}),r("span",{className:e.triggerText,children:O})]})});x.displayName="CustomSelect.Shell";export{C as CustomSelectChevron,w as CustomSelectPlaceholder,x as CustomSelectShell};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{injectCss as e}from"../../utils/injectCss.js";var t=".B5o2G{align-content:center;cursor:pointer;display:grid;height:100%;min-height:0;overflow:hidden;position:relative;text-align:left;text-overflow:ellipsis;white-space:nowrap}.B5o2G .-dojU,.B5o2G .LDBVd{grid-area:1/1}.B5o2G .LDBVd{align-items:flex-start;flex-direction:column;font-weight:var(--altum-g-font-weight-medium);height:1.25em;pointer-events:none;visibility:hidden}.B5o2G .-dojU,.B5o2G .LDBVd{display:flex;overflow:hidden;white-space:nowrap}.B5o2G .-dojU{align-items:center;min-height:1.25em;min-width:0;text-overflow:ellipsis}._1UPrY{max-width:min(100%,var(--altum-field-width-default));width:max-content}.IA0iK{color:var(--altum-color-input-placeholder,var(--altum-field-label))}.t-BWy .IA0iK{color:#0000}.UmDc9{fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;color:var(--altum-field-label);flex-shrink:0;transition:transform .2s ease}.UmDc9.RwIS5{transform:rotate(180deg)}.UmDc9.PXmN9{opacity:var(--altum-opacity-disabled)}";const i={trigger:"B5o2G",triggerSizer:"LDBVd",triggerText:"-dojU",fitContent:"_1UPrY",placeholder:"IA0iK",labeled:"t-BWy",arrow:"UmDc9",open:"RwIS5",readOnly:"PXmN9"};e(t);export{i as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{createContext as e,useContext as o}from"react";const n=e(null),r=e(null),l=e(null);function C(t){const u=o(n);if(!u)throw new Error(`${t} \u0434\u043E\u043B\u0436\u0435\u043D \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C\u0441\u044F \u0432\u043D\u0443\u0442\u0440\u0438 CustomSelect.Root`);return u}function c(t){const u=o(r);if(!u)throw new Error(`${t} \u0434\u043E\u043B\u0436\u0435\u043D \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C\u0441\u044F \u0432\u043D\u0443\u0442\u0440\u0438 CustomSelect.Root`);return u}function s(t){const u=o(l);if(!u)throw new Error(`${t} \u0434\u043E\u043B\u0436\u0435\u043D \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C\u0441\u044F \u0432\u043D\u0443\u0442\u0440\u0438 CustomSelect.Root`);return u}function i(t){return{...C(t),...c(t),...s(t)}}function m(t,u){return u===void 0?[]:t==="multiple"||t==="path"?Array.isArray(u)?u:u?[u]:[]:Array.isArray(u)?u[0]?[u[0]]:[]:u?[u]:[]}function E(t){return t==="single"?"":[]}export{l as CustomSelectFilterContext,n as CustomSelectOpenContext,r as CustomSelectSelectionContext,E as defaultEmptyValue,m as toValueArray,i as useCustomSelectContext,s as useCustomSelectFilterContext,C as useCustomSelectOpenContext,c as useCustomSelectSelectionContext};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{jsx as S}from"react/jsx-runtime";import{forwardRef as Ce,useId as be,useRef as he,useCallback as n,useMemo as f}from"react";import{Dropdown as Oe}from"../Dropdown/Dropdown.js";import{getListboxPath as ve,findListboxOption as E,filterListboxOptions as xe,defaultListboxFilterFn as Se}from"../../utils/listboxOptions.js";import{useControlledState as F}from"../../hooks/useControlledState.js";import{defaultEmptyValue as ye,CustomSelectOpenContext as Fe,CustomSelectSelectionContext as Re,CustomSelectFilterContext as Le,toValueArray as Me}from"./CustomSelect.context.js";import{useCustomSelectContext as He}from"./CustomSelect.context.js";import{CustomSelectFilter as Pe}from"./CustomSelect.Filter.js";import{CustomSelectList as Qe}from"./CustomSelect.List.js";import{CustomSelectPlaceholder as q,CustomSelectChevron as B,CustomSelectShell as H}from"./CustomSelect.Shell.js";const R=Ce(function({children:$,options:s,groups:L,selectionMode:t="single",value:z,defaultValue:G,onChange:M,open:J,defaultOpen:K=!1,onOpenChange:P,disabled:m=!1,readOnly:U=!1,closeOnSelect:W,filterFn:c=Se,filterQuery:X,defaultFilterQuery:Y="",onFilterQueryChange:g,renderTarget:Q,align:Z="auto",widthMode:_="trigger-fit",triggerMode:ee,mobileTitle:te,mobileLeftControls:le,mobileRightControls:oe,panelScroll:re="overlay",className:ie,...ne},se){const C=`${be()}-listbox`,A=he(null),[ae,I]=F(z,G??ye(t)),r=Me(t,ae),[u,N]=F(J,K),[b,h,w]=F(X,Y),p=W??t==="single",d=U&&!m,l=!m&&!d,me=ee??(t==="multiple"?"combobox":"toggle"),i=n(e=>{!l&&e||(N(e),P?.(e),!e&&!w&&(h(""),g?.("")))},[l,w,g,P,h,N]),T=n(e=>{h(e),g?.(e)},[g,h]),a=n(e=>{const o=t==="single"?e[0]??"":e;I(o),M?.(o)},[M,t,I]),V=n(()=>{l&&a([])},[a,l]),O=n((e,o)=>{l&&(a(e),(o?.close??p)&&i(!1))},[a,l,i,p]),j=n(e=>{if(l){if(t==="multiple"){const o=r.includes(e)?r.filter(y=>y!==e):[...r,e];a(o),p&&i(!1);return}if(t==="path"){const o=ve(s,e).map(y=>y.value);O(o.length>0?o:[e],{close:p});return}a([e]),p&&i(!1)}},[a,l,s,O,t,i,p,r]),v=n(e=>{!l||t!=="multiple"||a(r.filter(o=>o!==e))},[a,l,t,r]),k=n(e=>{A.current=e},[]),x=f(()=>t==="path"?r.map(e=>E(s,e)).filter(e=>!!e):r.map(e=>{const o=E(s,e);if(o)return o;if(e)return{value:e,label:e}}).filter(e=>!!e),[s,t,r]),D=f(()=>xe({options:s,query:b,enabled:!0,filterFn:c}),[c,b,s]),pe=f(()=>({open:u,setOpen:i,disabled:m,readOnly:d,interactive:l}),[m,l,d,u,i]),ue=f(()=>({selectionMode:t,valueArray:r,selectedOptions:x,options:s,groups:L,listboxId:C,selectOption:j,selectPath:O,removeOption:v,registerListboxRef:k,listboxRef:A}),[L,C,s,k,v,j,O,x,t,r]),de=f(()=>({filteredOptions:D,filterQuery:b,setFilterQuery:T,filterFn:c}),[c,b,D,T]),fe=n((e,o)=>Q({triggerRef:o,triggerAttrs:e,open:u,disabled:m,readOnly:d,interactive:l,selectionMode:t,value:t==="single"?r[0]??"":r,selectedOptions:x,listboxId:C,setOpen:i,clearValue:V,removeOption:v}),[V,m,l,d,C,u,v,Q,x,t,i,r]),ce=n(()=>{l&&i(!0)},[l,i]),ge=n(()=>{i(!1)},[i]);return S(Fe.Provider,{value:pe,children:S(Re.Provider,{value:ue,children:S(Le.Provider,{value:de,children:S(Oe,{ref:se,open:u,onOpenChange:e=>{e?ce():ge()},popupRole:"none",triggerMode:me,className:ie,widthMode:_,align:Z,mobileTitle:te,mobileLeftControls:le,mobileRightControls:oe,panelScroll:re,renderTrigger:fe,...ne,children:$})})})})});R.displayName="CustomSelect.Root";const Ae=Object.assign(R,{Root:R,Filter:Pe,List:Qe,Shell:H,Chevron:B,Placeholder:q});export{Ae as CustomSelect,B as CustomSelectChevron,q as CustomSelectPlaceholder,H as CustomSelectShell,He as useCustomSelectContext};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{injectCss as r}from"../../utils/injectCss.js";var o="._6i6PA{border-bottom:1px solid var(--altum-color-border);padding:var(--altum-g-space-2)}";const t={filterWrapper:"_6i6PA"};r(o);export{t as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{useCallback as f}from"react";import{handleListHighlightKeyDown as m,isKey as h}from"../../utils/keyboard.js";import{useCustomSelectContext as g}from"./CustomSelect.context.js";function d(c={}){const{listboxRef:n,open:t,setOpen:r,interactive:i}=g("useCustomSelectComboboxKeyboard"),{onEnter:s,onEscape:u,includeHomeEnd:l=!0}=c;return f((e,a)=>{if(a?.(e),e.defaultPrevented||!i)return;const o=n.current;if(!m(e,{onNext:()=>{t||r(!0),o?.highlightNext()},onPrev:()=>{t||r(!0),o?.highlightPrev()},onFirst:()=>o?.highlightFirst(),onLast:()=>o?.highlightLast(),includeHomeEnd:t&&l})){if(h(e,"Enter")&&t){if(e.preventDefault(),o?.selectHighlighted())return;s?.(e);return}h(e,"Escape")&&t&&(e.preventDefault(),r(!1),u?.())}},[l,i,n,s,u,t,r])}export{d as useCustomSelectComboboxKeyboard};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{jsx as m}from"react/jsx-runtime";import{forwardRef as p,useRef as F}from"react";import{useFocusTrap as R}from"../../hooks/useFocusTrap.js";import{composeRefs as d}from"../../utils/composeRefs.js";const o=p(function({active:r,children:s,className:c,style:t,initialFocusRef:i,returnFocusRef:u,restoreFocus:a=!0,onEscape:n,...f},l){const e=F(null);return R({active:r,containerRef:e,initialFocusRef:i,returnFocusRef:u,restoreFocus:a,onEscape:n}),m("div",{ref:d(l,e),className:c,style:t,...f,children:s})});o.displayName="FocusTrap";export{o as FocusTrap};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{jsxs as P,jsx as s}from"react/jsx-runtime";import D,{forwardRef as F,useId as G,useState as J,useMemo as y,useCallback as O}from"react";import{visitElementTree as Q}from"../../utils/visitElementTree.js";import{ActionList as U}from"../ActionList/ActionList.js";import{Button as Z}from"../Button/Button.js";import{ButtonIcon as _}from"../ButtonIcon/ButtonIcon.js";import{cn as x}from"../../utils/cn.js";import{useActionSheetContext as q}from"../ActionSheetTrigger/actionSheetContext.js";import b from"./Overflow.module.css.js";import{useLocale as H}from"../../locales/localeContext.js";import{OverflowMore as K}from"./OverflowMore.js";const W=new Set(["id","icon","label","textValue","disabled","onSelect","className","key"]);function X(e){return D.isValidElement(e)&&e.type===v}function Y(e){const o=[];let i=0;return Q(e,t=>{if(!X(t))return;const r=t.props.id??`action-${i}`;o.push({...t.props,id:r,key:String(t.key??r)}),i+=1},()=>!1),o}function S(e){return typeof e.textValue=="string"&&e.textValue.length>0?e.textValue:typeof e.label=="string"||typeof e.label=="number"?String(e.label):e.id??e.key}function N(e){const o={};for(const[i,t]of Object.entries(e))W.has(i)||t===void 0||(o[i]=t);return o}const v=()=>null;v.displayName="Overflow.Item";function $({item:e,display:o,size:i}){const t=S(e),r=o==="icon"&&e.icon!=null,n=N(e),c={...n,type:"button",variant:"ghost",size:i,id:e.id,disabled:e.disabled,className:x(b.item,e.className),onClick:()=>e.onSelect?.()};return r?s(_,{...c,icon:e.icon,"aria-label":n["aria-label"]??(n["aria-labelledby"]?void 0:t)}):s(Z,{...c,prefix:e.icon,children:e.label})}const k=F(function({children:e,visibleCount:o,display:i="icon-label",showOverflowTrigger:t,size:r="sm",mobileTitle:n,className:c,"aria-label":V,gap:ee,fit:le,maxVisible:oe,align:te,moreLabel:ie,...M},T){const{t:m}=H(),w=V??m("overflow.ariaLabel"),z=n??m("overflow.title"),C=G(),a=q(),[I,L]=J(!1),f=y(()=>Y(e),[e]),h=o===void 0||!Number.isFinite(o)?f.length:Math.max(0,Math.floor(o)),A=f.slice(0,h),d=f.slice(h),g=d.length>0,j=!(t??a?.shouldShowOverflowTrigger??!0),u=a!=null&&g,E=u?a.overflowOpen:I,p=O(l=>{u?a.setOverflowOpen(l):L(l)},[u,a]),R=y(()=>d.map(l=>({id:l.id??l.key,groupId:"overflow",label:l.label,textValue:S(l),icon:l.icon,disabled:l.disabled,onSelect:l.onSelect,buttonProps:N(l)})),[d]),B=O(l=>{l.onSelect?.(),p(!1)},[p]);return P("div",{ref:T,className:x(b.root,b.actions,c),...M,role:"toolbar","aria-label":w,children:[A.map(l=>s($,{item:l,display:i,size:r},l.key)),g&&s(K,{open:E,onOpenChange:p,size:r,mobileTitle:z,ariaLabel:m("overflow.more"),hidden:j,children:s(U,{id:C,"aria-label":w,items:R,groups:[{id:"overflow",label:m("overflow.title")}],onAction:B})})]})});k.displayName="Overflow";export{v as OverflowItem,k as OverflowMode};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{jsx as f,jsxs as ne}from"react/jsx-runtime";import W,{forwardRef as oe,useMemo as V,useState as k,useRef as h,useCallback as P,useLayoutEffect as ie,useEffect as le}from"react";import{composeRefs as ae}from"../../utils/composeRefs.js";import{cn as z}from"../../utils/cn.js";import{useLocale as ue}from"../../locales/localeContext.js";import n from"./Overflow.module.css.js";import{OverflowMore as ce}from"./OverflowMore.js";function me(e){return W.Children.toArray(e).filter(o=>W.isValidElement(o))}function T(e,o){return e.key!=null?String(e.key):`overflow-item-${o}`}function se(e){return e==="sm"?n.gapSm:e==="lg"?n.gapLg:n.gapMd}function fe(e){return`var(--altum-control-height-${e})`}function B(e){if(!e)return 0;const o=getComputedStyle(e).columnGap||getComputedStyle(e).gap,m=Number.parseFloat(o);return Number.isFinite(m)?m:0}function D(e,o){return o==="container"?e.clientWidth:e.parentElement?.clientWidth??e.clientWidth}function G(e,o,m,i,s){const c=o.length;if(c===0||e<=0)return 0;const v=l=>{if(l<=0)return 0;let d=0;for(let w=0;w<l;w+=1)d+=o[w]??0;return d+i*Math.max(0,l-1)},S=v(c),b=s!==void 0?Math.min(c,Math.max(0,Math.floor(s))):c;if(S<=e&&b>=c)return c;for(let l=b;l>=0;l-=1){const d=v(l);if((l<c?d+(l>0?i:0)+m:d)<=e)return l}return 0}const J=oe(function({children:e,gap:o="md",size:m="md",fit:i="content",maxVisible:s,align:c="right",moreLabel:v,mobileTitle:S,className:b,"aria-label":l,visibleCount:d,display:w,showOverflowTrigger:de,...K},Q){const{t:$}=ue(),a=V(()=>me(e),[e]),p=`${V(()=>a.map((r,t)=>T(r,t)).join("\0"),[a])}|${o}|${m}|${i}|${s??""}`,[x,U]=k(""),[N,X]=k(a.length),[Y,Z]=k(!1),y=h(null),L=h(null),j=h(null),C=h([]),M=h([]),E=h(0),g=x!==p,_=l??$("overflow.groupAriaLabel"),q=v??$("overflow.groupMore"),H=S??$("overflow.groupTitle"),A=fe(m),O=P(r=>{X(t=>t===r?t:r)},[]),R=P(()=>{const r=y.current,t=L.current;if(!r||!t||M.current.length===0)return;const u=D(r,i);u<=0||O(G(u,M.current,E.current,B(t),s))},[O,i,s]);ie(()=>{const r=y.current,t=L.current;if(!(!r||!t)){if(g){const u=D(r,i);if(u<=0)return;C.current=C.current.slice(0,a.length),M.current=a.map((he,te)=>C.current[te]?.offsetWidth??0),E.current=j.current?.offsetWidth??0,O(G(u,M.current,E.current,B(t),s)),U(p);return}R()}},[O,i,a.length,s,p,g,R]),le(()=>{const r=y.current;if(!r||typeof ResizeObserver>"u")return;const t=i==="container"?r:r.parentElement??r,u=new ResizeObserver(()=>{x===p&&R()});return u.observe(t),()=>u.disconnect()},[i,p,R,x]);const F=!g&&N<a.length,I=g?a.length:N,ee=a.slice(0,I),re=F?a.slice(N):[];return f("div",{ref:ae(Q,y),className:z(n.root,i==="container"?n.fitContainer:n.fitContent,b),role:"group","aria-label":_,...K,children:ne("div",{ref:L,className:z(n.row,se(o)),children:[ee.map((r,t)=>f("div",{ref:u=>{C.current[t]=u},className:n.item,children:r},T(r,t))),g&&f("div",{ref:j,className:z(n.more,n.moreMeasure),style:{width:A,height:A},"aria-hidden":!0}),F&&f("div",{className:n.moreSlot,children:f(ce,{open:Y,onOpenChange:Z,size:m,align:c,mobileTitle:H,ariaLabel:q,popupRole:"none",panelClassName:n.menuPanel,triggerClassName:i==="container"?n.bare:void 0,children:f("div",{className:n.menuStack,children:re.map((r,t)=>f(W.Fragment,{children:r},T(r,N+t)))})})})]})})});J.displayName="Overflow";export{J as OverflowMeasure};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{jsx as o}from"react/jsx-runtime";import{Dropdown as d}from"../Dropdown/Dropdown.js";import{ButtonIcon as h}from"../ButtonIcon/ButtonIcon.js";import{IconDots3 as b}from"../../icons/icons/IconDots3.js";import{cn as C}from"../../utils/cn.js";import N from"../../styles/srOnly.module.css.js";import n from"./Overflow.module.css.js";function O({open:i,onOpenChange:t,size:a,align:l="right",mobileTitle:m,ariaLabel:p,hidden:e,panelClassName:s,popupRole:c="listbox",triggerClassName:f,children:g}){return o(d,{open:i,onOpenChange:t,popupRole:c,align:l,widthMode:"content",mobileTitle:m,panelClassName:s,renderTrigger:(r,u)=>o(h,{...r,ref:u,type:"button",variant:"ghost",size:a,icon:o(b,{}),"aria-label":p,className:C(n.more,f,e&&N.srOnly,e&&n.srFocus,r.className)}),children:g})}export{O as OverflowMore};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{useRef as h,useEffect as k,useCallback as z}from"react";import{useEscapeKey as M}from"../../hooks/useEscapeKey.js";import{useOutsideClick as S}from"../../hooks/useOutsideClick.js";import{useOverlay as B}from"../../hooks/useOverlay.js";import{claimHoverTriggerOpen as q,releaseHoverTrigger as X,registerHoverTrigger as Y,createHoverTriggerId as j}from"../../utils/hoverTriggerGroup.js";function A(t,o,s,n=0){return o>=t.left-n&&o<=t.right+n&&s>=t.top-n&&s<=t.bottom+n}function I({enabled:t,open:o,targetRef:s,contentRef:n,triggerMode:r,purpose:E,openDelay:u,closeDelay:p,requestOpen:i}){const g=h(null),R=h(null),L=h(null),a=h(null),T=h(i);k(()=>{T.current=i},[i]);const v=E==="tooltip"&&r==="hover",d=z(()=>{R.current!=null&&(window.clearTimeout(R.current),R.current=null),L.current!=null&&(window.clearTimeout(L.current),L.current=null)},[]),f=z(e=>{v&&a.current&&(e?q(a.current,0):X(a.current)),T.current(e)},[v]);return k(()=>{if(!v)return;const e=j();a.current=e;const m=Y(e,()=>{d(),T.current(!1)});return()=>{m(),a.current=null}},[d,v]),k(()=>{if(!t||r==="manual")return;const e=s.current;if(!e)return;const m=(c,O)=>{g.current={x:c,y:O}},l=()=>{if(d(),r!=="hover"){i(!0);return}let c=u;if(v&&a.current&&(c=q(a.current,u)),c<=0){f(!0);return}R.current=window.setTimeout(()=>f(!0),c)},w=()=>{if(d(),r!=="hover"){i(!1);return}L.current=window.setTimeout(()=>f(!1),p)},b=()=>{r==="click"&&i(!o)},y=c=>{r==="hover"&&(m(c.clientX,c.clientY),l())},C=()=>{r==="hover"&&w()},H=c=>{r==="hover"&&m(c.clientX,c.clientY)},x=()=>{r==="hover"&&l()},D=c=>{if(r!=="hover")return;const O=c.relatedTarget;O&&(e.contains(O)||n.current?.contains(O))||w()};return r==="click"?e.addEventListener("click",b):(e.addEventListener("pointerenter",y),e.addEventListener("pointerleave",C),e.addEventListener("pointermove",H),e.addEventListener("focusin",x),e.addEventListener("focusout",D)),()=>{d(),e.removeEventListener("click",b),e.removeEventListener("pointerenter",y),e.removeEventListener("pointerleave",C),e.removeEventListener("pointermove",H),e.removeEventListener("focusin",x),e.removeEventListener("focusout",D)}},[d,p,n,t,o,u,f,i,s,r,v]),k(()=>{if(!t||!o||r!=="hover")return;const e=()=>{const m=s.current,l=g.current;if(!m||!l||A(m.getBoundingClientRect(),l.x,l.y,1))return;const w=n.current;w&&A(w.getBoundingClientRect(),l.x,l.y,1)||f(!1)};return window.addEventListener("scroll",e,!0),window.addEventListener("resize",e),()=>{window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",e)}},[n,t,o,f,s,r]),{pointerRef:g,clearTimers:d,closeTimerRef:L,openHover:f,useHoverMutex:v}}function K({open:t,targetRef:o,contentRef:s,triggerMode:n,closeOnOutsideClick:r,closeOnEscape:E,requestOpen:u}){const p=r??n==="click",i=E??n!=="hover";S([o,s],()=>u(!1),{enabled:t&&p}),M(()=>u(!1),{enabled:t&&i})}function P({open:t,onClose:o,contentRef:s,rootRef:n,backdrop:r,closeOnOutsideClick:E,closeOnEscape:u,lockScroll:p}){const i=E??r,g=p??r;return M(o,{enabled:u!==!1&&t}),S([s],o,{enabled:i&&!r&&t}),B(o,{open:t&&(r||g),closeOnEscape:!1,lockScroll:g&&t,rootRef:r?n:void 0}),{resolvedCloseOnOutside:i}}export{K as useAnchorDismiss,I as useAnchorTrigger,P as useScrimLayerDismiss};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{useRef as x,useState as N,useCallback as v,useLayoutEffect as B}from"react";import{computeAnchorPosition as rt}from"../../utils/anchorPosition.js";import{cn as nt}from"../../utils/cn.js";import{composeRefs as ot}from"../../utils/composeRefs.js";import{renderChildren as dt}from"../../utils/renderChildren.js";import{useAnchorDismiss as st}from"./Overlay.Dismiss.js";import c from"./Overlay.module.css.js";function at(t){return t==="bottom"?"top center":t==="top"?"bottom center":t==="left"?"center right":"center left"}function ct(t){const i=t.style.width,s=t.style.maxWidth,n=t.style.minWidth;t.style.width="max-content",t.style.maxWidth="none",t.style.minWidth="0";const l=Math.ceil(t.getBoundingClientRect().width);return t.style.width=i,t.style.maxWidth=s,t.style.minWidth=n,l}function lt(t,i,s){const n=Math.ceil(i.getBoundingClientRect().width),l=Math.max(0,window.innerWidth-16);if(t==="trigger"){const a=Math.min(n,l);return{width:a,maxWidth:a}}if(t==="trigger-fit"){const a=ct(s),m=Math.min(Math.max(n,a),l);return{width:m,maxWidth:m}}return{width:void 0,maxWidth:l}}function ht(t,i){return t.position===i.position&&t.top===i.top&&t.left===i.left&&t.width===i.width&&t.maxWidth===i.maxWidth&&t.minWidth===i.minWidth&&t.transformOrigin===i.transformOrigin&&t["--altum-anchor-arrow-along"]===i["--altum-anchor-arrow-along"]}function I({variant:t,purpose:i,open:s,targetRef:n,contentRef:l,triggerMode:a,side:m,align:W,sideOffset:b,widthMode:u,children:M,className:S,presented:O,layerStyle:$,closeDelay:k,closeOnOutsideClick:q,closeOnEscape:z,clearTimers:R,closeTimerRef:F,pointerRef:D,requestOpen:H,openHover:E,"aria-label":V,"aria-labelledby":X,"aria-describedby":Y,role:_}){const h=x(null),G=ot(l,h),[L,J]=N({position:"fixed",top:-9999,left:-9999}),[f,K]=N(m),P=x(L),C=x(f),p=x(0);st({open:s,targetRef:n,contentRef:h,triggerMode:a,closeOnOutsideClick:q,closeOnEscape:z,requestOpen:H});const T=v(()=>{const e=n.current,r=h.current;if(!e||!r)return null;let d=null;t==="dropdown"&&(d=lt(u,e,r),r.style.width=d.width!=null?`${d.width}px`:"max-content",r.style.maxWidth=`${d.maxWidth}px`,r.style.minWidth=u==="trigger-fit"||u==="trigger"?`${Math.min(Math.ceil(e.getBoundingClientRect().width),d.maxWidth)}px`:"");const o=rt(e,r,m,W,b),g=e.getBoundingClientRect(),j=Math.ceil(g.width),U=o.side==="top"||o.side==="bottom"?g.left+g.width/2-o.left:g.top+g.height/2-o.top,tt=o.side==="top"||o.side==="bottom"?r.offsetWidth:r.offsetHeight,y=10,et=Math.round(Math.min(Math.max(U,y),Math.max(y,tt-y))),it={position:o.position,top:o.top,left:o.left,width:d?.width,maxWidth:d?.maxWidth,minWidth:u==="trigger-fit"||u==="trigger"?Math.min(j,d?.maxWidth??Number.POSITIVE_INFINITY):void 0,transformOrigin:at(o.side),"--altum-anchor-arrow-along":`${et}px`};return{side:o.side,coords:it}},[W,h,m,b,n,t,u]),w=v(()=>{const e=T();if(!e)return;const r=e.side!==C.current,d=!ht(e.coords,P.current);r&&(C.current=e.side,K(e.side)),d&&(P.current=e.coords,J(e.coords))},[T]),A=v(()=>{p.current||(p.current=requestAnimationFrame(()=>{p.current=0,w()}))},[w]);B(()=>{s&&w()},[s,w,M,O]),B(()=>{if(!s)return;const e=()=>A(),r=new ResizeObserver(e);return n.current&&r.observe(n.current),h.current&&r.observe(h.current),window.addEventListener("resize",e),window.addEventListener("scroll",e,!0),()=>{r.disconnect(),window.removeEventListener("resize",e),window.removeEventListener("scroll",e,!0),p.current&&(cancelAnimationFrame(p.current),p.current=0)}},[h,s,n,A]);const Q=f==="top"?c.originBottom:f==="left"?c.originRight:f==="right"?c.originLeft:c.originTop,Z={className:nt(c.anchor,i==="tooltip"&&c.anchorTooltip,i==="popover"&&c.anchorPopover,t==="dropdown"&&c.dropdown,t==="dropdown"&&Q,S),"data-presented":O?"":void 0,style:{...L,...$},role:_??(t==="dropdown"?"listbox":"dialog"),"data-side":f,"aria-label":V,"aria-labelledby":X,"aria-describedby":Y,onPointerEnter:a==="hover"?()=>{R(),E(!0)}:void 0,onPointerLeave:a==="hover"?()=>{R(),F.current=window.setTimeout(()=>E(!1),k)}:void 0,onPointerMove:a==="hover"?e=>{D.current={x:e.clientX,y:e.clientY}}:void 0};return dt({children:M,props:Z,contentRef:G})}I.displayName="Overlay.Positioner";export{I as AnchorLayer};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";function l(s,e){return s==null?e:{outside:s==="all"||s==="outside",escape:s==="all"||s==="escape"}}const E=200,t=200,i=100;export{i as HOVER_CLOSE_DELAY,t as HOVER_OPEN_DELAY,E as PRESENCE_MS,l as resolveOverlayDismiss};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";const e=400;export{e as DROP_FALLBACK_MS};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{useState as M,useRef as k,useEffect as R,useCallback as l}from"react";import{moveArrayItem as q}from"../../utils/arrayMove.js";import U from"./SortableList.module.css.js";import{DROP_FALLBACK_MS as G}from"./SortableList.types.js";function z({items:p,onOrderChange:g,listRef:u,itemRefs:d,t:I}){const[$,v]=M(null),[B,K]=M(""),i=k(null),b=k(g),y=k(p);R(()=>{b.current=g,y.current=p});const h=l(()=>{if(!u.current)return 8;const e=parseFloat(getComputedStyle(u.current).gap);return Number.isFinite(e)?e:8},[u]),w=l(e=>{const n=u.current,t=d.current[e];return!n||!t?null:n.getBoundingClientRect().top+t.offsetTop+t.offsetHeight/2},[d,u]),x=l(()=>{u.current?.classList.remove(U.layoutActive),v(null)},[u]),C=l(e=>{if(e.captureTarget.removeEventListener("pointermove",e.onPointerMove),e.captureTarget.removeEventListener("pointerup",e.onPointerUp),e.captureTarget.removeEventListener("lostpointercapture",e.onLostPointerCapture),e.captureTarget.hasPointerCapture(e.pointerId))try{e.captureTarget.releasePointerCapture(e.pointerId)}catch{}},[]),P=l(e=>{e.dropFallbackTimer!==null&&(window.clearTimeout(e.dropFallbackTimer),e.dropFallbackTimer=null),e.element.removeEventListener("transitionend",e.onTransitionEnd)},[]),E=l(e=>{if(e.dropCommitted)return;e.dropCommitted=!0,P(e);const n=q(e.items,e.fromIndex,e.hoverIndex);e.element.style.transform="",n&&b.current(n),x(),i.current===e&&(i.current=null)},[x,P]),T=l(e=>{e&&(C(e),P(e),e.element.style.transform="",x(),i.current===e&&(i.current=null))},[x,P,C]);R(()=>()=>T(i.current),[T]);const N=l((e,n)=>{if(i.current)return;const t=e+n,o=q(y.current,e,t);if(!o)return;b.current(o);const c=o[t];K(I("sortable.moved",{position:t+1,total:o.length})),requestAnimationFrame(()=>{const m=d.current[c?.id??""];if(!m)return;const L=m.querySelector("[data-sortable-handle]");if(L){L.focus();return}const D=n<0?'[data-sortable-move="up"]':'[data-sortable-move="down"]';m.querySelector(D)?.focus()})},[d,I]),A=l(e=>{const n=h();let t=0;if(e.hoverIndex<e.fromIndex)for(let o=e.hoverIndex;o<e.fromIndex;o++){const c=d.current[e.items[o].id];c&&(t-=c.offsetHeight+n)}else for(let o=e.fromIndex+1;o<=e.hoverIndex;o++){const c=d.current[e.items[o].id];c&&(t+=c.offsetHeight+n)}return t},[h,d]),Y=l(e=>{e.isDropping=!0,C(e),e.dropCommitted=!1,v(t=>t&&t.draggingId===e.id?{...t,phase:"drop"}:t),e.onTransitionEnd=t=>{t.propertyName!=="transform"||t.target!==e.element||E(e)},e.element.addEventListener("transitionend",e.onTransitionEnd),e.dropFallbackTimer=window.setTimeout(()=>{i.current===e&&!e.dropCommitted&&E(e)},G);const n=A(e);e.element.style.transform=`translate3d(0, ${n}px, 0)`},[E,A,C]),O=l((e,n,t,o)=>{if(e.button!==0||i.current||!o?.fromHandle&&e.target?.closest("button:not([data-sortable-handle]), a, input, textarea, select, [data-no-drag]"))return;const c=d.current[n];if(!c)return;e.preventDefault(),e.stopPropagation();const m=e.currentTarget;m.setPointerCapture&&m.setPointerCapture(e.pointerId);const L=c.offsetHeight+h(),D={draggingId:n,fromIndex:t,hoverIndex:t,shiftHeight:L,phase:"drag"};u.current?.classList.add(U.layoutActive),v(D);const r={id:n,fromIndex:t,hoverIndex:t,items:y.current,pointerId:e.pointerId,startX:e.clientX,startY:e.clientY,element:c,captureTarget:m,isDropping:!1,dropCommitted:!1,onPointerMove:()=>{},onPointerUp:()=>{},onLostPointerCapture:()=>{},onTransitionEnd:()=>{},dropFallbackTimer:null},S=(a,F)=>{const _=a-r.startX,j=F-r.startY;r.element.style.transform=`translate3d(${_}px, ${j}px, 0)`;let f=r.fromIndex;for(let s=0;s<r.items.length;s++){if(s===r.fromIndex)continue;const H=w(r.items[s].id);H!==null&&(s<r.fromIndex&&F<H?f=Math.min(f,s):s>r.fromIndex&&F>H&&(f=Math.max(f,s)))}f!==r.hoverIndex&&(r.hoverIndex=f,v(s=>s&&s.draggingId===r.id?{...s,hoverIndex:f}:s))},X=()=>{if(!(i.current!==r||r.isDropping||r.dropCommitted)){if(r.fromIndex===r.hoverIndex){T(r);return}Y(r)}};r.onPointerMove=a=>{a.pointerId!==r.pointerId||i.current!==r||S(a.clientX,a.clientY)},r.onPointerUp=a=>{a.pointerId!==r.pointerId||i.current!==r||(S(a.clientX,a.clientY),X())},r.onLostPointerCapture=a=>{a.pointerId!==r.pointerId||i.current!==r||r.isDropping||r.dropCommitted||(S(a.clientX,a.clientY),X())},m.addEventListener("pointermove",r.onPointerMove),m.addEventListener("pointerup",r.onPointerUp),m.addEventListener("lostpointercapture",r.onLostPointerCapture),i.current=r},[T,w,h,d,u,Y]);return{dragLayout:$,announce:B,handlePointerDown:O,moveItemByKeyboard:N}}function J(p,g){if(p===g.fromIndex)return 0;const{shiftHeight:u,hoverIndex:d,fromIndex:I}=g;return p>=d&&p<I?u:p<=d&&p>I?-u:0}export{J as getSiblingShiftY,z as useSortableListDnD};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{injectCss as t}from"../../utils/injectCss.js";var i=".JMYqF{--altum-time-field-width:150px;min-width:var(--altum-time-field-width)}";const e={field:"JMYqF"};t(i);export{e as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{useRef as y,useState as G,useLayoutEffect as M}from"react";import{getFormattedValue as h,getRemainingGuides as V,getStaticDigitsPrefix as w}from"../components/MaskedField/MaskedField.utils.js";function B(k){const{mask:n,value:u,disabled:v,readOnly:R,onChange:d}=k,p=y(null),a=y(null),[C,T]=G(0),D=!!v||!!R,s=u.replace(/\D/g,"")?h(u,n):"",m=t=>{a.current=t,T(l=>l+1)};M(()=>{const t=p.current;t&&a.current!==null&&(t.setSelectionRange(a.current,a.current),a.current=null)},[u,C]);const b=t=>{if(D)return;const l=t.target,r=l.selectionStart||0,g=l.value;let c=g.replace(/\D/g,"");const e=w(n);e&&c.startsWith(e)&&(c=c.slice(e.length));const i=c.slice(0,n.replace(/[^9]/g,"").length),o=h(i,n);m(r>=g.length-1?o.length:r),d(i)},x=t=>{if(D)return;const l=t.currentTarget,r=l.selectionStart,g=l.selectionEnd;if(r===null||r!==g)return;const c=e=>{let i=0;for(let f=0;f<e;f++)n[f]==="9"&&i++;const o=u.replace(/\D/g,""),S=o.slice(0,i)+o.slice(i+1);m(h(S.slice(0,i),n).length),d(S)};if(t.key==="Backspace"&&r>0){let e=r-1;for(;e>=0&&n[e]!=="9";)e--;t.preventDefault(),e>=0&&c(e)}if(t.key==="Delete"&&r<n.length){let e=r;for(;e<n.length&&n[e]!=="9";)e++;e<n.length&&(t.preventDefault(),c(e))}},E=t=>{const l=t.currentTarget;l.selectionStart!==null&&l.selectionStart>s.length&&l.setSelectionRange(s.length,s.length)};return{inputRef:p,displayVal:s,remainingGuides:V(s,n),handleChange:b,handleKeyDown:x,handleClick:E}}export{B as useDigitMask};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{injectCss as e}from"../utils/injectCss.js";var i=".TfUk7{clip:rect(0,0,0,0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}";const t={srOnly:"TfUk7"};e(i);export{t as default};
|