Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/password component #562

Open
wants to merge 69 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
0ba5ea0
add password component
ins0 Jun 12, 2024
1abd21e
Merge remote-tracking branch 'refs/remotes/origin/main' into feature/…
ins0 Jun 12, 2024
b0b62a6
feat(PasswordCreationField): add password creation field component
ins0 Jul 2, 2024
ec1518b
Merge remote-tracking branch 'refs/remotes/origin/main' into feature/…
ins0 Jul 2, 2024
3bf90e4
chore(deps): Update dependencies
ins0 Jul 2, 2024
80fb6f9
cleanup
ins0 Jul 2, 2024
7772d84
cleanup
ins0 Jul 2, 2024
7eb9b5b
cleanup
ins0 Jul 2, 2024
f7f9ad0
cleanup
ins0 Jul 2, 2024
d39ee3a
cleanup
ins0 Jul 3, 2024
69f781b
update package
ins0 Jul 3, 2024
bcb38fd
update new package use
ins0 Jul 3, 2024
32db596
Merge remote-tracking branch 'refs/remotes/origin/main' into feature/…
ins0 Jul 3, 2024
8dc9ebb
adjust build
ins0 Jul 3, 2024
cbb0ece
add password component to integration story
ins0 Jul 9, 2024
4fe7058
only render error component when errors present
ins0 Jul 9, 2024
e2efcde
add p-queue lib
ins0 Jul 9, 2024
2856aa4
review changes & optimizations
ins0 Jul 9, 2024
573ea4e
review changes & optimizations
ins0 Jul 9, 2024
0642a52
add required and label content token
ins0 Jul 9, 2024
46fb3c1
Merge remote-tracking branch 'refs/remotes/origin/main' into feature/…
ins0 Jul 9, 2024
6495181
merge master
ins0 Jul 9, 2024
fe4cc03
assert valid on empty
ins0 Jul 9, 2024
891ae36
export password creation field
ins0 Jul 9, 2024
1c7715f
add internal complexity component
ins0 Jul 9, 2024
0f6e987
tweak animation length
ins0 Jul 9, 2024
a161a9e
add rule-to-rule token
ins0 Jul 9, 2024
893f895
add optimistic success onPaste
ins0 Jul 9, 2024
5e3fa85
css cleanup
ins0 Jul 10, 2024
cf2c902
css cleanup
ins0 Jul 10, 2024
118e819
tweak animation
ins0 Jul 10, 2024
15574db
simplify label component
ins0 Jul 10, 2024
932f193
simplify label component
ins0 Jul 10, 2024
f2d62f2
tweak animation and default state
ins0 Jul 10, 2024
c7ad9bd
adjust default state
ins0 Jul 10, 2024
d9f5374
adjust animation once more
ins0 Jul 10, 2024
34e748a
adjust animation once more
ins0 Jul 10, 2024
68c539b
Merge branch 'main' into feature/password-component
ins0 Jul 10, 2024
49f504c
implement long and short error versions
ins0 Jul 17, 2024
a402ddf
Merge remote-tracking branch 'refs/remotes/origin/main' into feature/…
ins0 Jul 17, 2024
ad2fb1c
merge master
ins0 Jul 17, 2024
071cbf0
add english translation
ins0 Jul 17, 2024
daa16c2
Merge remote-tracking branch 'origin/feature/password-component' into…
ins0 Jul 17, 2024
64cd5a6
adjust translations
ins0 Jul 17, 2024
3b1e3e6
fix test duo to master merge
ins0 Jul 17, 2024
8293817
Merge remote-tracking branch 'refs/remotes/origin/main' into feature/…
ins0 Jul 17, 2024
6549519
update yarn
ins0 Jul 29, 2024
14e7cb3
update lib
ins0 Jul 29, 2024
0d3b75b
add to proptypes
ins0 Jul 29, 2024
8d2e882
don't show button when secure crypto is not present
ins0 Jul 29, 2024
d9211c4
add label
ins0 Jul 29, 2024
7c3627b
add password-creation-field
ins0 Jul 29, 2024
00b2582
Merge remote-tracking branch 'refs/remotes/origin/main' into feature/…
ins0 Jul 29, 2024
835fd66
resolve conflicts
ins0 Jul 29, 2024
ec794ee
Merge branch 'main' into feature/password-component
ins0 Nov 25, 2024
8b96980
resolve conflicts
ins0 Nov 25, 2024
0065ba0
update import path
ins0 Nov 25, 2024
f7c6bad
Merge remote-tracking branch 'origin/main' into feature/password-comp…
ins0 Jan 7, 2025
ebae68b
update deps
ins0 Jan 7, 2025
aa618d0
update deps
ins0 Jan 7, 2025
5837696
remove locale prop
ins0 Jan 7, 2025
253d3b8
add aria hidden
ins0 Jan 7, 2025
8abcaf9
add validation result component
ins0 Jan 7, 2025
d579abf
add key prop
ins0 Jan 7, 2025
6b8ae9d
add ts tools
ins0 Jan 7, 2025
377b0fc
use debounce value
ins0 Jan 7, 2025
f77c1c7
mark password tools js as optional
ins0 Jan 7, 2025
96756ab
wait for attribute change
ins0 Jan 7, 2025
0333304
override refProp
ins0 Jan 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
610 changes: 610 additions & 0 deletions .pnp.cjs

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions packages/components/.storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ const config: StorybookConfig = {
// no options
},
},
core: {},
docs: {
autodocs: "tag",
},
viteFinal: async (conf) => {
// See why dynamic import: see https://github.com/storybookjs/storybook/issues/26291#issuecomment-1978193283
const { mergeConfig } = await import("vite");
Expand Down
1 change: 1 addition & 0 deletions packages/components/.storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import type { Preview } from "@storybook/react";
import React from "react";

const preview: Preview = {
tags: ["autodocs"],
decorators: [
(Story) => {
document.body.classList.add("flow");
Expand Down
11 changes: 11 additions & 0 deletions packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,10 @@
"types": "./dist/js/types/components/NumberField/index.d.ts",
"import": "./dist/js/NumberField.js"
},
"./PasswordCreationField": {
"types": "./dist/js/types/components/PasswordCreationField/index.d.ts",
"import": "./dist/js/PasswordCreationField.js"
},
"./Popover/styles.css": "./dist/css/Popover.css",
"./Popover": {
"types": "./dist/js/types/components/Popover/index.d.ts",
Expand Down Expand Up @@ -452,11 +456,13 @@
"react-syntax-highlighter": "^15.6.1",
"remeda": "^2.17.4",
"use-callback-ref": "^1.3.2",
"usehooks-ts": "^3.1.0",
"zod": "^3.23.8"
},
"devDependencies": {
"@faker-js/faker": "^9.2.0",
"@mittwald/flow-design-tokens": "workspace:^",
"@mittwald/password-tools-js": "^2.1.2",
ins0 marked this conversation as resolved.
Show resolved Hide resolved
"@mittwald/react-use-promise": "^2.6.0",
"@nx/storybook": "^20.1.3",
"@storybook/addon-a11y": "^8.4.5",
Expand Down Expand Up @@ -493,6 +499,7 @@
"happy-dom": "^15.11.7",
"next": "^14.2.18",
"nx": "^20.1.3",
"p-queue": "^8.0.1",
ins0 marked this conversation as resolved.
Show resolved Hide resolved
"postcss": "^8.4.49",
"postcss-nested-import": "^1.3.0",
"postcss-nesting": "^13.0.1",
Expand Down Expand Up @@ -520,13 +527,17 @@
"yaml": "^2.6.1"
},
"peerDependencies": {
"@mittwald/password-tools-js": "^2.1.2",
"@mittwald/react-use-promise": "^2.3.12",
"next": "*",
"react": "~18.3.0",
"react-dom": "~18.3.0",
"react-hook-form": "*"
},
"peerDependenciesMeta": {
"@mittwald/password-tools-js": {
"optional": true
},
"@mittwald/react-use-promise": {
"optional": true
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
min-width: 0;

/* Elements */

.label {
order: 1;
margin-bottom: var(--form-control--label-to-control-spacing);
Expand Down
9 changes: 9 additions & 0 deletions packages/components/src/components/Label/Label.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,13 @@
&.disabled {
color: var(--label--color--disabled);
}

> div {
display: inline-flex;
order: 1;
}

& .optional {
order: 0;
}
}
6 changes: 5 additions & 1 deletion packages/components/src/components/Label/Label.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ export const Label = flowComponent("Label", (props) => {
? className
: clsx(styles.label, isDisabled && styles.disabled, className);

const optionalMarker = " " + stringFormatter.format("label.optional");
const optionalMarker = (
<div className={styles.optional}>
Lisa18289 marked this conversation as resolved.
Show resolved Hide resolved
{stringFormatter.format("label.optional")}
</div>
);

return (
<ClearPropsContext>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
@use "@/styles/mixins/formControl";
@use "./components/ComplexityIndicator/complexity";

.inputGroup {
display: flex;

position: relative;
flex-direction: row;
min-width: fit-content;

@include formControl.formControl;
padding-inline-end: 0;
padding-top: 0;

@include complexity.animation-in("padding-bottom");

&:has([data-complexity-visible="false"]) {
transition-duration: #{complexity.$animation-out-duration};
padding-bottom: 0;
}

.input {
flex-grow: 1;

background-color: unset;
border-start-end-radius: 0;
border-end-end-radius: 0;
border-width: 0;

/* Hovered */
&:hover {
background-color: unset;
}

/* Focused */
&:focus-within {
border-color: unset;
background-color: unset;
}
&:focus-visible,
&:focus {
outline: unset;
}
}

.buttonContainer {
display: flex;

& .button {
flex-shrink: 0;
outline-offset: calc(var(--size-px--xxs) * -1);
}
}
}
Loading
Loading