@uzum-tech/ui 1.12.22 → 1.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2846 -574
- package/dist/index.prod.js +4 -4
- package/es/_styles/common/dark.js +1 -1
- package/es/_styles/common/light.d.ts +1 -0
- package/es/_styles/common/light.js +1 -1
- package/es/chat/src/ChatMessages.js +6 -1
- package/es/chat/src/styles/index.cssr.js +5 -1
- package/es/collapse/index.d.ts +5 -4
- package/es/collapse/index.js +4 -2
- package/es/collapse/src/Collapse.d.ts +62 -123
- package/es/collapse/src/Collapse.js +7 -27
- package/es/collapse/src/CollapseItem.d.ts +8 -18
- package/es/collapse/src/CollapseItem.js +36 -24
- package/es/collapse/src/interface.d.ts +1 -10
- package/es/collapse/src/props/collapse.props.d.ts +100 -0
- package/es/collapse/src/props/collapse.props.js +29 -0
- package/es/collapse/src/props/collapseItem.props.d.ts +7 -0
- package/es/collapse/src/props/collapseItem.props.js +6 -0
- package/es/collapse/src/styles/index.cssr.js +6 -2
- package/es/collapse/src/types/collapse.types.d.ts +55 -0
- package/es/collapse/src/types/collapse.types.js +1 -0
- package/es/collapse/styles/light.d.ts +3 -0
- package/es/collapse/styles/light.js +5 -2
- package/es/components.d.ts +1 -0
- package/es/components.js +1 -0
- package/es/config-provider/src/internal-interface.d.ts +3 -0
- package/es/date-picker-v2/index.d.ts +5 -0
- package/es/date-picker-v2/index.js +2 -0
- package/es/date-picker-v2/src/DatePickerV2.d.ts +4765 -0
- package/es/date-picker-v2/src/DatePickerV2.js +750 -0
- package/es/date-picker-v2/src/composables/useCalendarScroll.d.ts +1133 -0
- package/es/date-picker-v2/src/composables/useCalendarScroll.js +61 -0
- package/es/date-picker-v2/src/config.d.ts +14 -0
- package/es/date-picker-v2/src/config.js +34 -0
- package/es/date-picker-v2/src/interface.d.ts +42 -0
- package/es/date-picker-v2/src/interface.js +1 -0
- package/es/date-picker-v2/src/panel/CalendarPanel.d.ts +1222 -0
- package/es/date-picker-v2/src/panel/CalendarPanel.js +186 -0
- package/es/date-picker-v2/src/panel/CalendarRangePanel.d.ts +1246 -0
- package/es/date-picker-v2/src/panel/CalendarRangePanel.js +205 -0
- package/es/date-picker-v2/src/styles/index.cssr.d.ts +2 -0
- package/es/date-picker-v2/src/styles/index.cssr.js +190 -0
- package/es/date-picker-v2/src/utils.d.ts +12 -0
- package/es/date-picker-v2/src/utils.js +92 -0
- package/es/date-picker-v2/styles/dark.d.ts +447 -0
- package/es/date-picker-v2/styles/dark.js +19 -0
- package/es/date-picker-v2/styles/index.d.ts +3 -0
- package/es/date-picker-v2/styles/index.js +2 -0
- package/es/date-picker-v2/styles/light.d.ts +477 -0
- package/es/date-picker-v2/styles/light.js +56 -0
- package/es/dialog/src/DialogProvider.d.ts +2 -0
- package/es/dropdown/src/Dropdown.d.ts +1 -1
- package/es/locales/common/enUS.js +1 -1
- package/es/popconfirm/src/Popconfirm.d.ts +1 -1
- package/es/popover/src/Popover.d.ts +1 -1
- package/es/qr-code/src/QrCode.d.ts +1 -1
- package/es/theme-editor/src/ThemeEditor.d.ts +1 -0
- package/es/themes/dark.js +2 -0
- package/es/themes/light.js +2 -0
- package/es/tooltip/src/Tooltip.d.ts +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.js +1 -1
- package/lib/_styles/common/dark.js +1 -1
- package/lib/_styles/common/light.d.ts +1 -0
- package/lib/_styles/common/light.js +1 -1
- package/lib/chat/src/ChatMessages.js +6 -1
- package/lib/chat/src/styles/index.cssr.js +5 -1
- package/lib/collapse/index.d.ts +5 -4
- package/lib/collapse/index.js +5 -3
- package/lib/collapse/src/Collapse.d.ts +62 -123
- package/lib/collapse/src/Collapse.js +8 -28
- package/lib/collapse/src/CollapseItem.d.ts +8 -18
- package/lib/collapse/src/CollapseItem.js +35 -24
- package/lib/collapse/src/interface.d.ts +1 -10
- package/lib/collapse/src/props/collapse.props.d.ts +100 -0
- package/lib/collapse/src/props/collapse.props.js +32 -0
- package/lib/collapse/src/props/collapseItem.props.d.ts +7 -0
- package/lib/collapse/src/props/collapseItem.props.js +9 -0
- package/lib/collapse/src/styles/index.cssr.js +6 -2
- package/lib/collapse/src/types/collapse.types.d.ts +55 -0
- package/lib/collapse/src/types/collapse.types.js +2 -0
- package/lib/collapse/styles/light.d.ts +3 -0
- package/lib/collapse/styles/light.js +5 -2
- package/lib/components.d.ts +1 -0
- package/lib/components.js +1 -0
- package/lib/config-provider/src/internal-interface.d.ts +3 -0
- package/lib/date-picker-v2/index.d.ts +5 -0
- package/lib/date-picker-v2/index.js +11 -0
- package/lib/date-picker-v2/src/DatePickerV2.d.ts +4765 -0
- package/lib/date-picker-v2/src/DatePickerV2.js +756 -0
- package/lib/date-picker-v2/src/composables/useCalendarScroll.d.ts +1133 -0
- package/lib/date-picker-v2/src/composables/useCalendarScroll.js +64 -0
- package/lib/date-picker-v2/src/config.d.ts +14 -0
- package/lib/date-picker-v2/src/config.js +37 -0
- package/lib/date-picker-v2/src/interface.d.ts +42 -0
- package/lib/date-picker-v2/src/interface.js +4 -0
- package/lib/date-picker-v2/src/panel/CalendarPanel.d.ts +1222 -0
- package/lib/date-picker-v2/src/panel/CalendarPanel.js +188 -0
- package/lib/date-picker-v2/src/panel/CalendarRangePanel.d.ts +1246 -0
- package/lib/date-picker-v2/src/panel/CalendarRangePanel.js +207 -0
- package/lib/date-picker-v2/src/styles/index.cssr.d.ts +2 -0
- package/lib/date-picker-v2/src/styles/index.cssr.js +195 -0
- package/lib/date-picker-v2/src/utils.d.ts +12 -0
- package/lib/date-picker-v2/src/utils.js +101 -0
- package/lib/date-picker-v2/styles/dark.d.ts +447 -0
- package/lib/date-picker-v2/styles/dark.js +21 -0
- package/lib/date-picker-v2/styles/index.d.ts +3 -0
- package/lib/date-picker-v2/styles/index.js +10 -0
- package/lib/date-picker-v2/styles/light.d.ts +477 -0
- package/lib/date-picker-v2/styles/light.js +60 -0
- package/lib/dialog/src/DialogProvider.d.ts +2 -0
- package/lib/dropdown/src/Dropdown.d.ts +1 -1
- package/lib/locales/common/enUS.js +1 -1
- package/lib/popconfirm/src/Popconfirm.d.ts +1 -1
- package/lib/popover/src/Popover.d.ts +1 -1
- package/lib/qr-code/src/QrCode.d.ts +1 -1
- package/lib/theme-editor/src/ThemeEditor.d.ts +1 -0
- package/lib/themes/dark.js +2 -0
- package/lib/themes/light.js +2 -0
- package/lib/tooltip/src/Tooltip.d.ts +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
- package/volar.d.ts +1 -0
- package/web-types.json +153 -1
|
@@ -4,6 +4,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const _common_1 = __importDefault(require("./_common"));
|
|
7
|
-
const derived = Object.assign(Object.assign({ name: 'common' }, _common_1.default), { scrollbarColor: 'rgba(255, 255, 255, 0.25)', scrollbarColorHover: 'rgba(255, 255, 255, 0.4)', scrollbarWidth: '5px', scrollbarHeight: '5px', scrollbarBorderRadius: '5px', opacityDisabled: '0.5', brand150: '#FFF3D3', brand350: '#F1F9DF', brand550: '#FFF3F4', brandPrimary50: '#2B204E', brandPrimary100: '#412A89', brandPrimary200: '#6A40ED', brandPrimary300: '#BBA2FD', brandPrimary400: '#7748F1', brandPrimary500: '#8967F1', brandPrimary550: '#6607DF', brandPrimary600: '#5D46A6', brandSecondary400: '#FFF8E3', brandSecondary500: '#FFFF54', brandSecondary300: '#FDF5A6', brandSecondary600: '#F9DE6D', brandTertiary500: '#C4ED70', brandTertiary300: '#DCF0AF', brandTertiary600: '#9DED70', brandQuaternary500: '#90DDFB', brandQuaternary300: '#C5ECFD', brandQuaternary600: '#54B8F9', brandQuinary500: '#EC616A', brandQuinary300: '#F19EDA', brandQuinary600: '#EA3E68', brandQuinary100: '#FAD6D9', surfacePrimary: '#101010', surfaceSecondary: '#1D1D1D', containerPrimary: '#1D1D1D', containerSecondary: '#313135', textPrimary: '#F3F4F6', textSecondary: '#808080', textTertiary: '#999999', textQuaternary: '#101010', textBrand: '#F3F4F6', elementsPrimary: '#F3F4F6', elementsSecondary: '#101010', elementsTertiary: '#222222', elementsQuaternary: '#424247', elementsQuinary: '#707479', elementsDarkQuinary: '#919396', elementsSenary: '#DFDFDF', elementsOnContainer: '#101010', transparencyPrimary: 'rgba(255, 255, 255, 0.1)', transparencySecondary: 'rgba(255, 255, 255, 0.07)', transparencyTertiary: 'rgba(255, 255, 255, 0.16)', transparencyQuinary: 'rgba(255, 255, 255, 0.32)', transparencyModal: 'rgba(0, 0, 0, 0.75)', staticBlack: '#101010', staticDarkGrey: '#2C2C2D', staticWhite: '#FFFFFF', staticRed: '#F24835', staticOrange: '#F48C2C', staticGreen: '#09B849', staticDeepBlue: '#2F53CD', staticErrorAccent: '#CB0000', shadowDepth2: '0 0 0 1px #424247', shadowDepth: '0px 8px 8px 0px rgba(255, 255, 255, 0.25)' // В дизайне тень вообще отсутствует, пока что пусть побудет визуально как border
|
|
7
|
+
const derived = Object.assign(Object.assign({ name: 'common' }, _common_1.default), { scrollbarColor: 'rgba(255, 255, 255, 0.25)', scrollbarColorHover: 'rgba(255, 255, 255, 0.4)', scrollbarWidth: '5px', scrollbarHeight: '5px', scrollbarBorderRadius: '5px', opacityDisabled: '0.5', brand150: '#FFF3D3', brand350: '#F1F9DF', brand550: '#FFF3F4', brandPrimary10: '#F3F2F9', brandPrimary50: '#2B204E', brandPrimary100: '#412A89', brandPrimary200: '#6A40ED', brandPrimary300: '#BBA2FD', brandPrimary400: '#7748F1', brandPrimary500: '#8967F1', brandPrimary550: '#6607DF', brandPrimary600: '#5D46A6', brandSecondary400: '#FFF8E3', brandSecondary500: '#FFFF54', brandSecondary300: '#FDF5A6', brandSecondary600: '#F9DE6D', brandTertiary500: '#C4ED70', brandTertiary300: '#DCF0AF', brandTertiary600: '#9DED70', brandQuaternary500: '#90DDFB', brandQuaternary300: '#C5ECFD', brandQuaternary600: '#54B8F9', brandQuinary500: '#EC616A', brandQuinary300: '#F19EDA', brandQuinary600: '#EA3E68', brandQuinary100: '#FAD6D9', surfacePrimary: '#101010', surfaceSecondary: '#1D1D1D', containerPrimary: '#1D1D1D', containerSecondary: '#313135', textPrimary: '#F3F4F6', textSecondary: '#808080', textTertiary: '#999999', textQuaternary: '#101010', textBrand: '#F3F4F6', elementsPrimary: '#F3F4F6', elementsSecondary: '#101010', elementsTertiary: '#222222', elementsQuaternary: '#424247', elementsQuinary: '#707479', elementsDarkQuinary: '#919396', elementsSenary: '#DFDFDF', elementsOnContainer: '#101010', transparencyPrimary: 'rgba(255, 255, 255, 0.1)', transparencySecondary: 'rgba(255, 255, 255, 0.07)', transparencyTertiary: 'rgba(255, 255, 255, 0.16)', transparencyQuinary: 'rgba(255, 255, 255, 0.32)', transparencyModal: 'rgba(0, 0, 0, 0.75)', staticBlack: '#101010', staticDarkGrey: '#2C2C2D', staticWhite: '#FFFFFF', staticRed: '#F24835', staticOrange: '#F48C2C', staticGreen: '#09B849', staticDeepBlue: '#2F53CD', staticErrorAccent: '#CB0000', shadowDepth2: '0 0 0 1px #424247', shadowDepth: '0px 8px 8px 0px rgba(255, 255, 255, 0.25)' // В дизайне тень вообще отсутствует, пока что пусть побудет визуально как border
|
|
8
8
|
});
|
|
9
9
|
exports.default = derived;
|
|
@@ -4,5 +4,5 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const _common_1 = __importDefault(require("./_common"));
|
|
7
|
-
const derived = Object.assign(Object.assign({ name: 'common' }, _common_1.default), { scrollbarColor: 'rgba(0, 0, 0, 0.25)', scrollbarColorHover: 'rgba(0, 0, 0, 0.4)', scrollbarWidth: '5px', scrollbarHeight: '5px', scrollbarBorderRadius: '5px', opacityDisabled: '0.5', brand150: '#FFF3D3', brand350: '#F1F9DF', brand550: '#FFF3F4', brandPrimary50: '#F8F2FF', brandPrimary100: '#EAE2FF', brandPrimary200: '#DACCFF', brandPrimary300: '#BBA2FD', brandPrimary400: '#7748F1', brandPrimary500: '#7000FF', brandPrimary550: '#6607DF', brandPrimary600: '#5B34C1', brandSecondary400: '#FFF8E3', brandSecondary500: '#FFFF54', brandSecondary300: '#FDF5A6', brandSecondary600: '#F9DE6D', brandTertiary500: '#C4ED70', brandTertiary300: '#DCF0AF', brandTertiary600: '#9DED70', brandQuaternary500: '#90DDFB', brandQuaternary300: '#C5ECFD', brandQuaternary600: '#54B8F9', brandQuinary500: '#EC616A', brandQuinary300: '#F19EDA', brandQuinary600: '#EA3E68', brandQuinary100: '#FAD6D9', surfacePrimary: '#fff', surfaceSecondary: '#1d1d1d', containerPrimary: '#fff', containerSecondary: '#F3F4F6', textPrimary: '#101010', textSecondary: '#808080', textTertiary: '#999999', textQuaternary: '#FFFFFF', textBrand: '#7000FF', elementsPrimary: '#101010', elementsSecondary: '#fff', elementsTertiary: '#F3F4F6', elementsQuaternary: '#E7E8EA', elementsQuinary: '#C5C7CA', elementsDarkQuinary: '#919396', elementsSenary: '#4E4D4D', elementsOnContainer: '#fff', transparencyPrimary: 'rgba(0, 0, 0, 0.35)', transparencySecondary: 'rgba(0, 0, 0, 0.07)', transparencyTertiary: 'rgba(255, 255, 255, 0.16)', transparencyQuinary: 'rgba(255, 255, 255, 0.32)', transparencyModal: 'rgba(0, 0, 0, 0.40)', staticBlack: '#101010', staticDarkGrey: '#2C2C2D', staticWhite: '#FFFFFF', staticRed: '#F24835', staticOrange: '#F48C2C', staticGreen: '#09B849', staticDeepBlue: '#2F53CD', staticErrorAccent: '#CB0000', shadowDepth2: '0px 20px 80px 0px rgba(0, 0, 0, 0.07)', shadowDepth: '0px 8px 8px 0px rgba(0, 0, 0, 0.25)' });
|
|
7
|
+
const derived = Object.assign(Object.assign({ name: 'common' }, _common_1.default), { scrollbarColor: 'rgba(0, 0, 0, 0.25)', scrollbarColorHover: 'rgba(0, 0, 0, 0.4)', scrollbarWidth: '5px', scrollbarHeight: '5px', scrollbarBorderRadius: '5px', opacityDisabled: '0.5', brand150: '#FFF3D3', brand350: '#F1F9DF', brand550: '#FFF3F4', brandPrimary10: '#F3F2F9', brandPrimary50: '#F8F2FF', brandPrimary100: '#EAE2FF', brandPrimary200: '#DACCFF', brandPrimary300: '#BBA2FD', brandPrimary400: '#7748F1', brandPrimary500: '#7000FF', brandPrimary550: '#6607DF', brandPrimary600: '#5B34C1', brandSecondary400: '#FFF8E3', brandSecondary500: '#FFFF54', brandSecondary300: '#FDF5A6', brandSecondary600: '#F9DE6D', brandTertiary500: '#C4ED70', brandTertiary300: '#DCF0AF', brandTertiary600: '#9DED70', brandQuaternary500: '#90DDFB', brandQuaternary300: '#C5ECFD', brandQuaternary600: '#54B8F9', brandQuinary500: '#EC616A', brandQuinary300: '#F19EDA', brandQuinary600: '#EA3E68', brandQuinary100: '#FAD6D9', surfacePrimary: '#fff', surfaceSecondary: '#1d1d1d', containerPrimary: '#fff', containerSecondary: '#F3F4F6', textPrimary: '#101010', textSecondary: '#808080', textTertiary: '#999999', textQuaternary: '#FFFFFF', textBrand: '#7000FF', elementsPrimary: '#101010', elementsSecondary: '#fff', elementsTertiary: '#F3F4F6', elementsQuaternary: '#E7E8EA', elementsQuinary: '#C5C7CA', elementsDarkQuinary: '#919396', elementsSenary: '#4E4D4D', elementsOnContainer: '#fff', transparencyPrimary: 'rgba(0, 0, 0, 0.35)', transparencySecondary: 'rgba(0, 0, 0, 0.07)', transparencyTertiary: 'rgba(255, 255, 255, 0.16)', transparencyQuinary: 'rgba(255, 255, 255, 0.32)', transparencyModal: 'rgba(0, 0, 0, 0.40)', staticBlack: '#101010', staticDarkGrey: '#2C2C2D', staticWhite: '#FFFFFF', staticRed: '#F24835', staticOrange: '#F48C2C', staticGreen: '#09B849', staticDeepBlue: '#2F53CD', staticErrorAccent: '#CB0000', shadowDepth2: '0px 20px 80px 0px rgba(0, 0, 0, 0.07)', shadowDepth: '0px 8px 8px 0px rgba(0, 0, 0, 0.25)' });
|
|
8
8
|
exports.default = derived;
|
|
@@ -214,7 +214,12 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
214
214
|
? `${mergedClsPrefixRef.value}-chat-main__message--own`
|
|
215
215
|
: `${mergedClsPrefixRef.value}-chat-main__message--other`
|
|
216
216
|
] },
|
|
217
|
-
(0, vue_1.h)("div", { class:
|
|
217
|
+
(0, vue_1.h)("div", { class: [
|
|
218
|
+
`${mergedClsPrefixRef.value}-chat-main__message-wrapper`,
|
|
219
|
+
isOwn
|
|
220
|
+
? `${mergedClsPrefixRef.value}-chat-main__message-wrapper--own`
|
|
221
|
+
: `${mergedClsPrefixRef.value}-chat-main__message-wrapper--other`
|
|
222
|
+
] },
|
|
218
223
|
hasBubbleActionsSlot ? ((0, vue_1.h)("div", { onContextmenu: (e) => {
|
|
219
224
|
e.preventDefault();
|
|
220
225
|
contextMenuShow.value = false;
|
|
@@ -229,7 +229,11 @@ exports.default = (0, cssr_1.cB)('chat', `
|
|
|
229
229
|
flex-direction: column;
|
|
230
230
|
gap: 4px;
|
|
231
231
|
flex-shrink: 0;
|
|
232
|
-
|
|
232
|
+
`, [(0, cssr_1.cM)('own', `
|
|
233
|
+
align-items: flex-end;
|
|
234
|
+
`), (0, cssr_1.cM)('other', `
|
|
235
|
+
align-items: flex-start;
|
|
236
|
+
`)]), (0, cssr_1.cE)('message-bubble', `
|
|
233
237
|
border-radius: 18px;
|
|
234
238
|
font-size: 14px;
|
|
235
239
|
line-height: 20px;
|
package/lib/collapse/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { default as
|
|
3
|
-
export
|
|
4
|
-
export
|
|
1
|
+
export { collapseProps } from './src/props/collapse.props';
|
|
2
|
+
export { default as UCollapse } from './src/Collapse';
|
|
3
|
+
export { collapseItemProps } from './src/props/collapseItem.props';
|
|
4
|
+
export { default as UCollapseItem } from './src/CollapseItem';
|
|
5
|
+
export type { CollapseProps, CollapseSlots, CollapseItemProps, CollapseItemSlots, ArrowPlacement, CollapseArrowSlotProps, CollapseExpandedName, CollapseExpandedNames, CollapseItemArrowSlotProps, CollapseItemHeaderExtraSlotProps, CollapseItemHeaderSlotProps, CollapseTriggerArea, HeaderClickInfo, OnItemHeaderClick, OnItemHeaderClickImpl, OnUpdateExpandedNames, OnUpdateExpandedNamesImpl, UCollapseInjection } from './src/interface';
|
package/lib/collapse/index.js
CHANGED
|
@@ -3,10 +3,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.UCollapseItem = exports.collapseItemProps = exports.UCollapse = exports.collapseProps = void 0;
|
|
7
|
+
var collapse_props_1 = require("./src/props/collapse.props");
|
|
8
|
+
Object.defineProperty(exports, "collapseProps", { enumerable: true, get: function () { return collapse_props_1.collapseProps; } });
|
|
7
9
|
var Collapse_1 = require("./src/Collapse");
|
|
8
10
|
Object.defineProperty(exports, "UCollapse", { enumerable: true, get: function () { return __importDefault(Collapse_1).default; } });
|
|
9
|
-
|
|
11
|
+
var collapseItem_props_1 = require("./src/props/collapseItem.props");
|
|
12
|
+
Object.defineProperty(exports, "collapseItemProps", { enumerable: true, get: function () { return collapseItem_props_1.collapseItemProps; } });
|
|
10
13
|
var CollapseItem_1 = require("./src/CollapseItem");
|
|
11
14
|
Object.defineProperty(exports, "UCollapseItem", { enumerable: true, get: function () { return __importDefault(CollapseItem_1).default; } });
|
|
12
|
-
Object.defineProperty(exports, "collapseItemProps", { enumerable: true, get: function () { return CollapseItem_1.collapseItemProps; } });
|
|
@@ -1,107 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type { MaybeArray, ExtractPublicPropTypes } from '../../_utils';
|
|
3
|
-
import type { OnItemHeaderClick, OnUpdateExpandedNames, ArrowPlacement } from './interface';
|
|
4
|
-
export declare const collapseProps: {
|
|
5
|
-
readonly defaultExpandedNames: {
|
|
6
|
-
readonly type: PropType<string | number | Array<string | number> | null>;
|
|
7
|
-
readonly default: null;
|
|
8
|
-
};
|
|
9
|
-
readonly expandedNames: PropType<string | number | Array<string | number> | null>;
|
|
10
|
-
readonly arrowPlacement: {
|
|
11
|
-
readonly type: PropType<ArrowPlacement>;
|
|
12
|
-
readonly default: "right-edge";
|
|
13
|
-
};
|
|
14
|
-
readonly accordion: {
|
|
15
|
-
readonly type: BooleanConstructor;
|
|
16
|
-
readonly default: false;
|
|
17
|
-
};
|
|
18
|
-
readonly displayDirective: {
|
|
19
|
-
readonly type: PropType<"if" | "show">;
|
|
20
|
-
readonly default: "if";
|
|
21
|
-
};
|
|
22
|
-
readonly onItemHeaderClick: PropType<MaybeArray<OnItemHeaderClick>>;
|
|
23
|
-
readonly 'onUpdate:expandedNames': PropType<MaybeArray<OnUpdateExpandedNames>>;
|
|
24
|
-
readonly onUpdateExpandedNames: PropType<MaybeArray<OnUpdateExpandedNames>>;
|
|
25
|
-
readonly onExpandedNamesChange: {
|
|
26
|
-
readonly type: PropType<MaybeArray<OnUpdateExpandedNames> | undefined>;
|
|
27
|
-
readonly validator: () => boolean;
|
|
28
|
-
readonly default: undefined;
|
|
29
|
-
};
|
|
30
|
-
readonly theme: PropType<import("../../_mixins").Theme<"Collapse", {
|
|
31
|
-
titleFontSize: string;
|
|
32
|
-
titleLineHeight: string;
|
|
33
|
-
titleFontWeight: string;
|
|
34
|
-
dividerColor: string;
|
|
35
|
-
titleTextColor: string;
|
|
36
|
-
titleTextColorDisabled: string;
|
|
37
|
-
fontSize: string;
|
|
38
|
-
lineHeight: string;
|
|
39
|
-
textColor: string;
|
|
40
|
-
arrowSize: string;
|
|
41
|
-
arrowColor: string;
|
|
42
|
-
arrowColorDisabled: string;
|
|
43
|
-
titlePadding: string;
|
|
44
|
-
backgroundColor: string;
|
|
45
|
-
borderRadius: string;
|
|
46
|
-
padding: string;
|
|
47
|
-
boxSizing: string;
|
|
48
|
-
}, any>>;
|
|
49
|
-
readonly themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Collapse", {
|
|
50
|
-
titleFontSize: string;
|
|
51
|
-
titleLineHeight: string;
|
|
52
|
-
titleFontWeight: string;
|
|
53
|
-
dividerColor: string;
|
|
54
|
-
titleTextColor: string;
|
|
55
|
-
titleTextColorDisabled: string;
|
|
56
|
-
fontSize: string;
|
|
57
|
-
lineHeight: string;
|
|
58
|
-
textColor: string;
|
|
59
|
-
arrowSize: string;
|
|
60
|
-
arrowColor: string;
|
|
61
|
-
arrowColorDisabled: string;
|
|
62
|
-
titlePadding: string;
|
|
63
|
-
backgroundColor: string;
|
|
64
|
-
borderRadius: string;
|
|
65
|
-
padding: string;
|
|
66
|
-
boxSizing: string;
|
|
67
|
-
}, any>>>;
|
|
68
|
-
readonly builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Collapse", {
|
|
69
|
-
titleFontSize: string;
|
|
70
|
-
titleLineHeight: string;
|
|
71
|
-
titleFontWeight: string;
|
|
72
|
-
dividerColor: string;
|
|
73
|
-
titleTextColor: string;
|
|
74
|
-
titleTextColorDisabled: string;
|
|
75
|
-
fontSize: string;
|
|
76
|
-
lineHeight: string;
|
|
77
|
-
textColor: string;
|
|
78
|
-
arrowSize: string;
|
|
79
|
-
arrowColor: string;
|
|
80
|
-
arrowColorDisabled: string;
|
|
81
|
-
titlePadding: string;
|
|
82
|
-
backgroundColor: string;
|
|
83
|
-
borderRadius: string;
|
|
84
|
-
padding: string;
|
|
85
|
-
boxSizing: string;
|
|
86
|
-
}, any>>>;
|
|
87
|
-
};
|
|
88
|
-
export type CollapseProps = ExtractPublicPropTypes<typeof collapseProps>;
|
|
89
|
-
export interface UCollapseInjection {
|
|
90
|
-
props: ExtractPropTypes<typeof collapseProps>;
|
|
91
|
-
expandedNamesRef: Ref<string | number | Array<string | number> | null>;
|
|
92
|
-
mergedClsPrefixRef: Ref<string>;
|
|
93
|
-
slots: Slots;
|
|
94
|
-
toggleItem: (collapse: boolean, name: string | number, event: MouseEvent) => void;
|
|
95
|
-
}
|
|
1
|
+
import type { UCollapseInjection } from './types/collapse.types';
|
|
96
2
|
export declare const collapseInjectionKey: import("vue").InjectionKey<UCollapseInjection>;
|
|
97
3
|
declare const _default: import("vue").DefineComponent<{
|
|
98
4
|
readonly defaultExpandedNames: {
|
|
99
|
-
readonly type: PropType<string | number | Array<string | number> | null>;
|
|
5
|
+
readonly type: import("vue").PropType<string | number | Array<string | number> | null>;
|
|
100
6
|
readonly default: null;
|
|
101
7
|
};
|
|
102
|
-
readonly expandedNames: PropType<string | number | Array<string | number> | null>;
|
|
8
|
+
readonly expandedNames: import("vue").PropType<string | number | Array<string | number> | null>;
|
|
103
9
|
readonly arrowPlacement: {
|
|
104
|
-
readonly type: PropType<ArrowPlacement>;
|
|
10
|
+
readonly type: import("vue").PropType<import("./types/collapse.types").ArrowPlacement>;
|
|
105
11
|
readonly default: "right-edge";
|
|
106
12
|
};
|
|
107
13
|
readonly accordion: {
|
|
@@ -109,18 +15,22 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
109
15
|
readonly default: false;
|
|
110
16
|
};
|
|
111
17
|
readonly displayDirective: {
|
|
112
|
-
readonly type: PropType<"if" | "show">;
|
|
18
|
+
readonly type: import("vue").PropType<"if" | "show">;
|
|
113
19
|
readonly default: "if";
|
|
114
20
|
};
|
|
115
|
-
readonly
|
|
116
|
-
|
|
117
|
-
|
|
21
|
+
readonly triggerAreas: {
|
|
22
|
+
readonly type: import("vue").PropType<import("./types/collapse.types").CollapseTriggerArea[]>;
|
|
23
|
+
readonly default: () => string[];
|
|
24
|
+
};
|
|
25
|
+
readonly onItemHeaderClick: import("vue").PropType<import("../../_utils").MaybeArray<import("./types/collapse.types").OnItemHeaderClick>>;
|
|
26
|
+
readonly 'onUpdate:expandedNames': import("vue").PropType<import("../../_utils").MaybeArray<import("./types/collapse.types").OnUpdateExpandedNames>>;
|
|
27
|
+
readonly onUpdateExpandedNames: import("vue").PropType<import("../../_utils").MaybeArray<import("./types/collapse.types").OnUpdateExpandedNames>>;
|
|
118
28
|
readonly onExpandedNamesChange: {
|
|
119
|
-
readonly type: PropType<MaybeArray<OnUpdateExpandedNames> | undefined>;
|
|
29
|
+
readonly type: import("vue").PropType<import("../../_utils").MaybeArray<import("./types/collapse.types").OnUpdateExpandedNames> | undefined>;
|
|
120
30
|
readonly validator: () => boolean;
|
|
121
31
|
readonly default: undefined;
|
|
122
32
|
};
|
|
123
|
-
readonly theme: PropType<import("../../_mixins").Theme<"Collapse", {
|
|
33
|
+
readonly theme: import("vue").PropType<import("../../_mixins").Theme<"Collapse", {
|
|
124
34
|
titleFontSize: string;
|
|
125
35
|
titleLineHeight: string;
|
|
126
36
|
titleFontWeight: string;
|
|
@@ -138,8 +48,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
138
48
|
borderRadius: string;
|
|
139
49
|
padding: string;
|
|
140
50
|
boxSizing: string;
|
|
51
|
+
iconBorder: string;
|
|
52
|
+
iconBorderRadius: string;
|
|
53
|
+
iconBackground: string;
|
|
141
54
|
}, any>>;
|
|
142
|
-
readonly themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Collapse", {
|
|
55
|
+
readonly themeOverrides: import("vue").PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Collapse", {
|
|
143
56
|
titleFontSize: string;
|
|
144
57
|
titleLineHeight: string;
|
|
145
58
|
titleFontWeight: string;
|
|
@@ -157,8 +70,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
157
70
|
borderRadius: string;
|
|
158
71
|
padding: string;
|
|
159
72
|
boxSizing: string;
|
|
73
|
+
iconBorder: string;
|
|
74
|
+
iconBorderRadius: string;
|
|
75
|
+
iconBackground: string;
|
|
160
76
|
}, any>>>;
|
|
161
|
-
readonly builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Collapse", {
|
|
77
|
+
readonly builtinThemeOverrides: import("vue").PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Collapse", {
|
|
162
78
|
titleFontSize: string;
|
|
163
79
|
titleLineHeight: string;
|
|
164
80
|
titleFontWeight: string;
|
|
@@ -176,9 +92,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
176
92
|
borderRadius: string;
|
|
177
93
|
padding: string;
|
|
178
94
|
boxSizing: string;
|
|
95
|
+
iconBorder: string;
|
|
96
|
+
iconBorderRadius: string;
|
|
97
|
+
iconBackground: string;
|
|
179
98
|
}, any>>>;
|
|
180
99
|
}, {
|
|
181
|
-
rtlEnabled: Ref<import("../../config-provider/src/internal-interface").RtlItem | undefined> | undefined;
|
|
100
|
+
rtlEnabled: import("vue").Ref<import("../../config-provider/src/internal-interface").RtlItem | undefined> | undefined;
|
|
182
101
|
mergedTheme: import("vue").ComputedRef<{
|
|
183
102
|
common: import("../..").ThemeCommonVars;
|
|
184
103
|
self: {
|
|
@@ -199,13 +118,16 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
199
118
|
borderRadius: string;
|
|
200
119
|
padding: string;
|
|
201
120
|
boxSizing: string;
|
|
121
|
+
iconBorder: string;
|
|
122
|
+
iconBorderRadius: string;
|
|
123
|
+
iconBackground: string;
|
|
202
124
|
};
|
|
203
125
|
peers: any;
|
|
204
126
|
peerOverrides: {
|
|
205
127
|
[x: string]: any;
|
|
206
128
|
};
|
|
207
129
|
}>;
|
|
208
|
-
mergedClsPrefix: Ref<string>;
|
|
130
|
+
mergedClsPrefix: import("vue").Ref<string>;
|
|
209
131
|
cssVars: import("vue").ComputedRef<{
|
|
210
132
|
'--u-font-size': string;
|
|
211
133
|
'--u-bezier': string;
|
|
@@ -225,17 +147,20 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
225
147
|
'--u-border-radius': string;
|
|
226
148
|
'--u-padding': string;
|
|
227
149
|
'--u-box-sizing': string;
|
|
150
|
+
'--u-icon-border': string;
|
|
151
|
+
'--u-icon-border-radius': string;
|
|
152
|
+
'--u-icon-background': string;
|
|
228
153
|
}> | undefined;
|
|
229
|
-
themeClass: Ref<string> | undefined;
|
|
154
|
+
themeClass: import("vue").Ref<string> | undefined;
|
|
230
155
|
onRender: (() => void) | undefined;
|
|
231
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
156
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
232
157
|
readonly defaultExpandedNames: {
|
|
233
|
-
readonly type: PropType<string | number | Array<string | number> | null>;
|
|
158
|
+
readonly type: import("vue").PropType<string | number | Array<string | number> | null>;
|
|
234
159
|
readonly default: null;
|
|
235
160
|
};
|
|
236
|
-
readonly expandedNames: PropType<string | number | Array<string | number> | null>;
|
|
161
|
+
readonly expandedNames: import("vue").PropType<string | number | Array<string | number> | null>;
|
|
237
162
|
readonly arrowPlacement: {
|
|
238
|
-
readonly type: PropType<ArrowPlacement>;
|
|
163
|
+
readonly type: import("vue").PropType<import("./types/collapse.types").ArrowPlacement>;
|
|
239
164
|
readonly default: "right-edge";
|
|
240
165
|
};
|
|
241
166
|
readonly accordion: {
|
|
@@ -243,18 +168,22 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
243
168
|
readonly default: false;
|
|
244
169
|
};
|
|
245
170
|
readonly displayDirective: {
|
|
246
|
-
readonly type: PropType<"if" | "show">;
|
|
171
|
+
readonly type: import("vue").PropType<"if" | "show">;
|
|
247
172
|
readonly default: "if";
|
|
248
173
|
};
|
|
249
|
-
readonly
|
|
250
|
-
|
|
251
|
-
|
|
174
|
+
readonly triggerAreas: {
|
|
175
|
+
readonly type: import("vue").PropType<import("./types/collapse.types").CollapseTriggerArea[]>;
|
|
176
|
+
readonly default: () => string[];
|
|
177
|
+
};
|
|
178
|
+
readonly onItemHeaderClick: import("vue").PropType<import("../../_utils").MaybeArray<import("./types/collapse.types").OnItemHeaderClick>>;
|
|
179
|
+
readonly 'onUpdate:expandedNames': import("vue").PropType<import("../../_utils").MaybeArray<import("./types/collapse.types").OnUpdateExpandedNames>>;
|
|
180
|
+
readonly onUpdateExpandedNames: import("vue").PropType<import("../../_utils").MaybeArray<import("./types/collapse.types").OnUpdateExpandedNames>>;
|
|
252
181
|
readonly onExpandedNamesChange: {
|
|
253
|
-
readonly type: PropType<MaybeArray<OnUpdateExpandedNames> | undefined>;
|
|
182
|
+
readonly type: import("vue").PropType<import("../../_utils").MaybeArray<import("./types/collapse.types").OnUpdateExpandedNames> | undefined>;
|
|
254
183
|
readonly validator: () => boolean;
|
|
255
184
|
readonly default: undefined;
|
|
256
185
|
};
|
|
257
|
-
readonly theme: PropType<import("../../_mixins").Theme<"Collapse", {
|
|
186
|
+
readonly theme: import("vue").PropType<import("../../_mixins").Theme<"Collapse", {
|
|
258
187
|
titleFontSize: string;
|
|
259
188
|
titleLineHeight: string;
|
|
260
189
|
titleFontWeight: string;
|
|
@@ -272,8 +201,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
272
201
|
borderRadius: string;
|
|
273
202
|
padding: string;
|
|
274
203
|
boxSizing: string;
|
|
204
|
+
iconBorder: string;
|
|
205
|
+
iconBorderRadius: string;
|
|
206
|
+
iconBackground: string;
|
|
275
207
|
}, any>>;
|
|
276
|
-
readonly themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Collapse", {
|
|
208
|
+
readonly themeOverrides: import("vue").PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Collapse", {
|
|
277
209
|
titleFontSize: string;
|
|
278
210
|
titleLineHeight: string;
|
|
279
211
|
titleFontWeight: string;
|
|
@@ -291,8 +223,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
291
223
|
borderRadius: string;
|
|
292
224
|
padding: string;
|
|
293
225
|
boxSizing: string;
|
|
226
|
+
iconBorder: string;
|
|
227
|
+
iconBorderRadius: string;
|
|
228
|
+
iconBackground: string;
|
|
294
229
|
}, any>>>;
|
|
295
|
-
readonly builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Collapse", {
|
|
230
|
+
readonly builtinThemeOverrides: import("vue").PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Collapse", {
|
|
296
231
|
titleFontSize: string;
|
|
297
232
|
titleLineHeight: string;
|
|
298
233
|
titleFontWeight: string;
|
|
@@ -310,12 +245,16 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
310
245
|
borderRadius: string;
|
|
311
246
|
padding: string;
|
|
312
247
|
boxSizing: string;
|
|
248
|
+
iconBorder: string;
|
|
249
|
+
iconBorderRadius: string;
|
|
250
|
+
iconBackground: string;
|
|
313
251
|
}, any>>>;
|
|
314
252
|
}>>, {
|
|
315
253
|
readonly defaultExpandedNames: string | number | (string | number)[] | null;
|
|
316
|
-
readonly arrowPlacement: ArrowPlacement;
|
|
254
|
+
readonly arrowPlacement: import("./types/collapse.types").ArrowPlacement;
|
|
317
255
|
readonly accordion: boolean;
|
|
318
256
|
readonly displayDirective: "show" | "if";
|
|
319
|
-
readonly
|
|
257
|
+
readonly triggerAreas: import("./types/collapse.types").CollapseTriggerArea[];
|
|
258
|
+
readonly onExpandedNamesChange: import("../../_utils").MaybeArray<import("./types/collapse.types").OnUpdateExpandedNames> | undefined;
|
|
320
259
|
}, {}>;
|
|
321
260
|
export default _default;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.collapseInjectionKey =
|
|
6
|
+
exports.collapseInjectionKey = void 0;
|
|
7
7
|
const vue_1 = require("vue");
|
|
8
8
|
const vooks_1 = require("vooks");
|
|
9
9
|
const _mixins_1 = require("../../_mixins");
|
|
@@ -11,34 +11,11 @@ const _utils_1 = require("../../_utils");
|
|
|
11
11
|
const styles_1 = require("../styles");
|
|
12
12
|
const index_cssr_1 = __importDefault(require("./styles/index.cssr"));
|
|
13
13
|
const use_rtl_1 = require("../../_mixins/use-rtl");
|
|
14
|
-
|
|
15
|
-
type: [Array, String],
|
|
16
|
-
default: null
|
|
17
|
-
}, expandedNames: [Array, String], arrowPlacement: {
|
|
18
|
-
type: String,
|
|
19
|
-
default: 'right-edge'
|
|
20
|
-
}, accordion: {
|
|
21
|
-
type: Boolean,
|
|
22
|
-
default: false
|
|
23
|
-
}, displayDirective: {
|
|
24
|
-
type: String,
|
|
25
|
-
default: 'if'
|
|
26
|
-
}, onItemHeaderClick: [Function, Array], 'onUpdate:expandedNames': [Function, Array], onUpdateExpandedNames: [Function, Array],
|
|
27
|
-
// deprecated
|
|
28
|
-
onExpandedNamesChange: {
|
|
29
|
-
type: [Function, Array],
|
|
30
|
-
validator: () => {
|
|
31
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
32
|
-
(0, _utils_1.warn)('collapse', '`on-expanded-names-change` is deprecated, please use `on-update:expanded-names` instead.');
|
|
33
|
-
}
|
|
34
|
-
return true;
|
|
35
|
-
},
|
|
36
|
-
default: undefined
|
|
37
|
-
} });
|
|
14
|
+
const collapse_props_1 = require("./props/collapse.props");
|
|
38
15
|
exports.collapseInjectionKey = (0, _utils_1.createInjectionKey)('u-collapse');
|
|
39
16
|
exports.default = (0, vue_1.defineComponent)({
|
|
40
17
|
name: 'Collapse',
|
|
41
|
-
props:
|
|
18
|
+
props: collapse_props_1.collapseProps,
|
|
42
19
|
setup(props, { slots }) {
|
|
43
20
|
const { mergedClsPrefixRef, inlineThemeDisabled, mergedRtlRef } = (0, _mixins_1.useConfig)(props);
|
|
44
21
|
const uncontrolledExpandedNamesRef = (0, vue_1.ref)(props.defaultExpandedNames);
|
|
@@ -107,7 +84,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
107
84
|
});
|
|
108
85
|
const rtlEnabledRef = (0, use_rtl_1.useRtl)('Collapse', mergedRtlRef, mergedClsPrefixRef);
|
|
109
86
|
const cssVarsRef = (0, vue_1.computed)(() => {
|
|
110
|
-
const { common: { cubicBezierEaseInOut }, self: { titleFontWeight, dividerColor, titlePadding, titleTextColor, titleTextColorDisabled, textColor, arrowColor, fontSize, titleFontSize, arrowColorDisabled, lineHeight, titleLineHeight, arrowSize, backgroundColor, borderRadius, padding, boxSizing } } = themeRef.value;
|
|
87
|
+
const { common: { cubicBezierEaseInOut }, self: { titleFontWeight, dividerColor, titlePadding, titleTextColor, titleTextColorDisabled, textColor, arrowColor, fontSize, titleFontSize, arrowColorDisabled, lineHeight, titleLineHeight, arrowSize, backgroundColor, borderRadius, padding, boxSizing, iconBorder, iconBorderRadius, iconBackground } } = themeRef.value;
|
|
111
88
|
return {
|
|
112
89
|
'--u-font-size': fontSize,
|
|
113
90
|
'--u-bezier': cubicBezierEaseInOut,
|
|
@@ -126,7 +103,10 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
126
103
|
'--u-background-color': backgroundColor,
|
|
127
104
|
'--u-border-radius': borderRadius,
|
|
128
105
|
'--u-padding': padding,
|
|
129
|
-
'--u-box-sizing': boxSizing
|
|
106
|
+
'--u-box-sizing': boxSizing,
|
|
107
|
+
'--u-icon-border': iconBorder,
|
|
108
|
+
'--u-icon-border-radius': iconBorderRadius,
|
|
109
|
+
'--u-icon-background': iconBackground
|
|
130
110
|
};
|
|
131
111
|
});
|
|
132
112
|
const themeClassHandle = inlineThemeDisabled
|
|
@@ -1,34 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { ExtractPublicPropTypes } from '../../_utils';
|
|
3
|
-
import { ArrowPlacement } from './interface';
|
|
4
|
-
export declare const collapseItemProps: {
|
|
5
|
-
readonly title: StringConstructor;
|
|
6
|
-
readonly name: PropType<string | number>;
|
|
7
|
-
readonly disabled: BooleanConstructor;
|
|
8
|
-
readonly displayDirective: PropType<"if" | "show">;
|
|
9
|
-
};
|
|
10
|
-
export type CollapseItemProps = ExtractPublicPropTypes<typeof collapseItemProps>;
|
|
1
|
+
import { ArrowPlacement, CollapseTriggerArea } from './types/collapse.types';
|
|
11
2
|
declare const _default: import("vue").DefineComponent<{
|
|
12
3
|
readonly title: StringConstructor;
|
|
13
|
-
readonly name: PropType<string | number>;
|
|
4
|
+
readonly name: import("vue").PropType<string | number>;
|
|
14
5
|
readonly disabled: BooleanConstructor;
|
|
15
|
-
readonly displayDirective: PropType<"if" | "show">;
|
|
6
|
+
readonly displayDirective: import("vue").PropType<"if" | "show">;
|
|
16
7
|
}, {
|
|
17
8
|
rtlEnabled: import("vue").Ref<import("../../config-provider/src/internal-interface").RtlItem | undefined> | undefined;
|
|
18
|
-
collapseSlots:
|
|
19
|
-
[name: string]: import("vue").Slot<any> | undefined;
|
|
20
|
-
}>;
|
|
9
|
+
collapseSlots: import("./types/collapse.types").CollapseSlots;
|
|
21
10
|
randomName: string;
|
|
22
11
|
mergedClsPrefix: import("vue").Ref<string>;
|
|
23
12
|
collapsed: import("vue").ComputedRef<boolean>;
|
|
13
|
+
triggerAreas: import("vue").Ref<CollapseTriggerArea[]>;
|
|
24
14
|
mergedDisplayDirective: import("vue").ComputedRef<"show" | "if">;
|
|
25
15
|
arrowPlacement: import("vue").ComputedRef<ArrowPlacement>;
|
|
26
|
-
handleClick(
|
|
16
|
+
handleClick(event: MouseEvent): void;
|
|
27
17
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
28
18
|
readonly title: StringConstructor;
|
|
29
|
-
readonly name: PropType<string | number>;
|
|
19
|
+
readonly name: import("vue").PropType<string | number>;
|
|
30
20
|
readonly disabled: BooleanConstructor;
|
|
31
|
-
readonly displayDirective: PropType<"if" | "show">;
|
|
21
|
+
readonly displayDirective: import("vue").PropType<"if" | "show">;
|
|
32
22
|
}>>, {
|
|
33
23
|
readonly disabled: boolean;
|
|
34
24
|
}, {}>;
|
|
@@ -3,7 +3,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.collapseItemProps = void 0;
|
|
7
6
|
const vue_1 = require("vue");
|
|
8
7
|
const seemly_1 = require("seemly");
|
|
9
8
|
const vooks_1 = require("vooks");
|
|
@@ -14,15 +13,10 @@ const _internal_1 = require("../../_internal");
|
|
|
14
13
|
const _utils_1 = require("../../_utils");
|
|
15
14
|
const Collapse_1 = require("./Collapse");
|
|
16
15
|
const CollapseItemContent_1 = __importDefault(require("./CollapseItemContent"));
|
|
17
|
-
|
|
18
|
-
title: String,
|
|
19
|
-
name: [String, Number],
|
|
20
|
-
disabled: Boolean,
|
|
21
|
-
displayDirective: String
|
|
22
|
-
};
|
|
16
|
+
const collapseItem_props_1 = require("./props/collapseItem.props");
|
|
23
17
|
exports.default = (0, vue_1.defineComponent)({
|
|
24
18
|
name: 'CollapseItem',
|
|
25
|
-
props:
|
|
19
|
+
props: collapseItem_props_1.collapseItemProps,
|
|
26
20
|
setup(props) {
|
|
27
21
|
const { mergedRtlRef } = (0, _mixins_1.useConfig)(props);
|
|
28
22
|
const randomName = (0, seemly_1.createId)();
|
|
@@ -48,12 +42,26 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
48
42
|
return true;
|
|
49
43
|
});
|
|
50
44
|
const rtlEnabledRef = (0, use_rtl_1.useRtl)('Collapse', mergedRtlRef, mergedClsPrefixRef);
|
|
45
|
+
function clickedOn(event, area) {
|
|
46
|
+
return (0, seemly_1.happensIn)(event, area);
|
|
47
|
+
}
|
|
48
|
+
function checkClickedPlace(event) {
|
|
49
|
+
let clickedPlace = 'main';
|
|
50
|
+
if (clickedOn(event, 'arrow')) {
|
|
51
|
+
clickedPlace = 'arrow';
|
|
52
|
+
}
|
|
53
|
+
if (clickedOn(event, 'extra')) {
|
|
54
|
+
clickedPlace = 'extra';
|
|
55
|
+
}
|
|
56
|
+
return clickedPlace;
|
|
57
|
+
}
|
|
51
58
|
return {
|
|
52
59
|
rtlEnabled: rtlEnabledRef,
|
|
53
60
|
collapseSlots,
|
|
54
61
|
randomName,
|
|
55
62
|
mergedClsPrefix: mergedClsPrefixRef,
|
|
56
63
|
collapsed: collapsedRef,
|
|
64
|
+
triggerAreas: (0, vue_1.toRef)(collapseProps, 'triggerAreas'),
|
|
57
65
|
mergedDisplayDirective: (0, vue_1.computed)(() => {
|
|
58
66
|
const { displayDirective } = props;
|
|
59
67
|
if (displayDirective) {
|
|
@@ -66,41 +74,44 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
66
74
|
arrowPlacement: (0, vue_1.computed)(() => {
|
|
67
75
|
return collapseProps.arrowPlacement;
|
|
68
76
|
}),
|
|
69
|
-
handleClick(
|
|
70
|
-
|
|
77
|
+
handleClick(event) {
|
|
78
|
+
const clickedPlace = checkClickedPlace(event);
|
|
79
|
+
if (!collapseProps.triggerAreas.includes(clickedPlace)) {
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
71
82
|
if (UCollapse && !props.disabled) {
|
|
72
|
-
UCollapse.toggleItem(collapsedRef.value, mergedNameRef.value,
|
|
83
|
+
UCollapse.toggleItem(collapsedRef.value, mergedNameRef.value, event);
|
|
73
84
|
}
|
|
74
85
|
}
|
|
75
86
|
};
|
|
76
87
|
},
|
|
77
88
|
render() {
|
|
78
|
-
const { collapseSlots, $slots, arrowPlacement, collapsed, mergedDisplayDirective, mergedClsPrefix, disabled } = this;
|
|
89
|
+
const { collapseSlots, $slots, arrowPlacement, collapsed, mergedDisplayDirective, mergedClsPrefix, disabled, triggerAreas } = this;
|
|
79
90
|
const headerNode = (0, _utils_1.resolveSlotWithProps)($slots.header, { collapsed }, () => [this.title]);
|
|
80
91
|
const headerExtraSlot = $slots['header-extra'] || collapseSlots['header-extra'];
|
|
81
92
|
const arrowSlot = $slots.arrow || collapseSlots.arrow;
|
|
82
|
-
const arrowNode = ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-collapse-item-arrow`, key: this.rtlEnabled ? 0 : 1 }, (0, _utils_1.resolveSlotWithProps)(arrowSlot, { collapsed }, () =>
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
})
|
|
88
|
-
];
|
|
89
|
-
})));
|
|
93
|
+
const arrowNode = ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-collapse-item-arrow`, key: this.rtlEnabled ? 0 : 1, "data-arrow": true }, (0, _utils_1.resolveSlotWithProps)(arrowSlot, { collapsed }, () => [
|
|
94
|
+
(0, vue_1.h)(_internal_1.UBaseIcon, { clsPrefix: mergedClsPrefix }, {
|
|
95
|
+
default: () => this.rtlEnabled ? (0, vue_1.h)(icons_1.ChevronLeftIcon, null) : (0, vue_1.h)(icons_1.ChevronRightIcon, null)
|
|
96
|
+
})
|
|
97
|
+
])));
|
|
90
98
|
return ((0, vue_1.h)("div", { class: [
|
|
91
99
|
`${mergedClsPrefix}-collapse-item`,
|
|
92
100
|
`${mergedClsPrefix}-collapse-item--${arrowPlacement}-arrow-placement`,
|
|
93
101
|
disabled && `${mergedClsPrefix}-collapse-item--disabled`,
|
|
94
|
-
!collapsed && `${mergedClsPrefix}-collapse-item--active
|
|
95
|
-
|
|
102
|
+
!collapsed && `${mergedClsPrefix}-collapse-item--active`,
|
|
103
|
+
triggerAreas.map((area) => {
|
|
104
|
+
return `${mergedClsPrefix}-collapse-item--trigger-area-${area}`;
|
|
105
|
+
})
|
|
106
|
+
] },
|
|
96
107
|
(0, vue_1.h)("div", { class: [
|
|
97
108
|
`${mergedClsPrefix}-collapse-item__header`,
|
|
98
109
|
!collapsed && `${mergedClsPrefix}-collapse-item__header--active`
|
|
99
|
-
] },
|
|
110
|
+
], onClick: this.handleClick },
|
|
100
111
|
(0, vue_1.h)("div", { class: `${mergedClsPrefix}-collapse-item__header-main` },
|
|
101
112
|
arrowPlacement !== 'right-edge' && arrowNode,
|
|
102
113
|
headerNode),
|
|
103
|
-
(0, _utils_1.resolveWrappedSlotWithProps)(headerExtraSlot, { collapsed }, (children) => ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-collapse-item__header-extra`,
|
|
114
|
+
(0, _utils_1.resolveWrappedSlotWithProps)(headerExtraSlot, { collapsed }, (children) => ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-collapse-item__header-extra`, "data-extra": true }, children))),
|
|
104
115
|
arrowPlacement === 'right-edge' && arrowNode),
|
|
105
116
|
(0, vue_1.h)(CollapseItemContent_1.default, { clsPrefix: mergedClsPrefix, displayDirective: mergedDisplayDirective, show: !collapsed }, $slots)));
|
|
106
117
|
}
|