@aleph-alpha/ui-library 2.7.0 → 2.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/system/lib.js
CHANGED
|
@@ -44760,7 +44760,7 @@ const jY = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
44760
44760
|
$(dO),
|
|
44761
44761
|
$(l(NS), q({ "data-slot": "dialog-content" }, { ...l(r), ...s.$attrs }, {
|
|
44762
44762
|
class: l(D)(
|
|
44763
|
-
"bg-background-surface-modal data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95
|
|
44763
|
+
"bg-background-surface-modal data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 flex w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] flex-col rounded-lg border border-border-surface-default p-6 shadow-lg duration-200",
|
|
44764
44764
|
a.maxWidth ?? "max-w-[50vw]"
|
|
44765
44765
|
)
|
|
44766
44766
|
}), {
|
|
@@ -56088,7 +56088,8 @@ const PT = /* @__PURE__ */ b({
|
|
|
56088
56088
|
_.value && "transition-none",
|
|
56089
56089
|
e.side === "left" ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",
|
|
56090
56090
|
// Adjust the padding for floating and inset variants.
|
|
56091
|
-
e.variant === "floating" || e.variant === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+1rem+2px)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)
|
|
56091
|
+
e.variant === "floating" || e.variant === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+1rem+2px)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)",
|
|
56092
|
+
e.variant !== "floating" && e.variant !== "inset" && s.value && "group-data-[side=left]:border-r group-data-[side=right]:border-l",
|
|
56092
56093
|
Y.$attrs.class ?? ""
|
|
56093
56094
|
)
|
|
56094
56095
|
}, Y.$attrs), [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aleph-alpha/ui-library",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.8.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/system/lib.js",
|
|
@@ -78,9 +78,9 @@
|
|
|
78
78
|
"vue-router": "4.6.4",
|
|
79
79
|
"vue-tsc": "^2.2.12",
|
|
80
80
|
"wait-on": "9.0.3",
|
|
81
|
+
"@aleph-alpha/prettier-config-frontend": "2.1.0",
|
|
81
82
|
"@aleph-alpha/eslint-config-frontend": "0.6.0",
|
|
82
|
-
"@aleph-alpha/tsconfig-frontend": "0.6.0"
|
|
83
|
-
"@aleph-alpha/prettier-config-frontend": "2.1.0"
|
|
83
|
+
"@aleph-alpha/tsconfig-frontend": "0.6.0"
|
|
84
84
|
},
|
|
85
85
|
"peerDependencies": {
|
|
86
86
|
"@unocss/preset-wind4": ">=66.0.0",
|
|
@@ -117,7 +117,7 @@ describe('UiDialog', () => {
|
|
|
117
117
|
});
|
|
118
118
|
});
|
|
119
119
|
|
|
120
|
-
test('keeps content centered
|
|
120
|
+
test('keeps content centered when open', async () => {
|
|
121
121
|
const { getByRole } = renderDialog({ open: true });
|
|
122
122
|
|
|
123
123
|
await waitFor(() => {
|
|
@@ -125,10 +125,10 @@ describe('UiDialog', () => {
|
|
|
125
125
|
});
|
|
126
126
|
|
|
127
127
|
const dialog = getByRole('dialog');
|
|
128
|
-
expect(dialog).toHaveClass('
|
|
129
|
-
expect(dialog).toHaveClass('
|
|
130
|
-
expect(dialog).toHaveClass('
|
|
131
|
-
expect(dialog).toHaveClass('
|
|
128
|
+
expect(dialog).toHaveClass('top-[50%]');
|
|
129
|
+
expect(dialog).toHaveClass('left-[50%]');
|
|
130
|
+
expect(dialog).toHaveClass('translate-x-[-50%]');
|
|
131
|
+
expect(dialog).toHaveClass('translate-y-[-50%]');
|
|
132
132
|
});
|
|
133
133
|
|
|
134
134
|
test('closes when Cancel is clicked', async () => {
|
|
@@ -37,7 +37,7 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
|
37
37
|
v-bind="{ ...forwarded, ...$attrs }"
|
|
38
38
|
:class="
|
|
39
39
|
cn(
|
|
40
|
-
'bg-background-surface-modal data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95
|
|
40
|
+
'bg-background-surface-modal data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 flex w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] flex-col rounded-lg border border-border-surface-default p-6 shadow-lg duration-200',
|
|
41
41
|
props.maxWidth ?? 'max-w-[50vw]',
|
|
42
42
|
)
|
|
43
43
|
"
|
|
@@ -288,7 +288,11 @@ onBeforeUnmount(stopResize);
|
|
|
288
288
|
// Adjust the padding for floating and inset variants.
|
|
289
289
|
variant === 'floating' || variant === 'inset'
|
|
290
290
|
? 'p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+1rem+2px)]'
|
|
291
|
-
: 'group-data-[collapsible=icon]:w-(--sidebar-width-icon)
|
|
291
|
+
: 'group-data-[collapsible=icon]:w-(--sidebar-width-icon)',
|
|
292
|
+
variant !== 'floating' &&
|
|
293
|
+
variant !== 'inset' &&
|
|
294
|
+
resolvedResizable &&
|
|
295
|
+
'group-data-[side=left]:border-r group-data-[side=right]:border-l',
|
|
292
296
|
$attrs.class ?? '',
|
|
293
297
|
)
|
|
294
298
|
"
|