@aleph-alpha/ui-library 2.8.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
|
}), {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aleph-alpha/ui-library",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/system/lib.js",
|
|
@@ -79,8 +79,8 @@
|
|
|
79
79
|
"vue-tsc": "^2.2.12",
|
|
80
80
|
"wait-on": "9.0.3",
|
|
81
81
|
"@aleph-alpha/prettier-config-frontend": "2.1.0",
|
|
82
|
-
"@aleph-alpha/
|
|
83
|
-
"@aleph-alpha/
|
|
82
|
+
"@aleph-alpha/eslint-config-frontend": "0.6.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
|
"
|