cisse-vue-ui 0.5.22 → 0.5.23
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/{Button.vue_vue_type_script_setup_true_lang-DKE8elsf.js → Button.vue_vue_type_script_setup_true_lang-CD9QPOeU.js} +13 -4
- package/dist/Button.vue_vue_type_script_setup_true_lang-CD9QPOeU.js.map +1 -0
- package/dist/{Button.vue_vue_type_script_setup_true_lang-DrGM65ny.cjs → Button.vue_vue_type_script_setup_true_lang-Cev21KGJ.cjs} +13 -4
- package/dist/Button.vue_vue_type_script_setup_true_lang-Cev21KGJ.cjs.map +1 -0
- package/dist/{Combobox.vue_vue_type_script_setup_true_lang-FdUrjmSG.cjs → Combobox.vue_vue_type_script_setup_true_lang-D9TIId4E.cjs} +233 -101
- package/dist/Combobox.vue_vue_type_script_setup_true_lang-D9TIId4E.cjs.map +1 -0
- package/dist/{Combobox.vue_vue_type_script_setup_true_lang-DhcLb6DX.js → Combobox.vue_vue_type_script_setup_true_lang-DCLKWzhc.js} +234 -102
- package/dist/Combobox.vue_vue_type_script_setup_true_lang-DCLKWzhc.js.map +1 -0
- package/dist/{ConfirmDialog.vue_vue_type_script_setup_true_lang-DXb9wQQv.cjs → ConfirmDialog.vue_vue_type_script_setup_true_lang-CwHYxBhR.cjs} +76 -29
- package/dist/ConfirmDialog.vue_vue_type_script_setup_true_lang-CwHYxBhR.cjs.map +1 -0
- package/dist/{ConfirmDialog.vue_vue_type_script_setup_true_lang-CNucAMQg.js → ConfirmDialog.vue_vue_type_script_setup_true_lang-Dm4kLAnr.js} +77 -30
- package/dist/ConfirmDialog.vue_vue_type_script_setup_true_lang-Dm4kLAnr.js.map +1 -0
- package/dist/{DarkModeToggle.vue_vue_type_script_setup_true_lang-BoB48313.cjs → DarkModeToggle.vue_vue_type_script_setup_true_lang-CSxGvdSP.cjs} +76 -44
- package/dist/DarkModeToggle.vue_vue_type_script_setup_true_lang-CSxGvdSP.cjs.map +1 -0
- package/dist/{DarkModeToggle.vue_vue_type_script_setup_true_lang-43fxlbro.js → DarkModeToggle.vue_vue_type_script_setup_true_lang-D1Q43mhJ.js} +76 -44
- package/dist/DarkModeToggle.vue_vue_type_script_setup_true_lang-D1Q43mhJ.js.map +1 -0
- package/dist/{Dropdown.vue_vue_type_script_setup_true_lang-DKxcVBKu.cjs → Dropdown.vue_vue_type_script_setup_true_lang-DNeh9Gi-.cjs} +32 -15
- package/dist/Dropdown.vue_vue_type_script_setup_true_lang-DNeh9Gi-.cjs.map +1 -0
- package/dist/{Dropdown.vue_vue_type_script_setup_true_lang-C3pr8BwC.js → Dropdown.vue_vue_type_script_setup_true_lang-DXV811zB.js} +32 -15
- package/dist/Dropdown.vue_vue_type_script_setup_true_lang-DXV811zB.js.map +1 -0
- package/dist/{PageLayout.vue_vue_type_script_setup_true_lang-D22uNeS1.cjs → PageLayout.vue_vue_type_script_setup_true_lang-C0YzyJnK.cjs} +2 -2
- package/dist/{PageLayout.vue_vue_type_script_setup_true_lang-D22uNeS1.cjs.map → PageLayout.vue_vue_type_script_setup_true_lang-C0YzyJnK.cjs.map} +1 -1
- package/dist/{PageLayout.vue_vue_type_script_setup_true_lang-kT7np2ir.js → PageLayout.vue_vue_type_script_setup_true_lang-ClzYGS8h.js} +2 -2
- package/dist/{PageLayout.vue_vue_type_script_setup_true_lang-kT7np2ir.js.map → PageLayout.vue_vue_type_script_setup_true_lang-ClzYGS8h.js.map} +1 -1
- package/dist/components/core/AccordionItem.vue.d.ts +2 -0
- package/dist/components/core/Dropdown.vue.d.ts +2 -0
- package/dist/components/core/Popover.vue.d.ts +2 -0
- package/dist/components/core/Tooltip.vue.d.ts +2 -0
- package/dist/components/core/index.cjs +3 -3
- package/dist/components/core/index.js +3 -3
- package/dist/components/core/index.test.d.ts +1 -0
- package/dist/components/feedback/LoadingSpinner.vue.d.ts +6 -1
- package/dist/components/feedback/Modal.vue.d.ts +8 -2
- package/dist/components/feedback/index.cjs +2 -2
- package/dist/components/feedback/index.js +2 -2
- package/dist/components/feedback/index.test.d.ts +1 -0
- package/dist/components/form/Checkbox.vue.d.ts +2 -0
- package/dist/components/form/DatePicker.vue.d.ts +2 -0
- package/dist/components/form/FormHelp.vue.d.ts +2 -0
- package/dist/components/form/Switch.vue.d.ts +2 -0
- package/dist/components/form/index.cjs +2 -2
- package/dist/components/form/index.js +2 -2
- package/dist/components/form/index.test.d.ts +1 -0
- package/dist/components/index.cjs +7 -7
- package/dist/components/index.js +7 -7
- package/dist/components/index.test.d.ts +1 -0
- package/dist/components/layout/index.cjs +1 -1
- package/dist/components/layout/index.js +1 -1
- package/dist/components/layout/index.test.d.ts +1 -0
- package/dist/components/type/index.test.d.ts +1 -0
- package/dist/composables/index.cjs +6 -0
- package/dist/composables/index.cjs.map +1 -1
- package/dist/composables/index.d.ts +2 -0
- package/dist/composables/index.js +6 -0
- package/dist/composables/index.js.map +1 -1
- package/dist/composables/index.test.d.ts +1 -0
- package/dist/composables/useDarkMode.test.d.ts +1 -0
- package/dist/composables/useDropdown.test.d.ts +1 -0
- package/dist/composables/useExportCSV.test.d.ts +1 -0
- package/dist/composables/useFocusTrap.d.ts +41 -0
- package/dist/composables/useFocusTrap.test.d.ts +1 -0
- package/dist/composables/useId.d.ts +42 -0
- package/dist/composables/useId.test.d.ts +1 -0
- package/dist/composables/useModal.d.ts +1 -1
- package/dist/composables/useModal.test.d.ts +1 -0
- package/dist/{index-DZYqrXV0.js → index-BMoLBt6A.js} +8 -8
- package/dist/index-BMoLBt6A.js.map +1 -0
- package/dist/{index-Dghdw1yo.js → index-CJwlO351.js} +18 -9
- package/dist/index-CJwlO351.js.map +1 -0
- package/dist/{index-D7HVSFi2.cjs → index-CUNU12xk.cjs} +17 -8
- package/dist/index-CUNU12xk.cjs.map +1 -0
- package/dist/{index-DjEv91o4.cjs → index-DwFvFW-3.cjs} +8 -8
- package/dist/index-DwFvFW-3.cjs.map +1 -0
- package/dist/index.cjs +14 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +14 -8
- package/dist/index.js.map +1 -1
- package/dist/index.test.d.ts +1 -0
- package/dist/types/form.d.ts +4 -0
- package/dist/types/index.test.d.ts +1 -0
- package/dist/useFocusTrap-AnlJsihM.js +120 -0
- package/dist/useFocusTrap-AnlJsihM.js.map +1 -0
- package/dist/useFocusTrap-kcxO8AeU.cjs +119 -0
- package/dist/useFocusTrap-kcxO8AeU.cjs.map +1 -0
- package/dist/useId-nxrBaIC9.cjs +25 -0
- package/dist/useId-nxrBaIC9.cjs.map +1 -0
- package/dist/useId-xeHj7rkg.js +26 -0
- package/dist/useId-xeHj7rkg.js.map +1 -0
- package/dist/useToast-Bk60GArg.cjs.map +1 -1
- package/dist/useToast-ina5g3mj.js.map +1 -1
- package/package.json +9 -8
- package/dist/Button.vue_vue_type_script_setup_true_lang-DKE8elsf.js.map +0 -1
- package/dist/Button.vue_vue_type_script_setup_true_lang-DrGM65ny.cjs.map +0 -1
- package/dist/Combobox.vue_vue_type_script_setup_true_lang-DhcLb6DX.js.map +0 -1
- package/dist/Combobox.vue_vue_type_script_setup_true_lang-FdUrjmSG.cjs.map +0 -1
- package/dist/ConfirmDialog.vue_vue_type_script_setup_true_lang-CNucAMQg.js.map +0 -1
- package/dist/ConfirmDialog.vue_vue_type_script_setup_true_lang-DXb9wQQv.cjs.map +0 -1
- package/dist/DarkModeToggle.vue_vue_type_script_setup_true_lang-43fxlbro.js.map +0 -1
- package/dist/DarkModeToggle.vue_vue_type_script_setup_true_lang-BoB48313.cjs.map +0 -1
- package/dist/Dropdown.vue_vue_type_script_setup_true_lang-C3pr8BwC.js.map +0 -1
- package/dist/Dropdown.vue_vue_type_script_setup_true_lang-DKxcVBKu.cjs.map +0 -1
- package/dist/index-D7HVSFi2.cjs.map +0 -1
- package/dist/index-DZYqrXV0.js.map +0 -1
- package/dist/index-Dghdw1yo.js.map +0 -1
- package/dist/index-DjEv91o4.cjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Generates a unique ID for accessibility relationships (aria-labelledby, aria-describedby, etc.)
|
|
4
|
+
* Pattern: cisse-{prefix}-{counter}
|
|
5
|
+
*/
|
|
6
|
+
export declare function generateId(prefix?: string): string;
|
|
7
|
+
/**
|
|
8
|
+
* Resets the ID counter (useful for testing)
|
|
9
|
+
*/
|
|
10
|
+
export declare function resetIdCounter(): void;
|
|
11
|
+
export interface UseIdOptions {
|
|
12
|
+
/** Prefix for the generated ID */
|
|
13
|
+
prefix?: string;
|
|
14
|
+
/** Custom ID to use instead of generating one */
|
|
15
|
+
id?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface UseIdReturn {
|
|
18
|
+
/** The unique ID (reactive) */
|
|
19
|
+
id: Ref<string>;
|
|
20
|
+
/** Generate a related ID with a suffix (e.g., id-label, id-description) */
|
|
21
|
+
related: (suffix: string) => string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Composable for generating unique IDs for accessibility relationships
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```vue
|
|
28
|
+
* <script setup>
|
|
29
|
+
* const { id, related } = useId({ prefix: 'modal' })
|
|
30
|
+
* // id.value = 'cisse-modal-1'
|
|
31
|
+
* // related('title') = 'cisse-modal-1-title'
|
|
32
|
+
* // related('description') = 'cisse-modal-1-description'
|
|
33
|
+
* </script>
|
|
34
|
+
*
|
|
35
|
+
* <template>
|
|
36
|
+
* <div :id="id" role="dialog" :aria-labelledby="related('title')">
|
|
37
|
+
* <h2 :id="related('title')">Modal Title</h2>
|
|
38
|
+
* </div>
|
|
39
|
+
* </template>
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
export declare function useId(options?: UseIdOptions): UseIdReturn;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -57,4 +57,4 @@ export declare function useModal<T = unknown>(options?: {
|
|
|
57
57
|
* modals.delete.close()
|
|
58
58
|
* ```
|
|
59
59
|
*/
|
|
60
|
-
export declare function useModals<T extends Record<string, UseModalReturn<
|
|
60
|
+
export declare function useModals<T extends Record<string, UseModalReturn<any>>>(modals: T): T;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { o as _sfc_main, p as _sfc_main$1, d as _sfc_main$3, f as _sfc_main$4, n as _sfc_main$8, _ as _sfc_main$a, j as _sfc_main$d, r as _sfc_main$h, m as _sfc_main$k, b as _sfc_main$w, l as _sfc_main$D, c as _sfc_main$G, i as _sfc_main$K, h as _sfc_main$M, e as _sfc_main$N, a as _sfc_main$O, g as _sfc_main$Q, q as _sfc_main$S, k as _sfc_main$V } from "./DarkModeToggle.vue_vue_type_script_setup_true_lang-
|
|
2
|
-
import { a as _sfc_main$l, _ as _sfc_main$v } from "./Dropdown.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { o as _sfc_main, p as _sfc_main$1, d as _sfc_main$3, f as _sfc_main$4, n as _sfc_main$8, _ as _sfc_main$a, j as _sfc_main$d, r as _sfc_main$h, m as _sfc_main$k, b as _sfc_main$w, l as _sfc_main$D, c as _sfc_main$G, i as _sfc_main$K, h as _sfc_main$M, e as _sfc_main$N, a as _sfc_main$O, g as _sfc_main$Q, q as _sfc_main$S, k as _sfc_main$V } from "./DarkModeToggle.vue_vue_type_script_setup_true_lang-D1Q43mhJ.js";
|
|
2
|
+
import { a as _sfc_main$l, _ as _sfc_main$v } from "./Dropdown.vue_vue_type_script_setup_true_lang-DXV811zB.js";
|
|
3
3
|
import { e as _sfc_main$5, d as _sfc_main$7, c as _sfc_main$j, b as _sfc_main$A, _ as _sfc_main$J, a as _sfc_main$R } from "./BadgeType.vue_vue_type_script_setup_true_lang-CnB5eNEM.js";
|
|
4
|
-
import { _ as _sfc_main$9, b as _sfc_main$b, c as _sfc_main$t, a as _sfc_main$P } from "./Button.vue_vue_type_script_setup_true_lang-
|
|
5
|
-
import { j as _sfc_main$e, l as _sfc_main$f, g as _sfc_main$i, h as _sfc_main$n, d as _sfc_main$o, a as _sfc_main$p, b as _sfc_main$q, _ as _sfc_main$r, c as _sfc_main$s, k as _sfc_main$E, i as _sfc_main$F, e as _sfc_main$H, S as Slider, f as _sfc_main$L } from "./Combobox.vue_vue_type_script_setup_true_lang-
|
|
6
|
-
import { _ as _sfc_main$c } from "./index-
|
|
7
|
-
import { e as _sfc_main$2, j as _sfc_main$g, f as _sfc_main$m, _ as _sfc_main$u, a as _sfc_main$x, c as _sfc_main$y, d as _sfc_main$z, b as _sfc_main$C, P as Progress, i as _sfc_main$I, g as _sfc_main$T, h as _sfc_main$U } from "./ConfirmDialog.vue_vue_type_script_setup_true_lang-
|
|
8
|
-
import { _ as _sfc_main$6, a as _sfc_main$B } from "./PageLayout.vue_vue_type_script_setup_true_lang-
|
|
4
|
+
import { _ as _sfc_main$9, b as _sfc_main$b, c as _sfc_main$t, a as _sfc_main$P } from "./Button.vue_vue_type_script_setup_true_lang-CD9QPOeU.js";
|
|
5
|
+
import { j as _sfc_main$e, l as _sfc_main$f, g as _sfc_main$i, h as _sfc_main$n, d as _sfc_main$o, a as _sfc_main$p, b as _sfc_main$q, _ as _sfc_main$r, c as _sfc_main$s, k as _sfc_main$E, i as _sfc_main$F, e as _sfc_main$H, S as Slider, f as _sfc_main$L } from "./Combobox.vue_vue_type_script_setup_true_lang-DCLKWzhc.js";
|
|
6
|
+
import { _ as _sfc_main$c } from "./index-CJwlO351.js";
|
|
7
|
+
import { e as _sfc_main$2, j as _sfc_main$g, f as _sfc_main$m, _ as _sfc_main$u, a as _sfc_main$x, c as _sfc_main$y, d as _sfc_main$z, b as _sfc_main$C, P as Progress, i as _sfc_main$I, g as _sfc_main$T, h as _sfc_main$U } from "./ConfirmDialog.vue_vue_type_script_setup_true_lang-Dm4kLAnr.js";
|
|
8
|
+
import { _ as _sfc_main$6, a as _sfc_main$B } from "./PageLayout.vue_vue_type_script_setup_true_lang-ClzYGS8h.js";
|
|
9
9
|
const components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
10
10
|
__proto__: null,
|
|
11
11
|
Accordion: _sfc_main,
|
|
@@ -72,4 +72,4 @@ const components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
|
|
|
72
72
|
export {
|
|
73
73
|
components as c
|
|
74
74
|
};
|
|
75
|
-
//# sourceMappingURL=index-
|
|
75
|
+
//# sourceMappingURL=index-BMoLBt6A.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-BMoLBt6A.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { defineComponent, createElementBlock, openBlock, normalizeClass, createElementVNode, createCommentVNode, toDisplayString, onMounted, nextTick, getCurrentInstance, getCurrentScope, hasInjectionContext, inject, watch, shallowRef,
|
|
2
|
-
|
|
1
|
+
import { defineComponent, computed, createElementBlock, openBlock, normalizeClass, createElementVNode, createCommentVNode, toDisplayString, onMounted, nextTick, getCurrentInstance, getCurrentScope, hasInjectionContext, inject, watch, shallowRef, toValue, watchEffect, unref } from "vue";
|
|
2
|
+
import { u as useId } from "./useId-xeHj7rkg.js";
|
|
3
|
+
const _hoisted_1 = ["id", "checked", "disabled", "indeterminate", "aria-describedby"];
|
|
3
4
|
const _hoisted_2 = {
|
|
4
5
|
key: 0,
|
|
5
6
|
class: "flex flex-col"
|
|
@@ -8,10 +9,7 @@ const _hoisted_3 = {
|
|
|
8
9
|
key: 0,
|
|
9
10
|
class: "text-sm font-medium text-gray-900 dark:text-white"
|
|
10
11
|
};
|
|
11
|
-
const _hoisted_4 =
|
|
12
|
-
key: 1,
|
|
13
|
-
class: "text-sm text-gray-500 dark:text-gray-400"
|
|
14
|
-
};
|
|
12
|
+
const _hoisted_4 = ["id"];
|
|
15
13
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
16
14
|
__name: "Checkbox",
|
|
17
15
|
props: {
|
|
@@ -19,11 +17,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
19
17
|
label: {},
|
|
20
18
|
description: {},
|
|
21
19
|
disabled: { type: Boolean },
|
|
22
|
-
indeterminate: { type: Boolean }
|
|
20
|
+
indeterminate: { type: Boolean },
|
|
21
|
+
id: {}
|
|
23
22
|
},
|
|
24
23
|
emits: ["update:modelValue"],
|
|
25
24
|
setup(__props, { emit: __emit }) {
|
|
25
|
+
const props = __props;
|
|
26
26
|
const emit = __emit;
|
|
27
|
+
const { id: generatedId, related } = useId({ prefix: "checkbox", id: props.id });
|
|
28
|
+
const inputId = computed(() => props.id ?? generatedId.value);
|
|
29
|
+
const descriptionId = computed(() => related("description"));
|
|
27
30
|
const toggle = (event) => {
|
|
28
31
|
const target = event.target;
|
|
29
32
|
emit("update:modelValue", target.checked);
|
|
@@ -33,16 +36,22 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
33
36
|
class: normalizeClass(["inline-flex items-start gap-3", __props.disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer"])
|
|
34
37
|
}, [
|
|
35
38
|
createElementVNode("input", {
|
|
39
|
+
id: inputId.value,
|
|
36
40
|
type: "checkbox",
|
|
37
41
|
checked: __props.modelValue,
|
|
38
42
|
disabled: __props.disabled,
|
|
39
43
|
indeterminate: __props.indeterminate,
|
|
44
|
+
"aria-describedby": __props.description ? descriptionId.value : void 0,
|
|
40
45
|
class: "mt-0.5 size-4 rounded border-gray-300 text-primary/90 focus:ring-2 focus:ring-primary focus:ring-offset-2 disabled:cursor-not-allowed dark:border-gray-600 dark:bg-gray-800 dark:focus:ring-offset-gray-900",
|
|
41
46
|
onChange: toggle
|
|
42
47
|
}, null, 40, _hoisted_1),
|
|
43
48
|
__props.label || __props.description ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
44
49
|
__props.label ? (openBlock(), createElementBlock("span", _hoisted_3, toDisplayString(__props.label), 1)) : createCommentVNode("", true),
|
|
45
|
-
__props.description ? (openBlock(), createElementBlock("span",
|
|
50
|
+
__props.description ? (openBlock(), createElementBlock("span", {
|
|
51
|
+
key: 1,
|
|
52
|
+
id: descriptionId.value,
|
|
53
|
+
class: "text-sm text-gray-500 dark:text-gray-400"
|
|
54
|
+
}, toDisplayString(__props.description), 9, _hoisted_4)) : createCommentVNode("", true)
|
|
46
55
|
])) : createCommentVNode("", true)
|
|
47
56
|
], 2);
|
|
48
57
|
};
|
|
@@ -335,4 +344,4 @@ export {
|
|
|
335
344
|
onClickOutside as o,
|
|
336
345
|
useBreakpoints as u
|
|
337
346
|
};
|
|
338
|
-
//# sourceMappingURL=index-
|
|
347
|
+
//# sourceMappingURL=index-CJwlO351.js.map
|