@itguy614/clean-ui 1.2.2 → 1.3.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/README.md +12 -0
- package/dist/clean-ui.css +1 -1
- package/dist/components/CuiAccordion.vue.js +2 -2
- package/dist/components/CuiAlert.vue.d.ts +3 -5
- package/dist/components/CuiAlert.vue.d.ts.map +1 -1
- package/dist/components/CuiAlert.vue.js +1 -1
- package/dist/components/CuiAlert.vue2.js +54 -50
- package/dist/components/CuiBadge.vue.js +3 -3
- package/dist/components/CuiBadge.vue2.js +23 -23
- package/dist/components/CuiBanner.vue.d.ts +15 -10
- package/dist/components/CuiBanner.vue.d.ts.map +1 -1
- package/dist/components/CuiBanner.vue.js +5 -80
- package/dist/components/CuiBanner.vue2.js +90 -2
- package/dist/components/CuiButton.vue.d.ts +9 -0
- package/dist/components/CuiButton.vue.d.ts.map +1 -1
- package/dist/components/CuiButton.vue.js +1 -1
- package/dist/components/CuiButton.vue2.js +77 -83
- package/dist/components/CuiButtonGroup.vue.d.ts +4 -2
- package/dist/components/CuiButtonGroup.vue.d.ts.map +1 -1
- package/dist/components/CuiButtonGroup.vue.js +1 -1
- package/dist/components/CuiButtonGroup.vue2.js +18 -9
- package/dist/components/CuiCard.vue.d.ts.map +1 -1
- package/dist/components/CuiCard.vue.js +5 -33
- package/dist/components/CuiCard.vue2.js +32 -2
- package/dist/components/CuiCardBody.vue.d.ts.map +1 -1
- package/dist/components/CuiCardBody.vue.js +5 -18
- package/dist/components/CuiCardBody.vue2.js +18 -2
- package/dist/components/CuiCardFooter.vue.d.ts.map +1 -1
- package/dist/components/CuiCardFooter.vue.js +5 -30
- package/dist/components/CuiCardFooter.vue2.js +25 -2
- package/dist/components/CuiCardHeader.vue.d.ts +5 -4
- package/dist/components/CuiCardHeader.vue.d.ts.map +1 -1
- package/dist/components/CuiCardHeader.vue.js +5 -49
- package/dist/components/CuiCardHeader.vue2.js +40 -2
- package/dist/components/CuiCardMedia.vue.d.ts.map +1 -1
- package/dist/components/CuiCardMedia.vue.js +3 -3
- package/dist/components/CuiCardMedia.vue2.js +6 -6
- package/dist/components/CuiCheckbox.vue.d.ts +2 -2
- package/dist/components/CuiCheckbox.vue.d.ts.map +1 -1
- package/dist/components/CuiCheckbox.vue.js +1 -1
- package/dist/components/CuiCheckbox.vue2.js +46 -34
- package/dist/components/CuiCheckboxGroup.vue.d.ts +2 -2
- package/dist/components/CuiCheckboxGroup.vue.d.ts.map +1 -1
- package/dist/components/CuiCheckboxGroup.vue.js +2 -2
- package/dist/components/CuiCheckboxGroup.vue2.js +45 -35
- package/dist/components/CuiCodeBlock.vue.d.ts.map +1 -1
- package/dist/components/CuiCodeBlock.vue.js +14 -11
- package/dist/components/CuiColorPicker.vue.d.ts +2 -2
- package/dist/components/CuiColorPicker.vue.d.ts.map +1 -1
- package/dist/components/CuiColorPicker.vue.js +117 -104
- package/dist/components/CuiCombobox.vue.d.ts +2 -2
- package/dist/components/CuiCombobox.vue.d.ts.map +1 -1
- package/dist/components/CuiCombobox.vue.js +5 -330
- package/dist/components/CuiCombobox.vue2.js +330 -2
- package/dist/components/CuiConfirmDialog.vue.d.ts +5 -4
- package/dist/components/CuiConfirmDialog.vue.d.ts.map +1 -1
- package/dist/components/CuiConfirmDialog.vue.js +84 -73
- package/dist/components/CuiContextMenu.vue.d.ts +40 -1
- package/dist/components/CuiContextMenu.vue.d.ts.map +1 -1
- package/dist/components/CuiContextMenu.vue.js +1 -1
- package/dist/components/CuiContextMenu.vue2.js +149 -91
- package/dist/components/CuiCopyButton.vue.d.ts.map +1 -1
- package/dist/components/CuiCopyButton.vue.js +5 -61
- package/dist/components/CuiCopyButton.vue2.js +68 -2
- package/dist/components/CuiDataGridCardView.vue.d.ts.map +1 -1
- package/dist/components/CuiDataGridCardView.vue.js +10 -9
- package/dist/components/CuiDataGridColumnManager.vue.d.ts.map +1 -1
- package/dist/components/CuiDataGridColumnManager.vue.js +12 -11
- package/dist/components/CuiDataGridPagination.vue.d.ts.map +1 -1
- package/dist/components/CuiDataGridPagination.vue.js +9 -8
- package/dist/components/CuiDataGridSearch.vue.d.ts.map +1 -1
- package/dist/components/CuiDataGridSearch.vue.js +12 -9
- package/dist/components/CuiDataGridTable.vue.d.ts.map +1 -1
- package/dist/components/CuiDataGridTable.vue.js +213 -190
- package/dist/components/CuiDataGridViewManager.vue.d.ts.map +1 -1
- package/dist/components/CuiDataGridViewManager.vue.js +21 -20
- package/dist/components/CuiDatePicker.vue.d.ts +2 -2
- package/dist/components/CuiDatePicker.vue.d.ts.map +1 -1
- package/dist/components/CuiDatePicker.vue.js +257 -173
- package/dist/components/CuiDateRangePicker.vue.d.ts +2 -2
- package/dist/components/CuiDateRangePicker.vue.d.ts.map +1 -1
- package/dist/components/CuiDateRangePicker.vue.js +262 -179
- package/dist/components/CuiDivider.vue.d.ts +1 -3
- package/dist/components/CuiDivider.vue.d.ts.map +1 -1
- package/dist/components/CuiDivider.vue.js +47 -59
- package/dist/components/CuiDropdownMenu.vue.js +2 -2
- package/dist/components/CuiDropdownRadioGroup.vue.d.ts +4 -1
- package/dist/components/CuiDropdownRadioGroup.vue.d.ts.map +1 -1
- package/dist/components/CuiDropdownRadioGroup.vue.js +27 -14
- package/dist/components/CuiDropdownSub.vue.js +2 -2
- package/dist/components/CuiEmptyState.vue.d.ts +5 -4
- package/dist/components/CuiEmptyState.vue.d.ts.map +1 -1
- package/dist/components/CuiEmptyState.vue.js +1 -1
- package/dist/components/CuiEmptyState.vue2.js +30 -24
- package/dist/components/CuiFieldset.vue.d.ts.map +1 -1
- package/dist/components/CuiFieldset.vue.js +1 -1
- package/dist/components/CuiFieldset.vue2.js +21 -21
- package/dist/components/CuiFileUpload.vue.d.ts +2 -2
- package/dist/components/CuiFileUpload.vue.d.ts.map +1 -1
- package/dist/components/CuiFileUpload.vue.js +70 -57
- package/dist/components/CuiFormField.vue.d.ts.map +1 -1
- package/dist/components/CuiFormField.vue.js +2 -2
- package/dist/components/CuiFormField.vue2.js +48 -42
- package/dist/components/CuiInput.vue.d.ts +2 -2
- package/dist/components/CuiInput.vue.d.ts.map +1 -1
- package/dist/components/CuiInput.vue.js +1 -1
- package/dist/components/CuiInput.vue2.js +97 -85
- package/dist/components/CuiInputStepper.vue.d.ts +2 -2
- package/dist/components/CuiInputStepper.vue.d.ts.map +1 -1
- package/dist/components/CuiInputStepper.vue.js +5 -187
- package/dist/components/CuiInputStepper.vue2.js +237 -2
- package/dist/components/CuiKbd.vue.d.ts.map +1 -1
- package/dist/components/CuiKbd.vue.js +6 -5
- package/dist/components/CuiMaskedInput.vue.d.ts +9 -3
- package/dist/components/CuiMaskedInput.vue.d.ts.map +1 -1
- package/dist/components/CuiMaskedInput.vue.js +132 -117
- package/dist/components/CuiModal.vue.d.ts +10 -2
- package/dist/components/CuiModal.vue.d.ts.map +1 -1
- package/dist/components/CuiModal.vue.js +2 -2
- package/dist/components/CuiModal.vue2.js +48 -44
- package/dist/components/CuiModalBody.vue.d.ts.map +1 -1
- package/dist/components/CuiModalBody.vue.js +16 -13
- package/dist/components/CuiModalFooter.vue.d.ts.map +1 -1
- package/dist/components/CuiModalFooter.vue.js +3 -2
- package/dist/components/CuiModalHeader.vue.d.ts +13 -4
- package/dist/components/CuiModalHeader.vue.d.ts.map +1 -1
- package/dist/components/CuiModalHeader.vue.js +54 -42
- package/dist/components/CuiPagination.vue.d.ts.map +1 -1
- package/dist/components/CuiPagination.vue.js +1 -1
- package/dist/components/CuiPagination.vue2.js +28 -25
- package/dist/components/CuiPopover.vue.d.ts.map +1 -1
- package/dist/components/CuiPopover.vue.js +80 -72
- package/dist/components/CuiRadio.vue.d.ts +2 -4
- package/dist/components/CuiRadio.vue.d.ts.map +1 -1
- package/dist/components/CuiRadio.vue.js +2 -2
- package/dist/components/CuiRadio.vue2.js +88 -74
- package/dist/components/CuiRadioGroup.vue.d.ts +2 -2
- package/dist/components/CuiRadioGroup.vue.d.ts.map +1 -1
- package/dist/components/CuiRadioGroup.vue.js +3 -3
- package/dist/components/CuiRadioGroup.vue2.js +47 -37
- package/dist/components/CuiRating.vue.d.ts.map +1 -1
- package/dist/components/CuiRating.vue.js +15 -14
- package/dist/components/CuiResizablePanels.vue.d.ts.map +1 -1
- package/dist/components/CuiResizablePanels.vue.js +10 -9
- package/dist/components/CuiSelect.vue.d.ts +2 -2
- package/dist/components/CuiSelect.vue.d.ts.map +1 -1
- package/dist/components/CuiSelect.vue.js +2 -2
- package/dist/components/CuiSelect.vue2.js +161 -151
- package/dist/components/CuiSkeleton.vue.js +2 -2
- package/dist/components/CuiSkeleton.vue2.js +10 -10
- package/dist/components/CuiSlideover.vue.d.ts +2 -2
- package/dist/components/CuiSlideover.vue.d.ts.map +1 -1
- package/dist/components/CuiSlideover.vue.js +34 -30
- package/dist/components/CuiSlider.vue.d.ts +2 -2
- package/dist/components/CuiSlider.vue.d.ts.map +1 -1
- package/dist/components/CuiSlider.vue.js +5 -154
- package/dist/components/CuiSlider.vue2.js +171 -2
- package/dist/components/CuiSpinner.vue.d.ts.map +1 -1
- package/dist/components/CuiSpinner.vue.js +5 -4
- package/dist/components/CuiTable.vue.d.ts.map +1 -1
- package/dist/components/CuiTable.vue.js +4 -1
- package/dist/components/CuiTableBody.vue.d.ts.map +1 -1
- package/dist/components/CuiTableBody.vue.js +6 -6
- package/dist/components/CuiTableCell.vue.d.ts.map +1 -1
- package/dist/components/CuiTableCell.vue.js +11 -10
- package/dist/components/CuiTableFoot.vue.d.ts.map +1 -1
- package/dist/components/CuiTableFoot.vue.js +7 -7
- package/dist/components/CuiTableHead.vue.d.ts.map +1 -1
- package/dist/components/CuiTableHead.vue.js +7 -7
- package/dist/components/CuiTabs.vue.d.ts.map +1 -1
- package/dist/components/CuiTabs.vue.js +2 -2
- package/dist/components/CuiTabs.vue2.js +81 -76
- package/dist/components/CuiTagInput.vue.d.ts +2 -2
- package/dist/components/CuiTagInput.vue.d.ts.map +1 -1
- package/dist/components/CuiTagInput.vue.js +5 -294
- package/dist/components/CuiTagInput.vue2.js +276 -2
- package/dist/components/CuiTextarea.vue.d.ts +2 -2
- package/dist/components/CuiTextarea.vue.d.ts.map +1 -1
- package/dist/components/CuiTextarea.vue.js +4 -4
- package/dist/components/CuiTextarea.vue2.js +73 -59
- package/dist/components/CuiTimePicker.vue.d.ts +2 -2
- package/dist/components/CuiTimePicker.vue.d.ts.map +1 -1
- package/dist/components/CuiTimePicker.vue.js +172 -97
- package/dist/components/CuiTimeline.vue.d.ts.map +1 -1
- package/dist/components/CuiTimeline.vue.js +6 -5
- package/dist/components/CuiTimelineItem.vue.d.ts.map +1 -1
- package/dist/components/CuiTimelineItem.vue.js +11 -10
- package/dist/components/CuiToast.vue.d.ts +8 -10
- package/dist/components/CuiToast.vue.d.ts.map +1 -1
- package/dist/components/CuiToast.vue.js +2 -2
- package/dist/components/CuiToast.vue2.js +69 -67
- package/dist/components/CuiToggle.vue.d.ts +2 -2
- package/dist/components/CuiToggle.vue.d.ts.map +1 -1
- package/dist/components/CuiToggle.vue.js +2 -2
- package/dist/components/CuiToggle.vue2.js +71 -59
- package/dist/components/CuiToggleGroup.vue.d.ts +2 -2
- package/dist/components/CuiToggleGroup.vue.d.ts.map +1 -1
- package/dist/components/CuiToggleGroup.vue.js +2 -2
- package/dist/components/CuiToggleGroup.vue2.js +45 -35
- package/dist/components/CuiTooltip.vue.d.ts.map +1 -1
- package/dist/components/CuiTooltip.vue.js +2 -2
- package/dist/components/CuiTooltip.vue2.js +49 -45
- package/dist/components/CuiTransferList.vue.d.ts.map +1 -1
- package/dist/components/CuiTransferList.vue.js +31 -30
- package/dist/components/CuiTreeNode.vue.d.ts +9 -2
- package/dist/components/CuiTreeNode.vue.d.ts.map +1 -1
- package/dist/components/CuiTreeNode.vue.js +5 -179
- package/dist/components/CuiTreeNode.vue2.js +198 -2
- package/dist/components/CuiTreeView.vue.d.ts +33 -5
- package/dist/components/CuiTreeView.vue.d.ts.map +1 -1
- package/dist/components/CuiTreeView.vue.js +187 -44
- package/dist/composables/useCalendarKeyboard.d.ts +48 -0
- package/dist/composables/useCalendarKeyboard.d.ts.map +1 -0
- package/dist/composables/useCalendarKeyboard.js +91 -0
- package/dist/composables/useFieldDescribedBy.d.ts +30 -0
- package/dist/composables/useFieldDescribedBy.d.ts.map +1 -0
- package/dist/composables/useFieldDescribedBy.js +11 -0
- package/dist/composables/useMessages.d.ts.map +1 -1
- package/dist/composables/useMessages.js +6 -6
- package/dist/composables/usePopover.d.ts.map +1 -1
- package/dist/composables/usePopover.js +10 -0
- package/dist/composables/useScrollShadows.d.ts +3 -0
- package/dist/composables/useScrollShadows.d.ts.map +1 -1
- package/dist/composables/useScrollShadows.js +15 -12
- package/dist/icons/builtin.d.ts.map +1 -1
- package/dist/icons/builtin.js +38 -37
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +185 -182
- package/dist/messages.d.ts +39 -4
- package/dist/messages.d.ts.map +1 -1
- package/dist/messages.js +8 -7
- package/dist/types/common.d.ts +90 -0
- package/dist/types/common.d.ts.map +1 -1
- package/dist/utils/colorIconMap.d.ts +47 -3
- package/dist/utils/colorIconMap.d.ts.map +1 -1
- package/dist/utils/colorIconMap.js +20 -5
- package/dist/utils/date.d.ts +13 -0
- package/dist/utils/date.d.ts.map +1 -1
- package/dist/utils/date.js +46 -40
- package/dist/utils/sizing.d.ts +26 -1
- package/dist/utils/sizing.d.ts.map +1 -1
- package/dist/utils/sizing.js +22 -21
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -1,15 +1,23 @@
|
|
|
1
|
-
import type { HideableProps } from "../types/common";
|
|
2
|
-
export interface CuiModalHeaderProps extends HideableProps {
|
|
1
|
+
import type { HideableProps, TitleAsProps } from "../types/common";
|
|
2
|
+
export interface CuiModalHeaderProps extends HideableProps, TitleAsProps {
|
|
3
3
|
/** Convenience: title text */
|
|
4
4
|
title?: string;
|
|
5
|
+
/**
|
|
6
|
+
* id for the title element, so the dialog can point `aria-labelledby` at it.
|
|
7
|
+
*
|
|
8
|
+
* `CuiModal` and `CuiSlideover` generate one and pass it down. Without it their
|
|
9
|
+
* `aria-labelledby` referenced an id that was never rendered, so every titled dialog
|
|
10
|
+
* in the library was announced unnamed (#158).
|
|
11
|
+
*/
|
|
12
|
+
titleId?: string;
|
|
5
13
|
/** Hide the close button */
|
|
6
14
|
noCloseButton?: boolean;
|
|
7
15
|
}
|
|
8
|
-
declare var __VLS_1: {},
|
|
16
|
+
declare var __VLS_1: {}, __VLS_7: {};
|
|
9
17
|
type __VLS_Slots = {} & {
|
|
10
18
|
default?: (props: typeof __VLS_1) => any;
|
|
11
19
|
} & {
|
|
12
|
-
actions?: (props: typeof
|
|
20
|
+
actions?: (props: typeof __VLS_7) => any;
|
|
13
21
|
};
|
|
14
22
|
declare const __VLS_component: import("vue").DefineComponent<CuiModalHeaderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
15
23
|
close: () => any;
|
|
@@ -18,6 +26,7 @@ declare const __VLS_component: import("vue").DefineComponent<CuiModalHeaderProps
|
|
|
18
26
|
}>, {
|
|
19
27
|
hidden: boolean;
|
|
20
28
|
noCloseButton: boolean;
|
|
29
|
+
titleAs: import("../index.js").CuiTitleAs;
|
|
21
30
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
31
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
23
32
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CuiModalHeader.vue.d.ts","sourceRoot":"","sources":["../../src/components/CuiModalHeader.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CuiModalHeader.vue.d.ts","sourceRoot":"","sources":["../../src/components/CuiModalHeader.vue"],"names":[],"mappings":"AAqGA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAGnE,MAAM,WAAW,mBAAoB,SAAQ,aAAa,EAAE,YAAY;IACtE,8BAA8B;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,4BAA4B;IAC5B,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAmID,QAAA,IAAI,OAAO,IAAU,EAAE,OAAO,IAAW,CAAE;AAC3C,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GAC5C;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAwB/C,QAAA,MAAM,eAAe;;;;;;mBA/JH,OAAO;;6EAuKvB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAa1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,47 +1,59 @@
|
|
|
1
|
-
import { defineComponent as u, withDirectives as m, openBlock as
|
|
2
|
-
import
|
|
3
|
-
import { useMessages as
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
alignItems: "flex-start",
|
|
7
|
-
gap: "calc(0.75rem * var(--cui-density-scale, 1))",
|
|
8
|
-
padding: "calc(1.25rem * var(--cui-density-scale, 1)) calc(1.5rem * var(--cui-density-scale, 1)) calc(0.25rem * var(--cui-density-scale, 1))",
|
|
9
|
-
flexShrink: "0",
|
|
10
|
-
background: "var(--cui-surface-base)",
|
|
11
|
-
position: "relative",
|
|
12
|
-
zIndex: "1"
|
|
13
|
-
} }, x = { style: { flex: "1", "min-width": "0" } }, C = {
|
|
14
|
-
key: 0,
|
|
1
|
+
import { defineComponent as u, withDirectives as m, openBlock as a, createElementBlock as o, createElementVNode as y, renderSlot as s, createBlock as g, resolveDynamicComponent as f, withCtx as v, createTextVNode as h, toDisplayString as p, createCommentVNode as l, unref as k, createVNode as x, vShow as b } from "vue";
|
|
2
|
+
import C from "./CuiIcon.vue.js";
|
|
3
|
+
import { useMessages as B } from "../composables/useMessages.js";
|
|
4
|
+
const I = {
|
|
5
|
+
class: "cui-modal-header",
|
|
15
6
|
style: {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
7
|
+
display: "flex",
|
|
8
|
+
alignItems: "flex-start",
|
|
9
|
+
gap: "calc(0.75rem * var(--cui-density-scale, 1))",
|
|
10
|
+
padding: "calc(1.25rem * var(--cui-density-scale, 1)) calc(1.5rem * var(--cui-density-scale, 1)) calc(0.25rem * var(--cui-density-scale, 1))",
|
|
11
|
+
flexShrink: "0",
|
|
12
|
+
background: "var(--cui-surface-base)",
|
|
13
|
+
position: "relative",
|
|
14
|
+
zIndex: "1"
|
|
21
15
|
}
|
|
22
|
-
},
|
|
16
|
+
}, S = { style: { flex: "1", "min-width": "0" } }, w = {
|
|
23
17
|
key: 0,
|
|
24
18
|
style: { display: "flex", "align-items": "center", gap: "calc(0.5rem * var(--cui-density-scale, 1))", "flex-shrink": "0" }
|
|
25
|
-
},
|
|
19
|
+
}, M = ["aria-label"], D = /* @__PURE__ */ u({
|
|
26
20
|
__name: "CuiModalHeader",
|
|
27
21
|
props: {
|
|
28
22
|
title: {},
|
|
23
|
+
titleId: {},
|
|
29
24
|
noCloseButton: { type: Boolean, default: !1 },
|
|
30
|
-
hidden: { type: Boolean, default: !1 }
|
|
25
|
+
hidden: { type: Boolean, default: !1 },
|
|
26
|
+
titleAs: { default: "h2" }
|
|
31
27
|
},
|
|
32
28
|
emits: ["close"],
|
|
33
|
-
setup(
|
|
34
|
-
const c =
|
|
35
|
-
return (
|
|
36
|
-
y("div",
|
|
37
|
-
|
|
38
|
-
|
|
29
|
+
setup(e, { emit: n }) {
|
|
30
|
+
const c = n, d = B();
|
|
31
|
+
return (r, t) => m((a(), o("div", I, [
|
|
32
|
+
y("div", S, [
|
|
33
|
+
s(r.$slots, "default", {}, () => [
|
|
34
|
+
e.title ? (a(), g(f(e.titleAs), {
|
|
35
|
+
key: 0,
|
|
36
|
+
id: e.titleId,
|
|
37
|
+
class: "cui-modal-header__title",
|
|
38
|
+
style: {
|
|
39
|
+
fontSize: "1.125rem",
|
|
40
|
+
fontWeight: "600",
|
|
41
|
+
lineHeight: "1.4",
|
|
42
|
+
color: "var(--cui-text-emphasis)",
|
|
43
|
+
margin: "0"
|
|
44
|
+
}
|
|
45
|
+
}, {
|
|
46
|
+
default: v(() => [
|
|
47
|
+
h(p(e.title), 1)
|
|
48
|
+
]),
|
|
49
|
+
_: 1
|
|
50
|
+
}, 8, ["id"])) : l("", !0)
|
|
39
51
|
])
|
|
40
52
|
]),
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
])) :
|
|
44
|
-
|
|
53
|
+
r.$slots.actions ? (a(), o("div", w, [
|
|
54
|
+
s(r.$slots, "actions")
|
|
55
|
+
])) : l("", !0),
|
|
56
|
+
e.noCloseButton ? l("", !0) : (a(), o("button", {
|
|
45
57
|
key: 1,
|
|
46
58
|
type: "button",
|
|
47
59
|
style: {
|
|
@@ -61,25 +73,25 @@ const k = { style: {
|
|
|
61
73
|
marginRight: "calc(-0.25rem * var(--cui-density-scale, 1))",
|
|
62
74
|
transition: "color 0.15s ease, background 0.15s ease"
|
|
63
75
|
},
|
|
64
|
-
"aria-label":
|
|
65
|
-
onClick:
|
|
66
|
-
onMouseenter:
|
|
67
|
-
|
|
76
|
+
"aria-label": k(d).close,
|
|
77
|
+
onClick: t[0] || (t[0] = (i) => c("close")),
|
|
78
|
+
onMouseenter: t[1] || (t[1] = (i) => {
|
|
79
|
+
i.target.style.color = "var(--cui-text-body)", i.target.style.background = "var(--cui-primary-bg)";
|
|
68
80
|
}),
|
|
69
|
-
onMouseleave:
|
|
70
|
-
|
|
81
|
+
onMouseleave: t[2] || (t[2] = (i) => {
|
|
82
|
+
i.target.style.color = "var(--cui-text-tertiary)", i.target.style.background = "none";
|
|
71
83
|
})
|
|
72
84
|
}, [
|
|
73
|
-
|
|
85
|
+
x(C, {
|
|
74
86
|
name: "x",
|
|
75
87
|
size: "1rem"
|
|
76
88
|
})
|
|
77
|
-
], 40,
|
|
89
|
+
], 40, M))
|
|
78
90
|
], 512)), [
|
|
79
|
-
[
|
|
91
|
+
[b, !e.hidden]
|
|
80
92
|
]);
|
|
81
93
|
}
|
|
82
94
|
});
|
|
83
95
|
export {
|
|
84
|
-
|
|
96
|
+
D as default
|
|
85
97
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CuiPagination.vue.d.ts","sourceRoot":"","sources":["../../src/components/CuiPagination.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CuiPagination.vue.d.ts","sourceRoot":"","sources":["../../src/components/CuiPagination.vue"],"names":[],"mappings":"AA+VA,OAAO,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAIvG,MAAM,WAAW,oBAAoB;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;CACnB;AAED,MAAM,WAAW,kBAAmB,SAAQ,aAAa,EAAE,cAAc,EAAE,aAAa;IACtF,oCAAoC;IACpC,IAAI,CAAC,EAAE,oBAAoB,CAAC;IAC5B,4CAA4C;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2CAA2C;IAC3C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8CAA8C;IAC9C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gDAAgD;IAChD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oCAAoC;IACpC,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,iCAAiC;IACjC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iDAAiD;IACjD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;;;;;;;;;;;oBAPkB,MAAM,EAAE;iBAEX,OAAO;cAEV,OAAO;gBAEL,MAAM;;AAmUrB,wBAQG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./CuiPagination.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-fd425fec"]]);
|
|
5
5
|
export {
|
|
6
6
|
r as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as F, computed as
|
|
1
|
+
import { defineComponent as F, computed as i, withDirectives as L, openBlock as r, createElementBlock as u, normalizeClass as g, toDisplayString as x, unref as T, createCommentVNode as $, createElementVNode as v, createVNode as k, Fragment as B, renderList as U, normalizeStyle as R, vShow as W } from "vue";
|
|
2
2
|
import N from "./CuiIcon.vue.js";
|
|
3
3
|
import Z from "./CuiSelect.vue.js";
|
|
4
4
|
import { clampSize as j } from "../utils/sizing.js";
|
|
@@ -33,46 +33,46 @@ const G = {
|
|
|
33
33
|
},
|
|
34
34
|
emits: ["update:currentPage", "update:perPage"],
|
|
35
35
|
setup(s, { emit: I }) {
|
|
36
|
-
const a = s, f = I, M = ["sm", "md"], m =
|
|
36
|
+
const a = s, f = I, M = ["sm", "md"], m = i(() => j(a.size, M)), n = i(() => {
|
|
37
37
|
var e;
|
|
38
38
|
return a.currentPage ?? ((e = a.meta) == null ? void 0 : e.current_page) ?? 1;
|
|
39
|
-
}), _ =
|
|
39
|
+
}), _ = i(() => {
|
|
40
40
|
var e;
|
|
41
41
|
return a.totalPages ?? ((e = a.meta) == null ? void 0 : e.last_page) ?? 1;
|
|
42
|
-
}), b =
|
|
42
|
+
}), b = i(() => {
|
|
43
43
|
var e;
|
|
44
44
|
return a.perPage ?? ((e = a.meta) == null ? void 0 : e.per_page) ?? 15;
|
|
45
|
-
}), d =
|
|
45
|
+
}), d = i(() => {
|
|
46
46
|
var e;
|
|
47
47
|
return a.total ?? ((e = a.meta) == null ? void 0 : e.total) ?? 0;
|
|
48
|
-
}), E =
|
|
48
|
+
}), E = i(() => {
|
|
49
49
|
var e;
|
|
50
|
-
return ((e = a.meta) == null ? void 0 : e.from) != null ? a.meta.from : d.value === 0 ? 0 : (
|
|
51
|
-
}), O =
|
|
50
|
+
return ((e = a.meta) == null ? void 0 : e.from) != null ? a.meta.from : d.value === 0 ? 0 : (n.value - 1) * b.value + 1;
|
|
51
|
+
}), O = i(() => {
|
|
52
52
|
var e;
|
|
53
|
-
return ((e = a.meta) == null ? void 0 : e.to) != null ? a.meta.to : Math.min(
|
|
54
|
-
}), z =
|
|
55
|
-
const e = _.value, o =
|
|
53
|
+
return ((e = a.meta) == null ? void 0 : e.to) != null ? a.meta.to : Math.min(n.value * b.value, d.value);
|
|
54
|
+
}), z = i(() => n.value <= 1), C = i(() => n.value >= _.value), V = i(() => {
|
|
55
|
+
const e = _.value, o = n.value, t = a.maxButtons;
|
|
56
56
|
if (e <= t + 2)
|
|
57
|
-
return Array.from({ length: e }, (
|
|
57
|
+
return Array.from({ length: e }, (p, w) => w + 1);
|
|
58
58
|
const l = [], c = Math.floor(t / 2);
|
|
59
59
|
let h = Math.max(2, o - c), y = Math.min(e - 1, o + c);
|
|
60
60
|
o <= c + 1 && (y = t), o >= e - c && (h = e - t + 1), l.push(1), h > 2 && l.push("ellipsis");
|
|
61
|
-
for (let
|
|
62
|
-
l.push(
|
|
61
|
+
for (let p = h; p <= y; p++)
|
|
62
|
+
l.push(p);
|
|
63
63
|
return y < e - 1 && l.push("ellipsis"), e > 1 && l.push(e), l;
|
|
64
64
|
});
|
|
65
65
|
function P(e) {
|
|
66
|
-
e < 1 || e > _.value || e ===
|
|
66
|
+
e < 1 || e > _.value || e === n.value || f("update:currentPage", e);
|
|
67
67
|
}
|
|
68
68
|
function A(e) {
|
|
69
69
|
e != null && !Array.isArray(e) && (f("update:perPage", Number(e)), f("update:currentPage", 1));
|
|
70
70
|
}
|
|
71
|
-
const S = q(), D =
|
|
71
|
+
const S = q(), D = i(
|
|
72
72
|
() => a.perPageOptions.map((e) => ({ value: e, label: S.value.pagination.perPage(e) }))
|
|
73
73
|
);
|
|
74
74
|
return (e, o) => L((r(), u("div", {
|
|
75
|
-
class:
|
|
75
|
+
class: g(["cui-pagination", `cui-pagination--${m.value}`])
|
|
76
76
|
}, [
|
|
77
77
|
!s.hideInfo && d.value > 0 ? (r(), u("div", G, x(T(S).pagination.summary({ from: E.value, to: O.value, total: d.value })), 1)) : $("", !0),
|
|
78
78
|
v("div", H, [
|
|
@@ -86,10 +86,11 @@ const G = {
|
|
|
86
86
|
])),
|
|
87
87
|
v("nav", K, [
|
|
88
88
|
v("button", {
|
|
89
|
-
|
|
89
|
+
type: "button",
|
|
90
|
+
class: g(["cui-pagination__btn cui-pagination__btn--nav", { "cui-pagination__btn--disabled": z.value }]),
|
|
90
91
|
disabled: z.value,
|
|
91
92
|
"aria-label": "Previous page",
|
|
92
|
-
onClick: o[0] || (o[0] = (t) => P(
|
|
93
|
+
onClick: o[0] || (o[0] = (t) => P(n.value - 1))
|
|
93
94
|
}, [
|
|
94
95
|
k(N, {
|
|
95
96
|
name: "caret-left",
|
|
@@ -99,25 +100,27 @@ const G = {
|
|
|
99
100
|
(r(!0), u(B, null, U(V.value, (t, l) => (r(), u(B, { key: l }, [
|
|
100
101
|
t === "ellipsis" ? (r(), u("span", X, "...")) : (r(), u("button", {
|
|
101
102
|
key: 1,
|
|
102
|
-
|
|
103
|
-
|
|
103
|
+
type: "button",
|
|
104
|
+
class: g(["cui-pagination__btn", {
|
|
105
|
+
"cui-pagination__btn--active": t === n.value
|
|
104
106
|
}]),
|
|
105
|
-
style: R(t ===
|
|
107
|
+
style: R(t === n.value ? {
|
|
106
108
|
background: `var(--cui-${s.color}-bg)`,
|
|
107
109
|
color: `var(--cui-${s.color})`,
|
|
108
110
|
borderColor: `var(--cui-${s.color}-border)`,
|
|
109
111
|
fontWeight: "600"
|
|
110
112
|
} : {}),
|
|
111
113
|
"aria-label": `Page ${t}`,
|
|
112
|
-
"aria-current": t ===
|
|
114
|
+
"aria-current": t === n.value ? "page" : void 0,
|
|
113
115
|
onClick: (c) => P(t)
|
|
114
116
|
}, x(t), 15, Y))
|
|
115
117
|
], 64))), 128)),
|
|
116
118
|
v("button", {
|
|
117
|
-
|
|
119
|
+
type: "button",
|
|
120
|
+
class: g(["cui-pagination__btn cui-pagination__btn--nav", { "cui-pagination__btn--disabled": C.value }]),
|
|
118
121
|
disabled: C.value,
|
|
119
122
|
"aria-label": "Next page",
|
|
120
|
-
onClick: o[1] || (o[1] = (t) => P(
|
|
123
|
+
onClick: o[1] || (o[1] = (t) => P(n.value + 1))
|
|
121
124
|
}, [
|
|
122
125
|
k(N, {
|
|
123
126
|
name: "caret-right",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CuiPopover.vue.d.ts","sourceRoot":"","sources":["../../src/components/CuiPopover.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CuiPopover.vue.d.ts","sourceRoot":"","sources":["../../src/components/CuiPopover.vue"],"names":[],"mappings":"AA4TA,OAAO,EAAc,KAAK,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAG9E,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAGnF,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,aAAa,CAAC;AAEzE,MAAM,WAAW,eAAgB,SAAQ,aAAa,EAAE,gBAAgB;IACtE,mEAAmE;IACnE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0BAA0B;IAC1B,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAC7B,mCAAmC;IACnC,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,gCAAgC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+BAA+B;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qBAAqB;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,iCAAiC;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kCAAkC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gCAAgC;IAChC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,kCAAkC;IAClC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,oBAAoB;IACpB,OAAO,CAAC,EAAE,UAAU,CAAC;CACtB;AA+TD,QAAA,IAAI,OAAO,IAAU,EAAE,OAAO,IAAU,EAAE,QAAQ,IAAW,EAAE,QAAQ,IAAY,CAAE;AACrF,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GAC5C;IAAE,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GAC3C;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC7C;IAAE,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAiD/C,QAAA,MAAM,eAAe;;;;;;aAtXT,UAAU;;eAlBR,gBAAgB;aAElB,cAAc;eAEZ,MAAM;eAEN,MAAM;aAER,OAAO;cAQN,OAAO;6EAgYlB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAa1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { usePopover as
|
|
3
|
-
import { useClickOutside as
|
|
4
|
-
import
|
|
1
|
+
import { defineComponent as q, useSlots as G, ref as S, watch as E, computed as c, onUnmounted as J, useId as Q, withDirectives as X, openBlock as n, createElementBlock as l, createElementVNode as f, renderSlot as v, createBlock as Y, Teleport as Z, normalizeStyle as g, unref as h, toDisplayString as ee, withModifiers as te, createVNode as oe, createCommentVNode as u, vShow as ie } from "vue";
|
|
2
|
+
import { usePopover as re } from "../composables/usePopover.js";
|
|
3
|
+
import { useClickOutside as ne } from "../composables/useClickOutside.js";
|
|
4
|
+
import ae from "./CuiIcon.vue.js";
|
|
5
5
|
import { useMessages as le } from "../composables/useMessages.js";
|
|
6
|
-
const
|
|
6
|
+
const se = ["aria-labelledby"], ce = {
|
|
7
7
|
key: 0,
|
|
8
8
|
style: {
|
|
9
9
|
display: "flex",
|
|
@@ -12,12 +12,12 @@ const ae = ["aria-labelledby"], ne = {
|
|
|
12
12
|
gap: "calc(0.5rem * var(--cui-density-scale, 1))",
|
|
13
13
|
padding: "calc(0.75rem * var(--cui-density-scale, 1)) calc(0.875rem * var(--cui-density-scale, 1)) calc(0.25rem * var(--cui-density-scale, 1))"
|
|
14
14
|
}
|
|
15
|
-
},
|
|
15
|
+
}, ue = { style: { fontSize: "0.875rem", fontWeight: "600", color: "var(--cui-text-body)" } }, de = ["aria-label"], fe = {
|
|
16
16
|
key: 1,
|
|
17
17
|
style: {
|
|
18
18
|
padding: "0 calc(0.875rem * var(--cui-density-scale, 1)) calc(0.75rem * var(--cui-density-scale, 1))"
|
|
19
19
|
}
|
|
20
|
-
},
|
|
20
|
+
}, be = /* @__PURE__ */ q({
|
|
21
21
|
__name: "CuiPopover",
|
|
22
22
|
props: {
|
|
23
23
|
title: {},
|
|
@@ -35,41 +35,42 @@ const ae = ["aria-labelledby"], ne = {
|
|
|
35
35
|
disabled: { type: Boolean, default: !1 }
|
|
36
36
|
},
|
|
37
37
|
emits: ["update:visible"],
|
|
38
|
-
setup(
|
|
39
|
-
const e =
|
|
38
|
+
setup(s, { emit: M }) {
|
|
39
|
+
const e = s, R = {
|
|
40
40
|
none: "0",
|
|
41
|
-
sm: "0.25rem",
|
|
42
|
-
md: "var(--cui-button-radius, 0.375rem)",
|
|
43
|
-
lg: "0.5rem",
|
|
41
|
+
sm: "var(--cui-radius-sm, 0.25rem)",
|
|
42
|
+
md: "var(--cui-button-radius, var(--cui-radius-md, 0.375rem))",
|
|
43
|
+
lg: "var(--cui-radius-lg, 0.5rem)",
|
|
44
44
|
full: "9999px"
|
|
45
|
-
}, d =
|
|
46
|
-
let
|
|
47
|
-
|
|
45
|
+
}, d = M, b = G(), o = S(!1);
|
|
46
|
+
let a = null, i = null;
|
|
47
|
+
E(
|
|
48
48
|
() => e.visible,
|
|
49
49
|
(t) => {
|
|
50
50
|
t !== void 0 && (o.value = t);
|
|
51
|
-
}
|
|
51
|
+
},
|
|
52
|
+
{ immediate: !0 }
|
|
52
53
|
);
|
|
53
|
-
const { referenceRef:
|
|
54
|
-
placement:
|
|
55
|
-
offsetDistance:
|
|
54
|
+
const { referenceRef: T, floatingRef: w, arrowRef: C, floatingStyles: _, arrowStyle: D, currentSide: B, isPositioned: P } = re({
|
|
55
|
+
placement: c(() => e.placement),
|
|
56
|
+
offsetDistance: c(() => e.offset ?? 10),
|
|
56
57
|
arrow: !e.noArrow
|
|
57
|
-
}),
|
|
58
|
-
|
|
59
|
-
() => [
|
|
58
|
+
}), k = S(null);
|
|
59
|
+
ne(
|
|
60
|
+
() => [k.value, w.value],
|
|
60
61
|
() => {
|
|
61
62
|
o.value && e.trigger === "click" && r();
|
|
62
63
|
}
|
|
63
|
-
),
|
|
64
|
-
typeof document > "u" || (t ? document.addEventListener("keydown",
|
|
65
|
-
});
|
|
64
|
+
), E(o, (t) => {
|
|
65
|
+
typeof document > "u" || (t ? document.addEventListener("keydown", p) : document.removeEventListener("keydown", p));
|
|
66
|
+
}, { immediate: !0 });
|
|
66
67
|
function m() {
|
|
67
|
-
e.disabled || (i && (clearTimeout(i), i = null), e.showDelay > 0 ?
|
|
68
|
+
e.disabled || (i && (clearTimeout(i), i = null), e.showDelay > 0 ? a = setTimeout(() => {
|
|
68
69
|
o.value = !0, d("update:visible", !0);
|
|
69
70
|
}, e.showDelay) : (o.value = !0, d("update:visible", !0)));
|
|
70
71
|
}
|
|
71
72
|
function r() {
|
|
72
|
-
|
|
73
|
+
a && (clearTimeout(a), a = null), e.hideDelay > 0 ? i = setTimeout(() => {
|
|
73
74
|
o.value = !1, d("update:visible", !1);
|
|
74
75
|
}, e.hideDelay) : (o.value = !1, d("update:visible", !1));
|
|
75
76
|
}
|
|
@@ -85,13 +86,13 @@ const ae = ["aria-labelledby"], ne = {
|
|
|
85
86
|
function L() {
|
|
86
87
|
(e.trigger === "focus" || e.trigger === "hover-focus") && m();
|
|
87
88
|
}
|
|
88
|
-
function
|
|
89
|
+
function $() {
|
|
89
90
|
(e.trigger === "focus" || e.trigger === "hover-focus") && r();
|
|
90
91
|
}
|
|
91
|
-
function
|
|
92
|
+
function V() {
|
|
92
93
|
e.trigger === "click" && I();
|
|
93
94
|
}
|
|
94
|
-
function
|
|
95
|
+
function p(t) {
|
|
95
96
|
t.key === "Escape" && o.value && r();
|
|
96
97
|
}
|
|
97
98
|
function A() {
|
|
@@ -100,15 +101,15 @@ const ae = ["aria-labelledby"], ne = {
|
|
|
100
101
|
function H() {
|
|
101
102
|
(e.trigger === "hover" || e.trigger === "hover-focus") && r();
|
|
102
103
|
}
|
|
103
|
-
|
|
104
|
-
|
|
104
|
+
J(() => {
|
|
105
|
+
a && clearTimeout(a), i && clearTimeout(i), typeof document < "u" && document.removeEventListener("keydown", p);
|
|
105
106
|
});
|
|
106
|
-
const
|
|
107
|
+
const y = () => !!(e.title || b.header), N = () => !!b.footer, x = `cui-popover-title-${Q()}`, W = c(() => {
|
|
107
108
|
const t = {
|
|
108
109
|
zIndex: "9998",
|
|
109
110
|
background: "var(--cui-surface-base)",
|
|
110
111
|
border: "1px solid var(--cui-border)",
|
|
111
|
-
borderRadius:
|
|
112
|
+
borderRadius: R[e.rounded],
|
|
112
113
|
boxShadow: "0 8px 24px -4px rgba(0, 0, 0, 0.12), 0 2px 8px -2px rgba(0, 0, 0, 0.08)",
|
|
113
114
|
minWidth: "12rem",
|
|
114
115
|
maxWidth: "24rem",
|
|
@@ -117,56 +118,63 @@ const ae = ["aria-labelledby"], ne = {
|
|
|
117
118
|
overflow: "hidden"
|
|
118
119
|
};
|
|
119
120
|
return e.width && (t.width = e.width), t;
|
|
120
|
-
}), j =
|
|
121
|
+
}), j = c(() => {
|
|
122
|
+
const t = {};
|
|
123
|
+
return P.value || (t.opacity = "0", t.pointerEvents = "none", t.animation = "none"), t;
|
|
124
|
+
}), O = c(() => ({
|
|
121
125
|
width: "8px",
|
|
122
126
|
height: "8px",
|
|
123
127
|
background: "var(--cui-surface-base)",
|
|
124
128
|
border: "1px solid var(--cui-border)",
|
|
125
129
|
transform: "rotate(45deg)",
|
|
126
130
|
position: "absolute",
|
|
127
|
-
...
|
|
128
|
-
})),
|
|
131
|
+
...D.value
|
|
132
|
+
})), U = {
|
|
129
133
|
top: "polygon(0% 0%, 100% 0%, 100% 100%)",
|
|
130
134
|
bottom: "polygon(0% 0%, 0% 100%, 100% 100%)",
|
|
131
135
|
left: "polygon(0% 0%, 100% 0%, 100% 100%)",
|
|
132
136
|
right: "polygon(0% 0%, 0% 100%, 100% 100%)"
|
|
133
137
|
}, K = le();
|
|
134
|
-
return (t,
|
|
138
|
+
return (t, ve) => X((n(), l("div", {
|
|
139
|
+
class: "cui-popover",
|
|
135
140
|
ref_key: "wrapperRef",
|
|
136
|
-
ref:
|
|
141
|
+
ref: k,
|
|
137
142
|
style: { display: "inline-flex" },
|
|
138
143
|
onMouseenter: z,
|
|
139
144
|
onMouseleave: F,
|
|
140
145
|
onFocusin: L,
|
|
141
|
-
onFocusout:
|
|
142
|
-
onClick:
|
|
146
|
+
onFocusout: $,
|
|
147
|
+
onClick: V
|
|
143
148
|
}, [
|
|
144
|
-
|
|
149
|
+
f("div", {
|
|
145
150
|
ref_key: "referenceRef",
|
|
146
|
-
ref:
|
|
151
|
+
ref: T,
|
|
147
152
|
style: { display: "inline-flex" }
|
|
148
153
|
}, [
|
|
149
|
-
|
|
154
|
+
v(t.$slots, "default")
|
|
150
155
|
], 512),
|
|
151
|
-
(
|
|
152
|
-
o.value ? (
|
|
156
|
+
(n(), Y(Z, { to: "body" }, [
|
|
157
|
+
o.value ? (n(), l("div", {
|
|
153
158
|
key: 0,
|
|
154
159
|
ref_key: "floatingRef",
|
|
155
|
-
ref:
|
|
156
|
-
|
|
160
|
+
ref: w,
|
|
161
|
+
class: "cui-popover__panel",
|
|
162
|
+
style: g({ ...h(_), ...W.value, ...j.value }),
|
|
157
163
|
role: "dialog",
|
|
158
|
-
"aria-labelledby": x
|
|
164
|
+
"aria-labelledby": y() ? x : void 0,
|
|
159
165
|
onMouseenter: A,
|
|
160
166
|
onMouseleave: H
|
|
161
167
|
}, [
|
|
162
|
-
|
|
163
|
-
f(
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
},
|
|
168
|
+
y() ? (n(), l("div", ce, [
|
|
169
|
+
f("div", {
|
|
170
|
+
id: x,
|
|
171
|
+
style: { display: "contents" }
|
|
172
|
+
}, [
|
|
173
|
+
v(t.$slots, "header", {}, () => [
|
|
174
|
+
f("span", ue, ee(s.title), 1)
|
|
175
|
+
])
|
|
168
176
|
]),
|
|
169
|
-
|
|
177
|
+
s.closable ? (n(), l("button", {
|
|
170
178
|
key: 0,
|
|
171
179
|
type: "button",
|
|
172
180
|
style: {
|
|
@@ -184,44 +192,44 @@ const ae = ["aria-labelledby"], ne = {
|
|
|
184
192
|
marginTop: "calc(-0.0625rem * var(--cui-density-scale, 1))",
|
|
185
193
|
marginRight: "calc(-0.125rem * var(--cui-density-scale, 1))"
|
|
186
194
|
},
|
|
187
|
-
"aria-label":
|
|
188
|
-
onClick:
|
|
195
|
+
"aria-label": h(K).close,
|
|
196
|
+
onClick: te(r, ["stop"])
|
|
189
197
|
}, [
|
|
190
|
-
|
|
198
|
+
oe(ae, {
|
|
191
199
|
name: "x",
|
|
192
200
|
size: "0.8125rem"
|
|
193
201
|
})
|
|
194
|
-
], 8,
|
|
202
|
+
], 8, de)) : u("", !0)
|
|
195
203
|
])) : u("", !0),
|
|
196
|
-
|
|
204
|
+
f("div", {
|
|
197
205
|
style: g({
|
|
198
|
-
padding:
|
|
206
|
+
padding: y() ? "calc(0.25rem * var(--cui-density-scale, 1)) calc(0.875rem * var(--cui-density-scale, 1)) calc(0.75rem * var(--cui-density-scale, 1))" : "calc(0.75rem * var(--cui-density-scale, 1)) calc(0.875rem * var(--cui-density-scale, 1))",
|
|
199
207
|
fontSize: "0.875rem",
|
|
200
208
|
lineHeight: "1.55",
|
|
201
209
|
color: "var(--cui-text-secondary)"
|
|
202
210
|
})
|
|
203
211
|
}, [
|
|
204
|
-
|
|
212
|
+
v(t.$slots, "content")
|
|
205
213
|
], 4),
|
|
206
|
-
N
|
|
207
|
-
|
|
214
|
+
N() ? (n(), l("div", fe, [
|
|
215
|
+
v(t.$slots, "footer")
|
|
208
216
|
])) : u("", !0),
|
|
209
|
-
|
|
217
|
+
s.noArrow ? u("", !0) : (n(), l("div", {
|
|
210
218
|
key: 2,
|
|
211
219
|
ref_key: "arrowRef",
|
|
212
|
-
ref:
|
|
220
|
+
ref: C,
|
|
213
221
|
style: g({
|
|
214
|
-
...
|
|
215
|
-
clipPath:
|
|
222
|
+
...O.value,
|
|
223
|
+
clipPath: U[h(B)] || void 0
|
|
216
224
|
})
|
|
217
225
|
}, null, 4))
|
|
218
|
-
], 44,
|
|
226
|
+
], 44, se)) : u("", !0)
|
|
219
227
|
]))
|
|
220
228
|
], 544)), [
|
|
221
|
-
[
|
|
229
|
+
[ie, !s.hidden]
|
|
222
230
|
]);
|
|
223
231
|
}
|
|
224
232
|
});
|
|
225
233
|
export {
|
|
226
|
-
|
|
234
|
+
be as default
|
|
227
235
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { HideableProps, ColorableProps, DisableableProps } from "../types/common";
|
|
2
|
-
export interface CuiRadioProps extends HideableProps, ColorableProps, DisableableProps {
|
|
1
|
+
import type { HideableProps, ColorableProps, DisableableProps, NativeControlProps } from "../types/common";
|
|
2
|
+
export interface CuiRadioProps extends NativeControlProps, HideableProps, ColorableProps, DisableableProps {
|
|
3
3
|
/** The value this radio represents */
|
|
4
4
|
value: string | number | boolean;
|
|
5
5
|
/** v-model binding (standalone mode) */
|
|
@@ -8,8 +8,6 @@ export interface CuiRadioProps extends HideableProps, ColorableProps, Disableabl
|
|
|
8
8
|
label?: string;
|
|
9
9
|
/** Description text (or use #description slot) */
|
|
10
10
|
description?: string;
|
|
11
|
-
/** Name attribute (standalone mode) */
|
|
12
|
-
name?: string;
|
|
13
11
|
/** Readonly state */
|
|
14
12
|
readonly?: boolean;
|
|
15
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CuiRadio.vue.d.ts","sourceRoot":"","sources":["../../src/components/CuiRadio.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CuiRadio.vue.d.ts","sourceRoot":"","sources":["../../src/components/CuiRadio.vue"],"names":[],"mappings":"AAyVA,OAAO,KAAK,EAAY,aAAa,EAAE,cAAc,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAGrH,MAAM,WAAW,aAAc,SAAQ,kBAAkB,EAAE,aAAa,EAAE,cAAc,EAAE,gBAAgB;IACxG,sCAAsC;IACtC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;IACjC,wCAAwC;IACxC,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;IACvC,uCAAuC;IACvC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kDAAkD;IAClD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qBAAqB;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAuOD,QAAA,IAAI,OAAO,IAAU,EAAE,OAAO,IAAU,EAAE,OAAO,IAAW,CAAE;AAC9D,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GAC5C;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GAC5C;IAAE,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AA+BnD,QAAA,MAAM,eAAe;;;;;;;;cA3QR,OAAO;;;6EAoRlB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAa1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./CuiRadio.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-bfe1e595"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|