@igne-agency/react-web-ui 0.4.0 → 0.6.0
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/base.css +3 -0
- package/dist/components/accordion/accordion.css +21 -21
- package/dist/components/accordion/accordion.d.ts +17 -4
- package/dist/components/accordion/accordion.js +83 -36
- package/dist/components/accordion/accordion.module.js +6 -6
- package/dist/components/attachment-tile/attachment-preview.d.ts +56 -13
- package/dist/components/attachment-tile/attachment-preview.js +388 -119
- package/dist/components/attachment-tile/attachment-tile.css +31 -25
- package/dist/components/attachment-tile/attachment-tile.d.ts +32 -10
- package/dist/components/attachment-tile/attachment-tile.js +160 -43
- package/dist/components/attachment-tile/attachment-tile.module.js +8 -8
- package/dist/components/attachment-tile/index.d.ts +1 -1
- package/dist/components/avatar/avatar.css +9 -9
- package/dist/components/avatar/avatar.d.ts +50 -5
- package/dist/components/avatar/avatar.js +178 -64
- package/dist/components/avatar/avatar.module.js +3 -3
- package/dist/components/avatar-group/avatar-group-context.d.ts +2 -4
- package/dist/components/avatar-group/avatar-group-context.js +2 -2
- package/dist/components/avatar-group/avatar-group.css +26 -20
- package/dist/components/avatar-group/avatar-group.d.ts +85 -27
- package/dist/components/avatar-group/avatar-group.js +400 -246
- package/dist/components/avatar-group/avatar-group.module.js +8 -8
- package/dist/components/breadcrumbs/breadcrumbs.css +12 -12
- package/dist/components/breadcrumbs/breadcrumbs.d.ts +69 -23
- package/dist/components/breadcrumbs/breadcrumbs.js +299 -248
- package/dist/components/breadcrumbs/breadcrumbs.module.js +8 -8
- package/dist/components/button/button.css +29 -31
- package/dist/components/button/button.d.ts +20 -16
- package/dist/components/button/button.js +140 -145
- package/dist/components/button/button.module.js +1 -1
- package/dist/components/button/index.js +1 -1
- package/dist/components/checkbox-field/checkbox-field.js +63 -49
- package/dist/components/checkbox-field/checkbox.css +105 -56
- package/dist/components/checkbox-field/checkbox.d.ts +3 -2
- package/dist/components/checkbox-field/checkbox.js +12 -9
- package/dist/components/checkbox-field/checkbox.module.js +4 -4
- package/dist/components/checkbox-group-field/checkbox-group-field.js +78 -72
- package/dist/components/checkbox-group-field/checkbox-group.css +14 -10
- package/dist/components/checkbox-group-field/checkbox-group.d.ts +2 -2
- package/dist/components/checkbox-group-field/checkbox-group.js +2 -2
- package/dist/components/checkbox-group-field/checkbox-group.module.js +2 -2
- package/dist/components/collapsible/collapsible.css +20 -20
- package/dist/components/collapsible/collapsible.d.ts +17 -4
- package/dist/components/collapsible/collapsible.js +83 -36
- package/dist/components/collapsible/collapsible.module.js +5 -5
- package/dist/components/combobox-field/combobox-field.js +206 -158
- package/dist/components/combobox-field/combobox.css +492 -277
- package/dist/components/combobox-field/combobox.d.ts +148 -39
- package/dist/components/combobox-field/combobox.js +506 -206
- package/dist/components/combobox-field/combobox.module.js +21 -21
- package/dist/components/combobox-field/value-state-view.css +5 -5
- package/dist/components/combobox-field/value-state-view.module.js +4 -4
- package/dist/components/composer/composer-attachments.d.ts +30 -11
- package/dist/components/composer/composer-attachments.js +45 -40
- package/dist/components/composer/composer-editor.css +40 -35
- package/dist/components/composer/composer-editor.d.ts +14 -4
- package/dist/components/composer/composer-editor.js +134 -44
- package/dist/components/composer/composer-editor.module.js +5 -5
- package/dist/components/composer/composer.css +22 -22
- package/dist/components/composer/composer.d.ts +13 -2
- package/dist/components/composer/composer.js +78 -63
- package/dist/components/composer/composer.module.js +5 -5
- package/dist/components/composer/index.d.ts +2 -2
- package/dist/components/composer/mention-text.css +5 -5
- package/dist/components/composer/mention-text.module.js +1 -1
- package/dist/components/confirm-dialog/confirm-dialog.css +29 -29
- package/dist/components/confirm-dialog/confirm-dialog.d.ts +57 -3
- package/dist/components/confirm-dialog/confirm-dialog.js +266 -108
- package/dist/components/confirm-dialog/confirm-dialog.module.js +5 -5
- package/dist/components/conversation/conversation.css +52 -52
- package/dist/components/conversation/conversation.d.ts +43 -18
- package/dist/components/conversation/conversation.js +120 -78
- package/dist/components/conversation/conversation.module.js +15 -15
- package/dist/components/date-field/date-field.d.ts +1 -1
- package/dist/components/date-field/date-field.js +202 -100
- package/dist/components/date-field/date-input.d.ts +73 -37
- package/dist/components/date-field/date-input.js +72 -45
- package/dist/components/date-field/index.d.ts +1 -1
- package/dist/components/date-range-field/date-range-field.d.ts +1 -1
- package/dist/components/date-range-field/date-range-field.js +219 -107
- package/dist/components/date-range-field/date-range-input.d.ts +84 -40
- package/dist/components/date-range-field/date-range-input.js +83 -48
- package/dist/components/dialog/dialog.css +32 -32
- package/dist/components/dialog/dialog.d.ts +8 -7
- package/dist/components/dialog/dialog.js +8 -26
- package/dist/components/dialog/dialog.module.js +6 -6
- package/dist/components/divider/divider.css +6 -6
- package/dist/components/divider/divider.d.ts +36 -2
- package/dist/components/divider/divider.js +195 -29
- package/dist/components/divider/divider.module.js +3 -3
- package/dist/components/drawer/drawer.css +55 -56
- package/dist/components/drawer/drawer.d.ts +8 -7
- package/dist/components/drawer/drawer.js +8 -26
- package/dist/components/drawer/drawer.module.js +6 -6
- package/dist/components/field/field.css +34 -24
- package/dist/components/field/field.d.ts +60 -37
- package/dist/components/field/field.js +242 -157
- package/dist/components/field/field.module.js +12 -10
- package/dist/components/field/input-parts.d.ts +11 -13
- package/dist/components/field/input-parts.js +23 -42
- package/dist/components/field-placeholder/field-placeholder.css +6 -6
- package/dist/components/field-placeholder/field-placeholder.module.js +4 -4
- package/dist/components/fieldset/field-group.d.ts +1 -1
- package/dist/components/fieldset/field-group.js +48 -42
- package/dist/components/fieldset/fieldset-root.d.ts +1 -1
- package/dist/components/fieldset/fieldset-root.js +19 -17
- package/dist/components/fieldset/fieldset.d.ts +2 -2
- package/dist/components/fieldset/fieldset.js +2 -2
- package/dist/components/file-field/file-field.css +126 -60
- package/dist/components/file-field/file-field.js +201 -109
- package/dist/components/file-field/file-field.module.js +4 -4
- package/dist/components/file-field/file-input.d.ts +66 -40
- package/dist/components/file-field/file-input.js +188 -132
- package/dist/components/filter-bar/filter-bar.css +8 -8
- package/dist/components/filter-bar/filter-bar.d.ts +12 -3
- package/dist/components/filter-bar/filter-bar.js +23 -25
- package/dist/components/filter-bar/filter-bar.module.js +5 -5
- package/dist/components/form/form.d.ts +19 -7
- package/dist/components/form/form.js +80 -29
- package/dist/components/icon/icon.css +2 -2
- package/dist/components/icon/icon.module.js +1 -1
- package/dist/components/link/link.css +6 -5
- package/dist/components/link/link.module.js +1 -1
- package/dist/components/menu/menu.css +52 -47
- package/dist/components/menu/menu.d.ts +32 -25
- package/dist/components/menu/menu.js +75 -124
- package/dist/components/menu/menu.module.js +8 -8
- package/dist/components/nav/nav-context.d.ts +1 -1
- package/dist/components/nav/nav-item-view.d.ts +10 -13
- package/dist/components/nav/nav-item-view.js +42 -54
- package/dist/components/nav/nav.css +150 -119
- package/dist/components/nav/nav.d.ts +61 -17
- package/dist/components/nav/nav.js +271 -176
- package/dist/components/nav/nav.module.js +17 -15
- package/dist/components/number-field/number-field.css +153 -64
- package/dist/components/number-field/number-field.d.ts +2 -2
- package/dist/components/number-field/number-field.js +112 -91
- package/dist/components/number-field/number-field.module.js +6 -6
- package/dist/components/number-field/number-input.d.ts +43 -23
- package/dist/components/number-field/number-input.js +179 -125
- package/dist/components/otp-field/otp-field.css +153 -60
- package/dist/components/otp-field/otp-field.d.ts +2 -2
- package/dist/components/otp-field/otp-field.js +62 -46
- package/dist/components/otp-field/otp-field.module.js +4 -4
- package/dist/components/otp-field/otp-input.d.ts +8 -6
- package/dist/components/otp-field/otp-input.js +92 -92
- package/dist/components/pagination/pagination.d.ts +46 -15
- package/dist/components/pagination/pagination.js +217 -224
- package/dist/components/password-field/password-field.css +23 -23
- package/dist/components/password-field/password-field.js +107 -85
- package/dist/components/password-field/password-field.module.js +8 -8
- package/dist/components/password-field/password-strength.d.ts +107 -3
- package/dist/components/password-field/password-strength.js +569 -92
- package/dist/components/photo-field/photo-field.js +137 -112
- package/dist/components/photo-field/photo-input.css +67 -44
- package/dist/components/photo-field/photo-input.d.ts +59 -15
- package/dist/components/photo-field/photo-input.js +173 -86
- package/dist/components/photo-field/photo-input.module.js +10 -8
- package/dist/components/popover/popover.css +41 -41
- package/dist/components/popover/popover.d.ts +66 -25
- package/dist/components/popover/popover.js +332 -217
- package/dist/components/popover/popover.module.js +15 -19
- package/dist/components/radio-group-field/radio-group-field.js +80 -71
- package/dist/components/radio-group-field/radio-group.css +112 -60
- package/dist/components/radio-group-field/radio-group.d.ts +19 -3
- package/dist/components/radio-group-field/radio-group.js +66 -23
- package/dist/components/radio-group-field/radio-group.module.js +4 -4
- package/dist/components/segmented-control-field/segmented-control-field.d.ts +1 -1
- package/dist/components/segmented-control-field/segmented-control-field.js +111 -96
- package/dist/components/segmented-control-field/segmented-control.css +132 -79
- package/dist/components/segmented-control-field/segmented-control.d.ts +39 -15
- package/dist/components/segmented-control-field/segmented-control.js +124 -41
- package/dist/components/segmented-control-field/segmented-control.module.js +4 -4
- package/dist/components/select-field/select.css +214 -101
- package/dist/components/select-field/select.d.ts +43 -11
- package/dist/components/select-field/select.js +194 -109
- package/dist/components/select-field/select.module.js +14 -14
- package/dist/components/skeleton/skeleton.css +4 -4
- package/dist/components/skeleton/skeleton.module.js +3 -3
- package/dist/components/stale/stale.css +15 -15
- package/dist/components/stale/stale.d.ts +27 -3
- package/dist/components/stale/stale.js +147 -66
- package/dist/components/stale/stale.module.js +6 -6
- package/dist/components/status-message/status-message.css +22 -22
- package/dist/components/status-message/status-message.module.js +6 -6
- package/dist/components/switch-field/switch-field.js +77 -57
- package/dist/components/switch-field/switch.css +112 -63
- package/dist/components/switch-field/switch.d.ts +20 -3
- package/dist/components/switch-field/switch.js +70 -27
- package/dist/components/switch-field/switch.module.js +4 -4
- package/dist/components/tabs/tabs.css +32 -32
- package/dist/components/tabs/tabs.d.ts +21 -7
- package/dist/components/tabs/tabs.js +73 -14
- package/dist/components/tabs/tabs.module.js +7 -7
- package/dist/components/tag/tag.css +84 -84
- package/dist/components/tag/tag.module.js +3 -3
- package/dist/components/tag-group/tag-group.css +94 -94
- package/dist/components/tag-group/tag-group.module.js +4 -4
- package/dist/components/text-field/text-field.css +159 -82
- package/dist/components/text-field/text-field.d.ts +1 -1
- package/dist/components/text-field/text-field.js +139 -110
- package/dist/components/text-field/text-field.module.js +9 -9
- package/dist/components/text-field/text-input.d.ts +81 -45
- package/dist/components/text-field/text-input.js +366 -217
- package/dist/components/textarea-field/textarea-field.css +7 -2
- package/dist/components/textarea-field/textarea-field.js +72 -56
- package/dist/components/textarea-field/textarea-field.module.js +2 -2
- package/dist/components/time-field/time-field.js +153 -60
- package/dist/components/time-field/time-input.d.ts +21 -10
- package/dist/components/time-field/time-input.js +22 -11
- package/dist/components/toast/toast-provider.css +34 -31
- package/dist/components/toast/toast-provider.d.ts +63 -14
- package/dist/components/toast/toast-provider.js +174 -111
- package/dist/components/toast/toast-provider.module.js +7 -7
- package/dist/components/toggle-group-field/toggle-group-field.d.ts +1 -1
- package/dist/components/toggle-group-field/toggle-group-field.js +95 -89
- package/dist/components/toggle-group-field/toggle-group.css +117 -67
- package/dist/components/toggle-group-field/toggle-group.d.ts +2 -2
- package/dist/components/toggle-group-field/toggle-group.js +2 -2
- package/dist/components/toggle-group-field/toggle-group.module.js +2 -2
- package/dist/components/tooltip/tooltip.css +4 -4
- package/dist/components/tooltip/tooltip.module.js +1 -1
- package/dist/data-table/data-table-content.js +6 -5
- package/dist/data-table/data-table-parts.d.ts +41 -13
- package/dist/data-table/data-table-parts.js +213 -172
- package/dist/data-table/data-table-selection.d.ts +105 -3
- package/dist/data-table/data-table-selection.js +654 -145
- package/dist/data-table/data-table.css +125 -128
- package/dist/data-table/data-table.d.ts +21 -26
- package/dist/data-table/data-table.js +20 -23
- package/dist/data-table/data-table.module.js +32 -34
- package/dist/data-table/index.d.ts +2 -2
- package/dist/index.js +3 -3
- package/dist/lib/calendar/calendar-navigation.d.ts +39 -5
- package/dist/lib/calendar/calendar-navigation.js +185 -118
- package/dist/lib/calendar/calendar-parts.d.ts +143 -0
- package/dist/lib/calendar/calendar-parts.js +540 -0
- package/dist/lib/calendar/calendar-prefab.d.ts +52 -0
- package/dist/lib/calendar/calendar-prefab.js +311 -0
- package/dist/lib/calendar/calendar-year.d.ts +3 -1
- package/dist/lib/calendar/calendar-year.js +139 -131
- package/dist/lib/calendar/temporal.css +325 -232
- package/dist/lib/calendar/temporal.d.ts +67 -82
- package/dist/lib/calendar/temporal.js +258 -569
- package/dist/lib/calendar/temporal.module.js +38 -38
- package/dist/lib/forms/use-connected-field.d.ts +1 -1
- package/dist/lib/forms/use-connected-field.js +1 -1
- package/dist/lib/render-as.d.ts +13 -0
- package/dist/lib/render-as.js +46 -0
- package/dist/terrazzo/index.d.ts +4 -3
- package/dist/terrazzo/index.js +17 -6
- package/dist/tokens.css +28 -4
- package/package.json +2 -2
- package/tokens/dark.tokens.json +6 -0
- package/tokens/sys.tokens.json +7 -0
- package/dist/components/button/close-button.d.ts +0 -16
- package/dist/components/button/close-button.js +0 -30
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import { IconButton } from "../button/button.js";
|
|
2
|
+
import { Field } from "../field/field.js";
|
|
1
3
|
import { TextInput } from "../text-field/text-input.js";
|
|
2
4
|
import { PasswordStrength } from "./password-strength.js";
|
|
5
|
+
import { Spinner } from "../spinner/spinner.js";
|
|
3
6
|
import { c } from "react/compiler-runtime";
|
|
4
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
8
|
import { useState } from "react";
|
|
@@ -22,7 +25,7 @@ import { useState } from "react";
|
|
|
22
25
|
* />
|
|
23
26
|
*/
|
|
24
27
|
var PasswordField = (t0) => {
|
|
25
|
-
const $ = c(
|
|
28
|
+
const $ = c(67);
|
|
26
29
|
let className;
|
|
27
30
|
let description;
|
|
28
31
|
let dirty;
|
|
@@ -99,88 +102,108 @@ var PasswordField = (t0) => {
|
|
|
99
102
|
}
|
|
100
103
|
const [revealed, setRevealed] = useState(false);
|
|
101
104
|
let t1;
|
|
102
|
-
if ($[24] !==
|
|
103
|
-
t1 = /* @__PURE__ */ jsx(
|
|
104
|
-
$[24] =
|
|
105
|
+
if ($[24] !== optionalLabel) {
|
|
106
|
+
t1 = /* @__PURE__ */ jsx(Field.Requiredness, { optionalLabel });
|
|
107
|
+
$[24] = optionalLabel;
|
|
105
108
|
$[25] = t1;
|
|
106
109
|
} else t1 = $[25];
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
110
|
+
let t2;
|
|
111
|
+
if ($[26] !== label || $[27] !== t1) {
|
|
112
|
+
t2 = /* @__PURE__ */ jsxs(TextInput.Label, { children: [
|
|
113
|
+
label,
|
|
114
|
+
" ",
|
|
115
|
+
t1
|
|
116
|
+
] });
|
|
117
|
+
$[26] = label;
|
|
118
|
+
$[27] = t1;
|
|
119
|
+
$[28] = t2;
|
|
120
|
+
} else t2 = $[28];
|
|
121
|
+
const t3 = revealed ? "text" : "password";
|
|
122
|
+
let t4;
|
|
123
|
+
if ($[29] !== inputProps || $[30] !== t3) {
|
|
124
|
+
t4 = /* @__PURE__ */ jsx(TextInput.Input, {
|
|
111
125
|
...inputProps,
|
|
112
|
-
type:
|
|
126
|
+
type: t3
|
|
113
127
|
});
|
|
114
|
-
$[
|
|
115
|
-
$[
|
|
116
|
-
$[
|
|
117
|
-
} else
|
|
118
|
-
let
|
|
119
|
-
if ($[
|
|
120
|
-
|
|
121
|
-
$[
|
|
122
|
-
} else
|
|
123
|
-
const
|
|
124
|
-
const
|
|
125
|
-
let
|
|
126
|
-
if ($[
|
|
127
|
-
|
|
128
|
+
$[29] = inputProps;
|
|
129
|
+
$[30] = t3;
|
|
130
|
+
$[31] = t4;
|
|
131
|
+
} else t4 = $[31];
|
|
132
|
+
let t5;
|
|
133
|
+
if ($[32] === Symbol.for("react.memo_cache_sentinel")) {
|
|
134
|
+
t5 = /* @__PURE__ */ jsx(TextInput.Pending, { children: /* @__PURE__ */ jsx(Spinner, { size: 1 }) });
|
|
135
|
+
$[32] = t5;
|
|
136
|
+
} else t5 = $[32];
|
|
137
|
+
const t6 = revealed ? hidePasswordLabel : showPasswordLabel;
|
|
138
|
+
const t7 = revealed ? hidePasswordIcon : showPasswordIcon;
|
|
139
|
+
let t8;
|
|
140
|
+
if ($[33] !== t6 || $[34] !== t7) {
|
|
141
|
+
t8 = /* @__PURE__ */ jsx(IconButton, {
|
|
142
|
+
label: t6,
|
|
143
|
+
variant: "tertiary",
|
|
144
|
+
size: "sm",
|
|
145
|
+
children: t7
|
|
146
|
+
});
|
|
147
|
+
$[33] = t6;
|
|
148
|
+
$[34] = t7;
|
|
149
|
+
$[35] = t8;
|
|
150
|
+
} else t8 = $[35];
|
|
151
|
+
let t9;
|
|
152
|
+
if ($[36] !== revealed || $[37] !== t8) {
|
|
153
|
+
t9 = /* @__PURE__ */ jsx(TextInput.Reveal, {
|
|
128
154
|
revealed,
|
|
129
155
|
onRevealedChange: setRevealed,
|
|
130
|
-
|
|
131
|
-
children: t6
|
|
156
|
+
render: t8
|
|
132
157
|
});
|
|
133
|
-
$[
|
|
134
|
-
$[
|
|
135
|
-
$[
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
t8 = /* @__PURE__ */ jsxs(TextInput.Group, { children: [
|
|
141
|
-
t3,
|
|
158
|
+
$[36] = revealed;
|
|
159
|
+
$[37] = t8;
|
|
160
|
+
$[38] = t9;
|
|
161
|
+
} else t9 = $[38];
|
|
162
|
+
let t10;
|
|
163
|
+
if ($[39] !== t4 || $[40] !== t9) {
|
|
164
|
+
t10 = /* @__PURE__ */ jsxs(TextInput.Group, { children: [
|
|
142
165
|
t4,
|
|
143
|
-
|
|
166
|
+
t5,
|
|
167
|
+
t9
|
|
144
168
|
] });
|
|
145
|
-
$[
|
|
146
|
-
$[
|
|
147
|
-
$[
|
|
148
|
-
} else
|
|
149
|
-
let
|
|
150
|
-
if ($[
|
|
151
|
-
|
|
169
|
+
$[39] = t4;
|
|
170
|
+
$[40] = t9;
|
|
171
|
+
$[41] = t10;
|
|
172
|
+
} else t10 = $[41];
|
|
173
|
+
let t11;
|
|
174
|
+
if ($[42] !== languages || $[43] !== scoreLabels || $[44] !== strength || $[45] !== strengthLabel || $[46] !== value) {
|
|
175
|
+
t11 = strength === true && /* @__PURE__ */ jsx(PasswordStrength, {
|
|
152
176
|
password: value,
|
|
153
177
|
label: strengthLabel,
|
|
154
178
|
scoreLabels,
|
|
155
179
|
languages
|
|
156
180
|
});
|
|
157
|
-
$[
|
|
158
|
-
$[
|
|
159
|
-
$[
|
|
160
|
-
$[
|
|
161
|
-
$[
|
|
162
|
-
$[
|
|
163
|
-
} else
|
|
164
|
-
let t10;
|
|
165
|
-
if ($[43] !== description) {
|
|
166
|
-
t10 = /* @__PURE__ */ jsx(TextInput.Description, { children: description });
|
|
167
|
-
$[43] = description;
|
|
168
|
-
$[44] = t10;
|
|
169
|
-
} else t10 = $[44];
|
|
170
|
-
let t11;
|
|
171
|
-
if ($[45] === Symbol.for("react.memo_cache_sentinel")) {
|
|
172
|
-
t11 = /* @__PURE__ */ jsx(TextInput.Error, {});
|
|
173
|
-
$[45] = t11;
|
|
174
|
-
} else t11 = $[45];
|
|
181
|
+
$[42] = languages;
|
|
182
|
+
$[43] = scoreLabels;
|
|
183
|
+
$[44] = strength;
|
|
184
|
+
$[45] = strengthLabel;
|
|
185
|
+
$[46] = value;
|
|
186
|
+
$[47] = t11;
|
|
187
|
+
} else t11 = $[47];
|
|
175
188
|
let t12;
|
|
176
|
-
if ($[
|
|
177
|
-
t12 = /* @__PURE__ */
|
|
189
|
+
if ($[48] !== description) {
|
|
190
|
+
t12 = /* @__PURE__ */ jsx(TextInput.Description, { children: description });
|
|
191
|
+
$[48] = description;
|
|
192
|
+
$[49] = t12;
|
|
193
|
+
} else t12 = $[49];
|
|
194
|
+
let t13;
|
|
195
|
+
if ($[50] === Symbol.for("react.memo_cache_sentinel")) {
|
|
196
|
+
t13 = /* @__PURE__ */ jsx(TextInput.Error, {});
|
|
197
|
+
$[50] = t13;
|
|
198
|
+
} else t13 = $[50];
|
|
199
|
+
let t14;
|
|
200
|
+
if ($[51] !== className || $[52] !== dirty || $[53] !== disabled || $[54] !== errors || $[55] !== onValueChange || $[56] !== pending || $[57] !== readOnly || $[58] !== requiredness || $[59] !== state || $[60] !== t10 || $[61] !== t11 || $[62] !== t12 || $[63] !== t2 || $[64] !== touched || $[65] !== value) {
|
|
201
|
+
t14 = /* @__PURE__ */ jsxs(TextInput.Root, {
|
|
178
202
|
value,
|
|
179
203
|
onValueChange,
|
|
180
204
|
disabled,
|
|
181
205
|
readOnly,
|
|
182
206
|
requiredness,
|
|
183
|
-
optionalLabel,
|
|
184
207
|
errors,
|
|
185
208
|
dirty,
|
|
186
209
|
touched,
|
|
@@ -188,31 +211,30 @@ var PasswordField = (t0) => {
|
|
|
188
211
|
state,
|
|
189
212
|
className,
|
|
190
213
|
children: [
|
|
191
|
-
|
|
192
|
-
t8,
|
|
193
|
-
t9,
|
|
214
|
+
t2,
|
|
194
215
|
t10,
|
|
195
|
-
t11
|
|
216
|
+
t11,
|
|
217
|
+
t12,
|
|
218
|
+
t13
|
|
196
219
|
]
|
|
197
220
|
});
|
|
198
|
-
$[
|
|
199
|
-
$[
|
|
200
|
-
$[
|
|
201
|
-
$[
|
|
202
|
-
$[
|
|
203
|
-
$[
|
|
204
|
-
$[
|
|
205
|
-
$[
|
|
206
|
-
$[
|
|
207
|
-
$[
|
|
208
|
-
$[
|
|
209
|
-
$[57] = t10;
|
|
210
|
-
$[58] = t8;
|
|
211
|
-
$[59] = t9;
|
|
212
|
-
$[60] = touched;
|
|
213
|
-
$[61] = value;
|
|
221
|
+
$[51] = className;
|
|
222
|
+
$[52] = dirty;
|
|
223
|
+
$[53] = disabled;
|
|
224
|
+
$[54] = errors;
|
|
225
|
+
$[55] = onValueChange;
|
|
226
|
+
$[56] = pending;
|
|
227
|
+
$[57] = readOnly;
|
|
228
|
+
$[58] = requiredness;
|
|
229
|
+
$[59] = state;
|
|
230
|
+
$[60] = t10;
|
|
231
|
+
$[61] = t11;
|
|
214
232
|
$[62] = t12;
|
|
215
|
-
|
|
216
|
-
|
|
233
|
+
$[63] = t2;
|
|
234
|
+
$[64] = touched;
|
|
235
|
+
$[65] = value;
|
|
236
|
+
$[66] = t14;
|
|
237
|
+
} else t14 = $[66];
|
|
238
|
+
return t14;
|
|
217
239
|
};
|
|
218
240
|
export { PasswordField };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import './password-field.css';// src/components/password-field/password-field.module.scss
|
|
2
|
-
var strength = "
|
|
3
|
-
var meter = "
|
|
4
|
-
var meterLabel = "
|
|
5
|
-
var meterValue = "
|
|
6
|
-
var meterTrack = "
|
|
7
|
-
var meterIndicator = "
|
|
8
|
-
var feedback = "
|
|
9
|
-
var suggestions = "
|
|
2
|
+
var strength = "_strength_1q8qt_3";
|
|
3
|
+
var meter = "_meter_1q8qt_8";
|
|
4
|
+
var meterLabel = "_meterLabel_1q8qt_30";
|
|
5
|
+
var meterValue = "_meterValue_1q8qt_35";
|
|
6
|
+
var meterTrack = "_meterTrack_1q8qt_40";
|
|
7
|
+
var meterIndicator = "_meterIndicator_1q8qt_47";
|
|
8
|
+
var feedback = "_feedback_1q8qt_56";
|
|
9
|
+
var suggestions = "_suggestions_1q8qt_60";
|
|
10
10
|
var password_field_module_default = {
|
|
11
11
|
strength,
|
|
12
12
|
meter,
|
|
@@ -1,8 +1,97 @@
|
|
|
1
|
+
import { Meter } from "@base-ui/react/meter";
|
|
2
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
1
3
|
import type { Score } from "@zxcvbn-ts/core";
|
|
2
|
-
import type
|
|
4
|
+
import { type ReactElement, type ReactNode } from "react";
|
|
3
5
|
import { type ZxcvbnLanguages } from "../../lib/password-strength/password-strength.ts";
|
|
4
6
|
/** The name of each strength band, from 0 (weakest) to 4 (strongest). */
|
|
5
7
|
export type PasswordScoreLabels = Readonly<Record<Score, string>>;
|
|
8
|
+
export type PasswordStrengthRootProps = useRender.ComponentProps<"div"> & Readonly<{
|
|
9
|
+
password: string;
|
|
10
|
+
/**
|
|
11
|
+
* zxcvbn language packs beside the kit's English and Dutch ones, by lowercase
|
|
12
|
+
* language tag: `{ de: () => import("@zxcvbn-ts/language-de") }`.
|
|
13
|
+
*/
|
|
14
|
+
languages?: ZxcvbnLanguages;
|
|
15
|
+
}>;
|
|
16
|
+
/**
|
|
17
|
+
* Judges `password` with zxcvbn in the locale's language and hands the result
|
|
18
|
+
* to the parts inside it. It suspends while that language's dictionaries load,
|
|
19
|
+
* and renders nothing for an empty password.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* <PasswordStrength.Root password={password}>…</PasswordStrength.Root>
|
|
23
|
+
*/
|
|
24
|
+
declare const Root: ({ password, languages, className, render, ref, ...props }: PasswordStrengthRootProps) => ReactNode;
|
|
25
|
+
export type PasswordStrengthMeterProps = Omit<Meter.Root.Props, "value" | "max" | "getAriaValueText"> & Readonly<{
|
|
26
|
+
/** The name of each band, such as "Very weak" for 0. */
|
|
27
|
+
scoreLabels: PasswordScoreLabels;
|
|
28
|
+
}>;
|
|
29
|
+
/**
|
|
30
|
+
* The strength band as a meter, read as the band's name. It sets `data-score`,
|
|
31
|
+
* which the `Value` and `Indicator` inside it colour by.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* <PasswordStrength.Meter scoreLabels={SCORE_LABELS}>…</PasswordStrength.Meter>
|
|
35
|
+
*/
|
|
36
|
+
declare const StrengthMeter: ({ scoreLabels, className, ...props }: PasswordStrengthMeterProps) => ReactNode;
|
|
37
|
+
/**
|
|
38
|
+
* The meter's label, such as "Password strength".
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* <PasswordStrength.Label>Password strength</PasswordStrength.Label>
|
|
42
|
+
*/
|
|
43
|
+
declare const Label: ({ className, ...props }: Meter.Label.Props) => ReactNode;
|
|
44
|
+
export type PasswordStrengthValueProps = Omit<Meter.Value.Props, "children">;
|
|
45
|
+
/**
|
|
46
|
+
* The band's name, such as "Fair", from the meter's `scoreLabels`.
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* <PasswordStrength.Value />
|
|
50
|
+
*/
|
|
51
|
+
declare const Value: ({ className, ...props }: PasswordStrengthValueProps) => ReactNode;
|
|
52
|
+
/**
|
|
53
|
+
* The bar the indicator fills.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* <PasswordStrength.Track><PasswordStrength.Indicator /></PasswordStrength.Track>
|
|
57
|
+
*/
|
|
58
|
+
declare const Track: ({ className, ...props }: Meter.Track.Props) => ReactNode;
|
|
59
|
+
/**
|
|
60
|
+
* The fill of the track, as far as the band reaches and in its colour.
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* <PasswordStrength.Indicator />
|
|
64
|
+
*/
|
|
65
|
+
declare const Indicator: ({ className, ...props }: Meter.Indicator.Props) => ReactNode;
|
|
66
|
+
export type PasswordStrengthFeedbackProps = Omit<useRender.ComponentProps<"p">, "children">;
|
|
67
|
+
/**
|
|
68
|
+
* zxcvbn's own warning, in the locale's language. Renders nothing without one.
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* <PasswordStrength.Feedback />
|
|
72
|
+
*/
|
|
73
|
+
declare const Feedback: ({ className, render, ref, ...props }: PasswordStrengthFeedbackProps) => ReactElement | null;
|
|
74
|
+
export type PasswordStrengthSuggestionsProps = Omit<useRender.ComponentProps<"ul">, "children"> & Readonly<{
|
|
75
|
+
/** Renders one of zxcvbn's suggestions, such as a `Suggestion`. */
|
|
76
|
+
children: (suggestion: string) => ReactNode;
|
|
77
|
+
}>;
|
|
78
|
+
/**
|
|
79
|
+
* zxcvbn's own suggestions, in the locale's language, as a list. Renders
|
|
80
|
+
* nothing without any.
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* <PasswordStrength.Suggestions>
|
|
84
|
+
* {suggestion => <PasswordStrength.Suggestion key={suggestion}>{suggestion}</PasswordStrength.Suggestion>}
|
|
85
|
+
* </PasswordStrength.Suggestions>
|
|
86
|
+
*/
|
|
87
|
+
declare const Suggestions: ({ className, render, ref, children, ...props }: PasswordStrengthSuggestionsProps) => ReactElement | null;
|
|
88
|
+
/**
|
|
89
|
+
* One of zxcvbn's suggestions.
|
|
90
|
+
*
|
|
91
|
+
* @example
|
|
92
|
+
* <PasswordStrength.Suggestion>{suggestion}</PasswordStrength.Suggestion>
|
|
93
|
+
*/
|
|
94
|
+
declare const Suggestion: ({ className, render, ref, ...props }: useRender.ComponentProps<"li">) => ReactElement;
|
|
6
95
|
export type PasswordStrengthProps = Readonly<{
|
|
7
96
|
password: string;
|
|
8
97
|
/** The meter's label, such as "Password strength". */
|
|
@@ -16,12 +105,27 @@ export type PasswordStrengthProps = Readonly<{
|
|
|
16
105
|
languages?: ZxcvbnLanguages;
|
|
17
106
|
className?: string;
|
|
18
107
|
}>;
|
|
108
|
+
declare const Prefab: ({ password, label, scoreLabels, languages, className, }: PasswordStrengthProps) => ReactNode;
|
|
109
|
+
/** The parts of a password strength meter, hanging off its prefab. */
|
|
110
|
+
export type PasswordStrengthParts = typeof Prefab & Readonly<{
|
|
111
|
+
Root: typeof Root;
|
|
112
|
+
Meter: typeof StrengthMeter;
|
|
113
|
+
Label: typeof Label;
|
|
114
|
+
Value: typeof Value;
|
|
115
|
+
Track: typeof Track;
|
|
116
|
+
Indicator: typeof Indicator;
|
|
117
|
+
Feedback: typeof Feedback;
|
|
118
|
+
Suggestions: typeof Suggestions;
|
|
119
|
+
Suggestion: typeof Suggestion;
|
|
120
|
+
}>;
|
|
19
121
|
/**
|
|
20
122
|
* The strength band of a password as a labelled meter, followed by zxcvbn's own
|
|
21
123
|
* warning and suggestions in the locale's language. It suspends while that
|
|
22
|
-
* language's dictionaries load, and renders nothing for an empty password.
|
|
124
|
+
* language's dictionaries load, and renders nothing for an empty password. The
|
|
125
|
+
* parts hanging off it compose a meter by hand.
|
|
23
126
|
*
|
|
24
127
|
* @example
|
|
25
128
|
* <PasswordStrength password={password} label="Password strength" scoreLabels={SCORE_LABELS} />
|
|
26
129
|
*/
|
|
27
|
-
export declare const PasswordStrength:
|
|
130
|
+
export declare const PasswordStrength: PasswordStrengthParts;
|
|
131
|
+
export {};
|