@duyluonganduin/acl-web-components 0.0.59 → 0.0.61
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/README.md +1 -0
- package/dist/acl-web-components.cjs +1 -1
- package/dist/acl-web-components.d.ts +118 -0
- package/dist/acl-web-components.iife.js +414 -297
- package/dist/acl-web-components.js +130 -126
- package/dist/{anduin-table-DRPTUmAM.js → anduin-table-D6X8sSGF.js} +2340 -2078
- package/dist/{anduin-table-X2lYnMwn.cjs → anduin-table-KkQzZaMG.cjs} +411 -294
- package/dist/jsx.d.ts +15 -0
- package/dist/react.cjs +1 -1
- package/dist/react.d.ts +116 -0
- package/dist/react.js +212 -200
- package/package.json +1 -1
package/dist/jsx.d.ts
CHANGED
|
@@ -207,6 +207,21 @@ declare module 'react' {
|
|
|
207
207
|
clearable?: boolean | string
|
|
208
208
|
}
|
|
209
209
|
|
|
210
|
+
// ── anduin-inline-edit ────────────────────────────────────────────────
|
|
211
|
+
'anduin-inline-edit': Base & {
|
|
212
|
+
value?: string
|
|
213
|
+
placeholder?: string
|
|
214
|
+
/** 'small' (24px buttons) | 'medium' (32px) (default: 'medium') */
|
|
215
|
+
size?: 'small' | 'medium'
|
|
216
|
+
/** Initial mode only (default: 'view') */
|
|
217
|
+
mode?: 'view' | 'edit'
|
|
218
|
+
disabled?: boolean | string
|
|
219
|
+
/** Clicking the view text also enters edit mode */
|
|
220
|
+
'click-to-edit'?: boolean | string
|
|
221
|
+
/** Switcher tooltip and accessible name (default: 'Edit') */
|
|
222
|
+
'edit-label'?: string
|
|
223
|
+
}
|
|
224
|
+
|
|
210
225
|
// ── anduin-textarea ───────────────────────────────────────────────────
|
|
211
226
|
'anduin-textarea': Base & {
|
|
212
227
|
value?: string
|
package/dist/react.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react"),a=require("@lit/react"),e=require("./anduin-table-X2lYnMwn.cjs"),t=a.createComponent({react:n,tagName:"anduin-spinner",elementClass:e.AnduinSpinner}),o=a.createComponent({react:n,tagName:"anduin-sparkle-spinner",elementClass:e.AnduinSparkleSpinner}),i=a.createComponent({react:n,tagName:"anduin-ai-spinner",elementClass:e.AnduinAiSpinner}),r=a.createComponent({react:n,tagName:"anduin-icon",elementClass:e.AnduinIcon}),C=a.createComponent({react:n,tagName:"anduin-badge",elementClass:e.AnduinBadge}),s=a.createComponent({react:n,tagName:"anduin-badge-count",elementClass:e.AnduinBadgeCount}),l=a.createComponent({react:n,tagName:"anduin-button",elementClass:e.AnduinButton}),c=a.createComponent({react:n,tagName:"anduin-callout",elementClass:e.AnduinCallout}),d=a.createComponent({react:n,tagName:"anduin-divider",elementClass:e.AnduinDivider}),m=a.createComponent({react:n,tagName:"anduin-dot",elementClass:e.AnduinDot}),E=a.createComponent({react:n,tagName:"anduin-progress",elementClass:e.AnduinProgress}),A=a.createComponent({react:n,tagName:"anduin-skeleton",elementClass:e.AnduinSkeleton}),u=a.createComponent({react:n,tagName:"anduin-loading-state",elementClass:e.AnduinLoadingState}),g=a.createComponent({react:n,tagName:"anduin-field",elementClass:e.AnduinField}),N=a.createComponent({react:n,tagName:"anduin-field-label",elementClass:e.AnduinFieldLabel}),T=a.createComponent({react:n,tagName:"anduin-field-description",elementClass:e.AnduinFieldDescription}),_=a.createComponent({react:n,tagName:"anduin-field-error",elementClass:e.AnduinFieldError}),p=a.createComponent({react:n,tagName:"anduin-field-group",elementClass:e.AnduinFieldGroup}),G=a.createComponent({react:n,tagName:"anduin-radio",elementClass:e.AnduinRadio,events:{onChange:e.RADIO_CHANGE}}),L=a.createComponent({react:n,tagName:"anduin-radio-group",elementClass:e.AnduinRadioGroup,events:{onChange:e.RADIO_GROUP_CHANGE}}),S=a.createComponent({react:n,tagName:"anduin-checkbox",elementClass:e.AnduinCheckbox,events:{onChange:e.CHECKBOX_CHANGE}}),O=a.createComponent({react:n,tagName:"anduin-input",elementClass:e.AnduinInput,events:{onChange:e.INPUT_CHANGE,onClear:e.INPUT_CLEAR}}),R=a.createComponent({react:n,tagName:"anduin-textarea",elementClass:e.AnduinTextarea,events:{onChange:e.TEXTAREA_CHANGE}}),I=a.createComponent({react:n,tagName:"anduin-popover",elementClass:e.AnduinPopover,events:{onOpenChange:e.POPOVER_OPEN_CHANGE}}),b=a.createComponent({react:n,tagName:"anduin-popover-close",elementClass:e.AnduinPopoverClose}),D=a.createComponent({react:n,tagName:"anduin-menu",elementClass:e.AnduinMenu}),P=a.createComponent({react:n,tagName:"anduin-menu-item",elementClass:e.AnduinMenuItem}),H=a.createComponent({react:n,tagName:"anduin-modal",elementClass:e.AnduinModal,events:{onClose:e.MODAL_CLOSE_EVENT,onAfterClose:e.MODAL_AFTER_CLOSE_EVENT}}),v=a.createComponent({react:n,tagName:"anduin-modal-close",elementClass:e.AnduinModalClose}),B=a.createComponent({react:n,tagName:"anduin-tabs",elementClass:e.AnduinTabs,events:{onChange:e.TAB_CHANGE}}),M=a.createComponent({react:n,tagName:"anduin-tabs-list",elementClass:e.AnduinTabsList}),U=a.createComponent({react:n,tagName:"anduin-tab-trigger",elementClass:e.AnduinTabTrigger}),F=a.createComponent({react:n,tagName:"anduin-tab-content",elementClass:e.AnduinTabContent}),W=a.createComponent({react:n,tagName:"anduin-tag",elementClass:e.AnduinTag}),h=a.createComponent({react:n,tagName:"anduin-tag-close",elementClass:e.AnduinTagClose,events:{onClick:e.TAG_CLOSE_CLICK}}),V=a.createComponent({react:n,tagName:"anduin-toggle-group",elementClass:e.AnduinToggleGroup,events:{onChange:e.TOGGLE_GROUP_CHANGE}}),w=a.createComponent({react:n,tagName:"anduin-toggle-group-item",elementClass:e.AnduinToggleGroupItem,events:{onChange:e.TOGGLE_GROUP_ITEM_CHANGE,onSelect:e.TOGGLE_GROUP_ITEM_SELECT,onDeselect:e.TOGGLE_GROUP_ITEM_DESELECT}}),k=a.createComponent({react:n,tagName:"anduin-tooltip",elementClass:e.AnduinTooltip}),K=a.createComponent({react:n,tagName:"anduin-tooltip-trigger",elementClass:e.AnduinTooltipTrigger}),f=a.createComponent({react:n,tagName:"anduin-tooltip-content",elementClass:e.AnduinTooltipContent}),z=a.createComponent({react:n,tagName:"anduin-well",elementClass:e.AnduinWell}),X=a.createComponent({react:n,tagName:"anduin-well-close",elementClass:e.AnduinWellClose,events:{onClick:e.WELL_CLOSE_CLICK}}),x=a.createComponent({react:n,tagName:"anduin-avatar",elementClass:e.AnduinAvatar}),Z=a.createComponent({react:n,tagName:"anduin-file-icon",elementClass:e.AnduinFileIcon}),q=a.createComponent({react:n,tagName:"anduin-toast",elementClass:e.AnduinToast}),y=a.createComponent({react:n,tagName:"anduin-toaster",elementClass:e.AnduinToaster}),j=a.createComponent({react:n,tagName:"anduin-dropdown",elementClass:e.AnduinDropdown,events:{onChange:e.DROPDOWN_CHANGE}}),J=a.createComponent({react:n,tagName:"anduin-drawer",elementClass:e.AnduinDrawer,events:{onClose:e.DRAWER_CLOSE_EVENT,onAfterClose:e.DRAWER_AFTER_CLOSE_EVENT}}),Q=a.createComponent({react:n,tagName:"anduin-drawer-close",elementClass:e.AnduinDrawerClose}),Y=a.createComponent({react:n,tagName:"anduin-switcher",elementClass:e.AnduinSwitcher,events:{onChange:e.SWITCHER_CHANGE}}),$=a.createComponent({react:n,tagName:"anduin-suggestion",elementClass:e.AnduinSuggestion,events:{onChange:e.SUGGESTION_CHANGE,onSelect:e.SUGGESTION_SELECT,onClear:e.SUGGESTION_CLEAR}}),ee=a.createComponent({react:n,tagName:"anduin-navigation",elementClass:e.AnduinNavigation,events:{onChange:e.NAVIGATION_CHANGE}}),ne=a.createComponent({react:n,tagName:"anduin-navigation-item",elementClass:e.AnduinNavigationItem}),ae=a.createComponent({react:n,tagName:"anduin-resizable-panel-group",elementClass:e.AnduinResizablePanelGroup}),te=a.createComponent({react:n,tagName:"anduin-resizable-panel",elementClass:e.AnduinResizablePanel}),oe=a.createComponent({react:n,tagName:"anduin-resizable-handle",elementClass:e.AnduinResizableHandle,events:{onResize:e.RESIZE_EVENT}}),ie=a.createComponent({react:n,tagName:"anduin-pagination",elementClass:e.AnduinPagination,events:{onValueChange:e.PAGINATION_CHANGE}}),re=a.createComponent({react:n,tagName:"anduin-pagination-first-page",elementClass:e.AnduinPaginationFirstPage}),Ce=a.createComponent({react:n,tagName:"anduin-pagination-last-page",elementClass:e.AnduinPaginationLastPage}),se=a.createComponent({react:n,tagName:"anduin-sidebar",elementClass:e.AnduinSidebar}),le=a.createComponent({react:n,tagName:"anduin-sidebar-content",elementClass:e.AnduinSidebarContent}),ce=a.createComponent({react:n,tagName:"anduin-sidebar-header",elementClass:e.AnduinSidebarHeader}),de=a.createComponent({react:n,tagName:"anduin-sidebar-footer",elementClass:e.AnduinSidebarFooter}),me=a.createComponent({react:n,tagName:"anduin-sidebar-group",elementClass:e.AnduinSidebarGroup}),Ee=a.createComponent({react:n,tagName:"anduin-sidebar-group-label",elementClass:e.AnduinSidebarGroupLabel}),Ae=a.createComponent({react:n,tagName:"anduin-sidebar-menu",elementClass:e.AnduinSidebarMenu}),ue=a.createComponent({react:n,tagName:"anduin-sidebar-menu-item",elementClass:e.AnduinSidebarMenuItem,events:{onSelect:e.SIDEBAR_SELECT}}),ge=a.createComponent({react:n,tagName:"anduin-sidebar-action",elementClass:e.AnduinSidebarAction}),Ne=a.createComponent({react:n,tagName:"anduin-sidebar-badge",elementClass:e.AnduinSidebarBadge}),Te=a.createComponent({react:n,tagName:"anduin-sidebar-separator",elementClass:e.AnduinSidebarSeparator}),_e=a.createComponent({react:n,tagName:"anduin-timeline",elementClass:e.AnduinTimeline}),pe=a.createComponent({react:n,tagName:"anduin-timeline-item",elementClass:e.AnduinTimelineItem}),Ge=a.createComponent({react:n,tagName:"anduin-timeline-date",elementClass:e.AnduinTimelineDate}),Le=a.createComponent({react:n,tagName:"anduin-timeline-title",elementClass:e.AnduinTimelineTitle}),Se=a.createComponent({react:n,tagName:"anduin-timeline-group",elementClass:e.AnduinTimelineGroup}),Oe=a.createComponent({react:n,tagName:"anduin-timeline-label",elementClass:e.AnduinTimelineLabel}),Re=a.createComponent({react:n,tagName:"anduin-calendar",elementClass:e.AnduinCalendar,events:{onValueChange:e.CALENDAR_CHANGE}}),Ie=a.createComponent({react:n,tagName:"anduin-date-range",elementClass:e.AnduinDateRange,events:{onChange:e.DATE_RANGE_CHANGE}}),be=a.createComponent({react:n,tagName:"anduin-date-range-default",elementClass:e.AnduinDateRangeDefault}),De=a.createComponent({react:n,tagName:"anduin-date-range-start",elementClass:e.AnduinDateRangeStart}),Pe=a.createComponent({react:n,tagName:"anduin-date-range-end",elementClass:e.AnduinDateRangeEnd}),He=a.createComponent({react:n,tagName:"anduin-date-input",elementClass:e.AnduinDateInput,events:{onValueChange:e.DATE_INPUT_CHANGE}}),ve=a.createComponent({react:n,tagName:"anduin-date-picker",elementClass:e.AnduinDatePicker,events:{onValueChange:e.DATE_PICKER_CHANGE}}),Be=a.createComponent({react:n,tagName:"anduin-table",elementClass:e.AnduinTable,events:{onSort:e.TABLE_SORT,onColumnClick:e.TABLE_COLUMN_CLICK,onRowClick:e.TABLE_ROW_CLICK,onSelectionChange:e.TABLE_SELECTION_CHANGE,onCellContextMenu:e.TABLE_CELL_CONTEXT_MENU,onRowExpand:e.TABLE_ROW_EXPAND,onRowCollapse:e.TABLE_ROW_COLLAPSE,onGroupToggle:e.TABLE_GROUP_TOGGLE,onColumnResize:e.TABLE_COLUMN_RESIZE}});exports.CALENDAR_CHANGE=e.CALENDAR_CHANGE;exports.CHECKBOX_CHANGE=e.CHECKBOX_CHANGE;exports.DATE_INPUT_CHANGE=e.DATE_INPUT_CHANGE;exports.DATE_PICKER_CHANGE=e.DATE_PICKER_CHANGE;exports.DATE_RANGE_CHANGE=e.DATE_RANGE_CHANGE;exports.DRAWER_AFTER_CLOSE_EVENT=e.DRAWER_AFTER_CLOSE_EVENT;exports.DRAWER_CLOSE_EVENT=e.DRAWER_CLOSE_EVENT;exports.DROPDOWN_CHANGE=e.DROPDOWN_CHANGE;exports.INPUT_CHANGE=e.INPUT_CHANGE;exports.INPUT_CLEAR=e.INPUT_CLEAR;exports.MENU_ITEM_CLICK=e.MENU_ITEM_CLICK;exports.MODAL_AFTER_CLOSE_EVENT=e.MODAL_AFTER_CLOSE_EVENT;exports.MODAL_CLOSE_EVENT=e.MODAL_CLOSE_EVENT;exports.NAVIGATION_CHANGE=e.NAVIGATION_CHANGE;exports.PAGINATION_CHANGE=e.PAGINATION_CHANGE;exports.POPOVER_OPEN_CHANGE=e.POPOVER_OPEN_CHANGE;exports.RADIO_CHANGE=e.RADIO_CHANGE;exports.RADIO_GROUP_CHANGE=e.RADIO_GROUP_CHANGE;exports.RESIZE_EVENT=e.RESIZE_EVENT;exports.SIDEBAR_SELECT=e.SIDEBAR_SELECT;exports.SUGGESTION_CHANGE=e.SUGGESTION_CHANGE;exports.SUGGESTION_CLEAR=e.SUGGESTION_CLEAR;exports.SUGGESTION_SELECT=e.SUGGESTION_SELECT;exports.SWITCHER_CHANGE=e.SWITCHER_CHANGE;exports.TABLE_CELL_CONTEXT_MENU=e.TABLE_CELL_CONTEXT_MENU;exports.TABLE_COLUMN_CLICK=e.TABLE_COLUMN_CLICK;exports.TABLE_COLUMN_RESIZE=e.TABLE_COLUMN_RESIZE;exports.TABLE_GROUP_TOGGLE=e.TABLE_GROUP_TOGGLE;exports.TABLE_ROW_CLICK=e.TABLE_ROW_CLICK;exports.TABLE_ROW_COLLAPSE=e.TABLE_ROW_COLLAPSE;exports.TABLE_ROW_EXPAND=e.TABLE_ROW_EXPAND;exports.TABLE_SELECTION_CHANGE=e.TABLE_SELECTION_CHANGE;exports.TABLE_SORT=e.TABLE_SORT;exports.TAB_CHANGE=e.TAB_CHANGE;exports.TAG_CLOSE_CLICK=e.TAG_CLOSE_CLICK;exports.TEXTAREA_CHANGE=e.TEXTAREA_CHANGE;exports.TOGGLE_GROUP_CHANGE=e.TOGGLE_GROUP_CHANGE;exports.TOGGLE_GROUP_ITEM_CHANGE=e.TOGGLE_GROUP_ITEM_CHANGE;exports.TOGGLE_GROUP_ITEM_DESELECT=e.TOGGLE_GROUP_ITEM_DESELECT;exports.TOGGLE_GROUP_ITEM_SELECT=e.TOGGLE_GROUP_ITEM_SELECT;exports.WELL_CLOSE_CLICK=e.WELL_CLOSE_CLICK;exports.AiSpinner=i;exports.Avatar=x;exports.Badge=C;exports.BadgeCount=s;exports.Button=l;exports.Calendar=Re;exports.Callout=c;exports.Checkbox=S;exports.DateInput=He;exports.DatePicker=ve;exports.DateRange=Ie;exports.DateRangeDefault=be;exports.DateRangeEnd=Pe;exports.DateRangeStart=De;exports.Divider=d;exports.Dot=m;exports.Drawer=J;exports.DrawerClose=Q;exports.Dropdown=j;exports.Field=g;exports.FieldDescription=T;exports.FieldError=_;exports.FieldGroup=p;exports.FieldLabel=N;exports.FileIcon=Z;exports.Icon=r;exports.Input=O;exports.LoadingState=u;exports.Menu=D;exports.MenuItem=P;exports.Modal=H;exports.ModalClose=v;exports.Navigation=ee;exports.NavigationItem=ne;exports.Pagination=ie;exports.PaginationFirstPage=re;exports.PaginationLastPage=Ce;exports.Popover=I;exports.PopoverClose=b;exports.Progress=E;exports.Radio=G;exports.RadioGroup=L;exports.ResizableHandle=oe;exports.ResizablePanel=te;exports.ResizablePanelGroup=ae;exports.Sidebar=se;exports.SidebarAction=ge;exports.SidebarBadge=Ne;exports.SidebarContent=le;exports.SidebarFooter=de;exports.SidebarGroup=me;exports.SidebarGroupLabel=Ee;exports.SidebarHeader=ce;exports.SidebarMenu=Ae;exports.SidebarMenuItem=ue;exports.SidebarSeparator=Te;exports.Skeleton=A;exports.SparkleSpinner=o;exports.Spinner=t;exports.Suggestion=$;exports.Switcher=Y;exports.TabContent=F;exports.TabTrigger=U;exports.Table=Be;exports.Tabs=B;exports.TabsList=M;exports.Tag=W;exports.TagClose=h;exports.Textarea=R;exports.Timeline=_e;exports.TimelineDate=Ge;exports.TimelineGroup=Se;exports.TimelineItem=pe;exports.TimelineLabel=Oe;exports.TimelineTitle=Le;exports.Toast=q;exports.Toaster=y;exports.ToggleGroup=V;exports.ToggleGroupItem=w;exports.Tooltip=k;exports.TooltipContent=f;exports.TooltipTrigger=K;exports.Well=z;exports.WellClose=X;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react"),a=require("@lit/react"),e=require("./anduin-table-KkQzZaMG.cjs"),t=a.createComponent({react:n,tagName:"anduin-spinner",elementClass:e.AnduinSpinner}),o=a.createComponent({react:n,tagName:"anduin-sparkle-spinner",elementClass:e.AnduinSparkleSpinner}),i=a.createComponent({react:n,tagName:"anduin-ai-spinner",elementClass:e.AnduinAiSpinner}),r=a.createComponent({react:n,tagName:"anduin-icon",elementClass:e.AnduinIcon}),C=a.createComponent({react:n,tagName:"anduin-badge",elementClass:e.AnduinBadge}),l=a.createComponent({react:n,tagName:"anduin-badge-count",elementClass:e.AnduinBadgeCount}),s=a.createComponent({react:n,tagName:"anduin-button",elementClass:e.AnduinButton}),d=a.createComponent({react:n,tagName:"anduin-callout",elementClass:e.AnduinCallout}),c=a.createComponent({react:n,tagName:"anduin-divider",elementClass:e.AnduinDivider}),E=a.createComponent({react:n,tagName:"anduin-dot",elementClass:e.AnduinDot}),m=a.createComponent({react:n,tagName:"anduin-progress",elementClass:e.AnduinProgress}),A=a.createComponent({react:n,tagName:"anduin-skeleton",elementClass:e.AnduinSkeleton}),u=a.createComponent({react:n,tagName:"anduin-loading-state",elementClass:e.AnduinLoadingState}),N=a.createComponent({react:n,tagName:"anduin-field",elementClass:e.AnduinField}),g=a.createComponent({react:n,tagName:"anduin-field-label",elementClass:e.AnduinFieldLabel}),T=a.createComponent({react:n,tagName:"anduin-field-description",elementClass:e.AnduinFieldDescription}),_=a.createComponent({react:n,tagName:"anduin-field-error",elementClass:e.AnduinFieldError}),p=a.createComponent({react:n,tagName:"anduin-field-group",elementClass:e.AnduinFieldGroup}),G=a.createComponent({react:n,tagName:"anduin-radio",elementClass:e.AnduinRadio,events:{onChange:e.RADIO_CHANGE}}),L=a.createComponent({react:n,tagName:"anduin-radio-group",elementClass:e.AnduinRadioGroup,events:{onChange:e.RADIO_GROUP_CHANGE}}),S=a.createComponent({react:n,tagName:"anduin-checkbox",elementClass:e.AnduinCheckbox,events:{onChange:e.CHECKBOX_CHANGE}}),O=a.createComponent({react:n,tagName:"anduin-input",elementClass:e.AnduinInput,events:{onChange:e.INPUT_CHANGE,onClear:e.INPUT_CLEAR}}),R=a.createComponent({react:n,tagName:"anduin-textarea",elementClass:e.AnduinTextarea,events:{onChange:e.TEXTAREA_CHANGE}}),I=a.createComponent({react:n,tagName:"anduin-inline-edit",elementClass:e.AnduinInlineEdit,events:{onSave:e.INLINE_EDIT_SAVE,onCancel:e.INLINE_EDIT_CANCEL,onEdit:e.INLINE_EDIT_EDIT}}),b=a.createComponent({react:n,tagName:"anduin-popover",elementClass:e.AnduinPopover,events:{onOpenChange:e.POPOVER_OPEN_CHANGE}}),D=a.createComponent({react:n,tagName:"anduin-popover-close",elementClass:e.AnduinPopoverClose}),P=a.createComponent({react:n,tagName:"anduin-menu",elementClass:e.AnduinMenu}),H=a.createComponent({react:n,tagName:"anduin-menu-item",elementClass:e.AnduinMenuItem}),v=a.createComponent({react:n,tagName:"anduin-modal",elementClass:e.AnduinModal,events:{onClose:e.MODAL_CLOSE_EVENT,onAfterClose:e.MODAL_AFTER_CLOSE_EVENT}}),B=a.createComponent({react:n,tagName:"anduin-modal-close",elementClass:e.AnduinModalClose}),M=a.createComponent({react:n,tagName:"anduin-tabs",elementClass:e.AnduinTabs,events:{onChange:e.TAB_CHANGE}}),U=a.createComponent({react:n,tagName:"anduin-tabs-list",elementClass:e.AnduinTabsList}),F=a.createComponent({react:n,tagName:"anduin-tab-trigger",elementClass:e.AnduinTabTrigger}),W=a.createComponent({react:n,tagName:"anduin-tab-content",elementClass:e.AnduinTabContent}),h=a.createComponent({react:n,tagName:"anduin-tag",elementClass:e.AnduinTag}),V=a.createComponent({react:n,tagName:"anduin-tag-close",elementClass:e.AnduinTagClose,events:{onClick:e.TAG_CLOSE_CLICK}}),w=a.createComponent({react:n,tagName:"anduin-toggle-group",elementClass:e.AnduinToggleGroup,events:{onChange:e.TOGGLE_GROUP_CHANGE}}),k=a.createComponent({react:n,tagName:"anduin-toggle-group-item",elementClass:e.AnduinToggleGroupItem,events:{onChange:e.TOGGLE_GROUP_ITEM_CHANGE,onSelect:e.TOGGLE_GROUP_ITEM_SELECT,onDeselect:e.TOGGLE_GROUP_ITEM_DESELECT}}),K=a.createComponent({react:n,tagName:"anduin-tooltip",elementClass:e.AnduinTooltip}),f=a.createComponent({react:n,tagName:"anduin-tooltip-trigger",elementClass:e.AnduinTooltipTrigger}),z=a.createComponent({react:n,tagName:"anduin-tooltip-content",elementClass:e.AnduinTooltipContent}),X=a.createComponent({react:n,tagName:"anduin-well",elementClass:e.AnduinWell}),x=a.createComponent({react:n,tagName:"anduin-well-close",elementClass:e.AnduinWellClose,events:{onClick:e.WELL_CLOSE_CLICK}}),Z=a.createComponent({react:n,tagName:"anduin-avatar",elementClass:e.AnduinAvatar}),q=a.createComponent({react:n,tagName:"anduin-file-icon",elementClass:e.AnduinFileIcon}),y=a.createComponent({react:n,tagName:"anduin-toast",elementClass:e.AnduinToast}),j=a.createComponent({react:n,tagName:"anduin-toaster",elementClass:e.AnduinToaster}),J=a.createComponent({react:n,tagName:"anduin-dropdown",elementClass:e.AnduinDropdown,events:{onChange:e.DROPDOWN_CHANGE}}),Q=a.createComponent({react:n,tagName:"anduin-drawer",elementClass:e.AnduinDrawer,events:{onClose:e.DRAWER_CLOSE_EVENT,onAfterClose:e.DRAWER_AFTER_CLOSE_EVENT}}),Y=a.createComponent({react:n,tagName:"anduin-drawer-close",elementClass:e.AnduinDrawerClose}),$=a.createComponent({react:n,tagName:"anduin-switcher",elementClass:e.AnduinSwitcher,events:{onChange:e.SWITCHER_CHANGE}}),ee=a.createComponent({react:n,tagName:"anduin-suggestion",elementClass:e.AnduinSuggestion,events:{onChange:e.SUGGESTION_CHANGE,onSelect:e.SUGGESTION_SELECT,onClear:e.SUGGESTION_CLEAR}}),ne=a.createComponent({react:n,tagName:"anduin-navigation",elementClass:e.AnduinNavigation,events:{onChange:e.NAVIGATION_CHANGE}}),ae=a.createComponent({react:n,tagName:"anduin-navigation-item",elementClass:e.AnduinNavigationItem}),te=a.createComponent({react:n,tagName:"anduin-resizable-panel-group",elementClass:e.AnduinResizablePanelGroup}),oe=a.createComponent({react:n,tagName:"anduin-resizable-panel",elementClass:e.AnduinResizablePanel}),ie=a.createComponent({react:n,tagName:"anduin-resizable-handle",elementClass:e.AnduinResizableHandle,events:{onResize:e.RESIZE_EVENT}}),re=a.createComponent({react:n,tagName:"anduin-pagination",elementClass:e.AnduinPagination,events:{onValueChange:e.PAGINATION_CHANGE}}),Ce=a.createComponent({react:n,tagName:"anduin-pagination-first-page",elementClass:e.AnduinPaginationFirstPage}),le=a.createComponent({react:n,tagName:"anduin-pagination-last-page",elementClass:e.AnduinPaginationLastPage}),se=a.createComponent({react:n,tagName:"anduin-sidebar",elementClass:e.AnduinSidebar}),de=a.createComponent({react:n,tagName:"anduin-sidebar-content",elementClass:e.AnduinSidebarContent}),ce=a.createComponent({react:n,tagName:"anduin-sidebar-header",elementClass:e.AnduinSidebarHeader}),Ee=a.createComponent({react:n,tagName:"anduin-sidebar-footer",elementClass:e.AnduinSidebarFooter}),me=a.createComponent({react:n,tagName:"anduin-sidebar-group",elementClass:e.AnduinSidebarGroup}),Ae=a.createComponent({react:n,tagName:"anduin-sidebar-group-label",elementClass:e.AnduinSidebarGroupLabel}),ue=a.createComponent({react:n,tagName:"anduin-sidebar-menu",elementClass:e.AnduinSidebarMenu}),Ne=a.createComponent({react:n,tagName:"anduin-sidebar-menu-item",elementClass:e.AnduinSidebarMenuItem,events:{onSelect:e.SIDEBAR_SELECT}}),ge=a.createComponent({react:n,tagName:"anduin-sidebar-action",elementClass:e.AnduinSidebarAction}),Te=a.createComponent({react:n,tagName:"anduin-sidebar-badge",elementClass:e.AnduinSidebarBadge}),_e=a.createComponent({react:n,tagName:"anduin-sidebar-separator",elementClass:e.AnduinSidebarSeparator}),pe=a.createComponent({react:n,tagName:"anduin-timeline",elementClass:e.AnduinTimeline}),Ge=a.createComponent({react:n,tagName:"anduin-timeline-item",elementClass:e.AnduinTimelineItem}),Le=a.createComponent({react:n,tagName:"anduin-timeline-date",elementClass:e.AnduinTimelineDate}),Se=a.createComponent({react:n,tagName:"anduin-timeline-title",elementClass:e.AnduinTimelineTitle}),Oe=a.createComponent({react:n,tagName:"anduin-timeline-group",elementClass:e.AnduinTimelineGroup}),Re=a.createComponent({react:n,tagName:"anduin-timeline-label",elementClass:e.AnduinTimelineLabel}),Ie=a.createComponent({react:n,tagName:"anduin-calendar",elementClass:e.AnduinCalendar,events:{onValueChange:e.CALENDAR_CHANGE}}),be=a.createComponent({react:n,tagName:"anduin-date-range",elementClass:e.AnduinDateRange,events:{onChange:e.DATE_RANGE_CHANGE}}),De=a.createComponent({react:n,tagName:"anduin-date-range-default",elementClass:e.AnduinDateRangeDefault}),Pe=a.createComponent({react:n,tagName:"anduin-date-range-start",elementClass:e.AnduinDateRangeStart}),He=a.createComponent({react:n,tagName:"anduin-date-range-end",elementClass:e.AnduinDateRangeEnd}),ve=a.createComponent({react:n,tagName:"anduin-date-input",elementClass:e.AnduinDateInput,events:{onValueChange:e.DATE_INPUT_CHANGE}}),Be=a.createComponent({react:n,tagName:"anduin-date-picker",elementClass:e.AnduinDatePicker,events:{onValueChange:e.DATE_PICKER_CHANGE}}),Me=a.createComponent({react:n,tagName:"anduin-table",elementClass:e.AnduinTable,events:{onSort:e.TABLE_SORT,onColumnClick:e.TABLE_COLUMN_CLICK,onRowClick:e.TABLE_ROW_CLICK,onSelectionChange:e.TABLE_SELECTION_CHANGE,onCellContextMenu:e.TABLE_CELL_CONTEXT_MENU,onRowExpand:e.TABLE_ROW_EXPAND,onRowCollapse:e.TABLE_ROW_COLLAPSE,onGroupToggle:e.TABLE_GROUP_TOGGLE,onColumnResize:e.TABLE_COLUMN_RESIZE}});exports.CALENDAR_CHANGE=e.CALENDAR_CHANGE;exports.CHECKBOX_CHANGE=e.CHECKBOX_CHANGE;exports.DATE_INPUT_CHANGE=e.DATE_INPUT_CHANGE;exports.DATE_PICKER_CHANGE=e.DATE_PICKER_CHANGE;exports.DATE_RANGE_CHANGE=e.DATE_RANGE_CHANGE;exports.DRAWER_AFTER_CLOSE_EVENT=e.DRAWER_AFTER_CLOSE_EVENT;exports.DRAWER_CLOSE_EVENT=e.DRAWER_CLOSE_EVENT;exports.DROPDOWN_CHANGE=e.DROPDOWN_CHANGE;exports.INPUT_CHANGE=e.INPUT_CHANGE;exports.INPUT_CLEAR=e.INPUT_CLEAR;exports.MENU_ITEM_CLICK=e.MENU_ITEM_CLICK;exports.MODAL_AFTER_CLOSE_EVENT=e.MODAL_AFTER_CLOSE_EVENT;exports.MODAL_CLOSE_EVENT=e.MODAL_CLOSE_EVENT;exports.NAVIGATION_CHANGE=e.NAVIGATION_CHANGE;exports.PAGINATION_CHANGE=e.PAGINATION_CHANGE;exports.POPOVER_OPEN_CHANGE=e.POPOVER_OPEN_CHANGE;exports.RADIO_CHANGE=e.RADIO_CHANGE;exports.RADIO_GROUP_CHANGE=e.RADIO_GROUP_CHANGE;exports.RESIZE_EVENT=e.RESIZE_EVENT;exports.SIDEBAR_SELECT=e.SIDEBAR_SELECT;exports.SUGGESTION_CHANGE=e.SUGGESTION_CHANGE;exports.SUGGESTION_CLEAR=e.SUGGESTION_CLEAR;exports.SUGGESTION_SELECT=e.SUGGESTION_SELECT;exports.SWITCHER_CHANGE=e.SWITCHER_CHANGE;exports.TABLE_CELL_CONTEXT_MENU=e.TABLE_CELL_CONTEXT_MENU;exports.TABLE_COLUMN_CLICK=e.TABLE_COLUMN_CLICK;exports.TABLE_COLUMN_RESIZE=e.TABLE_COLUMN_RESIZE;exports.TABLE_GROUP_TOGGLE=e.TABLE_GROUP_TOGGLE;exports.TABLE_ROW_CLICK=e.TABLE_ROW_CLICK;exports.TABLE_ROW_COLLAPSE=e.TABLE_ROW_COLLAPSE;exports.TABLE_ROW_EXPAND=e.TABLE_ROW_EXPAND;exports.TABLE_SELECTION_CHANGE=e.TABLE_SELECTION_CHANGE;exports.TABLE_SORT=e.TABLE_SORT;exports.TAB_CHANGE=e.TAB_CHANGE;exports.TAG_CLOSE_CLICK=e.TAG_CLOSE_CLICK;exports.TEXTAREA_CHANGE=e.TEXTAREA_CHANGE;exports.TOGGLE_GROUP_CHANGE=e.TOGGLE_GROUP_CHANGE;exports.TOGGLE_GROUP_ITEM_CHANGE=e.TOGGLE_GROUP_ITEM_CHANGE;exports.TOGGLE_GROUP_ITEM_DESELECT=e.TOGGLE_GROUP_ITEM_DESELECT;exports.TOGGLE_GROUP_ITEM_SELECT=e.TOGGLE_GROUP_ITEM_SELECT;exports.WELL_CLOSE_CLICK=e.WELL_CLOSE_CLICK;exports.AiSpinner=i;exports.Avatar=Z;exports.Badge=C;exports.BadgeCount=l;exports.Button=s;exports.Calendar=Ie;exports.Callout=d;exports.Checkbox=S;exports.DateInput=ve;exports.DatePicker=Be;exports.DateRange=be;exports.DateRangeDefault=De;exports.DateRangeEnd=He;exports.DateRangeStart=Pe;exports.Divider=c;exports.Dot=E;exports.Drawer=Q;exports.DrawerClose=Y;exports.Dropdown=J;exports.Field=N;exports.FieldDescription=T;exports.FieldError=_;exports.FieldGroup=p;exports.FieldLabel=g;exports.FileIcon=q;exports.Icon=r;exports.InlineEdit=I;exports.Input=O;exports.LoadingState=u;exports.Menu=P;exports.MenuItem=H;exports.Modal=v;exports.ModalClose=B;exports.Navigation=ne;exports.NavigationItem=ae;exports.Pagination=re;exports.PaginationFirstPage=Ce;exports.PaginationLastPage=le;exports.Popover=b;exports.PopoverClose=D;exports.Progress=m;exports.Radio=G;exports.RadioGroup=L;exports.ResizableHandle=ie;exports.ResizablePanel=oe;exports.ResizablePanelGroup=te;exports.Sidebar=se;exports.SidebarAction=ge;exports.SidebarBadge=Te;exports.SidebarContent=de;exports.SidebarFooter=Ee;exports.SidebarGroup=me;exports.SidebarGroupLabel=Ae;exports.SidebarHeader=ce;exports.SidebarMenu=ue;exports.SidebarMenuItem=Ne;exports.SidebarSeparator=_e;exports.Skeleton=A;exports.SparkleSpinner=o;exports.Spinner=t;exports.Suggestion=ee;exports.Switcher=$;exports.TabContent=W;exports.TabTrigger=F;exports.Table=Me;exports.Tabs=M;exports.TabsList=U;exports.Tag=h;exports.TagClose=V;exports.Textarea=R;exports.Timeline=pe;exports.TimelineDate=Le;exports.TimelineGroup=Oe;exports.TimelineItem=Ge;exports.TimelineLabel=Re;exports.TimelineTitle=Se;exports.Toast=y;exports.Toaster=j;exports.ToggleGroup=w;exports.ToggleGroupItem=k;exports.Tooltip=K;exports.TooltipContent=z;exports.TooltipTrigger=f;exports.Well=X;exports.WellClose=x;
|
package/dist/react.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CSSResult } from 'lit';
|
|
2
|
+
import { EventName } from '@lit/react';
|
|
2
3
|
import { LitElement } from 'lit';
|
|
3
4
|
import { nothing } from 'lit';
|
|
4
5
|
import { PropertyValues } from 'lit';
|
|
@@ -603,6 +604,108 @@ declare class AnduinIcon extends LitElement {
|
|
|
603
604
|
render(): TemplateResult<2>;
|
|
604
605
|
}
|
|
605
606
|
|
|
607
|
+
/**
|
|
608
|
+
* Edit a single-line value in place: a View mode that shows the value with an
|
|
609
|
+
* edit "switcher", and an Edit mode with a text field, Save and Cancel.
|
|
610
|
+
*
|
|
611
|
+
* A port of `InlineEditR` / `InlineEditL` from the Anduin design system
|
|
612
|
+
* (`design.anduin.components.inline`). Kept from it: the two modes, the
|
|
613
|
+
* switcher as a plain `edit` icon button in a tooltip, Save as a filled
|
|
614
|
+
* primary `check` button ("Or press Enter to save", or the validation message
|
|
615
|
+
* while invalid, when it is also disabled), Cancel as a plain `cross` button
|
|
616
|
+
* ("Or press Esc to cancel"), Enter / Escape, validation on every keystroke,
|
|
617
|
+
* Cancel restoring the last saved value, and heights 24 / 32 mapped onto
|
|
618
|
+
* button sizes small / medium.
|
|
619
|
+
*
|
|
620
|
+
* What differs, and why:
|
|
621
|
+
*
|
|
622
|
+
* - **The field inherits the host's font.** The Scala component renders a
|
|
623
|
+
* `TextBox` (13px). This one exists for detail-page titles edited in place,
|
|
624
|
+
* where a 13px input replacing a 26px heading makes the page jump and reads
|
|
625
|
+
* as a form rather than the title itself. So the host sets no font at all —
|
|
626
|
+
* not even `--font-sans`, unlike every other ACL host — and the view text and
|
|
627
|
+
* the field both inherit size, weight, line height, family and colour from
|
|
628
|
+
* wherever the element is placed. The field keeps the ACL input's border,
|
|
629
|
+
* radius, background and focus treatment.
|
|
630
|
+
*
|
|
631
|
+
* - **It is a native `<input>`, not `<anduin-input>`.** `anduin-input` fixes
|
|
632
|
+
* its font size per `size` (11 / 13 / 15px) and its height (24 / 32 / 40px),
|
|
633
|
+
* both of which the point above has to undo; and its `anduin-input:change`
|
|
634
|
+
* is bubbling and composed, so every keystroke would leak an input event out
|
|
635
|
+
* of this element that a consumer listening for input changes higher up
|
|
636
|
+
* would mistake for its own field.
|
|
637
|
+
*
|
|
638
|
+
* - **The view is built in.** The Scala API takes a `renderViewMode` callback.
|
|
639
|
+
* Here the value text plus switcher is the default and the default slot
|
|
640
|
+
* replaces the text, which covers the same ground without a render prop.
|
|
641
|
+
*
|
|
642
|
+
* - **Enter / Escape act on keydown, not keyup.** On keyup, the Enter that
|
|
643
|
+
* commits an IME composition arrives as a plain Enter and saved half-typed
|
|
644
|
+
* text; keydown carries `isComposing`, so that Enter is ignored. Both keys
|
|
645
|
+
* stop propagating once handled, so an Escape that cancels the edit does not
|
|
646
|
+
* also close a surrounding drawer or popover listening on the document.
|
|
647
|
+
*
|
|
648
|
+
* - **Saving an unchanged value fires cancel, not save.** Every edit session
|
|
649
|
+
* ends in exactly one of the two events, so a consumer tracking "is editing"
|
|
650
|
+
* from `edit` always hears the end of it, and a no-op rename never reaches
|
|
651
|
+
* the consumer's save path.
|
|
652
|
+
*/
|
|
653
|
+
declare class AnduinInlineEdit extends LitElement {
|
|
654
|
+
static styles: CSSResult;
|
|
655
|
+
/** The saved value. Changing it from outside updates the view (and an untouched draft). */
|
|
656
|
+
value: string;
|
|
657
|
+
/** Shown in the field when empty, and in the view (gray) when the value is empty. */
|
|
658
|
+
placeholder: string;
|
|
659
|
+
/** Button size: `small` (24px) or `medium` (32px). */
|
|
660
|
+
size: InlineEditSize;
|
|
661
|
+
/** The mode on first render. Later changes are ignored; call `edit()` to switch. */
|
|
662
|
+
mode: InlineEditMode;
|
|
663
|
+
/** Hides the switcher and ignores clicks and `edit()`. Leaves edit mode (discarding the draft) if set while editing. */
|
|
664
|
+
disabled: boolean;
|
|
665
|
+
/** Clicking the view text also enters edit mode. */
|
|
666
|
+
clickToEdit: boolean;
|
|
667
|
+
/** Tooltip and accessible name of the switcher. */
|
|
668
|
+
editLabel: string;
|
|
669
|
+
/** Property only. Runs on entering edit mode and on every keystroke. */
|
|
670
|
+
validate?: InlineEditValidate;
|
|
671
|
+
private _editing;
|
|
672
|
+
private _draft;
|
|
673
|
+
private _error;
|
|
674
|
+
private _hasSlotted;
|
|
675
|
+
/** Width of the view text when edit mode was entered, so the field opens at least that wide. */
|
|
676
|
+
private _openWidth;
|
|
677
|
+
private _field?;
|
|
678
|
+
private _text?;
|
|
679
|
+
/** Whether the element is in edit mode. Also reflected as the `editing` attribute. */
|
|
680
|
+
get editing(): boolean;
|
|
681
|
+
/**
|
|
682
|
+
* Enters edit mode with the field focused and its whole text selected — for
|
|
683
|
+
* a "Rename" menu item, or opening a just-created object straight into its
|
|
684
|
+
* name. A no-op while disabled; while already editing it refocuses and
|
|
685
|
+
* reselects. Resolves once the field has focus.
|
|
686
|
+
*/
|
|
687
|
+
edit(): Promise<void>;
|
|
688
|
+
/** Leaves edit mode without saving and fires `anduin-inline-edit:cancel`. A no-op in view mode. */
|
|
689
|
+
cancel(): void;
|
|
690
|
+
/**
|
|
691
|
+
* Saves the draft and returns to view mode, as Enter does. Does nothing while
|
|
692
|
+
* the draft is invalid. Fires `anduin-inline-edit:save` with the new value, or
|
|
693
|
+
* `anduin-inline-edit:cancel` if it is unchanged.
|
|
694
|
+
*/
|
|
695
|
+
save(): void;
|
|
696
|
+
private _exit;
|
|
697
|
+
private _runValidate;
|
|
698
|
+
protected willUpdate(changed: Map<PropertyKey, unknown>): void;
|
|
699
|
+
protected updated(): void;
|
|
700
|
+
private _onInput;
|
|
701
|
+
private _onKeydown;
|
|
702
|
+
private _onTextClick;
|
|
703
|
+
private _onSlotChange;
|
|
704
|
+
private _renderView;
|
|
705
|
+
private _renderEdit;
|
|
706
|
+
render(): TemplateResult<1>;
|
|
707
|
+
}
|
|
708
|
+
|
|
606
709
|
declare class AnduinInput extends LitElement {
|
|
607
710
|
/**
|
|
608
711
|
* Focus belongs to the inner `<input>`, not the host. Without this,
|
|
@@ -1820,6 +1923,19 @@ declare type FileIconSize = 16 | 24 | 32;
|
|
|
1820
1923
|
|
|
1821
1924
|
export declare const Icon: ReactWebComponent<AnduinIcon, {}>;
|
|
1822
1925
|
|
|
1926
|
+
export declare const InlineEdit: ReactWebComponent<AnduinInlineEdit, {
|
|
1927
|
+
onSave: EventName<CustomEvent<string>>;
|
|
1928
|
+
onCancel: EventName<CustomEvent<void>>;
|
|
1929
|
+
onEdit: EventName<CustomEvent<void>>;
|
|
1930
|
+
}>;
|
|
1931
|
+
|
|
1932
|
+
declare type InlineEditMode = 'view' | 'edit';
|
|
1933
|
+
|
|
1934
|
+
declare type InlineEditSize = 'small' | 'medium';
|
|
1935
|
+
|
|
1936
|
+
/** Returns `null` (or `''`) when the value is valid, or the message to show when it is not. */
|
|
1937
|
+
declare type InlineEditValidate = (value: string) => string | null | undefined;
|
|
1938
|
+
|
|
1823
1939
|
export declare const Input: ReactWebComponent<AnduinInput, {
|
|
1824
1940
|
onChange: string;
|
|
1825
1941
|
onClear: string;
|