@vkzstudio/muza-ui 1.9.2 → 1.9.3
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/components/Input/Input.js +1 -1
- package/dist/components/PhoneInput/PhoneInput.d.ts.map +1 -1
- package/dist/components/PhoneInput/PhoneInput.js +68 -60
- package/dist/components/Textarea/Textarea.js +1 -1
- package/dist/muza-ui.css +1 -1
- package/dist/stories/AutofillHarness.stories.d.ts +19 -0
- package/dist/stories/AutofillHarness.stories.d.ts.map +1 -0
- package/dist/styles/utilities.css +28 -0
- package/package.json +1 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
/**
|
|
3
|
+
* Manual test bed for the browser's autofill rendering.
|
|
4
|
+
*
|
|
5
|
+
* Chrome only offers autofill on fields it can classify, which needs a real
|
|
6
|
+
* `<form>`, a `name`, and an `autocomplete` token — none of which the
|
|
7
|
+
* per-component stories carry, and none of which can be added from the URL
|
|
8
|
+
* (Storybook drops `args` that no `argTypes` entry declares). So the fields
|
|
9
|
+
* live here instead, wired up the way a consumer's form would be.
|
|
10
|
+
*
|
|
11
|
+
* Not automatable: the CDP `Autofill` domain is compiled out of Playwright's
|
|
12
|
+
* Chromium, so no test can put these fields into the autofilled state. This
|
|
13
|
+
* page exists to be driven by hand.
|
|
14
|
+
*/
|
|
15
|
+
declare const meta: Meta;
|
|
16
|
+
export default meta;
|
|
17
|
+
type Story = StoryObj;
|
|
18
|
+
export declare const AutofillHarness: Story;
|
|
19
|
+
//# sourceMappingURL=AutofillHarness.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AutofillHarness.stories.d.ts","sourceRoot":"","sources":["../../src/stories/AutofillHarness.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAU3D;;;;;;;;;;;;GAYG;AACH,QAAA,MAAM,IAAI,EAAE,IAWX,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAA;AAErB,eAAO,MAAM,eAAe,EAAE,KA2D7B,CAAA"}
|
|
@@ -10,6 +10,34 @@
|
|
|
10
10
|
transform: translateY(calc(--value(integer) * 0.0625em));
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
+
/* The `fix-y-text` nudge as padding instead of a transform, for text inside a
|
|
14
|
+
fixed-height box. A transform moves the element's painted box along with the
|
|
15
|
+
glyphs; an input's text centres inside its content box, so padding of twice
|
|
16
|
+
the offset moves the text alone. Use it wherever the browser paints on the
|
|
17
|
+
element's own box (Chrome's autofill highlight) and that box is not the shape
|
|
18
|
+
the design draws. */
|
|
19
|
+
@utility fix-y-box {
|
|
20
|
+
/* Default value for >14px font size */
|
|
21
|
+
padding-top: 0.25em;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@utility fix-y-box-* {
|
|
25
|
+
/* Custom value */
|
|
26
|
+
/* Use 2 for >14px font size */
|
|
27
|
+
/* Use 1 for <=14px font size */
|
|
28
|
+
padding-top: calc(--value(integer) * 0.125em);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/* Chrome paints an opaque highlight over an autofilled field. It lands on the
|
|
32
|
+
input's own border box — not the rounded wrapper the design draws — and both
|
|
33
|
+
its background and its text colour are UA `!important`, which no author rule
|
|
34
|
+
outranks. An inset shadow is the one layer the UA leaves alone, so fill the
|
|
35
|
+
box with the field's own colour and restore the text colour alongside it. */
|
|
36
|
+
@utility autofill-field {
|
|
37
|
+
@apply autofill:shadow-[inset_0_0_0_1000px] autofill:shadow-comp-input-fill-def;
|
|
38
|
+
@apply autofill:[-webkit-text-fill-color:var(--color-comp-input-text-primary)];
|
|
39
|
+
}
|
|
40
|
+
|
|
13
41
|
@utility focus-visible-auto {
|
|
14
42
|
@apply focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none;
|
|
15
43
|
}
|