@igne-agency/react-web-ui 0.3.1 → 0.4.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/README.md +32 -1
- package/dist/components/accordion/accordion.css +24 -19
- package/dist/components/accordion/accordion.d.ts +19 -3
- package/dist/components/accordion/accordion.js +86 -32
- package/dist/components/accordion/accordion.module.js +8 -8
- package/dist/components/active-filters/active-filter-describers.d.ts +1 -1
- package/dist/components/active-filters/active-filter-describers.js +1 -1
- package/dist/components/active-filters/active-filters.d.ts +35 -2
- package/dist/components/active-filters/active-filters.js +57 -52
- package/dist/components/active-filters/index.js +2 -2
- package/dist/components/attachment-tile/attachment-preview.d.ts +11 -9
- package/dist/components/attachment-tile/attachment-preview.js +102 -68
- package/dist/components/attachment-tile/attachment-tile.css +22 -13
- package/dist/components/attachment-tile/attachment-tile.d.ts +51 -6
- package/dist/components/attachment-tile/attachment-tile.js +209 -85
- package/dist/components/attachment-tile/attachment-tile.module.js +10 -10
- package/dist/components/attachment-tile/index.d.ts +1 -1
- package/dist/components/attachment-tile/index.js +2 -2
- package/dist/components/avatar/avatar.d.ts +5 -5
- package/dist/components/avatar/avatar.js +64 -37
- package/dist/components/avatar-group/avatar-group.js +2 -2
- package/dist/components/badge/badge.js +1 -1
- package/dist/components/breadcrumbs/breadcrumbs.d.ts +22 -7
- package/dist/components/breadcrumbs/breadcrumbs.js +189 -170
- package/dist/components/button/button.d.ts +2 -3
- package/dist/components/button/button.js +58 -77
- package/dist/components/button/close-button.d.ts +4 -2
- package/dist/components/button/close-button.js +9 -9
- package/dist/components/checkbox-field/checkbox-field.d.ts +17 -3
- package/dist/components/checkbox-field/checkbox-field.js +108 -131
- package/dist/components/checkbox-field/checkbox.css +26 -34
- package/dist/components/checkbox-field/checkbox.d.ts +51 -8
- package/dist/components/checkbox-field/checkbox.js +221 -57
- package/dist/components/checkbox-field/checkbox.module.js +6 -8
- package/dist/components/checkbox-field/index.d.ts +0 -1
- package/dist/components/checkbox-field/index.js +1 -2
- package/dist/components/checkbox-field/tsf-checkbox-field.d.ts +2 -2
- package/dist/components/checkbox-group-field/checkbox-group-field.d.ts +4 -1
- package/dist/components/checkbox-group-field/checkbox-group-field.js +54 -50
- package/dist/components/checkbox-group-field/checkbox-group.d.ts +7 -2
- package/dist/components/checkbox-group-field/checkbox-group.js +8 -3
- package/dist/components/collapsible/collapsible.css +23 -18
- package/dist/components/collapsible/collapsible.d.ts +18 -3
- package/dist/components/collapsible/collapsible.js +85 -32
- package/dist/components/collapsible/collapsible.module.js +7 -7
- package/dist/components/combobox-field/combobox-field.d.ts +9 -1
- package/dist/components/combobox-field/combobox-field.js +195 -175
- package/dist/components/combobox-field/combobox-items.d.ts +2 -2
- package/dist/components/combobox-field/combobox-items.js +4 -4
- package/dist/components/combobox-field/combobox.css +99 -96
- package/dist/components/combobox-field/combobox.d.ts +94 -15
- package/dist/components/combobox-field/combobox.js +484 -159
- package/dist/components/combobox-field/combobox.module.js +21 -21
- package/dist/components/combobox-field/index.d.ts +0 -1
- package/dist/components/combobox-field/selection.d.ts +4 -1
- package/dist/components/combobox-field/value-state-view.css +7 -3
- package/dist/components/combobox-field/value-state-view.d.ts +4 -2
- package/dist/components/combobox-field/value-state-view.js +15 -15
- package/dist/components/combobox-field/value-state-view.module.js +6 -4
- package/dist/components/composer/composer-attachments.d.ts +11 -3
- package/dist/components/composer/composer-attachments.js +61 -47
- package/dist/components/composer/composer-editor.d.ts +2 -1
- package/dist/components/composer/composer-editor.js +79 -71
- package/dist/components/composer/composer-mentions.js +2 -2
- package/dist/components/composer/composer.d.ts +42 -21
- package/dist/components/composer/composer.js +201 -58
- package/dist/components/composer/mention-text.js +3 -3
- package/dist/components/confirm-dialog/confirm-dialog.d.ts +8 -7
- package/dist/components/confirm-dialog/confirm-dialog.js +10 -9
- package/dist/components/conversation/conversation.context.d.ts +0 -5
- package/dist/components/conversation/conversation.d.ts +63 -29
- package/dist/components/conversation/conversation.js +193 -82
- package/dist/components/conversation/index.d.ts +1 -1
- package/dist/components/date-field/date-field.d.ts +10 -4
- package/dist/components/date-field/date-field.js +57 -43
- package/dist/components/date-field/date-input.d.ts +20 -3
- package/dist/components/date-field/date-input.js +28 -13
- package/dist/components/date-field/index.d.ts +1 -1
- package/dist/components/date-field/tsf-date-field.d.ts +1 -1
- package/dist/components/date-field/tsf-date-field.js +1 -1
- package/dist/components/date-range-field/date-range-field.d.ts +8 -4
- package/dist/components/date-range-field/date-range-field.js +57 -45
- package/dist/components/date-range-field/date-range-input.d.ts +20 -3
- package/dist/components/date-range-field/date-range-input.js +27 -12
- package/dist/components/date-range-field/tsf-date-range-field.d.ts +1 -1
- package/dist/components/date-range-field/tsf-date-range-field.js +1 -1
- package/dist/components/detail-list/detail-list.d.ts +28 -27
- package/dist/components/detail-list/detail-list.js +177 -121
- package/dist/components/dialog/dialog.d.ts +47 -27
- package/dist/components/dialog/dialog.js +101 -38
- package/dist/components/divider/divider.js +1 -1
- package/dist/components/drawer/drawer.d.ts +48 -30
- package/dist/components/drawer/drawer.js +113 -41
- package/dist/components/email-field/email-field.d.ts +5 -3
- package/dist/components/email-field/email-field.js +1 -3
- package/dist/components/email-field/tsf-email-field.d.ts +3 -2
- package/dist/components/empty-message/empty-message.d.ts +3 -3
- package/dist/components/empty-message/empty-message.js +3 -3
- package/dist/components/error-boundary/error-boundary.d.ts +5 -2
- package/dist/components/error-boundary/error-boundary.js +2 -3
- package/dist/components/error-message/error-message.d.ts +1 -1
- package/dist/components/error-message/error-message.js +1 -1
- package/dist/components/error-text/error-text.js +3 -3
- package/dist/components/field/field.d.ts +5 -5
- package/dist/components/field/field.js +9 -9
- package/dist/components/field/index.js +2 -2
- package/dist/components/field/input-parts.js +1 -1
- package/dist/components/field-placeholder/field-placeholder.d.ts +4 -1
- package/dist/components/field-placeholder/field-placeholder.js +41 -26
- package/dist/components/fieldset/field-group.js +1 -1
- package/dist/components/fieldset/fieldset-root.js +1 -1
- package/dist/components/fieldset/fieldset.js +1 -1
- package/dist/components/file-field/file-field.css +19 -15
- package/dist/components/file-field/file-field.d.ts +10 -1
- package/dist/components/file-field/file-field.js +130 -109
- package/dist/components/file-field/file-field.module.js +6 -4
- package/dist/components/file-field/file-input.d.ts +32 -9
- package/dist/components/file-field/file-input.js +94 -74
- package/dist/components/filter-bar/filter-bar.d.ts +79 -51
- package/dist/components/filter-bar/filter-bar.js +552 -216
- package/dist/components/form/form.d.ts +4 -6
- package/dist/components/form/form.js +6 -8
- package/dist/components/icon/icon.d.ts +5 -10
- package/dist/components/icon/icon.js +4 -6
- package/dist/components/link/link.js +1 -1
- package/dist/components/link-button/link-button.d.ts +1 -2
- package/dist/components/link-button/link-button.js +12 -22
- package/dist/components/loading-message/loading-message.d.ts +2 -2
- package/dist/components/loading-message/loading-message.js +1 -1
- package/dist/components/locale-provider/locale-provider.js +1 -1
- package/dist/components/menu/menu.d.ts +40 -22
- package/dist/components/menu/menu.js +100 -40
- package/dist/components/nav/nav-context.d.ts +0 -1
- package/dist/components/nav/nav-context.js +1 -2
- package/dist/components/nav/nav-item-view.d.ts +7 -7
- package/dist/components/nav/nav-item-view.js +27 -51
- package/dist/components/nav/nav.css +72 -60
- package/dist/components/nav/nav.d.ts +15 -8
- package/dist/components/nav/nav.js +105 -52
- package/dist/components/nav/nav.module.js +14 -14
- package/dist/components/number-field/number-field.d.ts +7 -1
- package/dist/components/number-field/number-field.js +98 -82
- package/dist/components/number-field/number-input.d.ts +53 -4
- package/dist/components/number-field/number-input.js +68 -21
- package/dist/components/number-field/tsf-number-field.d.ts +1 -1
- package/dist/components/number-field/tsf-number-field.js +1 -1
- package/dist/components/otp-field/otp-input.d.ts +25 -0
- package/dist/components/otp-field/otp-input.js +26 -1
- package/dist/components/pagination/pagination.d.ts +82 -23
- package/dist/components/pagination/pagination.js +656 -229
- package/dist/components/password-field/password-field.d.ts +7 -1
- package/dist/components/password-field/password-field.js +117 -126
- package/dist/components/password-field/password-strength.js +1 -1
- package/dist/components/password-field/tsf-password-field.d.ts +1 -1
- package/dist/components/password-field/tsf-password-field.js +1 -1
- package/dist/components/photo-field/photo-field.d.ts +17 -3
- package/dist/components/photo-field/photo-field.js +168 -89
- package/dist/components/photo-field/photo-input-context.d.ts +25 -0
- package/dist/components/photo-field/photo-input-context.js +14 -0
- package/dist/components/photo-field/photo-input.d.ts +58 -23
- package/dist/components/photo-field/photo-input.js +459 -261
- package/dist/components/popover/popover.d.ts +55 -23
- package/dist/components/popover/popover.js +205 -61
- package/dist/components/radio-group-field/radio-group.js +1 -1
- package/dist/components/search-field/search-field.d.ts +7 -5
- package/dist/components/search-field/search-field.js +4 -6
- package/dist/components/search-field/tsf-search-field.d.ts +1 -1
- package/dist/components/search-field/tsf-search-field.js +1 -1
- package/dist/components/segmented-control-field/segmented-control.js +1 -1
- package/dist/components/select-field/select-field.d.ts +7 -1
- package/dist/components/select-field/select-field.js +151 -139
- package/dist/components/select-field/select.d.ts +28 -6
- package/dist/components/select-field/select.js +234 -149
- package/dist/components/skeleton/skeleton.js +1 -1
- package/dist/components/spinner/spinner.css +47 -1
- package/dist/components/spinner/spinner.js +28 -11
- package/dist/components/spinner/spinner.module.js +18 -3
- package/dist/components/stale/stale.d.ts +17 -21
- package/dist/components/stale/stale.js +307 -129
- package/dist/components/status-message/status-message.css +22 -21
- package/dist/components/status-message/status-message.d.ts +10 -5
- package/dist/components/status-message/status-message.js +20 -24
- package/dist/components/status-message/status-message.module.js +6 -6
- package/dist/components/status-message/status-preset.d.ts +4 -5
- package/dist/components/status-message/status-preset.js +3 -3
- package/dist/components/switch-field/switch.js +1 -1
- package/dist/components/tabs/tabs.d.ts +51 -28
- package/dist/components/tabs/tabs.js +219 -144
- package/dist/components/tag/tag.css +23 -21
- package/dist/components/tag/tag.d.ts +17 -15
- package/dist/components/tag/tag.js +140 -65
- package/dist/components/tag/tag.module.js +3 -3
- package/dist/components/tag-group/tag-group.css +30 -27
- package/dist/components/tag-group/tag-group.d.ts +10 -4
- package/dist/components/tag-group/tag-group.js +47 -35
- package/dist/components/tag-group/tag-group.module.js +4 -4
- package/dist/components/text-field/text-field.d.ts +14 -3
- package/dist/components/text-field/text-field.js +154 -133
- package/dist/components/text-field/text-input.d.ts +89 -3
- package/dist/components/text-field/text-input.js +184 -70
- package/dist/components/textarea-field/textarea.js +1 -1
- package/dist/components/time-field/time-input.d.ts +6 -0
- package/dist/components/time-field/time-input.js +6 -0
- package/dist/components/time-zone-provider/time-zone-provider.js +1 -1
- package/dist/components/toast/index.js +2 -2
- package/dist/components/toast/toast-provider.css +38 -34
- package/dist/components/toast/toast-provider.d.ts +65 -3
- package/dist/components/toast/toast-provider.js +313 -148
- package/dist/components/toast/toast-provider.module.js +11 -17
- package/dist/components/toast/toast.d.ts +5 -1
- package/dist/components/toast/toast.js +2 -1
- package/dist/components/toggle-group-field/toggle-group.js +1 -1
- package/dist/components/tooltip/tooltip.d.ts +6 -6
- package/dist/components/tooltip/tooltip.js +7 -7
- package/dist/data-table/data-table-content.d.ts +18 -10
- package/dist/data-table/data-table-content.js +145 -290
- package/dist/data-table/data-table-context.d.ts +4 -2
- package/dist/data-table/data-table-context.js +1 -1
- package/dist/data-table/data-table-parts.d.ts +99 -0
- package/dist/data-table/data-table-parts.js +1182 -0
- package/dist/data-table/data-table-selection.d.ts +7 -3
- package/dist/data-table/data-table-selection.js +62 -37
- package/dist/data-table/data-table.css +100 -95
- package/dist/data-table/data-table.d.ts +49 -25
- package/dist/data-table/data-table.js +95 -83
- package/dist/data-table/data-table.module.js +34 -34
- package/dist/data-table/index.d.ts +2 -1
- package/dist/data-table/index.js +2 -1
- package/dist/data-view/use-data-view.d.ts +2 -2
- package/dist/data-view/use-data-view.js +2 -2
- package/dist/index.js +7 -8
- package/dist/lib/calendar/calendar-navigation.d.ts +9 -2
- package/dist/lib/calendar/calendar-navigation.js +72 -73
- package/dist/lib/calendar/calendar-year.d.ts +4 -3
- package/dist/lib/calendar/calendar-year.js +137 -156
- package/dist/lib/calendar/temporal.d.ts +18 -12
- package/dist/lib/calendar/temporal.js +191 -147
- package/dist/lib/table-storage.d.ts +2 -2
- package/dist/lib/table-storage.js +2 -2
- package/dist/lib/unsaved-changes/leave-guard.js +1 -1
- package/dist/terrazzo/index.d.ts +16 -0
- package/dist/terrazzo/index.js +94 -2
- package/dist/tokens.css +71 -69
- package/package.json +3 -2
- package/tokens/ref.tokens.json +0 -30
- package/tokens/sys.tokens.json +0 -7
- package/dist/assets/spinner.js +0 -28
- package/dist/components/checkbox-field/checkbox-glyph.d.ts +0 -12
- package/dist/components/checkbox-field/checkbox-glyph.js +0 -38
- package/dist/components/combobox-field/combobox-popup-body.d.ts +0 -34
- package/dist/components/combobox-field/combobox-popup-body.js +0 -142
- package/dist/components/conversation/conversation.context.js +0 -4
- package/dist/vendor/@material-design-icons/svg/outlined/add.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/arrow_downward.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/arrow_forward.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/arrow_upward.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/attach_file.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/block.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/calendar_today.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/check.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/check_circle.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/chevron_left.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/chevron_right.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/close.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/content_copy.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/date_range.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/description.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/download.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/error.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/error_outline.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/expand_less.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/expand_more.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/filter_alt.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/filter_alt_off.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/first_page.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/info.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/keyboard_arrow_down.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/last_page.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/mail.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/more_horiz.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/photo_camera.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/remove.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/restart_alt.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/restore.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/search.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/unfold_more.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/upload_file.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/visibility.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/visibility_off.js +0 -12
- package/dist/vendor/@material-design-icons/svg/outlined/warning_amber.js +0 -12
|
@@ -24,6 +24,10 @@ export type PasswordFieldBaseProps = Omit<TextFieldBaseProps, "type" | "icon" |
|
|
|
24
24
|
showPasswordLabel: string;
|
|
25
25
|
/** The reveal button's accessible name while the password shows, such as "Hide password". */
|
|
26
26
|
hidePasswordLabel: string;
|
|
27
|
+
/** The reveal button's icon while the password is hidden. */
|
|
28
|
+
showPasswordIcon: ReactNode;
|
|
29
|
+
/** The reveal button's icon while the password shows. */
|
|
30
|
+
hidePasswordIcon: ReactNode;
|
|
27
31
|
}>;
|
|
28
32
|
export type PasswordFieldProps = PasswordFieldBaseProps & PasswordFieldStrengthProps;
|
|
29
33
|
/**
|
|
@@ -36,9 +40,11 @@ export type PasswordFieldProps = PasswordFieldBaseProps & PasswordFieldStrengthP
|
|
|
36
40
|
* optionalLabel="optional"
|
|
37
41
|
* showPasswordLabel="Show password"
|
|
38
42
|
* hidePasswordLabel="Hide password"
|
|
43
|
+
* showPasswordIcon={<VisibilityIcon />}
|
|
44
|
+
* hidePasswordIcon={<VisibilityOffIcon />}
|
|
39
45
|
* value={password}
|
|
40
46
|
* onValueChange={setPassword}
|
|
41
47
|
* autoComplete="current-password"
|
|
42
48
|
* />
|
|
43
49
|
*/
|
|
44
|
-
export declare const PasswordField: ({ label, description, errors, requiredness, optionalLabel, showPasswordLabel, hidePasswordLabel, strength, strengthLabel, scoreLabels, languages, value, onValueChange, disabled, readOnly, dirty, touched, pending, state, className, ...inputProps }: PasswordFieldProps) => ReactNode;
|
|
50
|
+
export declare const PasswordField: ({ label, description, errors, requiredness, optionalLabel, showPasswordLabel, hidePasswordLabel, showPasswordIcon, hidePasswordIcon, strength, strengthLabel, scoreLabels, languages, value, onValueChange, disabled, readOnly, dirty, touched, pending, state, className, ...inputProps }: PasswordFieldProps) => ReactNode;
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
import SvgVisibility from "../../vendor/@material-design-icons/svg/outlined/visibility.js";
|
|
2
|
-
import SvgVisibilityOff from "../../vendor/@material-design-icons/svg/outlined/visibility_off.js";
|
|
3
|
-
import { Button } from "../button/button.js";
|
|
4
1
|
import { TextInput } from "../text-field/text-input.js";
|
|
5
|
-
import text_field_module_default from "../text-field/text-field.module.js";
|
|
6
2
|
import { PasswordStrength } from "./password-strength.js";
|
|
7
3
|
import { c } from "react/compiler-runtime";
|
|
8
|
-
import { useState } from "react";
|
|
9
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { useState } from "react";
|
|
10
6
|
// src/components/password-field/password-field.tsx
|
|
11
7
|
/**
|
|
12
8
|
* A password field with a reveal toggle, and optionally a strength meter fed by
|
|
@@ -18,18 +14,21 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
18
14
|
* optionalLabel="optional"
|
|
19
15
|
* showPasswordLabel="Show password"
|
|
20
16
|
* hidePasswordLabel="Hide password"
|
|
17
|
+
* showPasswordIcon={<VisibilityIcon />}
|
|
18
|
+
* hidePasswordIcon={<VisibilityOffIcon />}
|
|
21
19
|
* value={password}
|
|
22
20
|
* onValueChange={setPassword}
|
|
23
21
|
* autoComplete="current-password"
|
|
24
22
|
* />
|
|
25
23
|
*/
|
|
26
24
|
var PasswordField = (t0) => {
|
|
27
|
-
const $ = c(
|
|
25
|
+
const $ = c(63);
|
|
28
26
|
let className;
|
|
29
27
|
let description;
|
|
30
28
|
let dirty;
|
|
31
29
|
let disabled;
|
|
32
30
|
let errors;
|
|
31
|
+
let hidePasswordIcon;
|
|
33
32
|
let hidePasswordLabel;
|
|
34
33
|
let inputProps;
|
|
35
34
|
let label;
|
|
@@ -40,6 +39,7 @@ var PasswordField = (t0) => {
|
|
|
40
39
|
let readOnly;
|
|
41
40
|
let requiredness;
|
|
42
41
|
let scoreLabels;
|
|
42
|
+
let showPasswordIcon;
|
|
43
43
|
let showPasswordLabel;
|
|
44
44
|
let state;
|
|
45
45
|
let strength;
|
|
@@ -47,143 +47,134 @@ var PasswordField = (t0) => {
|
|
|
47
47
|
let touched;
|
|
48
48
|
let value;
|
|
49
49
|
if ($[0] !== t0) {
|
|
50
|
-
({label, description, errors, requiredness, optionalLabel, showPasswordLabel, hidePasswordLabel, strength, strengthLabel, scoreLabels, languages, value, onValueChange, disabled, readOnly, dirty, touched, pending, state, className, ...inputProps} = t0);
|
|
50
|
+
({label, description, errors, requiredness, optionalLabel, showPasswordLabel, hidePasswordLabel, showPasswordIcon, hidePasswordIcon, strength, strengthLabel, scoreLabels, languages, value, onValueChange, disabled, readOnly, dirty, touched, pending, state, className, ...inputProps} = t0);
|
|
51
51
|
$[0] = t0;
|
|
52
52
|
$[1] = className;
|
|
53
53
|
$[2] = description;
|
|
54
54
|
$[3] = dirty;
|
|
55
55
|
$[4] = disabled;
|
|
56
56
|
$[5] = errors;
|
|
57
|
-
$[6] =
|
|
58
|
-
$[7] =
|
|
59
|
-
$[8] =
|
|
60
|
-
$[9] =
|
|
61
|
-
$[10] =
|
|
62
|
-
$[11] =
|
|
63
|
-
$[12] =
|
|
64
|
-
$[13] =
|
|
65
|
-
$[14] =
|
|
66
|
-
$[15] =
|
|
67
|
-
$[16] =
|
|
68
|
-
$[17] =
|
|
69
|
-
$[18] =
|
|
70
|
-
$[19] =
|
|
71
|
-
$[20] =
|
|
72
|
-
$[21] =
|
|
57
|
+
$[6] = hidePasswordIcon;
|
|
58
|
+
$[7] = hidePasswordLabel;
|
|
59
|
+
$[8] = inputProps;
|
|
60
|
+
$[9] = label;
|
|
61
|
+
$[10] = languages;
|
|
62
|
+
$[11] = onValueChange;
|
|
63
|
+
$[12] = optionalLabel;
|
|
64
|
+
$[13] = pending;
|
|
65
|
+
$[14] = readOnly;
|
|
66
|
+
$[15] = requiredness;
|
|
67
|
+
$[16] = scoreLabels;
|
|
68
|
+
$[17] = showPasswordIcon;
|
|
69
|
+
$[18] = showPasswordLabel;
|
|
70
|
+
$[19] = state;
|
|
71
|
+
$[20] = strength;
|
|
72
|
+
$[21] = strengthLabel;
|
|
73
|
+
$[22] = touched;
|
|
74
|
+
$[23] = value;
|
|
73
75
|
} else {
|
|
74
76
|
className = $[1];
|
|
75
77
|
description = $[2];
|
|
76
78
|
dirty = $[3];
|
|
77
79
|
disabled = $[4];
|
|
78
80
|
errors = $[5];
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
81
|
+
hidePasswordIcon = $[6];
|
|
82
|
+
hidePasswordLabel = $[7];
|
|
83
|
+
inputProps = $[8];
|
|
84
|
+
label = $[9];
|
|
85
|
+
languages = $[10];
|
|
86
|
+
onValueChange = $[11];
|
|
87
|
+
optionalLabel = $[12];
|
|
88
|
+
pending = $[13];
|
|
89
|
+
readOnly = $[14];
|
|
90
|
+
requiredness = $[15];
|
|
91
|
+
scoreLabels = $[16];
|
|
92
|
+
showPasswordIcon = $[17];
|
|
93
|
+
showPasswordLabel = $[18];
|
|
94
|
+
state = $[19];
|
|
95
|
+
strength = $[20];
|
|
96
|
+
strengthLabel = $[21];
|
|
97
|
+
touched = $[22];
|
|
98
|
+
value = $[23];
|
|
95
99
|
}
|
|
96
100
|
const [revealed, setRevealed] = useState(false);
|
|
97
101
|
let t1;
|
|
98
|
-
if ($[
|
|
102
|
+
if ($[24] !== label) {
|
|
99
103
|
t1 = /* @__PURE__ */ jsx(TextInput.Label, { children: label });
|
|
100
|
-
$[
|
|
101
|
-
$[
|
|
102
|
-
} else t1 = $[
|
|
104
|
+
$[24] = label;
|
|
105
|
+
$[25] = t1;
|
|
106
|
+
} else t1 = $[25];
|
|
103
107
|
const t2 = revealed ? "text" : "password";
|
|
104
108
|
let t3;
|
|
105
|
-
if ($[
|
|
109
|
+
if ($[26] !== inputProps || $[27] !== t2) {
|
|
106
110
|
t3 = /* @__PURE__ */ jsx(TextInput.Input, {
|
|
107
111
|
...inputProps,
|
|
108
112
|
type: t2
|
|
109
113
|
});
|
|
110
|
-
$[
|
|
111
|
-
$[
|
|
112
|
-
$[
|
|
113
|
-
} else t3 = $[
|
|
114
|
+
$[26] = inputProps;
|
|
115
|
+
$[27] = t2;
|
|
116
|
+
$[28] = t3;
|
|
117
|
+
} else t3 = $[28];
|
|
114
118
|
let t4;
|
|
115
|
-
if ($[
|
|
119
|
+
if ($[29] === Symbol.for("react.memo_cache_sentinel")) {
|
|
116
120
|
t4 = /* @__PURE__ */ jsx(TextInput.Pending, {});
|
|
117
|
-
$[
|
|
118
|
-
} else t4 = $[
|
|
119
|
-
const t5 = revealed ?
|
|
120
|
-
const t6 = revealed ?
|
|
121
|
+
$[29] = t4;
|
|
122
|
+
} else t4 = $[29];
|
|
123
|
+
const t5 = revealed ? hidePasswordLabel : showPasswordLabel;
|
|
124
|
+
const t6 = revealed ? hidePasswordIcon : showPasswordIcon;
|
|
121
125
|
let t7;
|
|
122
|
-
if ($[
|
|
123
|
-
t7 =
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
if ($[30] !== disabled || $[31] !== revealed || $[32] !== t5 || $[33] !== t6 || $[34] !== t7) {
|
|
129
|
-
t8 = /* @__PURE__ */ jsx(Button, {
|
|
130
|
-
iconOnly: true,
|
|
131
|
-
icon: t5,
|
|
132
|
-
label: t6,
|
|
133
|
-
variant: "tertiary",
|
|
134
|
-
size: "sm",
|
|
135
|
-
"aria-pressed": revealed,
|
|
136
|
-
disabled,
|
|
137
|
-
className: text_field_module_default.action,
|
|
138
|
-
onClick: t7
|
|
126
|
+
if ($[30] !== revealed || $[31] !== t5 || $[32] !== t6) {
|
|
127
|
+
t7 = /* @__PURE__ */ jsx(TextInput.Reveal, {
|
|
128
|
+
revealed,
|
|
129
|
+
onRevealedChange: setRevealed,
|
|
130
|
+
label: t5,
|
|
131
|
+
children: t6
|
|
139
132
|
});
|
|
140
|
-
$[30] =
|
|
141
|
-
$[31] =
|
|
142
|
-
$[32] =
|
|
143
|
-
$[33] =
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
if ($[36] !== t3 || $[37] !== t8) {
|
|
149
|
-
t9 = /* @__PURE__ */ jsxs(TextInput.Group, { children: [
|
|
133
|
+
$[30] = revealed;
|
|
134
|
+
$[31] = t5;
|
|
135
|
+
$[32] = t6;
|
|
136
|
+
$[33] = t7;
|
|
137
|
+
} else t7 = $[33];
|
|
138
|
+
let t8;
|
|
139
|
+
if ($[34] !== t3 || $[35] !== t7) {
|
|
140
|
+
t8 = /* @__PURE__ */ jsxs(TextInput.Group, { children: [
|
|
150
141
|
t3,
|
|
151
142
|
t4,
|
|
152
|
-
|
|
143
|
+
t7
|
|
153
144
|
] });
|
|
154
|
-
$[
|
|
155
|
-
$[
|
|
156
|
-
$[
|
|
157
|
-
} else
|
|
158
|
-
let
|
|
159
|
-
if ($[
|
|
160
|
-
|
|
145
|
+
$[34] = t3;
|
|
146
|
+
$[35] = t7;
|
|
147
|
+
$[36] = t8;
|
|
148
|
+
} else t8 = $[36];
|
|
149
|
+
let t9;
|
|
150
|
+
if ($[37] !== languages || $[38] !== scoreLabels || $[39] !== strength || $[40] !== strengthLabel || $[41] !== value) {
|
|
151
|
+
t9 = strength === true && /* @__PURE__ */ jsx(PasswordStrength, {
|
|
161
152
|
password: value,
|
|
162
153
|
label: strengthLabel,
|
|
163
154
|
scoreLabels,
|
|
164
155
|
languages
|
|
165
156
|
});
|
|
166
|
-
$[
|
|
167
|
-
$[
|
|
168
|
-
$[
|
|
169
|
-
$[
|
|
170
|
-
$[
|
|
157
|
+
$[37] = languages;
|
|
158
|
+
$[38] = scoreLabels;
|
|
159
|
+
$[39] = strength;
|
|
160
|
+
$[40] = strengthLabel;
|
|
161
|
+
$[41] = value;
|
|
162
|
+
$[42] = t9;
|
|
163
|
+
} else t9 = $[42];
|
|
164
|
+
let t10;
|
|
165
|
+
if ($[43] !== description) {
|
|
166
|
+
t10 = /* @__PURE__ */ jsx(TextInput.Description, { children: description });
|
|
167
|
+
$[43] = description;
|
|
171
168
|
$[44] = t10;
|
|
172
169
|
} else t10 = $[44];
|
|
173
170
|
let t11;
|
|
174
|
-
if ($[45]
|
|
175
|
-
t11 = /* @__PURE__ */ jsx(TextInput.
|
|
176
|
-
$[45] =
|
|
177
|
-
|
|
178
|
-
} else t11 = $[46];
|
|
171
|
+
if ($[45] === Symbol.for("react.memo_cache_sentinel")) {
|
|
172
|
+
t11 = /* @__PURE__ */ jsx(TextInput.Error, {});
|
|
173
|
+
$[45] = t11;
|
|
174
|
+
} else t11 = $[45];
|
|
179
175
|
let t12;
|
|
180
|
-
if ($[47]
|
|
181
|
-
t12 = /* @__PURE__ */
|
|
182
|
-
$[47] = t12;
|
|
183
|
-
} else t12 = $[47];
|
|
184
|
-
let t13;
|
|
185
|
-
if ($[48] !== className || $[49] !== dirty || $[50] !== disabled || $[51] !== errors || $[52] !== onValueChange || $[53] !== optionalLabel || $[54] !== pending || $[55] !== readOnly || $[56] !== requiredness || $[57] !== state || $[58] !== t1 || $[59] !== t10 || $[60] !== t11 || $[61] !== t9 || $[62] !== touched || $[63] !== value) {
|
|
186
|
-
t13 = /* @__PURE__ */ jsxs(TextInput.Root, {
|
|
176
|
+
if ($[46] !== className || $[47] !== dirty || $[48] !== disabled || $[49] !== errors || $[50] !== onValueChange || $[51] !== optionalLabel || $[52] !== pending || $[53] !== readOnly || $[54] !== requiredness || $[55] !== state || $[56] !== t1 || $[57] !== t10 || $[58] !== t8 || $[59] !== t9 || $[60] !== touched || $[61] !== value) {
|
|
177
|
+
t12 = /* @__PURE__ */ jsxs(TextInput.Root, {
|
|
187
178
|
value,
|
|
188
179
|
onValueChange,
|
|
189
180
|
disabled,
|
|
@@ -198,30 +189,30 @@ var PasswordField = (t0) => {
|
|
|
198
189
|
className,
|
|
199
190
|
children: [
|
|
200
191
|
t1,
|
|
192
|
+
t8,
|
|
201
193
|
t9,
|
|
202
194
|
t10,
|
|
203
|
-
t11
|
|
204
|
-
t12
|
|
195
|
+
t11
|
|
205
196
|
]
|
|
206
197
|
});
|
|
207
|
-
$[
|
|
208
|
-
$[
|
|
209
|
-
$[
|
|
210
|
-
$[
|
|
211
|
-
$[
|
|
212
|
-
$[
|
|
213
|
-
$[
|
|
214
|
-
$[
|
|
215
|
-
$[
|
|
216
|
-
$[
|
|
217
|
-
$[
|
|
218
|
-
$[
|
|
219
|
-
$[
|
|
220
|
-
$[
|
|
221
|
-
$[
|
|
222
|
-
$[
|
|
223
|
-
$[
|
|
224
|
-
} else
|
|
225
|
-
return
|
|
198
|
+
$[46] = className;
|
|
199
|
+
$[47] = dirty;
|
|
200
|
+
$[48] = disabled;
|
|
201
|
+
$[49] = errors;
|
|
202
|
+
$[50] = onValueChange;
|
|
203
|
+
$[51] = optionalLabel;
|
|
204
|
+
$[52] = pending;
|
|
205
|
+
$[53] = readOnly;
|
|
206
|
+
$[54] = requiredness;
|
|
207
|
+
$[55] = state;
|
|
208
|
+
$[56] = t1;
|
|
209
|
+
$[57] = t10;
|
|
210
|
+
$[58] = t8;
|
|
211
|
+
$[59] = t9;
|
|
212
|
+
$[60] = touched;
|
|
213
|
+
$[61] = value;
|
|
214
|
+
$[62] = t12;
|
|
215
|
+
} else t12 = $[62];
|
|
216
|
+
return t12;
|
|
226
217
|
};
|
|
227
218
|
export { PasswordField };
|
|
@@ -2,8 +2,8 @@ import { usePasswordStrength } from "../../lib/password-strength/password-streng
|
|
|
2
2
|
import { useLocale } from "../locale-provider/locale-provider.js";
|
|
3
3
|
import password_field_module_default from "./password-field.module.js";
|
|
4
4
|
import { c } from "react/compiler-runtime";
|
|
5
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
5
|
import { clsx } from "clsx";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { Meter } from "@base-ui/react/meter";
|
|
8
8
|
// src/components/password-field/password-strength.tsx
|
|
9
9
|
var MAX_SCORE = 4;
|
|
@@ -8,7 +8,7 @@ export type TSFPasswordFieldProps = Omit<PasswordFieldBaseProps, keyof Connected
|
|
|
8
8
|
*
|
|
9
9
|
* @example
|
|
10
10
|
* <form.AppField name="password">
|
|
11
|
-
* {field => <field.PasswordField label="Password" optionalLabel="optional" showPasswordLabel="Show password" hidePasswordLabel="Hide password" />}
|
|
11
|
+
* {field => <field.PasswordField label="Password" optionalLabel="optional" showPasswordLabel="Show password" hidePasswordLabel="Hide password" showPasswordIcon={<VisibilityIcon />} hidePasswordIcon={<VisibilityOffIcon />} />}
|
|
12
12
|
* </form.AppField>
|
|
13
13
|
*/
|
|
14
14
|
export declare const TSFPasswordField: (props: TSFPasswordFieldProps) => ReactNode;
|
|
@@ -9,7 +9,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
9
9
|
*
|
|
10
10
|
* @example
|
|
11
11
|
* <form.AppField name="password">
|
|
12
|
-
* {field => <field.PasswordField label="Password" optionalLabel="optional" showPasswordLabel="Show password" hidePasswordLabel="Hide password" />}
|
|
12
|
+
* {field => <field.PasswordField label="Password" optionalLabel="optional" showPasswordLabel="Show password" hidePasswordLabel="Hide password" showPasswordIcon={<VisibilityIcon />} hidePasswordIcon={<VisibilityOffIcon />} />}
|
|
13
13
|
* </form.AppField>
|
|
14
14
|
*/
|
|
15
15
|
var TSFPasswordField = (props) => {
|
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
2
|
import { type FieldProps } from "../field/index.ts";
|
|
3
|
-
import { type PhotoInputPreviewProps, type
|
|
4
|
-
export type PhotoFieldProps =
|
|
3
|
+
import { type PhotoInputPreviewProps, type PhotoInputRootProps } from "./photo-input.tsx";
|
|
4
|
+
export type PhotoFieldProps = Pick<PhotoInputRootProps, "value" | "onValueChange" | "accept" | "name" | "readOnly" | "onBlur"> & PhotoInputPreviewProps & FieldProps & Readonly<{
|
|
5
|
+
/** The picked photo's alternative text, such as "Preview". */
|
|
6
|
+
previewLabel: string;
|
|
7
|
+
/** What the control announces while a photo is set, such as "Photo set". */
|
|
8
|
+
photoSetLabel: string;
|
|
9
|
+
/** What the control announces while no photo is set, such as "No photo". */
|
|
10
|
+
noPhotoLabel: string;
|
|
11
|
+
/** Accessible name of the button that removes a picked photo, such as "Remove photo". */
|
|
12
|
+
removeLabel: string;
|
|
13
|
+
/** The remove button's icon, such as a cross. */
|
|
14
|
+
removeIcon: ReactNode;
|
|
15
|
+
/** The badge on the circle's rim, such as a camera icon. */
|
|
16
|
+
icon?: ReactNode;
|
|
5
17
|
/** Applied to the field, where a caller lays it out itself. */
|
|
6
18
|
className?: string;
|
|
7
19
|
}>;
|
|
@@ -20,10 +32,12 @@ export type PhotoFieldProps = Omit<PhotoInputProps, keyof PhotoInputPreviewProps
|
|
|
20
32
|
* hasStoredImage={user.photo !== null}
|
|
21
33
|
* defaultPreview={<Avatar name={user.name} />}
|
|
22
34
|
* accept={["image/png", "image/jpeg"]}
|
|
35
|
+
* icon={<PhotoCameraIcon />}
|
|
23
36
|
* previewLabel="Preview"
|
|
24
37
|
* photoSetLabel="Photo set"
|
|
25
38
|
* noPhotoLabel="No photo"
|
|
26
39
|
* removeLabel="Remove photo"
|
|
40
|
+
* removeIcon={<CloseIcon />}
|
|
27
41
|
* />
|
|
28
42
|
*/
|
|
29
|
-
export declare const PhotoField: ({ label, description, errors, requiredness, optionalLabel, dirty, touched, pending, readOnly, className, ...controlProps }: PhotoFieldProps) => ReactNode;
|
|
43
|
+
export declare const PhotoField: ({ label, description, errors, requiredness, optionalLabel, dirty, touched, pending, readOnly, className, defaultPreview, hasStoredImage, previewLabel, photoSetLabel, noPhotoLabel, removeLabel, removeIcon, icon, ...controlProps }: PhotoFieldProps) => ReactNode;
|