adminforth 2.4.0-next.7 → 2.4.0-next.71
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/commands/callTsProxy.js +14 -4
- package/commands/cli.js +12 -4
- package/commands/createApp/templates/custom/tsconfig.json.hbs +2 -3
- package/commands/createApp/templates/index.ts.hbs +1 -1
- package/commands/createApp/templates/package.json.hbs +1 -1
- package/commands/createApp/utils.js +39 -13
- package/commands/createCustomComponent/configUpdater.js +25 -21
- package/commands/createCustomComponent/fileGenerator.js +1 -1
- package/commands/createCustomComponent/main.js +2 -1
- package/commands/createCustomComponent/templates/login/beforeLogin.vue.hbs +18 -0
- package/dist/dataConnectors/baseConnector.d.ts.map +1 -1
- package/dist/dataConnectors/baseConnector.js +16 -3
- package/dist/dataConnectors/baseConnector.js.map +1 -1
- package/dist/dataConnectors/mongo.d.ts.map +1 -1
- package/dist/dataConnectors/mongo.js +14 -14
- package/dist/dataConnectors/mongo.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +20 -9
- package/dist/index.js.map +1 -1
- package/dist/modules/codeInjector.d.ts.map +1 -1
- package/dist/modules/codeInjector.js +25 -9
- package/dist/modules/codeInjector.js.map +1 -1
- package/dist/modules/configValidator.d.ts.map +1 -1
- package/dist/modules/configValidator.js +50 -1
- package/dist/modules/configValidator.js.map +1 -1
- package/dist/modules/restApi.d.ts.map +1 -1
- package/dist/modules/restApi.js +45 -2
- package/dist/modules/restApi.js.map +1 -1
- package/dist/modules/styles.d.ts +42 -0
- package/dist/modules/styles.d.ts.map +1 -1
- package/dist/modules/styles.js +44 -2
- package/dist/modules/styles.js.map +1 -1
- package/dist/spa/index.html +1 -1
- package/dist/spa/src/App.vue +14 -5
- package/dist/spa/src/afcl/Button.vue +4 -4
- package/dist/spa/src/afcl/Checkbox.vue +21 -13
- package/dist/spa/src/afcl/CountryFlag.vue +3 -1
- package/dist/spa/src/afcl/Dropzone.vue +4 -2
- package/dist/spa/src/afcl/Input.vue +5 -3
- package/dist/spa/src/afcl/JsonViewer.vue +25 -0
- package/dist/spa/src/afcl/Link.vue +1 -1
- package/dist/spa/src/afcl/LinkButton.vue +1 -1
- package/dist/spa/src/afcl/Select.vue +44 -15
- package/dist/spa/src/afcl/Table.vue +8 -8
- package/dist/spa/src/afcl/Toggle.vue +32 -0
- package/dist/spa/src/afcl/Tooltip.vue +1 -1
- package/dist/spa/src/afcl/index.ts +2 -2
- package/dist/spa/src/components/AcceptModal.vue +4 -4
- package/dist/spa/src/components/ColumnValueInput.vue +21 -2
- package/dist/spa/src/components/ColumnValueInputWrapper.vue +1 -0
- package/dist/spa/src/components/CustomDatePicker.vue +2 -2
- package/dist/spa/src/components/CustomDateRangePicker.vue +1 -0
- package/dist/spa/src/components/Filters.vue +73 -28
- package/dist/spa/src/components/GroupsTable.vue +3 -3
- package/dist/spa/src/components/ResourceForm.vue +61 -26
- package/dist/spa/src/components/ResourceListTable.vue +34 -36
- package/dist/spa/src/components/ResourceListTableVirtual.vue +23 -25
- package/dist/spa/src/components/ShowTable.vue +11 -6
- package/dist/spa/src/components/ValueRenderer.vue +4 -4
- package/dist/spa/src/controls/BoolToggle.vue +34 -0
- package/dist/spa/src/spa_types/core.ts +7 -0
- package/dist/spa/src/stores/core.ts +1 -1
- package/dist/spa/src/types/Back.ts +46 -12
- package/dist/spa/src/types/Common.ts +10 -1
- package/dist/spa/src/types/adapters/CompletionAdapter.ts +25 -0
- package/dist/spa/src/types/adapters/EmailAdapter.ts +29 -0
- package/dist/spa/src/types/adapters/ImageGenerationAdapter.ts +50 -0
- package/dist/spa/src/types/adapters/OAuth2Adapter.ts +34 -0
- package/dist/spa/src/types/adapters/StorageAdapter.ts +73 -0
- package/dist/spa/src/types/adapters/index.ts +5 -0
- package/dist/spa/src/utils.ts +209 -0
- package/dist/spa/src/views/CreateView.vue +3 -3
- package/dist/spa/src/views/EditView.vue +1 -1
- package/dist/spa/src/views/ListView.vue +2 -2
- package/dist/spa/src/views/LoginView.vue +39 -37
- package/dist/spa/src/views/ResourceParent.vue +1 -1
- package/dist/spa/src/views/ShowView.vue +3 -3
- package/dist/types/Back.d.ts +40 -9
- package/dist/types/Back.d.ts.map +1 -1
- package/dist/types/Back.js.map +1 -1
- package/dist/types/Common.d.ts +9 -0
- package/dist/types/Common.d.ts.map +1 -1
- package/dist/types/Common.js.map +1 -1
- package/dist/types/adapters/CompletionAdapter.d.ts +20 -0
- package/dist/types/adapters/CompletionAdapter.d.ts.map +1 -0
- package/dist/types/adapters/CompletionAdapter.js +2 -0
- package/dist/types/adapters/CompletionAdapter.js.map +1 -0
- package/dist/types/adapters/EmailAdapter.d.ts +21 -0
- package/dist/types/adapters/EmailAdapter.d.ts.map +1 -0
- package/dist/types/adapters/EmailAdapter.js +2 -0
- package/dist/types/adapters/EmailAdapter.js.map +1 -0
- package/dist/types/adapters/ImageGenerationAdapter.d.ts +37 -0
- package/dist/types/adapters/ImageGenerationAdapter.d.ts.map +1 -0
- package/dist/types/adapters/ImageGenerationAdapter.js +2 -0
- package/dist/types/adapters/ImageGenerationAdapter.js.map +1 -0
- package/dist/types/adapters/OAuth2Adapter.d.ts +32 -0
- package/dist/types/adapters/OAuth2Adapter.d.ts.map +1 -0
- package/dist/types/adapters/OAuth2Adapter.js +2 -0
- package/dist/types/adapters/OAuth2Adapter.js.map +1 -0
- package/dist/types/adapters/StorageAdapter.d.ts +63 -0
- package/dist/types/adapters/StorageAdapter.d.ts.map +1 -0
- package/dist/types/adapters/StorageAdapter.js +2 -0
- package/dist/types/adapters/StorageAdapter.js.map +1 -0
- package/dist/types/adapters/index.d.ts +6 -0
- package/dist/types/adapters/index.d.ts.map +1 -0
- package/dist/types/adapters/index.js +2 -0
- package/dist/types/adapters/index.js.map +1 -0
- package/package.json +2 -2
- package/dist/spa/src/types/Adapters.ts +0 -213
- package/dist/types/Adapters.d.ts +0 -168
- package/dist/types/Adapters.d.ts.map +0 -1
- package/dist/types/Adapters.js +0 -2
- package/dist/types/Adapters.js.map +0 -1
package/dist/modules/styles.js
CHANGED
|
@@ -51,11 +51,32 @@ export const styles = () => ({
|
|
|
51
51
|
lightButtonsDisabled: "#f3f4f6", // button disabled
|
|
52
52
|
lightButtonsDisabledText: "#f3f4f6", // button disabled text
|
|
53
53
|
lightButtonsIcon: "#333333", // button icon
|
|
54
|
+
lightDropdownButtonsBackground: "#f9fafb", // dropdown button/input background color
|
|
55
|
+
lightDropownButtonsBorder: "#d1d5db", //border color
|
|
56
|
+
lightDropdownButtonsText: "#6b7280", //text color
|
|
57
|
+
lightDropdownButtonsPlaceholderText: "#6b7280", //placeholder text color
|
|
58
|
+
lightDropdownOptionsBackground: "#FFFFFF", //dropdown menu background color
|
|
59
|
+
lightDropdownOptionsHoverBackground: "#f3f4f6", //dropdown menu hover background color
|
|
60
|
+
lightDropdownOptionsText: "#000000", //dropdown menu hover background color
|
|
61
|
+
lightCheckboxBgUnchecked: "alias:lightPrimaryContrast lighten", //checkbox unchecked state bg
|
|
62
|
+
lightCheckboxBgChecked: "alias:lightPrimary", //cheched state bg
|
|
63
|
+
lightCheckboxIconColor: "alias:lightPrimaryContrast lighten", //checked icon color
|
|
64
|
+
lightCheckboxBorderColor: "alias:lightPrimary darken", //border color
|
|
65
|
+
lightFocusRing: "alias:lightPrimary lighten", //focus ring color
|
|
66
|
+
lightTextLabel: "black", //text color of checkbox label
|
|
67
|
+
lightToggleBgUnactive: "#F9FAFB",
|
|
68
|
+
lightToggleBgActive: "alias:lightPrimary darken",
|
|
69
|
+
lightToggleCircleUnactive: "alias:lightPrimary",
|
|
70
|
+
lightToggleCircleActive: "#F9FAFB",
|
|
71
|
+
lightToggleRing: "alias:lightPrimary lighten",
|
|
72
|
+
lightToggleText: "black",
|
|
73
|
+
lightToggleBorderUnactive: "#E5E7EB",
|
|
74
|
+
lightToggleBorderActive: "alias:lightPrimary darken",
|
|
54
75
|
// colors for dark theme
|
|
55
76
|
darkHtml: "#111827",
|
|
56
77
|
darkPrimary: "rgb(130 172 255)", // primary color
|
|
57
78
|
darkPrimaryContrast: "alias:darkPrimary inverse", // primary color contrast
|
|
58
|
-
darkPrimaryOpacity: "
|
|
79
|
+
darkPrimaryOpacity: "alias:darkPrimary opacity:0.2", // primary color opacity
|
|
59
80
|
darkNavbar: "#111827",
|
|
60
81
|
darkNavbarBorder: "#e5e7eb",
|
|
61
82
|
darkNavbarText: "#9ca3af",
|
|
@@ -85,7 +106,28 @@ export const styles = () => ({
|
|
|
85
106
|
darkListBorder: "#444444",
|
|
86
107
|
darkForm: "#111111",
|
|
87
108
|
darkFormBorder: "#222222",
|
|
88
|
-
darkFormHeading: "alias:darkListTableHeading"
|
|
109
|
+
darkFormHeading: "alias:darkListTableHeading",
|
|
110
|
+
darkDropdownButtonsBackground: "alias:darkForm darken",
|
|
111
|
+
darkDropownButtonsBorder: "alias:darkForm lighten",
|
|
112
|
+
darkDropdownButtonsText: "#ffffff",
|
|
113
|
+
darkDropdownButtonsPlaceholderText: "#9ca3af",
|
|
114
|
+
darkDropdownOptionsBackground: "#alias:darkForm lighten",
|
|
115
|
+
darkDropdownOptionsHoverBackground: "alias:darkForm",
|
|
116
|
+
darkDropdownOptionsText: "#9ca3af",
|
|
117
|
+
darkCheckboxBgUnchecked: "alias:darkPrimaryContrast lighten", //checkbox unchecked state bg
|
|
118
|
+
darkCheckboxBgChecked: "alias:darkPrimary", //cheched state bg
|
|
119
|
+
darkCheckboxIconColor: "alias:darkPrimaryContrast lighten", //checked icon color
|
|
120
|
+
darkCheckboxBorderColor: "alias:darkPrimary darken", //border color
|
|
121
|
+
darkFocusRing: "alias:darkPrimary lighten",
|
|
122
|
+
darkTextLabel: "white",
|
|
123
|
+
darkToggleBgUnactive: "#F9FAFB",
|
|
124
|
+
darkToggleBgActive: "alias:darkPrimary darken",
|
|
125
|
+
darkToggleCircleUnactive: "alias:darkPrimary",
|
|
126
|
+
darkToggleCircleActive: "#F9FAFB",
|
|
127
|
+
darkToggleRing: "alias:darkPrimary lighten",
|
|
128
|
+
darkToggleText: "alias:darkPrimaryContrast lighten",
|
|
129
|
+
darkToggleBorderUnactive: "alias:darkPrimary lighten",
|
|
130
|
+
darkToggleBorderActive: "alias:darkPrimary darken",
|
|
89
131
|
},
|
|
90
132
|
boxShadow: {
|
|
91
133
|
customLight: "0 4px 8px rgba(0, 0, 0, 0.1)", // Lighter shadow
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../modules/styles.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,EAAE,CAAC,CAAC;IAC3B,MAAM,EAAE;QACN,SAAS,EAAE,SAAS,EAAE,kBAAkB;QAExC,YAAY,EAAE,SAAS,EAAE,gBAAgB;QACzC,oBAAoB,EAAE,4BAA4B,EAAE,yBAAyB;QAC7E,mBAAmB,EAAE,iCAAiC,EAAE,wBAAwB;QAEhF,WAAW,EAAE,SAAS,EAAE,oBAAoB;QAC5C,iBAAiB,EAAE,kBAAkB,EAAE,SAAS;QAChD,eAAe,EAAE,SAAS,EAAE,cAAc;QAC1C,oBAAoB,EAAE,8BAA8B,EAAE,oBAAoB;QAC1E,qBAAqB,EAAE,8BAA8B,EAAE,qBAAqB;QAC5E,gBAAgB,EAAE,mCAAmC,EAAE,eAAe;QACtE,qBAAqB,EAAE,4BAA4B,EAAE,oBAAoB;QACzE,mBAAmB,EAAE,oBAAoB,EAAE,eAAe;QAE1D,YAAY,EAAE,SAAS,EAAE,qBAAqB;QAC9C,kBAAkB,EAAE,qCAAqC,EAAE,uBAAuB;QAClF,qBAAqB,EAAE,qCAAqC,EAAE,0BAA0B;QACxF,sBAAsB,EAAE,qCAAqC,EAAE,2BAA2B;QAC1F,gBAAgB,EAAE,SAAS,EAAE,yBAAyB;QACtD,qBAAqB,EAAE,+BAA+B,EAAE,+BAA+B;QACvF,sBAAsB,EAAE,+BAA+B,EAAE,gCAAgC;QACzF,mBAAmB,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AE,uBAAuB;QACtD,wBAAwB,EAAE,wBAAwB;QAClD,uBAAuB,EAAE,SAAS;QAClC,kCAAkC,EAAE,SAAS;QAE7C,6BAA6B,EAAE,yBAAyB;QACxD,kCAAkC,EAAE,gBAAgB;QACpD,uBAAuB,EAAE,SAAS;QAElC,uBAAuB,EAAE,mCAAmC,EAAM,6BAA6B;QAC/F,qBAAqB,EAAE,mBAAmB,EAAS,kBAAkB;QACrE,qBAAqB,EAAE,mCAAmC,EAAQ,oBAAoB;QACtF,uBAAuB,EAAE,0BAA0B,EAAG,cAAc;QACpE,aAAa,EAAE,2BAA2B;QAC1C,aAAa,EAAE,OAAO;QAEtB,oBAAoB,EAAE,SAAS;QAC/B,kBAAkB,EAAE,0BAA0B;QAC9C,wBAAwB,EAAE,mBAAmB;QAC7C,sBAAsB,EAAE,SAAS;QACjC,cAAc,EAAE,2BAA2B;QAC3C,cAAc,EAAE,mCAAmC;QACnD,wBAAwB,EAAE,2BAA2B;QACrD,sBAAsB,EAAE,0BAA0B;KACnD;IACD,SAAS,EAAE;QACT,WAAW,EAAE,8BAA8B,EAAE,iBAAiB;QAC9D,YAAY,EAAE,8BAA8B,EAAE,iBAAiB;QAC/D,eAAe,EAAE,8BAA8B,EAAE,iBAAiB;QAClE,mBAAmB,EAAE,8BAA8B,EAAE,iBAAiB;QACtE,kBAAkB,EAAE,8BAA8B,EAAE,iBAAiB;QACrE,sBAAsB,EAAE,8BAA8B,EAAE,iBAAiB;KAE1E;IACD,QAAQ,EAAE;QACR,iBAAiB,EAAE,MAAM;KAC1B;IACD,YAAY,EAAE;QACZ,SAAS,EAAE,OAAO;KACnB;CACF,CAAC,CAAC"}
|
package/dist/spa/index.html
CHANGED
package/dist/spa/src/App.vue
CHANGED
|
@@ -24,7 +24,8 @@
|
|
|
24
24
|
/>
|
|
25
25
|
|
|
26
26
|
<div class="flex items-center ms-3 ">
|
|
27
|
-
<span
|
|
27
|
+
<span
|
|
28
|
+
v-if="!coreStore.config?.singleTheme"
|
|
28
29
|
@click="toggleTheme" class="cursor-pointer flex items-center gap-1 block px-4 py-2 text-sm text-black hover:bg-lightHtml dark:text-darkSidebarTextHover dark:hover:bg-darkHtml dark:hover:text-darkSidebarTextActive" role="menuitem">
|
|
29
30
|
<IconMoonSolid class="w-5 h-5 text-blue-300" v-if="coreStore.theme !== 'dark'" />
|
|
30
31
|
<IconSunSolid class="w-5 h-5 text-yellow-300" v-else />
|
|
@@ -76,11 +77,11 @@
|
|
|
76
77
|
aria-label="Sidebar"
|
|
77
78
|
>
|
|
78
79
|
<div class="h-full px-3 pb-4 overflow-y-auto bg-lightSidebar dark:bg-darkSidebar border-r border-lightSidebarBorder dark:border-darkSidebarBorder">
|
|
79
|
-
<div class="flex ms-2 m-4">
|
|
80
|
-
<img :src="loadFile(coreStore.config?.brandLogo || '@/assets/logo.svg')" :alt="`${ coreStore.config?.brandName } Logo`" class="h-8 me-3" />
|
|
80
|
+
<div class="af-logo-title-wrapper flex ms-2 m-4">
|
|
81
|
+
<img :src="loadFile(coreStore.config?.brandLogo || '@/assets/logo.svg')" :alt="`${ coreStore.config?.brandName } Logo`" class="af-logo h-8 me-3" />
|
|
81
82
|
<span
|
|
82
83
|
v-if="coreStore.config?.showBrandNameInSidebar"
|
|
83
|
-
class="self-center text-lightNavbarText-size font-semibold sm:text-lightNavbarText-size whitespace-nowrap dark:text-darkSidebarText text-lightSidebarText"
|
|
84
|
+
class="af-title self-center text-lightNavbarText-size font-semibold sm:text-lightNavbarText-size whitespace-nowrap dark:text-darkSidebarText text-lightSidebarText"
|
|
84
85
|
>
|
|
85
86
|
{{ coreStore.config?.brandName }}
|
|
86
87
|
</span>
|
|
@@ -121,7 +122,7 @@
|
|
|
121
122
|
</svg>
|
|
122
123
|
</button>
|
|
123
124
|
|
|
124
|
-
<ul :id="`dropdown-example${i}`" role="none" class="pt-1 space-y-1" :class="{ 'hidden': !opened.includes(i) }">
|
|
125
|
+
<ul :id="`dropdown-example${i}`" role="none" class="af-sidebar-dropdown pt-1 space-y-1" :class="{ 'hidden': !opened.includes(i) }">
|
|
125
126
|
<template v-for="(child, j) in item.children" :key="`menu-${i}-${j}`">
|
|
126
127
|
<li>
|
|
127
128
|
<MenuLink :item="child" isChild="true" @click="hideSidebar"/>
|
|
@@ -410,6 +411,14 @@ onBeforeMount(()=>{
|
|
|
410
411
|
document.documentElement.classList.toggle('dark', theme.value === 'dark');
|
|
411
412
|
})
|
|
412
413
|
|
|
414
|
+
watch(() => coreStore.config?.singleTheme, (singleTheme) => {
|
|
415
|
+
if (singleTheme) {
|
|
416
|
+
theme.value = singleTheme;
|
|
417
|
+
window.localStorage.setItem('af__theme', singleTheme);
|
|
418
|
+
document.documentElement.classList.toggle('dark', theme.value === 'dark');
|
|
419
|
+
}
|
|
420
|
+
}, { immediate: true })
|
|
421
|
+
|
|
413
422
|
|
|
414
423
|
const ctaBadge: Ref<(AnnouncementBadgeResponse & { hash: string; }) | null> = computed(() => {
|
|
415
424
|
const badge = coreStore.config?.announcementBadge;
|
|
@@ -2,12 +2,11 @@
|
|
|
2
2
|
<button
|
|
3
3
|
v-bind="$attrs"
|
|
4
4
|
type="submit"
|
|
5
|
-
class="flex items-center justify-center gap-1 text-lightPrimaryContrast bg-lightPrimary dark:bg-darkPrimary hover:brightness-110
|
|
5
|
+
class="afcl-button flex items-center justify-center gap-1 text-lightPrimaryContrast bg-lightPrimary dark:bg-darkPrimary hover:brightness-110
|
|
6
6
|
focus:ring-4 focus:outline-none focus:ring-lightPrimary focus:ring-opacity-50 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:focus:ring-darkPrimary dark:focus:ring-opacity-50"
|
|
7
7
|
:class="{
|
|
8
|
-
'cursor-default': props.disabled,
|
|
9
|
-
'
|
|
10
|
-
'pointer-events-none': props.disabled,
|
|
8
|
+
'cursor-default opacity-50 pointer-events-none': props.disabled,
|
|
9
|
+
'active brightness-200 hover:brightness-150' : props.active
|
|
11
10
|
}"
|
|
12
11
|
>
|
|
13
12
|
<svg v-if="props.loader"
|
|
@@ -22,6 +21,7 @@
|
|
|
22
21
|
const props = defineProps({
|
|
23
22
|
loader: Boolean,
|
|
24
23
|
disabled: Boolean,
|
|
24
|
+
active: Boolean,
|
|
25
25
|
});
|
|
26
26
|
|
|
27
27
|
</script>
|
|
@@ -1,21 +1,29 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="flex items-center h-5" :class="{'opacity-50' : props.disabled}">
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
<div class="afcl-checkbox flex items-center relative h-5" :class="{'opacity-50' : props.disabled}">
|
|
3
|
+
<div class="flex items-center justify-center">
|
|
4
|
+
<input :id="id"
|
|
5
|
+
ref="rememberInput"
|
|
6
|
+
type="checkbox"
|
|
7
|
+
:checked="props.modelValue"
|
|
8
|
+
:disabled="props.disabled"
|
|
9
|
+
@change="$emit('update:modelValue', $event.target.checked)"
|
|
10
|
+
class="peer appearance-none min-w-4 min-h-4 bg-lightCheckboxBgUnchecked border border-lightCheckboxBorderColor rounded-sm checked:bg-lightCheckboxBgChecked
|
|
11
|
+
focus:ring-lightFocusRing dark:focus:ring-darkFocusRing dark:focus:ring-darkFocusRing
|
|
12
|
+
focus:ring-2 dark:bg-darkCheckboxBgUnchecked dark:border-darkCheckboxBorderColor dark:checked:bg-darkCheckboxBgChecked cursor-pointer"
|
|
13
|
+
>
|
|
14
|
+
<div class="pointer-events-none absolute text-lightCheckboxIconColor dark:text-darkCheckboxIconColor leading-none peer-checked:block hidden">
|
|
15
|
+
<IconCheckOutline width="18" height="18" />
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
<label :for="id" class="ms-2 text-sm font-medium text-lightTextLabel dark:text-darkTextLabel">
|
|
19
|
+
<slot></slot>
|
|
20
|
+
</label>
|
|
21
|
+
|
|
11
22
|
</div>
|
|
12
|
-
<label :for="id" class="ms-2 text-sm font-medium text-gray-900 dark:text-gray-300">
|
|
13
|
-
<slot></slot>
|
|
14
|
-
</label>
|
|
15
23
|
</template>
|
|
16
24
|
|
|
17
25
|
<script setup lang="ts">
|
|
18
|
-
|
|
26
|
+
import { IconCheckOutline } from '@iconify-prerendered/vue-flowbite';
|
|
19
27
|
const props = defineProps({
|
|
20
28
|
modelValue: Boolean,
|
|
21
29
|
disabled: Boolean,
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
2
|
+
<div class="aspect-[4/3] w-8 h-6 flex items-center justify-center">
|
|
3
|
+
<component v-if="getFlagComponent(countryCode)" :is="getFlagComponent(countryCode)" class="flag-icon w-full h-full object-contain rounded-sm"/>
|
|
3
4
|
<span v-else-if="countryCode">{{ countryCode }}</span>
|
|
5
|
+
</div>
|
|
4
6
|
</template>
|
|
5
7
|
|
|
6
8
|
<script setup lang="ts">
|
|
@@ -5,13 +5,15 @@
|
|
|
5
5
|
@dragleave.prevent="dragging = false"
|
|
6
6
|
@drop.prevent="dragging = false; doEmit($event.dataTransfer.files)"
|
|
7
7
|
>
|
|
8
|
-
<label :id="id" class="flex flex-col items-center justify-center w-full
|
|
8
|
+
<label :id="id" class="flex flex-col items-center justify-center w-full border-2 border-dashed rounded-lg cursor-pointer dark:hover:bg-gray-800
|
|
9
9
|
hover:bg-gray-100 dark:hover:border-gray-500 dark:hover:bg-gray-600"
|
|
10
10
|
:class="{
|
|
11
11
|
'border-blue-600 dark:border-blue-400': dragging,
|
|
12
12
|
'border-gray-300 dark:border-gray-600': !dragging,
|
|
13
13
|
'bg-blue-50 dark:bg-blue-800': dragging,
|
|
14
14
|
'bg-gray-50 dark:bg-gray-800': !dragging,
|
|
15
|
+
'min-h-32 h-full': props.multiple,
|
|
16
|
+
'h-32': !props.multiple,
|
|
15
17
|
}"
|
|
16
18
|
>
|
|
17
19
|
<div class="flex flex-col items-center justify-center pt-5 pb-6">
|
|
@@ -20,7 +22,7 @@
|
|
|
20
22
|
<svg v-if="!selectedFiles.length" class="w-8 h-8 mb-4 text-gray-500 dark:text-gray-400" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 16">
|
|
21
23
|
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 13h3a3 3 0 0 0 0-6h-.025A5.56 5.56 0 0 0 16 6.5 5.5 5.5 0 0 0 5.207 5.021C5.137 5.017 5.071 5 5 5a4 4 0 0 0 0 8h2.167M10 15V6m0 0L8 8m2-2 2 2"/>
|
|
22
24
|
</svg>
|
|
23
|
-
<div v-else class="flex items-center justify-center w-full mt-1 mb-4">
|
|
25
|
+
<div v-else class="flex items-center justify-center flex-wrap gap-1 w-full mt-1 mb-4">
|
|
24
26
|
<template v-for="file in selectedFiles">
|
|
25
27
|
<p class="text-sm text-gray-500 dark:text-gray-400 flex items-center gap-1">
|
|
26
28
|
<IconFileSolid class="w-5 h-5" />
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
|
|
3
|
-
<div class="flex z-0" :class="{'opacity-50' : readonly}">
|
|
3
|
+
<div class="afcl-input-wrapper flex z-0 relative" :class="{'opacity-50' : readonly}">
|
|
4
4
|
<span
|
|
5
5
|
v-if="$slots.prefix || prefix"
|
|
6
6
|
class="inline-flex items-center px-3 text-sm text-gray-900 bg-gray-200 border border-s-0 border-gray-300 rounded-s-md dark:bg-gray-600 dark:text-gray-400 dark:border-gray-600">
|
|
@@ -15,13 +15,15 @@
|
|
|
15
15
|
@input="$emit('update:modelValue', $event.target?.value)"
|
|
16
16
|
:value="modelValue"
|
|
17
17
|
aria-describedby="helper-text-explanation"
|
|
18
|
-
class="inline-flex bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-0 focus:ring-lightPrimary focus:border-lightPrimary dark:focus:ring-darkPrimary dark:focus:border-darkPrimary
|
|
18
|
+
class="afcl-input inline-flex bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-0 focus:ring-lightPrimary focus:border-lightPrimary dark:focus:ring-darkPrimary dark:focus:border-darkPrimary
|
|
19
19
|
blue-500 focus:border-blue-500 block w-20 p-2.5 dark:bg-gray-700 dark:border-gray-600 placeholder-gray-500 dark:placeholder-gray-400 dark:text-white translate-y-0"
|
|
20
20
|
:class="{'rounded-l-md': !$slots.prefix && !prefix, 'rounded-r-md': !$slots.suffix && !suffix, 'w-full': fullWidth}"
|
|
21
21
|
:disabled="readonly"
|
|
22
22
|
>
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
<div v-if="$slots.rightIcon" class="absolute inset-y-0 right-0 pr-3 flex items-center">
|
|
25
|
+
<slot name="rightIcon" />
|
|
26
|
+
</div>
|
|
25
27
|
<span
|
|
26
28
|
v-if="$slots.suffix || suffix"
|
|
27
29
|
class="inline-flex items-center px-3 text-sm text-gray-900 bg-gray-200 border border-s-0 border-gray-300 rounded-e-md dark:bg-gray-600 dark:text-gray-400 dark:border-gray-600 ">
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<JsonViewer
|
|
3
|
+
class="afcl-json-viewer min-w-[6rem]"
|
|
4
|
+
:value="value"
|
|
5
|
+
:expandDepth="expandDepth"
|
|
6
|
+
copyable
|
|
7
|
+
sort
|
|
8
|
+
:theme="currentTheme"
|
|
9
|
+
/>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script setup lang="ts">
|
|
13
|
+
import { computed } from 'vue'
|
|
14
|
+
import { JsonViewer } from 'vue3-json-viewer'
|
|
15
|
+
import { useCoreStore } from '@/stores/core'
|
|
16
|
+
|
|
17
|
+
defineProps<{
|
|
18
|
+
value: any
|
|
19
|
+
expandDepth?: number
|
|
20
|
+
}>()
|
|
21
|
+
|
|
22
|
+
const coreStore = useCoreStore()
|
|
23
|
+
|
|
24
|
+
const currentTheme = computed(() => (coreStore.theme === 'dark' ? 'dark' : 'light'))
|
|
25
|
+
</script>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<router-link
|
|
3
3
|
v-bind="$attrs"
|
|
4
4
|
:to="to"
|
|
5
|
-
class="text-lightPrimary underline dark:text-darkPrimary hover:no-underline hover:brightness-110
|
|
5
|
+
class="afcl-link text-lightPrimary underline dark:text-darkPrimary hover:no-underline hover:brightness-110
|
|
6
6
|
cursor-pointer"
|
|
7
7
|
>
|
|
8
8
|
<slot></slot>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
v-bind="$attrs"
|
|
4
4
|
:to="props.to"
|
|
5
5
|
type="submit"
|
|
6
|
-
class="flex items-center justify-center gap-1 text-lightPrimaryContrast bg-lightPrimary dark:bg-darkPrimary hover:brightness-110
|
|
6
|
+
class="afcl-link-button flex items-center justify-center gap-1 text-lightPrimaryContrast bg-lightPrimary dark:bg-darkPrimary hover:brightness-110
|
|
7
7
|
focus:ring-4 focus:outline-none focus:ring-lightPrimary focus:ring-opacity-50 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:focus:ring-darkPrimary dark:focus:ring-opacity-50"
|
|
8
8
|
:class="{
|
|
9
9
|
'cursor-default': props.disabled,
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="relative inline-block
|
|
2
|
+
<div class="afcl-select afcl-select-wrapper relative inline-block" ref="internalSelect"
|
|
3
3
|
:class="{'opacity-50': readonly}"
|
|
4
4
|
>
|
|
5
5
|
<div class="relative">
|
|
6
6
|
<input
|
|
7
7
|
ref="inputEl"
|
|
8
8
|
type="text"
|
|
9
|
-
:readonly="readonly"
|
|
9
|
+
:readonly="readonly || searchDisabled"
|
|
10
10
|
v-model="search"
|
|
11
11
|
@click="inputClick"
|
|
12
12
|
@input="inputInput"
|
|
13
|
-
class="block w-full pl-3 pr-10 py-2.5 border border-
|
|
13
|
+
class="block w-full pl-3 pr-10 py-2.5 border border-lightDropownButtonsBorder rounded-md leading-5 bg-lightDropdownButtonsBackground
|
|
14
|
+
placeholder-lightDropdownButtonsPlaceholderText text-lightDropdownButtonsText sm:text-sm transition duration-150 ease-in-out dark:bg-darkDropdownButtonsBackground dark:border-darkDropownButtonsBorder dark:placeholder-darkDropdownButtonsPlaceholderText
|
|
15
|
+
dark:text-darkDropdownButtonsText focus:ring-lightPrimary focus:border-lightPrimary dark:focus:ring-darkPrimary dark:focus:border-darkPrimary"
|
|
14
16
|
autocomplete="off" data-custom="no-autofill"
|
|
15
17
|
:placeholder="
|
|
16
18
|
selectedItems.length && !multiple ? '' : (showDropdown ? $t('Search') : placeholder || $t('Select...'))
|
|
@@ -37,18 +39,19 @@
|
|
|
37
39
|
<teleport to="body" v-if="teleportToBody && showDropdown">
|
|
38
40
|
<div ref="dropdownEl" :style="getDropdownPosition" :class="{'shadow-none': isTop}"
|
|
39
41
|
class="fixed z-[5] w-full bg-white shadow-lg dark:shadow-black dark:bg-gray-700
|
|
40
|
-
dark:border-gray-600 rounded-md py-1 text-base ring-1 ring-black ring-opacity-5 overflow-auto focus:outline-none sm:text-sm max-h-48"
|
|
42
|
+
dark:border-gray-600 rounded-md py-1 text-base ring-1 ring-black ring-opacity-5 overflow-auto focus:outline-none sm:text-sm max-h-48"
|
|
43
|
+
@scroll="handleDropdownScroll">
|
|
41
44
|
<div
|
|
42
45
|
v-for="item in filteredItems"
|
|
43
46
|
:key="item.value"
|
|
44
|
-
class="px-4 py-2 cursor-pointer hover:bg-
|
|
47
|
+
class="px-4 py-2 cursor-pointer hover:bg-lightDropdownOptionsHoverBackground dark:hover:bg-darkDropdownOptionsHoverBackground text-lightDropdownOptionsText dark:text-darkDropdownOptionsText"
|
|
45
48
|
:class="{ 'bg-lightPrimaryOpacity dark:bg-darkPrimaryOpacity': selectedItems.includes(item) }"
|
|
46
49
|
@click="toogleItem(item)"
|
|
47
50
|
>
|
|
48
51
|
<slot name="item" :option="item"></slot>
|
|
49
52
|
<label v-if="!$slots.item" :for="item.value">{{ item.label }}</label>
|
|
50
53
|
</div>
|
|
51
|
-
<div v-if="!filteredItems.length" class="px-4 py-2 cursor-pointer text-
|
|
54
|
+
<div v-if="!filteredItems.length" class="px-4 py-2 cursor-pointer text-lightDropdownOptionsText dark:text-darkDropdownOptionsText">
|
|
52
55
|
{{ options.length ? $t('No results found') : $t('No items here') }}
|
|
53
56
|
</div>
|
|
54
57
|
|
|
@@ -60,22 +63,22 @@
|
|
|
60
63
|
|
|
61
64
|
<div v-if="!teleportToBody && showDropdown" ref="dropdownEl" :style="dropdownStyle" :class="{'shadow-none': isTop}"
|
|
62
65
|
class="absolute z-10 mt-1 w-full bg-white shadow-lg dark:shadow-black dark:bg-gray-700
|
|
63
|
-
dark:border-gray-600 rounded-md py-1 text-base ring-1 ring-black ring-opacity-5 overflow-auto focus:outline-none sm:text-sm max-h-48"
|
|
66
|
+
dark:border-gray-600 rounded-md py-1 text-base ring-1 ring-black ring-opacity-5 overflow-auto focus:outline-none sm:text-sm max-h-48"
|
|
67
|
+
@scroll="handleDropdownScroll">
|
|
64
68
|
<div
|
|
65
69
|
v-for="item in filteredItems"
|
|
66
70
|
:key="item.value"
|
|
67
|
-
class="px-4 py-2 cursor-pointer hover:bg-
|
|
71
|
+
class="px-4 py-2 cursor-pointer hover:bg-lightDropdownOptionsHoverBackground dark:hover:bg-darkDropdownOptionsHoverBackground dark:text-darkDropdownOptionsText"
|
|
68
72
|
:class="{ 'bg-lightPrimaryOpacity dark:bg-darkPrimaryOpacity': selectedItems.includes(item) }"
|
|
69
73
|
@click="toogleItem(item)"
|
|
70
74
|
>
|
|
71
75
|
<slot name="item" :option="item"></slot>
|
|
72
76
|
<label v-if="!$slots.item" :for="item.value">{{ item.label }}</label>
|
|
73
77
|
</div>
|
|
74
|
-
<div v-if="!filteredItems.length" class="px-4 py-2 cursor-pointer text-
|
|
78
|
+
<div v-if="!filteredItems.length" class="px-4 py-2 cursor-pointer text-lightDropdownOptionsText dark:text-darkDropdownOptionsText">
|
|
75
79
|
{{ options.length ? $t('No results found') : $t('No items here') }}
|
|
76
80
|
</div>
|
|
77
|
-
|
|
78
|
-
<div v-if="$slots['extra-item']" class="px-4 py-2 dark:text-gray-400">
|
|
81
|
+
<div v-if="$slots['extra-item']" class="px-4 py-2 dark:text-darkDropdownOptionsText">
|
|
79
82
|
<slot name="extra-item"></slot>
|
|
80
83
|
</div>
|
|
81
84
|
|
|
@@ -111,7 +114,7 @@
|
|
|
111
114
|
</template>
|
|
112
115
|
|
|
113
116
|
<script setup lang="ts">
|
|
114
|
-
import { ref, computed, onMounted, onUnmounted, watch, type Ref } from 'vue';
|
|
117
|
+
import { ref, computed, onMounted, onUnmounted, watch, nextTick, type Ref } from 'vue';
|
|
115
118
|
import { IconCaretDownSolid } from '@iconify-prerendered/vue-flowbite';
|
|
116
119
|
import { useElementSize } from '@vueuse/core'
|
|
117
120
|
|
|
@@ -132,13 +135,17 @@ const props = defineProps({
|
|
|
132
135
|
type: Boolean,
|
|
133
136
|
default: false,
|
|
134
137
|
},
|
|
138
|
+
searchDisabled: {
|
|
139
|
+
type: Boolean,
|
|
140
|
+
default: false,
|
|
141
|
+
},
|
|
135
142
|
teleportToBody: {
|
|
136
143
|
type: Boolean,
|
|
137
144
|
default: false,
|
|
138
145
|
},
|
|
139
146
|
});
|
|
140
147
|
|
|
141
|
-
const emit = defineEmits(['update:modelValue']);
|
|
148
|
+
const emit = defineEmits(['update:modelValue', 'scroll-near-end', 'search']);
|
|
142
149
|
|
|
143
150
|
const search = ref('');
|
|
144
151
|
const showDropdown = ref(false);
|
|
@@ -159,6 +166,9 @@ function inputInput() {
|
|
|
159
166
|
selectedItems.value = [];
|
|
160
167
|
emit('update:modelValue', null);
|
|
161
168
|
}
|
|
169
|
+
if (!props.searchDisabled) {
|
|
170
|
+
emit('search', search.value);
|
|
171
|
+
}
|
|
162
172
|
}
|
|
163
173
|
|
|
164
174
|
function updateFromProps() {
|
|
@@ -176,7 +186,7 @@ function updateFromProps() {
|
|
|
176
186
|
}
|
|
177
187
|
}
|
|
178
188
|
|
|
179
|
-
function inputClick() {
|
|
189
|
+
async function inputClick() {
|
|
180
190
|
if (props.readonly) return;
|
|
181
191
|
// Toggle local dropdown
|
|
182
192
|
showDropdown.value = !showDropdown.value;
|
|
@@ -184,6 +194,11 @@ function inputClick() {
|
|
|
184
194
|
if (!showDropdown.value && !search.value) {
|
|
185
195
|
search.value = '';
|
|
186
196
|
}
|
|
197
|
+
|
|
198
|
+
if(props.teleportToBody){
|
|
199
|
+
await nextTick();
|
|
200
|
+
handleScroll();
|
|
201
|
+
}
|
|
187
202
|
}
|
|
188
203
|
|
|
189
204
|
watch(
|
|
@@ -221,6 +236,15 @@ const handleScroll = () => {
|
|
|
221
236
|
}
|
|
222
237
|
};
|
|
223
238
|
|
|
239
|
+
const handleDropdownScroll = (event: Event) => {
|
|
240
|
+
const target = event.target as HTMLElement;
|
|
241
|
+
const threshold = 10; // pixels from bottom
|
|
242
|
+
|
|
243
|
+
if (target.scrollTop + target.clientHeight >= target.scrollHeight - threshold) {
|
|
244
|
+
emit('scroll-near-end');
|
|
245
|
+
}
|
|
246
|
+
};
|
|
247
|
+
|
|
224
248
|
onMounted(() => {
|
|
225
249
|
updateFromProps();
|
|
226
250
|
|
|
@@ -241,7 +265,12 @@ onMounted(() => {
|
|
|
241
265
|
});
|
|
242
266
|
|
|
243
267
|
const filteredItems = computed(() => {
|
|
244
|
-
|
|
268
|
+
|
|
269
|
+
if (props.searchDisabled) {
|
|
270
|
+
return props.options || [];
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
return (props.options || []).filter((item: any) =>
|
|
245
274
|
item.label.toLowerCase().includes(search.value.toLowerCase())
|
|
246
275
|
);
|
|
247
276
|
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
|
|
3
|
-
<div class="relative overflow-x-auto shadow-md sm:rounded-lg">
|
|
4
|
-
<table class="w-full text-sm text-left rtl:text-right text-gray-500 dark:text-gray-400">
|
|
5
|
-
<thead class="text-xs text-gray-700 uppercase bg-gray-50 dark:bg-gray-700 dark:text-gray-400">
|
|
3
|
+
<div class="afcl-table-container relative overflow-x-auto shadow-md sm:rounded-lg">
|
|
4
|
+
<table class="afcl-table w-full text-sm text-left rtl:text-right text-gray-500 dark:text-gray-400">
|
|
5
|
+
<thead class="afcl-table-thread text-xs text-gray-700 uppercase bg-gray-50 dark:bg-gray-700 dark:text-gray-400">
|
|
6
6
|
<tr>
|
|
7
7
|
<th scope="col" class="px-6 py-3"
|
|
8
8
|
v-for="column in columns"
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
<tr
|
|
20
20
|
v-for="(item, index) in dataPage"
|
|
21
21
|
:class="{
|
|
22
|
-
'odd:bg-white odd:dark:bg-gray-900 even:bg-gray-50 even:dark:bg-gray-800': evenHighlights,
|
|
22
|
+
'afcl-table-body odd:bg-white odd:dark:bg-gray-900 even:bg-gray-50 even:dark:bg-gray-800': evenHighlights,
|
|
23
23
|
'border-b dark:border-gray-700': index !== dataPage.length - 1 || totalPages > 1,
|
|
24
24
|
}"
|
|
25
25
|
>
|
|
@@ -38,24 +38,24 @@
|
|
|
38
38
|
</tr>
|
|
39
39
|
</tbody>
|
|
40
40
|
</table>
|
|
41
|
-
<nav class="flex items-center flex-column flex-wrap md:flex-row justify-between p-4"
|
|
41
|
+
<nav class="afcl-table-pagination-container flex items-center flex-column flex-wrap md:flex-row justify-between p-4"
|
|
42
42
|
v-if="totalPages > 1"
|
|
43
43
|
:aria-label="$t('Table navigation')">
|
|
44
44
|
<i18n-t
|
|
45
|
-
keypath="Showing {from} to {to} of {total}" tag="span" class="text-sm font-normal text-gray-500 dark:text-gray-400 mb-4 md:mb-0 block w-full md:inline md:w-auto"
|
|
45
|
+
keypath="Showing {from} to {to} of {total}" tag="span" class="afcl-table-pagination-text text-sm font-normal text-gray-500 dark:text-gray-400 mb-4 md:mb-0 block w-full md:inline md:w-auto"
|
|
46
46
|
>
|
|
47
47
|
<template #from><span class="font-semibold text-gray-900 dark:text-white">{{ Math.min((currentPage - 1) * props.pageSize + 1, props.data.length) }}</span></template>
|
|
48
48
|
<template #to><span class="font-semibold text-gray-900 dark:text-white">{{ Math.min(currentPage * props.pageSize, props.data.length) }}</span></template>
|
|
49
49
|
<template #total><span class="font-semibold text-gray-900 dark:text-white">{{ props.data.length }}</span></template>
|
|
50
50
|
</i18n-t>
|
|
51
51
|
|
|
52
|
-
<ul class="inline-flex -space-x-px rtl:space-x-reverse text-sm h-8">
|
|
52
|
+
<ul class="afcl-table-pagination-list inline-flex -space-x-px rtl:space-x-reverse text-sm h-8">
|
|
53
53
|
<li v-for="page in totalPages" :key="page">
|
|
54
54
|
<a href="#"
|
|
55
55
|
@click.prevent="switchPage(page)"
|
|
56
56
|
:aria-current="page === page ? 'page' : undefined"
|
|
57
57
|
:class='{
|
|
58
|
-
"text-blue-600 bg-lightPrimary text-lightPrimaryContrast dark:bg-darkPrimary dark:text-darkPrimaryContrast hover:opacity-90": page === currentPage,
|
|
58
|
+
"afcl-table-pagination-button text-blue-600 bg-lightPrimary text-lightPrimaryContrast dark:bg-darkPrimary dark:text-darkPrimaryContrast hover:opacity-90": page === currentPage,
|
|
59
59
|
"text-gray-500 border bg-white border-gray-300 hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white": page !== currentPage,
|
|
60
60
|
"rounded-s-lg ms-0": page === 1,
|
|
61
61
|
"rounded-e-lg": page === totalPages,
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<label class="inline-flex items-center cursor-pointer bor" :class="{'opacity-50' : props.disabled}">
|
|
3
|
+
<input :id="id"
|
|
4
|
+
type="checkbox"
|
|
5
|
+
value="" class="sr-only peer"
|
|
6
|
+
:disabled="props.disabled"
|
|
7
|
+
:checked="props.modelValue"
|
|
8
|
+
@change="$emit('update:modelValue', $event.target.checked)"
|
|
9
|
+
>
|
|
10
|
+
<div class="border border-lightToggleBorderUnactive relative min-w-11 min-h-6 bg-lightToggleBgUnactive peer-focus:outline-none peer-focus:ring-4
|
|
11
|
+
peer-focus:ring-lightToggleRing dark:peer-focus:ring-darkToggleRing rounded-full peer dark:bg-darkToggleBgUnactive
|
|
12
|
+
peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:top-[2px] peer-checked:border-none
|
|
13
|
+
peer-checked:after:border-lightToggleBorderActive after:content-[''] after:absolute after:top-[1px]
|
|
14
|
+
after:start-[2px] after:bg-lightToggleCircleUnactive peer-checked:after:bg-lightToggleCircleActive dark:after:bg-darkToggleCircleUnactive after:border-lightToggleBgUnactive dark:after:border-darkToggleBgUnactive after:border after:rounded-full
|
|
15
|
+
after:h-5 after:w-5 after:transition-all dark:border-darkToggleBorderUnactive peer-checked:bg-lightToggleBgActive
|
|
16
|
+
dark:peer-checked:bg-darkToggleBgActive dark:peer-checked:after:border-darkToggleBorderActive dark:peer-checked:after:bg-darkToggleCircleActive">
|
|
17
|
+
</div>
|
|
18
|
+
<label :for="id" class="cursor-pointer ms-3 text-sm font-medium text-lightToggleText dark:text-darkToggleText">
|
|
19
|
+
<slot></slot>
|
|
20
|
+
</label>
|
|
21
|
+
</label>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<script setup lang="ts">
|
|
25
|
+
const props = defineProps({
|
|
26
|
+
modelValue: Boolean,
|
|
27
|
+
disabled: Boolean,
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
defineEmits(['update:modelValue']);
|
|
31
|
+
const id = `afcb-${Math.random().toString(36).substring(7)}`
|
|
32
|
+
</script>
|
|
@@ -19,6 +19,6 @@ export { default as Skeleton } from './Skeleton.vue';
|
|
|
19
19
|
export { default as Dialog } from './Dialog.vue';
|
|
20
20
|
export { default as MixedChart } from './MixedChart.vue';
|
|
21
21
|
export { default as CountryFlag } from './CountryFlag.vue';
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
export { default as JsonViewer } from './JsonViewer.vue';
|
|
23
|
+
export { default as Toggle } from './Toggle.vue';
|
|
24
24
|
|
|
@@ -8,7 +8,7 @@ const modalStore = useModalStore();
|
|
|
8
8
|
<Teleport to="body">
|
|
9
9
|
<div v-if="modalStore.isOpened" class="bg-gray-900/50 dark:bg-gray-900/80 overflow-y-auto overflow-x-hidden fixed top-0 right-0 left-0 z-50 justify-center items-center w-full md:inset-0 h-full max-h-full">
|
|
10
10
|
<div class="relative p-4 w-full max-w-md max-h-full top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 " >
|
|
11
|
-
<div class="relative bg-white rounded-lg shadow dark:bg-gray-700 dark:shadow-black">
|
|
11
|
+
<div class="afcl-confirmation-container relative bg-white rounded-lg shadow dark:bg-gray-700 dark:shadow-black">
|
|
12
12
|
<button type="button"@click="modalStore.togleModal" class="absolute top-3 end-2.5 text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm w-8 h-8 ms-auto inline-flex justify-center items-center dark:hover:bg-gray-600 dark:hover:text-white" >
|
|
13
13
|
<svg class="w-3 h-3" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 14">
|
|
14
14
|
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"/>
|
|
@@ -19,11 +19,11 @@ const modalStore = useModalStore();
|
|
|
19
19
|
<svg class="mx-auto mb-4 text-gray-400 w-12 h-12 dark:text-gray-200" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20">
|
|
20
20
|
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 11V6m0 8h.01M19 10a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"/>
|
|
21
21
|
</svg>
|
|
22
|
-
<h3 class="mb-5 text-lg font-normal text-gray-500 dark:text-gray-400">{{ modalStore?.modalContent?.content }}</h3>
|
|
23
|
-
<button @click="()=>{ modalStore.onAcceptFunction(true);modalStore.togleModal()}" type="button" class="text-white bg-red-600 hover:bg-red-800 focus:ring-4 focus:outline-none focus:ring-red-300 dark:focus:ring-red-800 font-medium rounded-lg text-sm inline-flex items-center px-5 py-2.5 text-center">
|
|
22
|
+
<h3 class="afcl-confirmation-title mb-5 text-lg font-normal text-gray-500 dark:text-gray-400">{{ modalStore?.modalContent?.content }}</h3>
|
|
23
|
+
<button @click="()=>{ modalStore.onAcceptFunction(true);modalStore.togleModal()}" type="button" class="afcl-confirmation-accept-button text-white bg-red-600 hover:bg-red-800 focus:ring-4 focus:outline-none focus:ring-red-300 dark:focus:ring-red-800 font-medium rounded-lg text-sm inline-flex items-center px-5 py-2.5 text-center">
|
|
24
24
|
{{ modalStore?.modalContent?.acceptText }}
|
|
25
25
|
</button>
|
|
26
|
-
<button @click="()=>{modalStore.onAcceptFunction(false);modalStore.togleModal()}" type="button" class="py-2.5 px-5 ms-3 text-sm font-medium text-gray-900 focus:outline-none bg-white rounded-lg border border-gray-200 hover:bg-gray-100 hover:text-lightPrimary focus:z-10 focus:ring-4 focus:ring-gray-100 dark:focus:ring-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700">{{ modalStore?.modalContent?.cancelText }}</button>
|
|
26
|
+
<button @click="()=>{modalStore.onAcceptFunction(false);modalStore.togleModal()}" type="button" class="afcl-confirmation-cancel-button py-2.5 px-5 ms-3 text-sm font-medium text-gray-900 focus:outline-none bg-white rounded-lg border border-gray-200 hover:bg-gray-100 hover:text-lightPrimary focus:z-10 focus:ring-4 focus:ring-gray-100 dark:focus:ring-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700">{{ modalStore?.modalContent?.cancelText }}</button>
|
|
27
27
|
</div>
|
|
28
28
|
</div>
|
|
29
29
|
</div>
|