@editora/ui-core 0.1.25 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +124 -0
- package/dist/accordion.cjs.js +13 -12
- package/dist/accordion.esm.js +13 -12
- package/dist/alert-dialog.cjs.js +76 -45
- package/dist/alert-dialog.esm.js +179 -135
- package/dist/alert.cjs.js +41 -32
- package/dist/alert.esm.js +79 -70
- package/dist/animated-beam.cjs.js +42 -50
- package/dist/animated-beam.esm.js +47 -55
- package/dist/animated-list.cjs.js +11 -27
- package/dist/animated-list.esm.js +12 -28
- package/dist/animated-text.cjs.js +4 -4
- package/dist/animated-text.esm.js +4 -4
- package/dist/app-header.cjs.js +5 -5
- package/dist/app-header.esm.js +6 -6
- package/dist/aspect-ratio.cjs.js +10 -12
- package/dist/aspect-ratio.esm.js +11 -13
- package/dist/avatar.cjs.js +13 -17
- package/dist/avatar.esm.js +13 -17
- package/dist/badge.cjs.js +27 -22
- package/dist/badge.esm.js +32 -27
- package/dist/block-controls.cjs.js +11 -12
- package/dist/block-controls.esm.js +8 -9
- package/dist/box.cjs.js +2 -3
- package/dist/box.esm.js +2 -3
- package/dist/breadcrumb.cjs.js +12 -18
- package/dist/breadcrumb.esm.js +11 -17
- package/dist/button.cjs.js +1 -1
- package/dist/button.esm.js +1 -1
- package/dist/{calendar-B3PUKHQm.mjs → calendar-DmxiZrR7.mjs} +126 -117
- package/dist/{calendar-D-mXMgqc.js → calendar-o273O28D.js} +53 -44
- package/dist/calendar.cjs.js +1 -1
- package/dist/calendar.esm.js +1 -1
- package/dist/card.cjs.js +6 -7
- package/dist/card.esm.js +5 -6
- package/dist/chart.cjs.js +52 -52
- package/dist/chart.esm.js +95 -95
- package/dist/checkbox.cjs.js +19 -15
- package/dist/checkbox.esm.js +19 -15
- package/dist/collapsible.cjs.js +7 -11
- package/dist/collapsible.esm.js +7 -11
- package/dist/color-picker.cjs.js +36 -17
- package/dist/color-picker.esm.js +132 -113
- package/dist/combobox.cjs.js +57 -54
- package/dist/combobox.esm.js +62 -58
- package/dist/command-palette.cjs.js +1 -0
- package/dist/command-palette.esm.js +1 -0
- package/dist/command.cjs.js +32 -14
- package/dist/command.esm.js +46 -28
- package/dist/components/date-time-utils.d.ts.map +1 -1
- package/dist/components/ui-accordion.d.ts.map +1 -1
- package/dist/components/ui-alert-dialog.d.ts +2 -0
- package/dist/components/ui-alert-dialog.d.ts.map +1 -1
- package/dist/components/ui-alert.d.ts.map +1 -1
- package/dist/components/ui-animated-beam.d.ts.map +1 -1
- package/dist/components/ui-animated-list.d.ts.map +1 -1
- package/dist/components/ui-aspect-ratio.d.ts.map +1 -1
- package/dist/components/ui-avatar.d.ts.map +1 -1
- package/dist/components/ui-badge.d.ts.map +1 -1
- package/dist/components/ui-block-controls.d.ts.map +1 -1
- package/dist/components/ui-box.d.ts.map +1 -1
- package/dist/components/ui-breadcrumb.d.ts.map +1 -1
- package/dist/components/ui-button.d.ts.map +1 -1
- package/dist/components/ui-calendar.d.ts.map +1 -1
- package/dist/components/ui-card.d.ts.map +1 -1
- package/dist/components/ui-checkbox.d.ts.map +1 -1
- package/dist/components/ui-collapsible.d.ts.map +1 -1
- package/dist/components/ui-color-picker.d.ts.map +1 -1
- package/dist/components/ui-combobox.d.ts.map +1 -1
- package/dist/components/ui-command-palette.d.ts.map +1 -1
- package/dist/components/ui-command.d.ts.map +1 -1
- package/dist/components/ui-container.d.ts.map +1 -1
- package/dist/components/ui-context-menu.d.ts.map +1 -1
- package/dist/components/ui-data-table.d.ts +7 -0
- package/dist/components/ui-data-table.d.ts.map +1 -1
- package/dist/components/ui-date-picker.d.ts.map +1 -1
- package/dist/components/ui-date-range-picker.d.ts.map +1 -1
- package/dist/components/ui-date-range-time-picker.d.ts.map +1 -1
- package/dist/components/ui-date-time-picker.d.ts.map +1 -1
- package/dist/components/ui-dialog.d.ts +2 -0
- package/dist/components/ui-dialog.d.ts.map +1 -1
- package/dist/components/ui-dock.d.ts.map +1 -1
- package/dist/components/ui-drawer.d.ts.map +1 -1
- package/dist/components/ui-dropdown.d.ts.map +1 -1
- package/dist/components/ui-empty-state.d.ts.map +1 -1
- package/dist/components/ui-field.d.ts.map +1 -1
- package/dist/components/ui-fieldset.d.ts.map +1 -1
- package/dist/components/ui-file-upload.d.ts.map +1 -1
- package/dist/components/ui-floating-toolbar.d.ts.map +1 -1
- package/dist/components/ui-form.d.ts.map +1 -1
- package/dist/components/ui-icon-cloud.d.ts.map +1 -1
- package/dist/components/ui-inline-edit.d.ts.map +1 -1
- package/dist/components/ui-input.d.ts.map +1 -1
- package/dist/components/ui-marquee.d.ts.map +1 -1
- package/dist/components/ui-menu.d.ts.map +1 -1
- package/dist/components/ui-menubar.d.ts.map +1 -1
- package/dist/components/ui-meter.d.ts.map +1 -1
- package/dist/components/ui-multi-select.d.ts.map +1 -1
- package/dist/components/ui-number-field.d.ts.map +1 -1
- package/dist/components/ui-orbiter.d.ts.map +1 -1
- package/dist/components/ui-pagination.d.ts.map +1 -1
- package/dist/components/ui-password-field.d.ts.map +1 -1
- package/dist/components/ui-pin-input.d.ts.map +1 -1
- package/dist/components/ui-popover.d.ts.map +1 -1
- package/dist/components/ui-progress.d.ts.map +1 -1
- package/dist/components/ui-radio-group.d.ts.map +1 -1
- package/dist/components/ui-radio.d.ts.map +1 -1
- package/dist/components/ui-rating.d.ts +1 -0
- package/dist/components/ui-rating.d.ts.map +1 -1
- package/dist/components/ui-scroll-area.d.ts.map +1 -1
- package/dist/components/ui-section.d.ts.map +1 -1
- package/dist/components/ui-select.d.ts.map +1 -1
- package/dist/components/ui-selection-popup.d.ts.map +1 -1
- package/dist/components/ui-slider.d.ts.map +1 -1
- package/dist/components/ui-sortable.d.ts.map +1 -1
- package/dist/components/ui-spinning-text.d.ts.map +1 -1
- package/dist/components/ui-split-button.d.ts.map +1 -1
- package/dist/components/ui-splitter.d.ts.map +1 -1
- package/dist/components/ui-stepper.d.ts.map +1 -1
- package/dist/components/ui-switch.d.ts.map +1 -1
- package/dist/components/ui-tabs.d.ts.map +1 -1
- package/dist/components/ui-tags-input.d.ts.map +1 -1
- package/dist/components/ui-textarea.d.ts.map +1 -1
- package/dist/components/ui-time-picker.d.ts.map +1 -1
- package/dist/components/ui-toggle-group.d.ts +2 -0
- package/dist/components/ui-toggle-group.d.ts.map +1 -1
- package/dist/components/ui-toggle.d.ts.map +1 -1
- package/dist/components/ui-toolbar.d.ts +2 -0
- package/dist/components/ui-toolbar.d.ts.map +1 -1
- package/dist/components/ui-tooltip.d.ts.map +1 -1
- package/dist/components/ui-transfer-list.d.ts.map +1 -1
- package/dist/components/ui-tree-item.d.ts.map +1 -1
- package/dist/components/ui-tree.d.ts.map +1 -1
- package/dist/components/ui-wizard.d.ts.map +1 -1
- package/dist/container.cjs.js +6 -12
- package/dist/container.esm.js +8 -14
- package/dist/context-menu.cjs.js +8 -8
- package/dist/context-menu.esm.js +42 -41
- package/dist/data-table.cjs.js +18 -15
- package/dist/data-table.esm.js +207 -187
- package/dist/date-field.cjs.js +8 -8
- package/dist/date-field.esm.js +7 -7
- package/dist/date-picker.cjs.js +27 -18
- package/dist/date-picker.esm.js +57 -48
- package/dist/date-range-picker.cjs.js +22 -17
- package/dist/date-range-picker.esm.js +31 -26
- package/dist/date-range-time-picker.cjs.js +26 -19
- package/dist/date-range-time-picker.esm.js +23 -16
- package/dist/date-time-picker.cjs.js +23 -16
- package/dist/date-time-picker.esm.js +88 -81
- package/dist/{date-time-utils-BTlxnz5j.mjs → date-time-utils-B4hAkt36.mjs} +75 -68
- package/dist/date-time-utils-DdigV4hs.js +1 -0
- package/dist/dialog.cjs.js +57 -41
- package/dist/dialog.esm.js +84 -51
- package/dist/dock.cjs.js +16 -30
- package/dist/dock.esm.js +26 -40
- package/dist/drawer.cjs.js +8 -12
- package/dist/drawer.esm.js +6 -10
- package/dist/dropdown.cjs.js +8 -6
- package/dist/dropdown.esm.js +33 -30
- package/dist/empty-state.cjs.js +17 -15
- package/dist/empty-state.esm.js +13 -11
- package/dist/field.cjs.js +22 -13
- package/dist/field.esm.js +54 -45
- package/dist/fieldset.cjs.js +18 -11
- package/dist/fieldset.esm.js +20 -13
- package/dist/file-upload.cjs.js +77 -35
- package/dist/file-upload.esm.js +152 -110
- package/dist/floating-toolbar.cjs.js +6 -7
- package/dist/floating-toolbar.esm.js +8 -9
- package/dist/form.cjs.js +20 -23
- package/dist/form.esm.js +20 -23
- package/dist/gantt.cjs.js +6 -6
- package/dist/gantt.esm.js +6 -6
- package/dist/hover-card.cjs.js +7 -7
- package/dist/hover-card.esm.js +7 -7
- package/dist/icon-cloud.cjs.js +19 -36
- package/dist/icon-cloud.esm.js +41 -58
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +108 -104
- package/dist/inline-edit.cjs.js +47 -19
- package/dist/inline-edit.esm.js +66 -38
- package/dist/input.cjs.js +44 -37
- package/dist/input.esm.js +59 -52
- package/dist/layout.cjs.js +3 -3
- package/dist/layout.esm.js +3 -3
- package/dist/marquee.cjs.js +7 -10
- package/dist/marquee.esm.js +7 -10
- package/dist/menu.cjs.js +8 -24
- package/dist/menu.esm.js +52 -72
- package/dist/menubar.cjs.js +9 -31
- package/dist/menubar.esm.js +127 -153
- package/dist/meter.cjs.js +4 -9
- package/dist/meter.esm.js +6 -11
- package/dist/multi-select.cjs.js +48 -35
- package/dist/multi-select.esm.js +67 -53
- package/dist/navigation-menu.cjs.js +10 -10
- package/dist/navigation-menu.esm.js +33 -33
- package/dist/number-field.cjs.js +27 -16
- package/dist/number-field.esm.js +36 -25
- package/dist/odometer.cjs.js +5 -5
- package/dist/odometer.esm.js +3 -3
- package/dist/orbiter.cjs.js +11 -28
- package/dist/orbiter.esm.js +28 -45
- package/dist/overlay-motion-B56x1GoY.js +49 -0
- package/dist/overlay-motion-BX3dPLay.mjs +120 -0
- package/dist/pagination.cjs.js +28 -25
- package/dist/pagination.esm.js +54 -51
- package/dist/password-field.cjs.js +38 -33
- package/dist/password-field.esm.js +62 -57
- package/dist/pin-input.cjs.js +17 -13
- package/dist/pin-input.esm.js +23 -19
- package/dist/plugin-panel.cjs.js +1 -1
- package/dist/plugin-panel.esm.js +1 -1
- package/dist/popover.cjs.js +16 -28
- package/dist/popover.esm.js +29 -45
- package/dist/portal-DeaM1tYY.mjs +121 -0
- package/dist/portal-XbYR3m_q.js +1 -0
- package/dist/portal.d.ts +3 -1
- package/dist/portal.d.ts.map +1 -1
- package/dist/{positioner-D0VGxtYU.mjs → positioner-BE8Nbho2.mjs} +5 -3
- package/dist/{positioner-D_fqyx_j.js → positioner-DZ1FW6A9.js} +1 -1
- package/dist/positioner.cjs.js +1 -1
- package/dist/positioner.esm.js +1 -1
- package/dist/primitives/overlay-motion.d.ts +47 -0
- package/dist/primitives/overlay-motion.d.ts.map +1 -0
- package/dist/primitives/positioner.d.ts.map +1 -1
- package/dist/progress.cjs.js +11 -16
- package/dist/progress.esm.js +37 -42
- package/dist/quick-actions.cjs.js +13 -13
- package/dist/quick-actions.esm.js +11 -11
- package/dist/radio-group.cjs.js +50 -26
- package/dist/radio-group.esm.js +53 -29
- package/dist/radio.cjs.js +15 -12
- package/dist/radio.esm.js +15 -12
- package/dist/rating.cjs.js +11 -15
- package/dist/rating.esm.js +48 -50
- package/dist/{runtime-CFnK53iC.mjs → runtime-CQM6wZOc.mjs} +498 -514
- package/dist/runtime-DxCl0A5q.js +5 -0
- package/dist/runtime.cjs.js +1 -1
- package/dist/runtime.d.ts +3 -2
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.esm.js +36 -32
- package/dist/scroll-area.cjs.js +3 -4
- package/dist/scroll-area.esm.js +3 -4
- package/dist/section.cjs.js +2 -4
- package/dist/section.esm.js +2 -4
- package/dist/select.cjs.js +40 -73
- package/dist/select.esm.js +55 -87
- package/dist/selection-popup.cjs.js +3 -4
- package/dist/selection-popup.esm.js +3 -4
- package/dist/semantic-tokens.d.ts +17 -0
- package/dist/semantic-tokens.d.ts.map +1 -0
- package/dist/sidebar.cjs.js +22 -22
- package/dist/sidebar.esm.js +25 -25
- package/dist/skeleton.cjs.js +2 -2
- package/dist/skeleton.esm.js +2 -2
- package/dist/slider.cjs.js +22 -26
- package/dist/slider.esm.js +25 -29
- package/dist/sortable.cjs.js +4 -5
- package/dist/sortable.esm.js +4 -5
- package/dist/spinning-text.cjs.js +4 -13
- package/dist/spinning-text.esm.js +4 -13
- package/dist/split-button.cjs.js +5 -5
- package/dist/split-button.esm.js +15 -14
- package/dist/splitter.cjs.js +52 -10
- package/dist/splitter.esm.js +55 -13
- package/dist/stepper.cjs.js +31 -65
- package/dist/stepper.esm.js +32 -66
- package/dist/switch.cjs.js +20 -22
- package/dist/switch.esm.js +20 -22
- package/dist/table.cjs.js +5 -5
- package/dist/table.esm.js +20 -20
- package/dist/tabs.cjs.js +91 -21
- package/dist/tabs.esm.js +182 -112
- package/dist/tags-input.cjs.js +41 -15
- package/dist/tags-input.esm.js +73 -47
- package/dist/textarea.cjs.js +32 -33
- package/dist/textarea.esm.js +38 -39
- package/dist/theme.d.ts +25 -1
- package/dist/theme.d.ts.map +1 -1
- package/dist/time-field.cjs.js +7 -7
- package/dist/time-field.esm.js +6 -6
- package/dist/time-picker.cjs.js +16 -13
- package/dist/time-picker.esm.js +27 -24
- package/dist/timeline.cjs.js +10 -10
- package/dist/timeline.esm.js +7 -7
- package/dist/toggle-group.cjs.js +13 -13
- package/dist/toggle-group.esm.js +66 -61
- package/dist/toggle.cjs.js +52 -34
- package/dist/toggle.esm.js +80 -62
- package/dist/toolbar.cjs.js +14 -14
- package/dist/toolbar.esm.js +41 -33
- package/dist/tooltip.cjs.js +3 -3
- package/dist/tooltip.esm.js +39 -33
- package/dist/transfer-list.cjs.js +28 -29
- package/dist/transfer-list.esm.js +28 -29
- package/dist/{tree-B_oQput6.mjs → tree-33fVNnaf.mjs} +6 -5
- package/dist/{tree-SivHxcAy.js → tree-Dc02MChE.js} +6 -5
- package/dist/tree-item.cjs.js +9 -8
- package/dist/tree-item.esm.js +13 -12
- package/dist/tree.cjs.js +1 -1
- package/dist/tree.esm.js +1 -1
- package/dist/{ui-button-Co8Sid6t.mjs → ui-button-C3OmI7Sn.mjs} +152 -154
- package/dist/{ui-button-BPrzJScZ.js → ui-button-CnLwXBnx.js} +107 -109
- package/dist/wizard.cjs.js +39 -36
- package/dist/wizard.esm.js +39 -36
- package/package.json +1 -1
- package/dist/date-time-utils-y3AvNvGe.js +0 -1
- package/dist/portal-DgpQ3Jo1.js +0 -1
- package/dist/portal-bR42gHvG.mjs +0 -118
- package/dist/runtime-DwE-tizc.js +0 -1
package/dist/index.esm.js
CHANGED
|
@@ -2,12 +2,12 @@ import { E as F } from "./ElementBase-BeZT54Hj.mjs";
|
|
|
2
2
|
import { UICollection as M } from "./collection.esm.js";
|
|
3
3
|
import { U as R, f as B, g as O, m as G, r as V, s as z, a as N } from "./listbox-hMVOhKHC.mjs";
|
|
4
4
|
import { UIRovingFocusGroup as q } from "./roving-focus-group.esm.js";
|
|
5
|
-
import { U as _, f as K, a as W, b as Q, c as J, d as X } from "./tree-
|
|
5
|
+
import { U as _, f as K, a as W, b as Q, c as J, d as X } from "./tree-33fVNnaf.mjs";
|
|
6
6
|
import { UITreeItem as Z } from "./tree-item.esm.js";
|
|
7
|
-
import { U as ee } from "./ui-button-
|
|
7
|
+
import { U as ee } from "./ui-button-C3OmI7Sn.mjs";
|
|
8
8
|
import { UITooltip as te } from "./tooltip.esm.js";
|
|
9
9
|
import { UIDropdown as ae } from "./dropdown.esm.js";
|
|
10
|
-
import { UIInput as
|
|
10
|
+
import { UIInput as ne } from "./input.esm.js";
|
|
11
11
|
import { UIPasswordField as fe } from "./password-field.esm.js";
|
|
12
12
|
import { UIForm as ce } from "./form.esm.js";
|
|
13
13
|
import { UIDescription as le } from "./description.esm.js";
|
|
@@ -15,7 +15,7 @@ import { UIFieldError as ue } from "./field-error.esm.js";
|
|
|
15
15
|
import { UIControlGroup as Ie } from "./control-group.esm.js";
|
|
16
16
|
import { UIFieldset as ge } from "./fieldset.esm.js";
|
|
17
17
|
import { UIPopover as he } from "./popover.esm.js";
|
|
18
|
-
import { UITabs as
|
|
18
|
+
import { UITabs as Te } from "./tabs.esm.js";
|
|
19
19
|
import { UIMenu as Pe } from "./menu.esm.js";
|
|
20
20
|
import { U as Ae, c as De, g as ke, a as we, h as Ce, r as Fe, u as Ee } from "./ui-icon-DLhB08Fo.mjs";
|
|
21
21
|
import { UIToast as Le } from "./toast.esm.js";
|
|
@@ -31,7 +31,7 @@ import { UIRadio as Ze } from "./radio.esm.js";
|
|
|
31
31
|
import { UIRadioGroup as eo } from "./radio-group.esm.js";
|
|
32
32
|
import { UISwitch as to } from "./switch.esm.js";
|
|
33
33
|
import { UISlider as ao } from "./slider.esm.js";
|
|
34
|
-
import { UISelect as
|
|
34
|
+
import { UISelect as no } from "./select.esm.js";
|
|
35
35
|
import { UIToggle as fo } from "./toggle.esm.js";
|
|
36
36
|
import { UIToggleGroup as co } from "./toggle-group.esm.js";
|
|
37
37
|
import { UIAlertDialog as lo } from "./alert-dialog.esm.js";
|
|
@@ -39,7 +39,7 @@ import { UIAspectRatio as xo } from "./aspect-ratio.esm.js";
|
|
|
39
39
|
import { UIAvatar as Uo } from "./avatar.esm.js";
|
|
40
40
|
import { UIBadge as bo } from "./badge.esm.js";
|
|
41
41
|
import { UITable as yo } from "./table.esm.js";
|
|
42
|
-
import { UINavigationMenu as
|
|
42
|
+
import { UINavigationMenu as vo } from "./navigation-menu.esm.js";
|
|
43
43
|
import { UIMenubar as So } from "./menubar.esm.js";
|
|
44
44
|
import { UIContextMenu as Do } from "./context-menu.esm.js";
|
|
45
45
|
import { UIPresence as wo } from "./presence.esm.js";
|
|
@@ -57,7 +57,7 @@ import { UIAppHeader as Yo } from "./app-header.esm.js";
|
|
|
57
57
|
import { UIDrawer as $o } from "./drawer.esm.js";
|
|
58
58
|
import { UIDialog as ot } from "./dialog.esm.js";
|
|
59
59
|
import { UILayout as rt } from "./layout.esm.js";
|
|
60
|
-
import { UIBlockControls as
|
|
60
|
+
import { UIBlockControls as st } from "./block-controls.esm.js";
|
|
61
61
|
import { UIPluginPanel as it } from "./plugin-panel.esm.js";
|
|
62
62
|
import { UIFloatingToolbar as mt } from "./floating-toolbar.esm.js";
|
|
63
63
|
import { UISelectionPopup as pt } from "./selection-popup.esm.js";
|
|
@@ -66,7 +66,7 @@ import { UICommandPalette as xt } from "./command-palette.esm.js";
|
|
|
66
66
|
import { UITextarea as Ut } from "./textarea.esm.js";
|
|
67
67
|
import { UIField as bt } from "./field.esm.js";
|
|
68
68
|
import { UINumberField as yt } from "./number-field.esm.js";
|
|
69
|
-
import { UITagsInput as
|
|
69
|
+
import { UITagsInput as vt } from "./tags-input.esm.js";
|
|
70
70
|
import { UIOtpInput as St, UIPinInput as At } from "./pin-input.esm.js";
|
|
71
71
|
import { UIFileUpload as kt } from "./file-upload.esm.js";
|
|
72
72
|
import { UIDropzone as Ct } from "./dropzone.esm.js";
|
|
@@ -83,7 +83,7 @@ import { UIDismissableLayer as Zt } from "./dismissable-layer.esm.js";
|
|
|
83
83
|
import { UIFocusScope as er } from "./focus-scope.esm.js";
|
|
84
84
|
import { UIPositioner as tr } from "./positioner.esm.js";
|
|
85
85
|
import { UIAnchor as ar } from "./anchor.esm.js";
|
|
86
|
-
import { UIAlert as
|
|
86
|
+
import { UIAlert as nr } from "./alert.esm.js";
|
|
87
87
|
import { UIMarquee as fr } from "./marquee.esm.js";
|
|
88
88
|
import { UIAnimatedText as cr } from "./animated-text.esm.js";
|
|
89
89
|
import { UISpinningText as lr } from "./spinning-text.esm.js";
|
|
@@ -91,13 +91,13 @@ import { UINumberTicker as ur } from "./number-ticker.esm.js";
|
|
|
91
91
|
import { UIAnimatedList as Ir } from "./animated-list.esm.js";
|
|
92
92
|
import { UIAnimatedBeam as gr } from "./animated-beam.esm.js";
|
|
93
93
|
import { UIIconCloud as hr } from "./icon-cloud.esm.js";
|
|
94
|
-
import { UIDock as
|
|
94
|
+
import { UIDock as Tr } from "./dock.esm.js";
|
|
95
95
|
import { UISkeleton as Pr } from "./skeleton.esm.js";
|
|
96
96
|
import { UIEmptyState as Ar } from "./empty-state.esm.js";
|
|
97
97
|
import { UIDataTable as kr } from "./data-table.esm.js";
|
|
98
98
|
import { UIChart as Cr } from "./chart.esm.js";
|
|
99
99
|
import { UITimeline as Er } from "./timeline.esm.js";
|
|
100
|
-
import { U as Lr } from "./calendar-
|
|
100
|
+
import { U as Lr } from "./calendar-DmxiZrR7.mjs";
|
|
101
101
|
import { UIColorPicker as Br } from "./color-picker.esm.js";
|
|
102
102
|
import { UIDatePicker as Gr } from "./date-picker.esm.js";
|
|
103
103
|
import { UIDateRangePicker as zr } from "./date-range-picker.esm.js";
|
|
@@ -110,7 +110,7 @@ import { UIGantt as Zr } from "./gantt.esm.js";
|
|
|
110
110
|
import { UIStepper as ea } from "./stepper.esm.js";
|
|
111
111
|
import { UIWizard as ta } from "./wizard.esm.js";
|
|
112
112
|
import { UIQuickActions as aa } from "./quick-actions.esm.js";
|
|
113
|
-
import { UIRating as
|
|
113
|
+
import { UIRating as na } from "./rating.esm.js";
|
|
114
114
|
import { UIOdometer as fa } from "./odometer.esm.js";
|
|
115
115
|
import { UIBox as ca } from "./box.esm.js";
|
|
116
116
|
import { UIFlex as la } from "./flex.esm.js";
|
|
@@ -118,17 +118,17 @@ import { UIGrid as ua } from "./grid.esm.js";
|
|
|
118
118
|
import { UIPlacementGrid as Ia } from "./placement-grid.esm.js";
|
|
119
119
|
import { UIMasonryGrid as ga } from "./masonry-grid.esm.js";
|
|
120
120
|
import { UISection as ha } from "./section.esm.js";
|
|
121
|
-
import { UIContainer as
|
|
122
|
-
import { A as Pa, D as Sa, a as Aa, b as Da, c as ka, d as wa, e as Ca, f as Fa, g as Ea, h as Ma, i as La, j as Ra, k as Ba, l as Oa, m as Ga, n as Va, o as za, p as Na,
|
|
123
|
-
import { a as
|
|
124
|
-
import { O as
|
|
125
|
-
import { a as
|
|
126
|
-
import { c as
|
|
127
|
-
import { c as
|
|
128
|
-
import { b as
|
|
129
|
-
import { f as
|
|
130
|
-
import { f as
|
|
131
|
-
import { UIOrbiter as
|
|
121
|
+
import { UIContainer as Ta } from "./container.esm.js";
|
|
122
|
+
import { A as Pa, D as Sa, a as Aa, b as Da, c as ka, d as wa, e as Ca, f as Fa, g as Ea, h as Ma, i as La, j as Ra, k as Ba, l as Oa, m as Ga, n as Va, o as za, p as Na, q as ja, r as qa, s as Ha, t as _a, u as Ka, v as Wa, w as Qa, x as Ja } from "./runtime-CQM6wZOc.mjs";
|
|
123
|
+
import { a as Ya, c as Za, b as $a, s as es } from "./portal-DeaM1tYY.mjs";
|
|
124
|
+
import { O as ts } from "./overlayManager-BJjU1VA8.mjs";
|
|
125
|
+
import { a as as, g as ss, r as ns } from "./scroll-lock-LfqXXqsu.mjs";
|
|
126
|
+
import { c as fs } from "./dismissable-layer-BmPIoK80.mjs";
|
|
127
|
+
import { c as cs } from "./focus-scope-CmEsG5UZ.mjs";
|
|
128
|
+
import { b as ls, d as ds, a as us, c as xs, e as Is, f as Us, g as gs, h as bs, i as hs, j as ys, k as Ts, o as vs, s as Ps, l as Ss } from "./positioner-BE8Nbho2.mjs";
|
|
129
|
+
import { f as Ds, a as ks, b as ws, c as Cs, d as Fs, n as Es } from "./collection-C7URGjEI.mjs";
|
|
130
|
+
import { f as Ls, g as Rs, m as Bs, r as Os, s as Gs } from "./roving-focus-group-Dbm1Jko_.mjs";
|
|
131
|
+
import { UIOrbiter as zs } from "./orbiter.esm.js";
|
|
132
132
|
const m = [], l = /* @__PURE__ */ new WeakMap();
|
|
133
133
|
class h {
|
|
134
134
|
constructor(o) {
|
|
@@ -241,9 +241,9 @@ function D(e, o = {}) {
|
|
|
241
241
|
}
|
|
242
242
|
};
|
|
243
243
|
}
|
|
244
|
-
const
|
|
244
|
+
const T = {
|
|
245
245
|
trap(e) {
|
|
246
|
-
const o = 'a[href], area[href], input:not([disabled]):not([type=hidden]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, [tabindex]:not([tabindex="-1"])', t =
|
|
246
|
+
const o = 'a[href], area[href], input:not([disabled]):not([type=hidden]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, [tabindex]:not([tabindex="-1"])', t = T.__activeTraps ||= [], r = /* @__PURE__ */ Symbol("focus-trap"), i = document.activeElement;
|
|
247
247
|
function c() {
|
|
248
248
|
return Array.from(e.querySelectorAll(o)).filter((a) => !a.hasAttribute("disabled") && a.getAttribute("aria-hidden") !== "true");
|
|
249
249
|
}
|
|
@@ -251,20 +251,20 @@ const v = {
|
|
|
251
251
|
return t.length > 0 && t[t.length - 1]?.id === r;
|
|
252
252
|
}
|
|
253
253
|
function d() {
|
|
254
|
-
const a = c(),
|
|
255
|
-
|
|
254
|
+
const a = c(), n = a.find((f) => f.hasAttribute("autofocus")) || a[0] || e;
|
|
255
|
+
n.hasAttribute("tabindex") || n.setAttribute("tabindex", "-1");
|
|
256
256
|
try {
|
|
257
|
-
|
|
257
|
+
n.focus();
|
|
258
258
|
} catch {
|
|
259
259
|
}
|
|
260
260
|
}
|
|
261
261
|
function x(a) {
|
|
262
262
|
if (!p()) return;
|
|
263
|
-
const
|
|
264
|
-
if (!(!
|
|
263
|
+
const s = document.activeElement;
|
|
264
|
+
if (!(!s || !e.contains(s)))
|
|
265
265
|
if (a.key === "Tab") {
|
|
266
|
-
const
|
|
267
|
-
if (
|
|
266
|
+
const n = c(), f = n[0], u = n[n.length - 1];
|
|
267
|
+
if (n.length === 0) {
|
|
268
268
|
a.preventDefault(), d();
|
|
269
269
|
return;
|
|
270
270
|
}
|
|
@@ -273,12 +273,12 @@ const v = {
|
|
|
273
273
|
}
|
|
274
274
|
function I(a) {
|
|
275
275
|
if (!p()) return;
|
|
276
|
-
const
|
|
277
|
-
|
|
276
|
+
const s = a.target;
|
|
277
|
+
s && !e.contains(s) && d();
|
|
278
278
|
}
|
|
279
279
|
return t.push({ id: r }), document.addEventListener("keydown", x), document.addEventListener("focusin", I, !0), d(), {
|
|
280
280
|
release() {
|
|
281
|
-
const a = t.findIndex((
|
|
281
|
+
const a = t.findIndex((s) => s.id === r);
|
|
282
282
|
a >= 0 && t.splice(a, 1), document.removeEventListener("keydown", x), document.removeEventListener("focusin", I, !0);
|
|
283
283
|
try {
|
|
284
284
|
i && i.focus && i.focus();
|
|
@@ -288,9 +288,9 @@ const v = {
|
|
|
288
288
|
};
|
|
289
289
|
}
|
|
290
290
|
}, b = {};
|
|
291
|
-
function
|
|
291
|
+
function v(e) {
|
|
292
292
|
if (!e || !e.name) throw new Error("Plugin must have a name");
|
|
293
|
-
b[e.name] = e, e.install && e.install({ registerUIPlugin:
|
|
293
|
+
b[e.name] = e, e.install && e.install({ registerUIPlugin: v });
|
|
294
294
|
}
|
|
295
295
|
function k() {
|
|
296
296
|
return Object.values(b);
|
|
@@ -299,10 +299,10 @@ export {
|
|
|
299
299
|
Pa as AlertDialogManager,
|
|
300
300
|
Sa as DialogManager,
|
|
301
301
|
F as ElementBase,
|
|
302
|
-
|
|
303
|
-
|
|
302
|
+
T as FocusManager,
|
|
303
|
+
ts as OverlayManager,
|
|
304
304
|
Qe as UIAccordion,
|
|
305
|
-
|
|
305
|
+
nr as UIAlert,
|
|
306
306
|
lo as UIAlertDialog,
|
|
307
307
|
ar as UIAnchor,
|
|
308
308
|
gr as UIAnimatedBeam,
|
|
@@ -312,7 +312,7 @@ export {
|
|
|
312
312
|
xo as UIAspectRatio,
|
|
313
313
|
Uo as UIAvatar,
|
|
314
314
|
bo as UIBadge,
|
|
315
|
-
|
|
315
|
+
st as UIBlockControls,
|
|
316
316
|
ca as UIBox,
|
|
317
317
|
Wo as UIBreadcrumb,
|
|
318
318
|
ee as UIButton,
|
|
@@ -326,7 +326,7 @@ export {
|
|
|
326
326
|
jt as UICombobox,
|
|
327
327
|
dt as UICommand,
|
|
328
328
|
xt as UICommandPalette,
|
|
329
|
-
|
|
329
|
+
Ta as UIContainer,
|
|
330
330
|
Do as UIContextMenu,
|
|
331
331
|
Ie as UIControlGroup,
|
|
332
332
|
kr as UIDataTable,
|
|
@@ -339,7 +339,7 @@ export {
|
|
|
339
339
|
ot as UIDialog,
|
|
340
340
|
Ke as UIDirectionProvider,
|
|
341
341
|
Zt as UIDismissableLayer,
|
|
342
|
-
|
|
342
|
+
Tr as UIDock,
|
|
343
343
|
$o as UIDrawer,
|
|
344
344
|
ae as UIDropdown,
|
|
345
345
|
Ct as UIDropzone,
|
|
@@ -358,7 +358,7 @@ export {
|
|
|
358
358
|
Ae as UIIcon,
|
|
359
359
|
hr as UIIconCloud,
|
|
360
360
|
zt as UIInlineEdit,
|
|
361
|
-
|
|
361
|
+
ne as UIInput,
|
|
362
362
|
Be as UILabel,
|
|
363
363
|
rt as UILayout,
|
|
364
364
|
R as UIListbox,
|
|
@@ -368,11 +368,11 @@ export {
|
|
|
368
368
|
So as UIMenubar,
|
|
369
369
|
Mo as UIMeter,
|
|
370
370
|
Et as UIMultiSelect,
|
|
371
|
-
|
|
371
|
+
vo as UINavigationMenu,
|
|
372
372
|
yt as UINumberField,
|
|
373
373
|
ur as UINumberTicker,
|
|
374
374
|
fa as UIOdometer,
|
|
375
|
-
|
|
375
|
+
zs as UIOrbiter,
|
|
376
376
|
St as UIOtpInput,
|
|
377
377
|
Ge as UIPagination,
|
|
378
378
|
Qt as UIPanel,
|
|
@@ -389,11 +389,11 @@ export {
|
|
|
389
389
|
aa as UIQuickActions,
|
|
390
390
|
Ze as UIRadio,
|
|
391
391
|
eo as UIRadioGroup,
|
|
392
|
-
|
|
392
|
+
na as UIRating,
|
|
393
393
|
q as UIRovingFocusGroup,
|
|
394
394
|
Ro as UIScrollArea,
|
|
395
395
|
ha as UISection,
|
|
396
|
-
|
|
396
|
+
no as UISelect,
|
|
397
397
|
pt as UISelectionPopup,
|
|
398
398
|
Oo as UISeparator,
|
|
399
399
|
Jo as UISidebar,
|
|
@@ -407,8 +407,8 @@ export {
|
|
|
407
407
|
ea as UIStepper,
|
|
408
408
|
to as UISwitch,
|
|
409
409
|
yo as UITable,
|
|
410
|
-
|
|
411
|
-
|
|
410
|
+
Te as UITabs,
|
|
411
|
+
vt as UITagsInput,
|
|
412
412
|
Ut as UITextarea,
|
|
413
413
|
Kr as UITimeField,
|
|
414
414
|
jr as UITimePicker,
|
|
@@ -423,83 +423,87 @@ export {
|
|
|
423
423
|
Z as UITreeItem,
|
|
424
424
|
_o as UIVisuallyHidden,
|
|
425
425
|
ta as UIWizard,
|
|
426
|
-
|
|
426
|
+
as as acquireBodyScrollLock,
|
|
427
427
|
Aa as alert,
|
|
428
|
-
Da as
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
wa as
|
|
435
|
-
Ca as
|
|
428
|
+
Da as applySystemTheme,
|
|
429
|
+
ka as applyTheme,
|
|
430
|
+
ls as arrowMiddleware,
|
|
431
|
+
ds as autoPlacementMiddleware,
|
|
432
|
+
Ya as autoUpdatePosition,
|
|
433
|
+
us as autoUpdatePositioner,
|
|
434
|
+
wa as baselineAccentPalettes,
|
|
435
|
+
Ca as baselineDarkTokens,
|
|
436
|
+
Fa as baselineLightTokens,
|
|
436
437
|
De as clearCustomIcons,
|
|
437
|
-
|
|
438
|
-
|
|
438
|
+
Za as computePosition,
|
|
439
|
+
xs as computePositionState,
|
|
439
440
|
A as computed,
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
441
|
+
Ea as confirm,
|
|
442
|
+
Ma as confirmDialog,
|
|
443
|
+
La as createAlertDialogManager,
|
|
444
|
+
Ra as createDialogManager,
|
|
445
|
+
fs as createDismissableLayer,
|
|
446
|
+
cs as createFocusScope,
|
|
447
|
+
$a as createPortalContainer,
|
|
448
|
+
Is as createPositioner,
|
|
448
449
|
P as createSignal,
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
450
|
+
Ba as createThemeTokens,
|
|
451
|
+
Us as createVirtualPoint,
|
|
452
|
+
gs as createVirtualRange,
|
|
453
|
+
bs as createVirtualRect,
|
|
454
|
+
Oa as defaultTokens,
|
|
455
|
+
Ga as deriveForegroundOnPrimary,
|
|
456
|
+
Va as deriveSemanticTokens,
|
|
457
|
+
za as deriveThemeSurfaces,
|
|
458
|
+
hs as detectPositionerOverflow,
|
|
459
|
+
Na as dismissAllAlertDialogs,
|
|
460
|
+
ja as dismissAllDialogs,
|
|
459
461
|
S as effect,
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
462
|
+
Ds as findFirstEnabledIndex,
|
|
463
|
+
ks as findIndexByValue,
|
|
464
|
+
ws as findLastEnabledIndex,
|
|
463
465
|
B as findListboxTypeaheadIndex,
|
|
464
|
-
|
|
466
|
+
Cs as findNextEnabledIndex,
|
|
465
467
|
K as findParentTreeRecordIndex,
|
|
466
468
|
W as findTreeRecordIndexById,
|
|
467
469
|
Q as findTreeTypeaheadMatch,
|
|
468
|
-
|
|
470
|
+
Fs as findTypeaheadMatch,
|
|
469
471
|
J as flattenTree,
|
|
470
472
|
X as flattenVisibleTree,
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
473
|
+
ys as flipMiddleware,
|
|
474
|
+
Ls as focusRovingItem,
|
|
475
|
+
ss as getBodyScrollLockCount,
|
|
474
476
|
ke as getIcon,
|
|
475
477
|
we as getIconVariant,
|
|
476
478
|
O as getListboxBoundaryIndex,
|
|
477
479
|
k as getRegisteredPlugins,
|
|
478
|
-
|
|
480
|
+
Rs as getRovingFocusBoundaryIndex,
|
|
479
481
|
Ce as hasIcon,
|
|
480
|
-
|
|
482
|
+
Ts as hideMiddleware,
|
|
481
483
|
G as moveListboxActiveIndex,
|
|
482
|
-
|
|
483
|
-
|
|
484
|
+
Bs as moveRovingFocusIndex,
|
|
485
|
+
Es as normalizeCollectionText,
|
|
484
486
|
_t as normalizePanelLayout,
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
487
|
+
vs as offsetMiddleware,
|
|
488
|
+
qa as prompt,
|
|
489
|
+
Ha as readableForeground,
|
|
488
490
|
Fe as registerIcon,
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
491
|
+
_a as registerThemeHost,
|
|
492
|
+
v as registerUIPlugin,
|
|
493
|
+
ns as releaseBodyScrollLock,
|
|
492
494
|
Kt as resizePanelPair,
|
|
493
495
|
V as resolveListboxActiveIndex,
|
|
494
|
-
|
|
496
|
+
Os as resolveRovingFocusIndex,
|
|
495
497
|
z as scrollListboxItemIntoView,
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
498
|
+
Ps as shiftMiddleware,
|
|
499
|
+
Ka as showDialog,
|
|
500
|
+
es as showPortalFor,
|
|
499
501
|
D as showToast,
|
|
500
|
-
|
|
502
|
+
Ss as sizeMiddleware,
|
|
501
503
|
N as syncActiveDescendant,
|
|
502
|
-
|
|
504
|
+
Gs as syncRovingTabStops,
|
|
505
|
+
Wa as themeToCss,
|
|
506
|
+
Qa as themeToVariables,
|
|
503
507
|
Ee as unregisterIcon,
|
|
504
|
-
|
|
508
|
+
Ja as withAccentPalette
|
|
505
509
|
};
|
package/dist/inline-edit.cjs.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
:host {
|
|
3
3
|
--ui-inline-edit-bg: transparent;
|
|
4
4
|
--ui-inline-edit-border: 1px dashed transparent;
|
|
5
|
-
--ui-inline-edit-radius:
|
|
5
|
+
--ui-inline-edit-radius: var(--ui-control-radius-2, var(--ui-radius, 6px));
|
|
6
6
|
--ui-inline-edit-text: var(--ui-color-text, #0f172a);
|
|
7
7
|
--ui-inline-edit-muted: var(--ui-color-muted, #526175);
|
|
8
8
|
--ui-inline-edit-focus: var(--ui-color-focus-ring, #2563eb);
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
.display:hover {
|
|
38
|
-
border-color:
|
|
39
|
-
background: color-mix(in srgb,
|
|
38
|
+
border-color: transparent;
|
|
39
|
+
background: var(--ui-color-fill-hover, color-mix(in srgb, currentColor 6%, transparent));
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
.value {
|
|
@@ -55,14 +55,37 @@
|
|
|
55
55
|
.save-btn,
|
|
56
56
|
.cancel-btn {
|
|
57
57
|
appearance: none;
|
|
58
|
-
border: 1px solid
|
|
58
|
+
border: 1px solid var(--ui-color-line, #cbd5e1);
|
|
59
59
|
background: var(--ui-inline-edit-surface);
|
|
60
60
|
color: var(--ui-inline-edit-text);
|
|
61
|
-
border-radius:
|
|
62
|
-
min-height:
|
|
63
|
-
padding: 0
|
|
61
|
+
border-radius: var(--ui-inline-edit-radius);
|
|
62
|
+
min-height: var(--ui-control-height-1, 24px);
|
|
63
|
+
padding: 0 10px;
|
|
64
64
|
cursor: pointer;
|
|
65
|
-
font:
|
|
65
|
+
font: 500 13px/1.2 "Inter", "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
66
|
+
transition: background-color 120ms ease, border-color 120ms ease;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.edit-btn:hover:not(:disabled),
|
|
70
|
+
.cancel-btn:hover:not(:disabled) {
|
|
71
|
+
background: var(--ui-color-fill-hover, color-mix(in srgb, currentColor 6%, transparent));
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.save-btn {
|
|
75
|
+
border-color: transparent;
|
|
76
|
+
background: var(--ui-color-primary, #2563eb);
|
|
77
|
+
color: var(--ui-color-foreground-on-primary, #ffffff);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.save-btn:hover:not(:disabled) {
|
|
81
|
+
background: color-mix(in srgb, var(--ui-color-primary, #2563eb) 88%, #000);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.edit-btn:focus-visible,
|
|
85
|
+
.save-btn:focus-visible,
|
|
86
|
+
.cancel-btn:focus-visible {
|
|
87
|
+
outline: var(--ui-ring-width, 2px) solid var(--ui-ring-color, var(--ui-inline-edit-focus));
|
|
88
|
+
outline-offset: var(--ui-ring-offset, 1px);
|
|
66
89
|
}
|
|
67
90
|
|
|
68
91
|
.edit-btn:disabled,
|
|
@@ -81,18 +104,23 @@
|
|
|
81
104
|
width: 100%;
|
|
82
105
|
min-width: 0;
|
|
83
106
|
box-sizing: border-box;
|
|
84
|
-
border: 1px solid
|
|
85
|
-
border-radius:
|
|
107
|
+
border: 1px solid var(--ui-color-line, #cbd5e1);
|
|
108
|
+
border-radius: var(--ui-inline-edit-radius);
|
|
86
109
|
background: var(--ui-inline-edit-surface);
|
|
87
110
|
color: var(--ui-inline-edit-text);
|
|
88
|
-
padding: 10px
|
|
89
|
-
font:
|
|
111
|
+
padding: 6px 10px;
|
|
112
|
+
font: 400 14px/1.45 "Inter", "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
90
113
|
outline: none;
|
|
91
114
|
}
|
|
92
115
|
|
|
116
|
+
.field:hover:not(:focus-visible) {
|
|
117
|
+
border-color: var(--ui-color-line-strong, #94a3b8);
|
|
118
|
+
}
|
|
119
|
+
|
|
93
120
|
.field:focus-visible {
|
|
94
|
-
border-color: color
|
|
95
|
-
|
|
121
|
+
border-color: var(--ui-ring-color, var(--ui-inline-edit-focus));
|
|
122
|
+
outline: var(--ui-ring-width, 2px) solid var(--ui-ring-color, var(--ui-inline-edit-focus));
|
|
123
|
+
outline-offset: -1px;
|
|
96
124
|
}
|
|
97
125
|
|
|
98
126
|
.actions {
|
|
@@ -100,19 +128,19 @@
|
|
|
100
128
|
gap: 8px;
|
|
101
129
|
justify-content: flex-end;
|
|
102
130
|
}
|
|
103
|
-
`;function o(d){return d.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}class c extends h.ElementBase{constructor(){super(...arguments),this._draft="",this._formUnregister=null,this._lastFocusTarget=null}static get observedAttributes(){return["value","placeholder","editing","multiline","disabled","readonly","name"]}get value(){return this.getAttribute("value")||""}set value(e){e?this.setAttribute("value",e):this.removeAttribute("value")}startEditing(){this.hasAttribute("disabled")||this.hasAttribute("readonly")||(this._lastFocusTarget=document.activeElement||this,this._draft=this.value,this.setAttribute("editing",""),queueMicrotask(()=>{const e=this.root.querySelector(".field");e?.focus(),e?.select?.()}),this.dispatchEvent(new CustomEvent("editing-change",{detail:{editing:!0},bubbles:!0,composed:!0})))}cancelEditing(){this.removeAttribute("editing"),this._draft=this.value,this.dispatchEvent(new CustomEvent("cancel",{detail:{value:this.value},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("editing-change",{detail:{editing:!1},bubbles:!0,composed:!0})),this._restoreFocus()}saveEditing(){if(this.hasAttribute("disabled")||this.hasAttribute("readonly"))return;if(this.hasAttribute("required")&&!this._draft.trim()){this.setAttribute("invalid","");return}const e=this.value;this._draft?this.setAttribute("value",this._draft):this.removeAttribute("value"),this.removeAttribute("invalid"),this.removeAttribute("editing"),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value,previousValue:e,source:"save"},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("save",{detail:{value:this.value,previousValue:e},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("editing-change",{detail:{editing:!1},bubbles:!0,composed:!0})),this._restoreFocus()}connectedCallback(){super.connectedCallback(),this._draft=this.value,this._registerWithForm()}disconnectedCallback(){this._formUnregister&&this._formUnregister(),super.disconnectedCallback()}attributeChangedCallback(e,a,
|
|
131
|
+
`;function o(d){return d.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}class c extends h.ElementBase{constructor(){super(...arguments),this._draft="",this._formUnregister=null,this._lastFocusTarget=null}static get observedAttributes(){return["value","placeholder","editing","multiline","disabled","readonly","name"]}get value(){return this.getAttribute("value")||""}set value(e){e?this.setAttribute("value",e):this.removeAttribute("value")}startEditing(){this.hasAttribute("disabled")||this.hasAttribute("readonly")||(this._lastFocusTarget=document.activeElement||this,this._draft=this.value,this.setAttribute("editing",""),queueMicrotask(()=>{const e=this.root.querySelector(".field");e?.focus(),e?.select?.()}),this.dispatchEvent(new CustomEvent("editing-change",{detail:{editing:!0},bubbles:!0,composed:!0})))}cancelEditing(){this.removeAttribute("editing"),this._draft=this.value,this.dispatchEvent(new CustomEvent("cancel",{detail:{value:this.value},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("editing-change",{detail:{editing:!1},bubbles:!0,composed:!0})),this._restoreFocus()}saveEditing(){if(this.hasAttribute("disabled")||this.hasAttribute("readonly"))return;if(this.hasAttribute("required")&&!this._draft.trim()){this.setAttribute("invalid","");return}const e=this.value;this._draft?this.setAttribute("value",this._draft):this.removeAttribute("value"),this.removeAttribute("invalid"),this.removeAttribute("editing"),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value,previousValue:e,source:"save"},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("save",{detail:{value:this.value,previousValue:e},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("editing-change",{detail:{editing:!1},bubbles:!0,composed:!0})),this._restoreFocus()}connectedCallback(){super.connectedCallback(),this._draft=this.value,this._registerWithForm()}disconnectedCallback(){this._formUnregister&&this._formUnregister(),super.disconnectedCallback()}attributeChangedCallback(e,a,r){a!==r&&(e==="name"&&this.isConnected&&this._registerWithForm(),e==="value"&&!this.hasAttribute("editing")&&(this._draft=r||""),this.isConnected&&this.requestRender())}render(){const e=this.hasAttribute("editing")?this._draft:this.value,a=this.getAttribute("placeholder")||"Add value",r=this.hasAttribute("multiline"),s=this.hasAttribute("editing"),n=!this.value,t=this.hasAttribute("disabled")||this.hasAttribute("readonly");this.setContent(`
|
|
104
132
|
<style>${b}</style>
|
|
105
133
|
<div class="root">
|
|
106
|
-
<div class="display"${
|
|
134
|
+
<div class="display"${s?" hidden":""}>
|
|
107
135
|
<div class="value" data-empty="${n}">${o(n?a:this.value)}</div>
|
|
108
136
|
<button class="edit-btn" type="button"${t?" disabled":""}>Edit</button>
|
|
109
137
|
</div>
|
|
110
|
-
<div class="editor"${
|
|
111
|
-
${
|
|
138
|
+
<div class="editor"${s?"":" hidden"}>
|
|
139
|
+
${r?`<textarea class="field" rows="4"${t?" disabled":""}>${o(e)}</textarea>`:`<input class="field" type="text" value="${o(e)}"${t?" disabled":""} />`}
|
|
112
140
|
<div class="actions">
|
|
113
141
|
<button class="cancel-btn" type="button"${t?" disabled":""}>Cancel</button>
|
|
114
142
|
<button class="save-btn" type="button"${t?" disabled":""}>Save</button>
|
|
115
143
|
</div>
|
|
116
144
|
</div>
|
|
117
145
|
</div>
|
|
118
|
-
`);const u=this.root.querySelector(".field");u?.addEventListener("input",l=>{this._draft=l.target.value}),u?.addEventListener("keydown",l=>{const i=l;i.key==="Escape"&&(i.preventDefault(),this.cancelEditing()),!
|
|
146
|
+
`);const u=this.root.querySelector(".field");u?.addEventListener("input",l=>{this._draft=l.target.value}),u?.addEventListener("keydown",l=>{const i=l;i.key==="Escape"&&(i.preventDefault(),this.cancelEditing()),!r&&i.key==="Enter"&&(i.preventDefault(),this.saveEditing()),(i.metaKey||i.ctrlKey)&&i.key==="Enter"&&(i.preventDefault(),this.saveEditing())}),this.root.querySelector(".edit-btn")?.addEventListener("click",()=>this.startEditing()),this.root.querySelector(".cancel-btn")?.addEventListener("click",()=>this.cancelEditing()),this.root.querySelector(".save-btn")?.addEventListener("click",()=>this.saveEditing())}_registerWithForm(){this._formUnregister&&(this._formUnregister(),this._formUnregister=null);try{const s=this.getRootNode().host?.closest?.("ui-form")||null||this.closest("ui-form"),n=this.getAttribute("name");s&&typeof s.registerField=="function"&&n&&(this._formUnregister=s.registerField(n,{name:n,getValue:()=>this.value,setValue:t=>{t==null||t===""?this.removeAttribute("value"):this.setAttribute("value",String(t))}}))}catch{}}_restoreFocus(){const e=this._lastFocusTarget&&this._lastFocusTarget.isConnected?this._lastFocusTarget:this.root.querySelector(".edit-btn");e&&(queueMicrotask(()=>{try{e.focus({preventScroll:!0})}catch{e.focus()}}),this._lastFocusTarget=null)}}typeof customElements<"u"&&!customElements.get("ui-inline-edit")&&customElements.define("ui-inline-edit",c);exports.UIInlineEdit=c;
|