@iris-ui-kit/vue 0.2.18 → 0.2.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/admin.cjs +1 -4
- package/dist/admin.cjs.map +1 -1
- package/dist/admin.js +1 -1
- package/dist/chunk-FG5USQSY.js +55 -0
- package/dist/chunk-FG5USQSY.js.map +1 -0
- package/dist/{chunk-2ETVCAVL.js → chunk-MMQKSFME.js} +3 -6
- package/dist/chunk-MMQKSFME.js.map +1 -0
- package/dist/index.cjs +59 -33
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +18 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +23 -3
- package/dist/index.js.map +1 -1
- package/dist/undo.cjs +37 -28
- package/dist/undo.cjs.map +1 -1
- package/dist/undo.d.cts +8 -2
- package/dist/undo.d.ts +8 -2
- package/dist/undo.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-2ETVCAVL.js.map +0 -1
- package/dist/chunk-VM2CXEUA.js +0 -46
- package/dist/chunk-VM2CXEUA.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1543,6 +1543,13 @@ declare const IrisCombobox: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
1543
1543
|
type: StringConstructor;
|
|
1544
1544
|
default: undefined;
|
|
1545
1545
|
};
|
|
1546
|
+
/** Allow committing free text that matches no option: Enter/blur emits
|
|
1547
|
+
* `commit` with the trimmed query (antd AutoComplete parity). Default
|
|
1548
|
+
* false keeps the option-only contract. */
|
|
1549
|
+
allowCommit: {
|
|
1550
|
+
type: BooleanConstructor;
|
|
1551
|
+
default: boolean;
|
|
1552
|
+
};
|
|
1546
1553
|
/** id forwarded to the input. Set by IrisFormField. */
|
|
1547
1554
|
id: {
|
|
1548
1555
|
type: StringConstructor;
|
|
@@ -1557,6 +1564,8 @@ declare const IrisCombobox: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
1557
1564
|
[key: string]: any;
|
|
1558
1565
|
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
1559
1566
|
'update:modelValue': (_value: string) => true;
|
|
1567
|
+
/** Free-text commit when `allowCommit` is on and no option is selected. */
|
|
1568
|
+
commit: (_text: string) => true;
|
|
1560
1569
|
}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
1561
1570
|
/** Selected option value ('' = none). */
|
|
1562
1571
|
modelValue: {
|
|
@@ -1588,6 +1597,13 @@ declare const IrisCombobox: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
1588
1597
|
type: StringConstructor;
|
|
1589
1598
|
default: undefined;
|
|
1590
1599
|
};
|
|
1600
|
+
/** Allow committing free text that matches no option: Enter/blur emits
|
|
1601
|
+
* `commit` with the trimmed query (antd AutoComplete parity). Default
|
|
1602
|
+
* false keeps the option-only contract. */
|
|
1603
|
+
allowCommit: {
|
|
1604
|
+
type: BooleanConstructor;
|
|
1605
|
+
default: boolean;
|
|
1606
|
+
};
|
|
1591
1607
|
/** id forwarded to the input. Set by IrisFormField. */
|
|
1592
1608
|
id: {
|
|
1593
1609
|
type: StringConstructor;
|
|
@@ -1600,6 +1616,7 @@ declare const IrisCombobox: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
1600
1616
|
};
|
|
1601
1617
|
}>> & Readonly<{
|
|
1602
1618
|
"onUpdate:modelValue"?: ((_value: string) => any) | undefined;
|
|
1619
|
+
onCommit?: ((_text: string) => any) | undefined;
|
|
1603
1620
|
}>, {
|
|
1604
1621
|
size: IrisComboboxSize;
|
|
1605
1622
|
id: string;
|
|
@@ -1610,6 +1627,7 @@ declare const IrisCombobox: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
1610
1627
|
placeholder: string;
|
|
1611
1628
|
ariaDescribedby: string;
|
|
1612
1629
|
emptyText: string;
|
|
1630
|
+
allowCommit: boolean;
|
|
1613
1631
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
1614
1632
|
|
|
1615
1633
|
type IrisPasswordInputSize = Size;
|
package/dist/index.d.ts
CHANGED
|
@@ -1543,6 +1543,13 @@ declare const IrisCombobox: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
1543
1543
|
type: StringConstructor;
|
|
1544
1544
|
default: undefined;
|
|
1545
1545
|
};
|
|
1546
|
+
/** Allow committing free text that matches no option: Enter/blur emits
|
|
1547
|
+
* `commit` with the trimmed query (antd AutoComplete parity). Default
|
|
1548
|
+
* false keeps the option-only contract. */
|
|
1549
|
+
allowCommit: {
|
|
1550
|
+
type: BooleanConstructor;
|
|
1551
|
+
default: boolean;
|
|
1552
|
+
};
|
|
1546
1553
|
/** id forwarded to the input. Set by IrisFormField. */
|
|
1547
1554
|
id: {
|
|
1548
1555
|
type: StringConstructor;
|
|
@@ -1557,6 +1564,8 @@ declare const IrisCombobox: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
1557
1564
|
[key: string]: any;
|
|
1558
1565
|
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
1559
1566
|
'update:modelValue': (_value: string) => true;
|
|
1567
|
+
/** Free-text commit when `allowCommit` is on and no option is selected. */
|
|
1568
|
+
commit: (_text: string) => true;
|
|
1560
1569
|
}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
1561
1570
|
/** Selected option value ('' = none). */
|
|
1562
1571
|
modelValue: {
|
|
@@ -1588,6 +1597,13 @@ declare const IrisCombobox: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
1588
1597
|
type: StringConstructor;
|
|
1589
1598
|
default: undefined;
|
|
1590
1599
|
};
|
|
1600
|
+
/** Allow committing free text that matches no option: Enter/blur emits
|
|
1601
|
+
* `commit` with the trimmed query (antd AutoComplete parity). Default
|
|
1602
|
+
* false keeps the option-only contract. */
|
|
1603
|
+
allowCommit: {
|
|
1604
|
+
type: BooleanConstructor;
|
|
1605
|
+
default: boolean;
|
|
1606
|
+
};
|
|
1591
1607
|
/** id forwarded to the input. Set by IrisFormField. */
|
|
1592
1608
|
id: {
|
|
1593
1609
|
type: StringConstructor;
|
|
@@ -1600,6 +1616,7 @@ declare const IrisCombobox: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
1600
1616
|
};
|
|
1601
1617
|
}>> & Readonly<{
|
|
1602
1618
|
"onUpdate:modelValue"?: ((_value: string) => any) | undefined;
|
|
1619
|
+
onCommit?: ((_text: string) => any) | undefined;
|
|
1603
1620
|
}>, {
|
|
1604
1621
|
size: IrisComboboxSize;
|
|
1605
1622
|
id: string;
|
|
@@ -1610,6 +1627,7 @@ declare const IrisCombobox: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
1610
1627
|
placeholder: string;
|
|
1611
1628
|
ariaDescribedby: string;
|
|
1612
1629
|
emptyText: string;
|
|
1630
|
+
allowCommit: boolean;
|
|
1613
1631
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
1614
1632
|
|
|
1615
1633
|
type IrisPasswordInputSize = Size;
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { createUndoStack, useUndoStack } from './chunk-
|
|
1
|
+
export { createUndoStack, useUndoStack } from './chunk-FG5USQSY.js';
|
|
2
2
|
import './chunk-ROJV6RON.js';
|
|
3
3
|
import { useBodyScrollLock, useFocusTrap } from './chunk-XCNCIG2I.js';
|
|
4
4
|
export { __getBodyScrollLockCount, __resetBodyScrollLock, useBodyScrollLock, useFocusTrap } from './chunk-XCNCIG2I.js';
|
|
@@ -12,7 +12,7 @@ import { IrisCheckbox } from './chunk-QLUIKEMJ.js';
|
|
|
12
12
|
export { IrisAlert, IrisButton, IrisCheckbox, IrisDashboardTemplate, IrisDivider, IrisFormField, IrisInput, IrisLoginTemplate, IrisPasswordInput } from './chunk-QLUIKEMJ.js';
|
|
13
13
|
export { IrisContainer, IrisDashboardCard, IrisDashboardGrid, IrisStack } from './chunk-3R3QDLJC.js';
|
|
14
14
|
export { IrisSkinKey, SkinProvider, SkinResolutionError, applySkin, builtinSkins, createSkinCatalog, createSkinEngine, createSkinRegistry, darkSkin, lightSkin, loadSkin, localStorageSkinStorage, memorySkinStorage, renderSkinStyle, resolveSkin, skinBootScript, skinError, skinToCssEntries, useSkin, useSkinContext, validateSkin } from './chunk-H7HVVPYR.js';
|
|
15
|
-
export { DropdownContextKey, IrisAdminBreadcrumb, IrisAdminLayout, IrisAdminTabs, IrisBreadcrumb, IrisBreadcrumbItem, IrisDropdown, IrisDropdownItem, IrisDropdownMenu, IrisDropdownSeparator, IrisDropdownTrigger, IrisIcon, IrisNavMenu, createAdminPreferences, createTabsNav, filterNavByAccess, findNavNode, findNavPath, firstLeaf, flattenNav, isBranch, isClosable, localStorageAdminPreferencesStorage, nodeAllowsRoles, useAdminPreferences, useAdminShell, useTabsNav, visibleNav } from './chunk-
|
|
15
|
+
export { DropdownContextKey, IrisAdminBreadcrumb, IrisAdminLayout, IrisAdminTabs, IrisBreadcrumb, IrisBreadcrumbItem, IrisDropdown, IrisDropdownItem, IrisDropdownMenu, IrisDropdownSeparator, IrisDropdownTrigger, IrisIcon, IrisNavMenu, createAdminPreferences, createTabsNav, filterNavByAccess, findNavNode, findNavPath, firstLeaf, flattenNav, isBranch, isClosable, localStorageAdminPreferencesStorage, nodeAllowsRoles, useAdminPreferences, useAdminShell, useTabsNav, visibleNav } from './chunk-MMQKSFME.js';
|
|
16
16
|
import { useFloating, useDismiss } from './chunk-3FJUCHCC.js';
|
|
17
17
|
export { useDismiss, useFloating } from './chunk-3FJUCHCC.js';
|
|
18
18
|
import { useMachine } from './chunk-TQB5LVOH.js';
|
|
@@ -1778,13 +1778,19 @@ var IrisCombobox = defineComponent({
|
|
|
1778
1778
|
size: { type: String, default: "md" },
|
|
1779
1779
|
/** Text shown when no option matches the query. Defaults to the i18n value. */
|
|
1780
1780
|
emptyText: { type: String, default: void 0 },
|
|
1781
|
+
/** Allow committing free text that matches no option: Enter/blur emits
|
|
1782
|
+
* `commit` with the trimmed query (antd AutoComplete parity). Default
|
|
1783
|
+
* false keeps the option-only contract. */
|
|
1784
|
+
allowCommit: { type: Boolean, default: false },
|
|
1781
1785
|
/** id forwarded to the input. Set by IrisFormField. */
|
|
1782
1786
|
id: { type: String, default: void 0 },
|
|
1783
1787
|
/** Forwarded as `aria-describedby` on the input. Set by IrisFormField. */
|
|
1784
1788
|
ariaDescribedby: { type: String, default: void 0 }
|
|
1785
1789
|
},
|
|
1786
1790
|
emits: {
|
|
1787
|
-
"update:modelValue": (_value) => true
|
|
1791
|
+
"update:modelValue": (_value) => true,
|
|
1792
|
+
/** Free-text commit when `allowCommit` is on and no option is selected. */
|
|
1793
|
+
commit: (_text) => true
|
|
1788
1794
|
},
|
|
1789
1795
|
setup(props, { attrs, emit }) {
|
|
1790
1796
|
const { t } = useI18n();
|
|
@@ -1813,6 +1819,13 @@ var IrisCombobox = defineComponent({
|
|
|
1813
1819
|
query.value = "";
|
|
1814
1820
|
close();
|
|
1815
1821
|
};
|
|
1822
|
+
const commitQuery = () => {
|
|
1823
|
+
const text = query.value.trim();
|
|
1824
|
+
if (!text) return;
|
|
1825
|
+
emit("commit", text);
|
|
1826
|
+
query.value = "";
|
|
1827
|
+
close();
|
|
1828
|
+
};
|
|
1816
1829
|
const onInput = (event) => {
|
|
1817
1830
|
query.value = event.target.value;
|
|
1818
1831
|
filtering.value = true;
|
|
@@ -1838,6 +1851,9 @@ var IrisCombobox = defineComponent({
|
|
|
1838
1851
|
if (open.value && activeIndex.value >= 0 && list[activeIndex.value]) {
|
|
1839
1852
|
event.preventDefault();
|
|
1840
1853
|
selectOption(list[activeIndex.value]);
|
|
1854
|
+
} else if (props.allowCommit) {
|
|
1855
|
+
event.preventDefault();
|
|
1856
|
+
commitQuery();
|
|
1841
1857
|
}
|
|
1842
1858
|
} else if (event.key === "Escape") {
|
|
1843
1859
|
if (open.value) {
|
|
@@ -1909,6 +1925,10 @@ var IrisCombobox = defineComponent({
|
|
|
1909
1925
|
},
|
|
1910
1926
|
onBlur: () => {
|
|
1911
1927
|
focused.value = false;
|
|
1928
|
+
if (props.allowCommit && query.value.trim()) {
|
|
1929
|
+
commitQuery();
|
|
1930
|
+
return;
|
|
1931
|
+
}
|
|
1912
1932
|
close();
|
|
1913
1933
|
},
|
|
1914
1934
|
style: {
|