@wordpress/components 39.0.0 → 40.0.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/CHANGELOG.md +63 -0
- package/CONTRIBUTING.md +7 -8
- package/build/base-control/styles/base-control-styles.cjs +150 -45
- package/build/base-control/styles/base-control-styles.cjs.map +4 -4
- package/build/border-box-control/border-box-control/hook.cjs +88 -23
- package/build/border-box-control/border-box-control/hook.cjs.map +3 -3
- package/build/border-box-control/border-box-control-linked-button/hook.cjs +87 -8
- package/build/border-box-control/border-box-control-linked-button/hook.cjs.map +4 -4
- package/build/border-box-control/border-box-control-split-controls/hook.cjs +89 -16
- package/build/border-box-control/border-box-control-split-controls/hook.cjs.map +4 -4
- package/build/border-box-control/border-box-control-visualizer/hook.cjs +108 -8
- package/build/border-box-control/border-box-control-visualizer/hook.cjs.map +4 -4
- package/build/border-control/border-control/hook.cjs +89 -14
- package/build/border-control/border-control/hook.cjs.map +4 -4
- package/build/border-control/border-control-dropdown/component.cjs +2 -4
- package/build/border-control/border-control-dropdown/component.cjs.map +2 -2
- package/build/border-control/border-control-dropdown/hook.cjs +103 -27
- package/build/border-control/border-control-dropdown/hook.cjs.map +4 -4
- package/build/box-control/box-input-control.cjs +102 -10
- package/build/box-control/box-input-control.cjs.map +4 -4
- package/build/box-control/index.cjs +95 -5
- package/build/box-control/index.cjs.map +4 -4
- package/build/button/index.cjs +10 -3
- package/build/button/index.cjs.map +2 -2
- package/build/card/card-body/hook.cjs +4 -2
- package/build/card/card-body/hook.cjs.map +2 -2
- package/build/card/styles.cjs +31 -16
- package/build/card/styles.cjs.map +2 -2
- package/build/circular-option-picker/circular-option-picker-option.cjs +4 -5
- package/build/circular-option-picker/circular-option-picker-option.cjs.map +2 -2
- package/build/circular-option-picker/circular-option-picker.cjs +24 -6
- package/build/circular-option-picker/circular-option-picker.cjs.map +2 -2
- package/build/circular-option-picker/index.cjs +6 -2
- package/build/circular-option-picker/index.cjs.map +2 -2
- package/build/circular-option-picker/utils.cjs +38 -8
- package/build/circular-option-picker/utils.cjs.map +3 -3
- package/build/color-palette/index.cjs +103 -10
- package/build/color-palette/index.cjs.map +3 -3
- package/build/combobox-control/index.cjs +87 -2
- package/build/combobox-control/index.cjs.map +3 -3
- package/build/confirm-dialog/component.cjs +5 -1
- package/build/confirm-dialog/component.cjs.map +2 -2
- package/build/content-editable-control/index.cjs +1 -1
- package/build/content-editable-control/index.cjs.map +2 -2
- package/build/context/context-system-provider.cjs.map +2 -2
- package/build/custom-gradient-picker/gradient-bar/control-points.cjs +14 -2
- package/build/custom-gradient-picker/gradient-bar/control-points.cjs.map +2 -2
- package/build/custom-gradient-picker/gradient-bar/index.cjs +2 -0
- package/build/custom-gradient-picker/gradient-bar/index.cjs.map +2 -2
- package/build/dropdown/dropdown-content-wrapper.cjs +102 -3
- package/build/dropdown/dropdown-content-wrapper.cjs.map +4 -4
- package/build/duotone-picker/custom-duotone-bar.cjs +1 -0
- package/build/duotone-picker/custom-duotone-bar.cjs.map +2 -2
- package/build/duotone-picker/duotone-picker.cjs +23 -14
- package/build/duotone-picker/duotone-picker.cjs.map +2 -2
- package/build/focal-point-picker/index.cjs +5 -3
- package/build/focal-point-picker/index.cjs.map +2 -2
- package/build/gradient-picker/index.cjs +105 -11
- package/build/gradient-picker/index.cjs.map +3 -3
- package/build/input-control/input-field.cjs +1 -0
- package/build/input-control/input-field.cjs.map +2 -2
- package/build/input-control/styles/input-control-styles.cjs +22 -22
- package/build/input-control/styles/input-control-styles.cjs.map +2 -2
- package/build/modal/index.cjs +1 -0
- package/build/modal/index.cjs.map +2 -2
- package/build/palette-edit/index.cjs +208 -33
- package/build/palette-edit/index.cjs.map +3 -3
- package/build/private-apis.cjs +1 -6
- package/build/private-apis.cjs.map +2 -2
- package/build/progress-bar/index.cjs +95 -7
- package/build/progress-bar/index.cjs.map +4 -4
- package/build/radio-control/index.cjs +1 -0
- package/build/radio-control/index.cjs.map +2 -2
- package/build/resizable-box/resize-tooltip/index.cjs +91 -4
- package/build/resizable-box/resize-tooltip/index.cjs.map +3 -3
- package/build/resizable-box/resize-tooltip/label.cjs +103 -6
- package/build/resizable-box/resize-tooltip/label.cjs.map +4 -4
- package/build/scrollable/hook.cjs +93 -6
- package/build/scrollable/hook.cjs.map +4 -4
- package/build/textarea-control/index.cjs +87 -3
- package/build/textarea-control/index.cjs.map +3 -3
- package/build/toggle-group-control/toggle-group-control/component.cjs +1 -1
- package/build/toggle-group-control/toggle-group-control/component.cjs.map +2 -2
- package/build/toggle-group-control/toggle-group-control-option-base/component.cjs +1 -1
- package/build/toggle-group-control/toggle-group-control-option-base/component.cjs.map +2 -2
- package/build/utils/config-values.cjs +0 -3
- package/build/utils/config-values.cjs.map +2 -2
- package/build/validated-form-controls/components/content-editable-control.cjs +3 -2
- package/build/validated-form-controls/components/content-editable-control.cjs.map +2 -2
- package/build/validated-form-controls/components/custom-select-control.cjs +3 -2
- package/build/validated-form-controls/components/custom-select-control.cjs.map +2 -2
- package/build/validated-form-controls/components/index.cjs +1 -9
- package/build/validated-form-controls/components/index.cjs.map +2 -2
- package/build/validated-form-controls/components/input-control.cjs +9 -2
- package/build/validated-form-controls/components/input-control.cjs.map +3 -3
- package/build/validated-form-controls/components/range-control.cjs +3 -2
- package/build/validated-form-controls/components/range-control.cjs.map +2 -2
- package/build/validated-form-controls/components/textarea-control.cjs +9 -2
- package/build/validated-form-controls/components/textarea-control.cjs.map +3 -3
- package/build/validated-form-controls/index.cjs +1 -3
- package/build/validated-form-controls/index.cjs.map +2 -2
- package/build/z-stack/component.cjs +105 -7
- package/build/z-stack/component.cjs.map +4 -4
- package/build-module/base-control/styles/base-control-styles.mjs +151 -46
- package/build-module/base-control/styles/base-control-styles.mjs.map +3 -3
- package/build-module/border-box-control/border-box-control/hook.mjs +89 -14
- package/build-module/border-box-control/border-box-control/hook.mjs.map +3 -3
- package/build-module/border-box-control/border-box-control-linked-button/hook.mjs +87 -8
- package/build-module/border-box-control/border-box-control-linked-button/hook.mjs.map +3 -3
- package/build-module/border-box-control/border-box-control-split-controls/hook.mjs +89 -16
- package/build-module/border-box-control/border-box-control-split-controls/hook.mjs.map +3 -3
- package/build-module/border-box-control/border-box-control-visualizer/hook.mjs +108 -8
- package/build-module/border-box-control/border-box-control-visualizer/hook.mjs.map +3 -3
- package/build-module/border-control/border-control/hook.mjs +90 -15
- package/build-module/border-control/border-control/hook.mjs.map +3 -3
- package/build-module/border-control/border-control-dropdown/component.mjs +2 -4
- package/build-module/border-control/border-control-dropdown/component.mjs.map +2 -2
- package/build-module/border-control/border-control-dropdown/hook.mjs +103 -27
- package/build-module/border-control/border-control-dropdown/hook.mjs.map +3 -3
- package/build-module/box-control/box-input-control.mjs +102 -10
- package/build-module/box-control/box-input-control.mjs.map +3 -3
- package/build-module/box-control/index.mjs +95 -5
- package/build-module/box-control/index.mjs.map +3 -3
- package/build-module/button/index.mjs +11 -4
- package/build-module/button/index.mjs.map +2 -2
- package/build-module/card/card-body/hook.mjs +4 -2
- package/build-module/card/card-body/hook.mjs.map +2 -2
- package/build-module/card/styles.mjs +30 -16
- package/build-module/card/styles.mjs.map +2 -2
- package/build-module/circular-option-picker/circular-option-picker-option.mjs +4 -5
- package/build-module/circular-option-picker/circular-option-picker-option.mjs.map +2 -2
- package/build-module/circular-option-picker/circular-option-picker.mjs +24 -6
- package/build-module/circular-option-picker/circular-option-picker.mjs.map +2 -2
- package/build-module/circular-option-picker/index.mjs +4 -2
- package/build-module/circular-option-picker/index.mjs.map +2 -2
- package/build-module/circular-option-picker/utils.mjs +25 -7
- package/build-module/circular-option-picker/utils.mjs.map +2 -2
- package/build-module/color-palette/index.mjs +104 -11
- package/build-module/color-palette/index.mjs.map +3 -3
- package/build-module/combobox-control/index.mjs +88 -3
- package/build-module/combobox-control/index.mjs.map +3 -3
- package/build-module/confirm-dialog/component.mjs +5 -1
- package/build-module/confirm-dialog/component.mjs.map +2 -2
- package/build-module/content-editable-control/index.mjs +1 -1
- package/build-module/content-editable-control/index.mjs.map +2 -2
- package/build-module/context/context-system-provider.mjs.map +2 -2
- package/build-module/custom-gradient-picker/gradient-bar/control-points.mjs +14 -2
- package/build-module/custom-gradient-picker/gradient-bar/control-points.mjs.map +2 -2
- package/build-module/custom-gradient-picker/gradient-bar/index.mjs +2 -0
- package/build-module/custom-gradient-picker/gradient-bar/index.mjs.map +2 -2
- package/build-module/dropdown/dropdown-content-wrapper.mjs +92 -3
- package/build-module/dropdown/dropdown-content-wrapper.mjs.map +3 -3
- package/build-module/duotone-picker/custom-duotone-bar.mjs +1 -0
- package/build-module/duotone-picker/custom-duotone-bar.mjs.map +2 -2
- package/build-module/duotone-picker/duotone-picker.mjs +24 -15
- package/build-module/duotone-picker/duotone-picker.mjs.map +2 -2
- package/build-module/focal-point-picker/index.mjs +5 -3
- package/build-module/focal-point-picker/index.mjs.map +2 -2
- package/build-module/gradient-picker/index.mjs +106 -12
- package/build-module/gradient-picker/index.mjs.map +3 -3
- package/build-module/input-control/input-field.mjs +1 -0
- package/build-module/input-control/input-field.mjs.map +2 -2
- package/build-module/input-control/styles/input-control-styles.mjs +22 -22
- package/build-module/input-control/styles/input-control-styles.mjs.map +2 -2
- package/build-module/modal/index.mjs +1 -0
- package/build-module/modal/index.mjs.map +2 -2
- package/build-module/palette-edit/index.mjs +209 -34
- package/build-module/palette-edit/index.mjs.map +2 -2
- package/build-module/private-apis.mjs +2 -7
- package/build-module/private-apis.mjs.map +2 -2
- package/build-module/progress-bar/index.mjs +95 -7
- package/build-module/progress-bar/index.mjs.map +3 -3
- package/build-module/radio-control/index.mjs +1 -0
- package/build-module/radio-control/index.mjs.map +2 -2
- package/build-module/resizable-box/resize-tooltip/index.mjs +91 -4
- package/build-module/resizable-box/resize-tooltip/index.mjs.map +3 -3
- package/build-module/resizable-box/resize-tooltip/label.mjs +93 -6
- package/build-module/resizable-box/resize-tooltip/label.mjs.map +3 -3
- package/build-module/scrollable/hook.mjs +93 -6
- package/build-module/scrollable/hook.mjs.map +4 -4
- package/build-module/textarea-control/index.mjs +87 -3
- package/build-module/textarea-control/index.mjs.map +3 -3
- package/build-module/toggle-group-control/toggle-group-control/component.mjs +1 -1
- package/build-module/toggle-group-control/toggle-group-control/component.mjs.map +2 -2
- package/build-module/toggle-group-control/toggle-group-control-option-base/component.mjs +1 -1
- package/build-module/toggle-group-control/toggle-group-control-option-base/component.mjs.map +2 -2
- package/build-module/utils/config-values.mjs +0 -3
- package/build-module/utils/config-values.mjs.map +2 -2
- package/build-module/validated-form-controls/components/content-editable-control.mjs +2 -1
- package/build-module/validated-form-controls/components/content-editable-control.mjs.map +2 -2
- package/build-module/validated-form-controls/components/custom-select-control.mjs +2 -1
- package/build-module/validated-form-controls/components/custom-select-control.mjs.map +2 -2
- package/build-module/validated-form-controls/components/index.mjs +0 -4
- package/build-module/validated-form-controls/components/index.mjs.map +2 -2
- package/build-module/validated-form-controls/components/input-control.mjs +8 -1
- package/build-module/validated-form-controls/components/input-control.mjs.map +2 -2
- package/build-module/validated-form-controls/components/range-control.mjs +2 -1
- package/build-module/validated-form-controls/components/range-control.mjs.map +2 -2
- package/build-module/validated-form-controls/components/textarea-control.mjs +8 -1
- package/build-module/validated-form-controls/components/textarea-control.mjs.map +2 -2
- package/build-module/validated-form-controls/index.mjs +0 -1
- package/build-module/validated-form-controls/index.mjs.map +2 -2
- package/build-module/z-stack/component.mjs +95 -7
- package/build-module/z-stack/component.mjs.map +3 -3
- package/build-style/style-rtl.css +79 -134
- package/build-style/style.css +79 -134
- package/build-types/base-control/styles/base-control-styles.d.ts +21 -20
- package/build-types/base-control/styles/base-control-styles.d.ts.map +1 -1
- package/build-types/border-box-control/border-box-control/hook.d.ts.map +1 -1
- package/build-types/border-box-control/border-box-control-linked-button/hook.d.ts.map +1 -1
- package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts.map +1 -1
- package/build-types/border-box-control/border-box-control-visualizer/hook.d.ts +863 -1
- package/build-types/border-box-control/border-box-control-visualizer/hook.d.ts.map +1 -1
- package/build-types/border-control/border-control/hook.d.ts.map +1 -1
- package/build-types/border-control/border-control-dropdown/component.d.ts.map +1 -1
- package/build-types/border-control/border-control-dropdown/hook.d.ts +4 -2
- package/build-types/border-control/border-control-dropdown/hook.d.ts.map +1 -1
- package/build-types/box-control/box-input-control.d.ts.map +1 -1
- package/build-types/box-control/index.d.ts.map +1 -1
- package/build-types/button/index.d.ts.map +1 -1
- package/build-types/card/styles.d.ts +2 -1
- package/build-types/card/styles.d.ts.map +1 -1
- package/build-types/circular-option-picker/circular-option-picker-option.d.ts.map +1 -1
- package/build-types/circular-option-picker/circular-option-picker.d.ts.map +1 -1
- package/build-types/circular-option-picker/index.d.ts +1 -1
- package/build-types/circular-option-picker/index.d.ts.map +1 -1
- package/build-types/circular-option-picker/types.d.ts +34 -26
- package/build-types/circular-option-picker/types.d.ts.map +1 -1
- package/build-types/circular-option-picker/utils.d.ts +9 -5
- package/build-types/circular-option-picker/utils.d.ts.map +1 -1
- package/build-types/color-palette/index.d.ts.map +1 -1
- package/build-types/color-palette/types.d.ts +23 -3
- package/build-types/color-palette/types.d.ts.map +1 -1
- package/build-types/combobox-control/index.d.ts.map +1 -1
- package/build-types/combobox-control/types.d.ts +4 -2
- package/build-types/combobox-control/types.d.ts.map +1 -1
- package/build-types/confirm-dialog/component.d.ts.map +1 -1
- package/build-types/confirm-dialog/types.d.ts +11 -0
- package/build-types/confirm-dialog/types.d.ts.map +1 -1
- package/build-types/context/context-system-provider.d.ts.map +1 -1
- package/build-types/custom-gradient-picker/gradient-bar/control-points.d.ts +1 -1
- package/build-types/custom-gradient-picker/gradient-bar/control-points.d.ts.map +1 -1
- package/build-types/custom-gradient-picker/gradient-bar/index.d.ts +1 -1
- package/build-types/custom-gradient-picker/gradient-bar/index.d.ts.map +1 -1
- package/build-types/custom-gradient-picker/types.d.ts +10 -0
- package/build-types/custom-gradient-picker/types.d.ts.map +1 -1
- package/build-types/dropdown/dropdown-content-wrapper.d.ts.map +1 -1
- package/build-types/duotone-picker/custom-duotone-bar.d.ts.map +1 -1
- package/build-types/duotone-picker/duotone-picker.d.ts +1 -1
- package/build-types/duotone-picker/duotone-picker.d.ts.map +1 -1
- package/build-types/duotone-picker/types.d.ts +43 -4
- package/build-types/duotone-picker/types.d.ts.map +1 -1
- package/build-types/focal-point-picker/index.d.ts.map +1 -1
- package/build-types/gradient-picker/index.d.ts.map +1 -1
- package/build-types/gradient-picker/types.d.ts +22 -3
- package/build-types/gradient-picker/types.d.ts.map +1 -1
- package/build-types/input-control/input-field.d.ts.map +1 -1
- package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
- package/build-types/modal/index.d.ts.map +1 -1
- package/build-types/palette-edit/index.d.ts +8 -5
- package/build-types/palette-edit/index.d.ts.map +1 -1
- package/build-types/palette-edit/types.d.ts +47 -8
- package/build-types/palette-edit/types.d.ts.map +1 -1
- package/build-types/private-apis.d.ts.map +1 -1
- package/build-types/progress-bar/index.d.ts.map +1 -1
- package/build-types/radio-control/index.d.ts.map +1 -1
- package/build-types/radio-control/types.d.ts +6 -0
- package/build-types/radio-control/types.d.ts.map +1 -1
- package/build-types/resizable-box/resize-tooltip/index.d.ts +4 -5
- package/build-types/resizable-box/resize-tooltip/index.d.ts.map +1 -1
- package/build-types/resizable-box/resize-tooltip/label.d.ts.map +1 -1
- package/build-types/scrollable/hook.d.ts.map +1 -1
- package/build-types/textarea-control/index.d.ts.map +1 -1
- package/build-types/utils/config-values.d.ts +0 -3
- package/build-types/validated-form-controls/components/content-editable-control.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/custom-select-control.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/index.d.ts +0 -4
- package/build-types/validated-form-controls/components/index.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/input-control.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/range-control.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/textarea-control.d.ts.map +1 -1
- package/build-types/validated-form-controls/index.d.ts +0 -1
- package/build-types/validated-form-controls/index.d.ts.map +1 -1
- package/build-types/z-stack/component.d.ts.map +1 -1
- package/package.json +30 -30
- package/src/animate/stories/index.story.tsx +0 -10
- package/src/base-control/stories/index.story.tsx +1 -1
- package/src/base-control/styles/base-control-styles.tsx +115 -0
- package/src/base-control/styles/style.module.scss +39 -0
- package/src/border-box-control/border-box-control/hook.ts +5 -16
- package/src/border-box-control/border-box-control-linked-button/hook.ts +6 -10
- package/src/border-box-control/border-box-control-split-controls/hook.ts +11 -20
- package/src/border-box-control/border-box-control-visualizer/hook.ts +37 -11
- package/src/border-box-control/stories/index.story.tsx +1 -1
- package/src/border-box-control/style.module.scss +43 -0
- package/src/border-control/border-control/hook.ts +10 -19
- package/src/border-control/border-control-dropdown/component.tsx +6 -8
- package/src/border-control/border-control-dropdown/hook.ts +23 -32
- package/src/border-control/style.module.scss +93 -0
- package/src/border-control/test/index.js +63 -31
- package/src/box-control/box-input-control.tsx +31 -16
- package/src/box-control/index.tsx +15 -12
- package/src/box-control/style.module.scss +28 -0
- package/src/box-control/test/index.tsx +161 -0
- package/src/button/index.tsx +32 -10
- package/src/button/test/index.tsx +51 -0
- package/src/card/card-body/hook.ts +2 -2
- package/src/card/styles.ts +11 -1
- package/src/card/test/__snapshots__/index.tsx.snap +27 -27
- package/src/circular-option-picker/README.md +8 -4
- package/src/circular-option-picker/circular-option-picker-option.tsx +26 -16
- package/src/circular-option-picker/circular-option-picker.tsx +47 -14
- package/src/circular-option-picker/index.tsx +5 -1
- package/src/circular-option-picker/stories/index.story.tsx +3 -3
- package/src/circular-option-picker/test/index.tsx +152 -3
- package/src/circular-option-picker/types.ts +38 -32
- package/src/circular-option-picker/utils.tsx +35 -5
- package/src/clipboard-button/index.tsx +1 -1
- package/src/color-palette/README.md +11 -7
- package/src/color-palette/index.tsx +28 -14
- package/src/color-palette/stories/index.story.tsx +5 -0
- package/src/color-palette/style.module.scss +12 -0
- package/src/color-palette/test/index.tsx +80 -5
- package/src/color-palette/types.ts +23 -3
- package/src/color-picker/stories/index.story.tsx +0 -5
- package/src/combobox-control/README.md +1 -1
- package/src/combobox-control/index.tsx +4 -4
- package/src/combobox-control/style.module.scss +6 -0
- package/src/combobox-control/style.scss +1 -1
- package/src/combobox-control/types.ts +4 -2
- package/src/composite/legacy/stories/index.story.tsx +10 -10
- package/src/composite/stories/index.story.tsx +0 -5
- package/src/confirm-dialog/README.md +16 -0
- package/src/confirm-dialog/component.tsx +7 -1
- package/src/confirm-dialog/test/index.tsx +41 -0
- package/src/confirm-dialog/types.ts +11 -0
- package/src/content-editable-control/style.module.scss +0 -1
- package/src/context/context-system-provider.js +0 -1
- package/src/custom-gradient-picker/gradient-bar/control-points.tsx +24 -3
- package/src/custom-gradient-picker/gradient-bar/index.tsx +2 -0
- package/src/custom-gradient-picker/test/index.tsx +134 -0
- package/src/custom-gradient-picker/types.ts +10 -0
- package/src/dropdown/dropdown-content-wrapper.tsx +17 -7
- package/src/dropdown/stories/index.story.tsx +0 -5
- package/src/dropdown/style.module.scss +25 -0
- package/src/dropdown/test/index.tsx +51 -0
- package/src/duotone-picker/README.md +21 -6
- package/src/duotone-picker/custom-duotone-bar.tsx +1 -0
- package/src/duotone-picker/duotone-picker.tsx +79 -54
- package/src/duotone-picker/stories/duotone-picker.story.tsx +63 -15
- package/src/duotone-picker/test/custom-duotone-bar.tsx +114 -0
- package/src/duotone-picker/test/index.tsx +346 -0
- package/src/duotone-picker/types.ts +48 -4
- package/src/focal-point-picker/index.tsx +6 -2
- package/src/focal-point-picker/stories/index.story.tsx +15 -0
- package/src/focal-point-picker/test/index.tsx +31 -0
- package/src/form-toggle/stories/index.story.tsx +3 -0
- package/src/form-token-field/style.scss +7 -1
- package/src/gradient-picker/README.md +19 -10
- package/src/gradient-picker/index.tsx +43 -16
- package/src/gradient-picker/stories/index.story.tsx +5 -0
- package/src/gradient-picker/test/index.tsx +84 -0
- package/src/gradient-picker/types.ts +22 -3
- package/src/input-control/input-field.tsx +1 -0
- package/src/input-control/stories/index.story.tsx +3 -3
- package/src/input-control/stories/migration-guide.mdx +201 -0
- package/src/input-control/style.scss +11 -0
- package/src/input-control/styles/input-control-styles.tsx +30 -11
- package/src/input-control/test/index.js +10 -0
- package/src/keyboard-shortcuts/stories/index.story.tsx +2 -2
- package/src/menu-group/stories/index.story.tsx +9 -6
- package/src/menu-item/stories/index.story.tsx +6 -3
- package/src/menu-items-choice/stories/index.story.tsx +14 -11
- package/src/modal/index.tsx +1 -0
- package/src/modal/test/index.tsx +19 -0
- package/src/navigator/stories/index.story.tsx +0 -5
- package/src/number-control/stories/index.story.tsx +3 -3
- package/src/palette-edit/index.tsx +364 -70
- package/src/palette-edit/stories/index.story.tsx +59 -18
- package/src/palette-edit/style.scss +3 -1
- package/src/palette-edit/test/index.tsx +375 -1
- package/src/palette-edit/types.ts +50 -8
- package/src/popover/stories/index.story.tsx +5 -1
- package/src/popover/stories/utils.tsx +79 -0
- package/src/popover/test/index.tsx +1 -1
- package/src/popover/test/utils/index.js +1 -0
- package/src/popover/test/utils/index.tsx +4 -78
- package/src/private-apis.ts +0 -8
- package/src/progress-bar/index.tsx +10 -6
- package/src/progress-bar/style.module.scss +62 -0
- package/src/progress-bar/test/index.tsx +13 -11
- package/src/radio-control/README.md +3 -1
- package/src/radio-control/index.tsx +1 -0
- package/src/radio-control/stories/index.story.tsx +12 -0
- package/src/radio-control/style.scss +1 -3
- package/src/radio-control/test/index.tsx +59 -0
- package/src/radio-control/types.ts +6 -0
- package/src/range-control/stories/index.story.tsx +30 -0
- package/src/resizable-box/resize-tooltip/index.tsx +16 -7
- package/src/resizable-box/resize-tooltip/label.tsx +18 -12
- package/src/resizable-box/resize-tooltip/style.module.scss +40 -0
- package/src/resizable-box/resize-tooltip/test/index.tsx +44 -0
- package/src/resizable-box/resize-tooltip/test/label.tsx +25 -0
- package/src/resizable-box/stories/index.story.tsx +11 -0
- package/src/sandbox/stories/index.story.tsx +2 -0
- package/src/scrollable/hook.ts +11 -17
- package/src/scrollable/stories/index.story.tsx +1 -0
- package/src/scrollable/style.module.scss +44 -0
- package/src/scrollable/test/index.tsx +120 -6
- package/src/snackbar/stories/index.story.tsx +5 -0
- package/src/snackbar/stories/list.story.tsx +3 -0
- package/src/spinner/stories/index.story.tsx +2 -2
- package/src/style.scss +1 -0
- package/src/text-control/stories/index.story.tsx +2 -3
- package/src/text-control/style.scss +0 -1
- package/src/textarea-control/index.tsx +6 -3
- package/src/textarea-control/stories/index.story.tsx +2 -3
- package/src/textarea-control/stories/migration-guide.mdx +79 -0
- package/src/textarea-control/style.module.scss +56 -0
- package/src/toggle-group-control/test/__snapshots__/index.tsx.snap +12 -116
- package/src/toggle-group-control/toggle-group-control/style.module.scss +0 -2
- package/src/toggle-group-control/toggle-group-control-option-base/style.module.scss +0 -2
- package/src/utils/config-values.js +0 -3
- package/src/utils/theme-variables.scss +0 -1
- package/src/validated-form-controls/components/content-editable-control.tsx +2 -1
- package/src/validated-form-controls/components/custom-select-control.tsx +2 -1
- package/src/validated-form-controls/components/index.ts +0 -4
- package/src/validated-form-controls/components/input-control.tsx +9 -1
- package/src/validated-form-controls/components/range-control.tsx +2 -1
- package/src/validated-form-controls/components/stories/content-editable-control.story.tsx +6 -0
- package/src/validated-form-controls/components/stories/custom-select-control.story.tsx +6 -0
- package/src/validated-form-controls/components/stories/overview.mdx +4 -47
- package/src/validated-form-controls/components/textarea-control.tsx +9 -1
- package/src/validated-form-controls/index.ts +0 -1
- package/src/validated-form-controls/style.scss +11 -67
- package/src/validated-form-controls/test/input-control.tsx +12 -0
- package/src/validated-form-controls/test/textarea-control.tsx +17 -0
- package/src/z-stack/component.tsx +17 -9
- package/src/z-stack/style.module.scss +26 -0
- package/build/border-box-control/styles.cjs +0 -99
- package/build/border-box-control/styles.cjs.map +0 -7
- package/build/border-control/styles.cjs +0 -117
- package/build/border-control/styles.cjs.map +0 -7
- package/build/box-control/styles/box-control-styles.cjs +0 -131
- package/build/box-control/styles/box-control-styles.cjs.map +0 -7
- package/build/color-palette/styles.cjs +0 -49
- package/build/color-palette/styles.cjs.map +0 -7
- package/build/combobox-control/styles.cjs +0 -49
- package/build/combobox-control/styles.cjs.map +0 -7
- package/build/dropdown/styles.cjs +0 -61
- package/build/dropdown/styles.cjs.map +0 -7
- package/build/progress-bar/styles.cjs +0 -106
- package/build/progress-bar/styles.cjs.map +0 -7
- package/build/resizable-box/resize-tooltip/styles/resize-tooltip.styles.cjs +0 -90
- package/build/resizable-box/resize-tooltip/styles/resize-tooltip.styles.cjs.map +0 -7
- package/build/scrollable/styles.cjs +0 -96
- package/build/scrollable/styles.cjs.map +0 -7
- package/build/textarea-control/styles/textarea-control-styles.cjs +0 -54
- package/build/textarea-control/styles/textarea-control-styles.cjs.map +0 -7
- package/build/validated-form-controls/components/combobox-control.cjs +0 -75
- package/build/validated-form-controls/components/combobox-control.cjs.map +0 -7
- package/build/validated-form-controls/components/form-token-field.cjs +0 -69
- package/build/validated-form-controls/components/form-token-field.cjs.map +0 -7
- package/build/validated-form-controls/components/toggle-control.cjs +0 -67
- package/build/validated-form-controls/components/toggle-control.cjs.map +0 -7
- package/build/validated-form-controls/components/toggle-group-control.cjs +0 -71
- package/build/validated-form-controls/components/toggle-group-control.cjs.map +0 -7
- package/build/validated-form-controls/control-with-error.cjs +0 -200
- package/build/validated-form-controls/control-with-error.cjs.map +0 -7
- package/build/validated-form-controls/validity-indicator.cjs +0 -67
- package/build/validated-form-controls/validity-indicator.cjs.map +0 -7
- package/build/z-stack/styles.cjs +0 -80
- package/build/z-stack/styles.cjs.map +0 -7
- package/build-module/border-box-control/styles.mjs +0 -67
- package/build-module/border-box-control/styles.mjs.map +0 -7
- package/build-module/border-control/styles.mjs +0 -80
- package/build-module/border-control/styles.mjs.map +0 -7
- package/build-module/box-control/styles/box-control-styles.mjs +0 -91
- package/build-module/box-control/styles/box-control-styles.mjs.map +0 -7
- package/build-module/color-palette/styles.mjs +0 -14
- package/build-module/color-palette/styles.mjs.map +0 -7
- package/build-module/combobox-control/styles.mjs +0 -14
- package/build-module/combobox-control/styles.mjs.map +0 -7
- package/build-module/dropdown/styles.mjs +0 -26
- package/build-module/dropdown/styles.mjs.map +0 -7
- package/build-module/progress-bar/styles.mjs +0 -68
- package/build-module/progress-bar/styles.mjs.map +0 -7
- package/build-module/resizable-box/resize-tooltip/styles/resize-tooltip.styles.mjs +0 -52
- package/build-module/resizable-box/resize-tooltip/styles/resize-tooltip.styles.mjs.map +0 -7
- package/build-module/scrollable/styles.mjs +0 -65
- package/build-module/scrollable/styles.mjs.map +0 -7
- package/build-module/textarea-control/styles/textarea-control-styles.mjs +0 -19
- package/build-module/textarea-control/styles/textarea-control-styles.mjs.map +0 -7
- package/build-module/validated-form-controls/components/combobox-control.mjs +0 -40
- package/build-module/validated-form-controls/components/combobox-control.mjs.map +0 -7
- package/build-module/validated-form-controls/components/form-token-field.mjs +0 -44
- package/build-module/validated-form-controls/components/form-token-field.mjs.map +0 -7
- package/build-module/validated-form-controls/components/toggle-control.mjs +0 -32
- package/build-module/validated-form-controls/components/toggle-control.mjs.map +0 -7
- package/build-module/validated-form-controls/components/toggle-group-control.mjs +0 -46
- package/build-module/validated-form-controls/components/toggle-group-control.mjs.map +0 -7
- package/build-module/validated-form-controls/control-with-error.mjs +0 -175
- package/build-module/validated-form-controls/control-with-error.mjs.map +0 -7
- package/build-module/validated-form-controls/validity-indicator.mjs +0 -32
- package/build-module/validated-form-controls/validity-indicator.mjs.map +0 -7
- package/build-module/z-stack/styles.mjs +0 -44
- package/build-module/z-stack/styles.mjs.map +0 -7
- package/build-types/alignment-matrix-control/stories/index.story.d.ts +0 -8
- package/build-types/alignment-matrix-control/stories/index.story.d.ts.map +0 -1
- package/build-types/alignment-matrix-control/test/index.d.ts +0 -2
- package/build-types/alignment-matrix-control/test/index.d.ts.map +0 -1
- package/build-types/angle-picker-control/stories/index.story.d.ts +0 -8
- package/build-types/angle-picker-control/stories/index.story.d.ts.map +0 -1
- package/build-types/animate/stories/index.story.d.ts +0 -12
- package/build-types/animate/stories/index.story.d.ts.map +0 -1
- package/build-types/autocomplete/test/get-autocomplete-match.d.ts +0 -2
- package/build-types/autocomplete/test/get-autocomplete-match.d.ts.map +0 -1
- package/build-types/autocomplete/test/index.d.ts +0 -2
- package/build-types/autocomplete/test/index.d.ts.map +0 -1
- package/build-types/badge/stories/e2e/index.story.d.ts +0 -7
- package/build-types/badge/stories/e2e/index.story.d.ts.map +0 -1
- package/build-types/badge/stories/index.story.d.ts +0 -11
- package/build-types/badge/stories/index.story.d.ts.map +0 -1
- package/build-types/badge/test/index.d.ts +0 -2
- package/build-types/badge/test/index.d.ts.map +0 -1
- package/build-types/base-control/stories/index.story.d.ts +0 -17
- package/build-types/base-control/stories/index.story.d.ts.map +0 -1
- package/build-types/base-control/test/index.d.ts +0 -2
- package/build-types/base-control/test/index.d.ts.map +0 -1
- package/build-types/border-box-control/stories/index.story.d.ts +0 -14
- package/build-types/border-box-control/stories/index.story.d.ts.map +0 -1
- package/build-types/border-box-control/styles.d.ts +0 -10
- package/build-types/border-box-control/styles.d.ts.map +0 -1
- package/build-types/border-box-control/test/index.d.ts +0 -2
- package/build-types/border-box-control/test/index.d.ts.map +0 -1
- package/build-types/border-box-control/test/utils.d.ts +0 -2
- package/build-types/border-box-control/test/utils.d.ts.map +0 -1
- package/build-types/border-control/stories/index.story.d.ts +0 -109
- package/build-types/border-control/stories/index.story.d.ts.map +0 -1
- package/build-types/border-control/styles.d.ts +0 -17
- package/build-types/border-control/styles.d.ts.map +0 -1
- package/build-types/box-control/stories/index.story.d.ts +0 -12
- package/build-types/box-control/stories/index.story.d.ts.map +0 -1
- package/build-types/box-control/styles/box-control-styles.d.ts +0 -65
- package/build-types/box-control/styles/box-control-styles.d.ts.map +0 -1
- package/build-types/box-control/test/index.d.ts +0 -2
- package/build-types/box-control/test/index.d.ts.map +0 -1
- package/build-types/button/stories/e2e/index.story.d.ts +0 -9
- package/build-types/button/stories/e2e/index.story.d.ts.map +0 -1
- package/build-types/button/stories/index.story.d.ts +0 -31
- package/build-types/button/stories/index.story.d.ts.map +0 -1
- package/build-types/button/test/index.d.ts +0 -2
- package/build-types/button/test/index.d.ts.map +0 -1
- package/build-types/button-group/stories/index.story.d.ts +0 -12
- package/build-types/button-group/stories/index.story.d.ts.map +0 -1
- package/build-types/card/stories/index.story.d.ts +0 -20
- package/build-types/card/stories/index.story.d.ts.map +0 -1
- package/build-types/card/test/index.d.ts +0 -2
- package/build-types/card/test/index.d.ts.map +0 -1
- package/build-types/checkbox-control/stories/index.story.d.ts +0 -24
- package/build-types/checkbox-control/stories/index.story.d.ts.map +0 -1
- package/build-types/checkbox-control/test/index.d.ts +0 -2
- package/build-types/checkbox-control/test/index.d.ts.map +0 -1
- package/build-types/circular-option-picker/stories/index.story.d.ts +0 -10
- package/build-types/circular-option-picker/stories/index.story.d.ts.map +0 -1
- package/build-types/circular-option-picker/test/index.d.ts +0 -2
- package/build-types/circular-option-picker/test/index.d.ts.map +0 -1
- package/build-types/color-indicator/stories/index.story.d.ts +0 -6
- package/build-types/color-indicator/stories/index.story.d.ts.map +0 -1
- package/build-types/color-indicator/test/index.d.ts +0 -2
- package/build-types/color-indicator/test/index.d.ts.map +0 -1
- package/build-types/color-palette/stories/index.story.d.ts +0 -11
- package/build-types/color-palette/stories/index.story.d.ts.map +0 -1
- package/build-types/color-palette/styles.d.ts +0 -11
- package/build-types/color-palette/styles.d.ts.map +0 -1
- package/build-types/color-palette/test/index.d.ts +0 -2
- package/build-types/color-palette/test/index.d.ts.map +0 -1
- package/build-types/color-palette/test/utils.d.ts +0 -2
- package/build-types/color-palette/test/utils.d.ts.map +0 -1
- package/build-types/color-picker/stories/index.story.d.ts +0 -6
- package/build-types/color-picker/stories/index.story.d.ts.map +0 -1
- package/build-types/color-picker/test/index.d.ts +0 -2
- package/build-types/color-picker/test/index.d.ts.map +0 -1
- package/build-types/combobox-control/stories/index.story.d.ts +0 -93
- package/build-types/combobox-control/stories/index.story.d.ts.map +0 -1
- package/build-types/combobox-control/styles.d.ts +0 -6
- package/build-types/combobox-control/styles.d.ts.map +0 -1
- package/build-types/combobox-control/test/index.d.ts +0 -2
- package/build-types/combobox-control/test/index.d.ts.map +0 -1
- package/build-types/composite/legacy/stories/index.story.d.ts +0 -9
- package/build-types/composite/legacy/stories/index.story.d.ts.map +0 -1
- package/build-types/composite/legacy/stories/utils.d.ts +0 -27
- package/build-types/composite/legacy/stories/utils.d.ts.map +0 -1
- package/build-types/composite/legacy/test/index.d.ts +0 -2
- package/build-types/composite/legacy/test/index.d.ts.map +0 -1
- package/build-types/composite/stories/index.story.d.ts +0 -33
- package/build-types/composite/stories/index.story.d.ts.map +0 -1
- package/build-types/composite/test/index.d.ts +0 -2
- package/build-types/composite/test/index.d.ts.map +0 -1
- package/build-types/confirm-dialog/stories/index.story.d.ts +0 -7
- package/build-types/confirm-dialog/stories/index.story.d.ts.map +0 -1
- package/build-types/confirm-dialog/test/index.d.ts +0 -2
- package/build-types/confirm-dialog/test/index.d.ts.map +0 -1
- package/build-types/content-editable-control/stories/index.story.d.ts +0 -7
- package/build-types/content-editable-control/stories/index.story.d.ts.map +0 -1
- package/build-types/content-editable-control/test/index.d.ts +0 -2
- package/build-types/content-editable-control/test/index.d.ts.map +0 -1
- package/build-types/context/test/context-connect.d.ts +0 -2
- package/build-types/context/test/context-connect.d.ts.map +0 -1
- package/build-types/context/test/wordpress-component.d.ts +0 -2
- package/build-types/context/test/wordpress-component.d.ts.map +0 -1
- package/build-types/custom-gradient-picker/gradient-bar/test/utils.d.ts +0 -2
- package/build-types/custom-gradient-picker/gradient-bar/test/utils.d.ts.map +0 -1
- package/build-types/custom-gradient-picker/stories/index.story.d.ts +0 -6
- package/build-types/custom-gradient-picker/stories/index.story.d.ts.map +0 -1
- package/build-types/custom-gradient-picker/test/index.d.ts +0 -2
- package/build-types/custom-gradient-picker/test/index.d.ts.map +0 -1
- package/build-types/custom-gradient-picker/test/serializer.d.ts +0 -2
- package/build-types/custom-gradient-picker/test/serializer.d.ts.map +0 -1
- package/build-types/custom-select-control/stories/index.story.d.ts +0 -8
- package/build-types/custom-select-control/stories/index.story.d.ts.map +0 -1
- package/build-types/custom-select-control/test/index.d.ts +0 -2
- package/build-types/custom-select-control/test/index.d.ts.map +0 -1
- package/build-types/custom-select-control-v2/stories/index.story.d.ts +0 -38
- package/build-types/custom-select-control-v2/stories/index.story.d.ts.map +0 -1
- package/build-types/custom-select-control-v2/test/index.d.ts +0 -2
- package/build-types/custom-select-control-v2/test/index.d.ts.map +0 -1
- package/build-types/date-time/date-picker/test/index.d.ts +0 -2
- package/build-types/date-time/date-picker/test/index.d.ts.map +0 -1
- package/build-types/date-time/date-picker/test/use-lilius.d.ts +0 -2
- package/build-types/date-time/date-picker/test/use-lilius.d.ts.map +0 -1
- package/build-types/date-time/date-time/test/index.d.ts +0 -2
- package/build-types/date-time/date-time/test/index.d.ts.map +0 -1
- package/build-types/date-time/stories/date-time.story.d.ts +0 -8
- package/build-types/date-time/stories/date-time.story.d.ts.map +0 -1
- package/build-types/date-time/stories/date.story.d.ts +0 -8
- package/build-types/date-time/stories/date.story.d.ts.map +0 -1
- package/build-types/date-time/stories/time.story.d.ts +0 -11
- package/build-types/date-time/stories/time.story.d.ts.map +0 -1
- package/build-types/date-time/stories/utils.d.ts +0 -3
- package/build-types/date-time/stories/utils.d.ts.map +0 -1
- package/build-types/date-time/test/utils.test.d.ts +0 -2
- package/build-types/date-time/test/utils.test.d.ts.map +0 -1
- package/build-types/date-time/time-picker/test/index.d.ts +0 -2
- package/build-types/date-time/time-picker/test/index.d.ts.map +0 -1
- package/build-types/date-time/time-picker/time-input/test/index.d.ts +0 -2
- package/build-types/date-time/time-picker/time-input/test/index.d.ts.map +0 -1
- package/build-types/disabled/stories/index.story.d.ts +0 -7
- package/build-types/disabled/stories/index.story.d.ts.map +0 -1
- package/build-types/disabled/test/index.d.ts +0 -2
- package/build-types/disabled/test/index.d.ts.map +0 -1
- package/build-types/divider/stories/index.story.d.ts +0 -8
- package/build-types/divider/stories/index.story.d.ts.map +0 -1
- package/build-types/divider/test/index.d.ts +0 -2
- package/build-types/divider/test/index.d.ts.map +0 -1
- package/build-types/draggable/stories/index.story.d.ts +0 -13
- package/build-types/draggable/stories/index.story.d.ts.map +0 -1
- package/build-types/drop-zone/stories/index.story.d.ts +0 -6
- package/build-types/drop-zone/stories/index.story.d.ts.map +0 -1
- package/build-types/dropdown/stories/index.story.d.ts +0 -18
- package/build-types/dropdown/stories/index.story.d.ts.map +0 -1
- package/build-types/dropdown/styles.d.ts +0 -6
- package/build-types/dropdown/styles.d.ts.map +0 -1
- package/build-types/dropdown/test/index.d.ts +0 -2
- package/build-types/dropdown/test/index.d.ts.map +0 -1
- package/build-types/dropdown-menu/stories/index.story.d.ts +0 -7
- package/build-types/dropdown-menu/stories/index.story.d.ts.map +0 -1
- package/build-types/dropdown-menu/test/index.d.ts +0 -2
- package/build-types/dropdown-menu/test/index.d.ts.map +0 -1
- package/build-types/duotone-picker/stories/duotone-picker.story.d.ts +0 -7
- package/build-types/duotone-picker/stories/duotone-picker.story.d.ts.map +0 -1
- package/build-types/duotone-picker/stories/duotone-swatch.story.d.ts +0 -8
- package/build-types/duotone-picker/stories/duotone-swatch.story.d.ts.map +0 -1
- package/build-types/elevation/stories/index.story.d.ts +0 -16
- package/build-types/elevation/stories/index.story.d.ts.map +0 -1
- package/build-types/elevation/test/index.d.ts +0 -2
- package/build-types/elevation/test/index.d.ts.map +0 -1
- package/build-types/external-link/stories/index.story.d.ts +0 -6
- package/build-types/external-link/stories/index.story.d.ts.map +0 -1
- package/build-types/external-link/test/index.d.ts +0 -2
- package/build-types/external-link/test/index.d.ts.map +0 -1
- package/build-types/flex/stories/index.story.d.ts +0 -7
- package/build-types/flex/stories/index.story.d.ts.map +0 -1
- package/build-types/flex/test/index.d.ts +0 -2
- package/build-types/flex/test/index.d.ts.map +0 -1
- package/build-types/focal-point-picker/stories/index.story.d.ts +0 -49
- package/build-types/focal-point-picker/stories/index.story.d.ts.map +0 -1
- package/build-types/focal-point-picker/test/index.d.ts +0 -2
- package/build-types/focal-point-picker/test/index.d.ts.map +0 -1
- package/build-types/focal-point-picker/test/media.d.ts +0 -2
- package/build-types/focal-point-picker/test/media.d.ts.map +0 -1
- package/build-types/font-size-picker/stories/e2e/index.story.d.ts +0 -20
- package/build-types/font-size-picker/stories/e2e/index.story.d.ts.map +0 -1
- package/build-types/font-size-picker/stories/index.story.d.ts +0 -26
- package/build-types/font-size-picker/stories/index.story.d.ts.map +0 -1
- package/build-types/font-size-picker/test/font-size-picker-select.d.ts +0 -2
- package/build-types/font-size-picker/test/font-size-picker-select.d.ts.map +0 -1
- package/build-types/font-size-picker/test/font-size-picker-toggle-group.d.ts +0 -2
- package/build-types/font-size-picker/test/font-size-picker-toggle-group.d.ts.map +0 -1
- package/build-types/font-size-picker/test/index.d.ts +0 -2
- package/build-types/font-size-picker/test/index.d.ts.map +0 -1
- package/build-types/font-size-picker/test/utils.d.ts +0 -2
- package/build-types/font-size-picker/test/utils.d.ts.map +0 -1
- package/build-types/form-file-upload/stories/index.story.d.ts +0 -17
- package/build-types/form-file-upload/stories/index.story.d.ts.map +0 -1
- package/build-types/form-file-upload/test/index.d.ts +0 -2
- package/build-types/form-file-upload/test/index.d.ts.map +0 -1
- package/build-types/form-toggle/stories/index.story.d.ts +0 -6
- package/build-types/form-toggle/stories/index.story.d.ts.map +0 -1
- package/build-types/form-toggle/test/index.d.ts +0 -2
- package/build-types/form-toggle/test/index.d.ts.map +0 -1
- package/build-types/form-token-field/stories/index.story.d.ts +0 -25
- package/build-types/form-token-field/stories/index.story.d.ts.map +0 -1
- package/build-types/form-token-field/test/index.d.ts +0 -2
- package/build-types/form-token-field/test/index.d.ts.map +0 -1
- package/build-types/gradient-picker/stories/index.story.d.ts +0 -11
- package/build-types/gradient-picker/stories/index.story.d.ts.map +0 -1
- package/build-types/gradient-picker/test/index.d.ts +0 -2
- package/build-types/gradient-picker/test/index.d.ts.map +0 -1
- package/build-types/grid/stories/index.story.d.ts +0 -6
- package/build-types/grid/stories/index.story.d.ts.map +0 -1
- package/build-types/grid/test/grid.d.ts +0 -2
- package/build-types/grid/test/grid.d.ts.map +0 -1
- package/build-types/guide/stories/index.story.d.ts +0 -6
- package/build-types/guide/stories/index.story.d.ts.map +0 -1
- package/build-types/guide/test/index.d.ts +0 -2
- package/build-types/guide/test/index.d.ts.map +0 -1
- package/build-types/h-stack/stories/e2e/index.story.d.ts +0 -6
- package/build-types/h-stack/stories/e2e/index.story.d.ts.map +0 -1
- package/build-types/h-stack/stories/index.story.d.ts +0 -6
- package/build-types/h-stack/stories/index.story.d.ts.map +0 -1
- package/build-types/h-stack/test/index.d.ts +0 -2
- package/build-types/h-stack/test/index.d.ts.map +0 -1
- package/build-types/heading/stories/index.story.d.ts +0 -6
- package/build-types/heading/stories/index.story.d.ts.map +0 -1
- package/build-types/heading/test/index.d.ts +0 -2
- package/build-types/heading/test/index.d.ts.map +0 -1
- package/build-types/higher-order/with-fallback-styles/test/index.d.ts +0 -2
- package/build-types/higher-order/with-fallback-styles/test/index.d.ts.map +0 -1
- package/build-types/higher-order/with-filters/test/index.d.ts +0 -2
- package/build-types/higher-order/with-filters/test/index.d.ts.map +0 -1
- package/build-types/higher-order/with-focus-outside/test/index.d.ts +0 -2
- package/build-types/higher-order/with-focus-outside/test/index.d.ts.map +0 -1
- package/build-types/higher-order/with-focus-return/test/index.d.ts +0 -2
- package/build-types/higher-order/with-focus-return/test/index.d.ts.map +0 -1
- package/build-types/higher-order/with-notices/test/index.d.ts +0 -2
- package/build-types/higher-order/with-notices/test/index.d.ts.map +0 -1
- package/build-types/higher-order/with-spoken-messages/test/index.d.ts +0 -2
- package/build-types/higher-order/with-spoken-messages/test/index.d.ts.map +0 -1
- package/build-types/icon/stories/index.story.d.ts +0 -21
- package/build-types/icon/stories/index.story.d.ts.map +0 -1
- package/build-types/icon/test/index.d.ts +0 -2
- package/build-types/icon/test/index.d.ts.map +0 -1
- package/build-types/input-control/stories/index.story.d.ts +0 -31
- package/build-types/input-control/stories/index.story.d.ts.map +0 -1
- package/build-types/isolated-event-container/test/index.d.ts +0 -2
- package/build-types/isolated-event-container/test/index.d.ts.map +0 -1
- package/build-types/item-group/stories/index.story.d.ts +0 -9
- package/build-types/item-group/stories/index.story.d.ts.map +0 -1
- package/build-types/keyboard-shortcuts/stories/index.story.d.ts +0 -6
- package/build-types/keyboard-shortcuts/stories/index.story.d.ts.map +0 -1
- package/build-types/keyboard-shortcuts/test/index.d.ts +0 -2
- package/build-types/keyboard-shortcuts/test/index.d.ts.map +0 -1
- package/build-types/menu/stories/index.story.d.ts +0 -13
- package/build-types/menu/stories/index.story.d.ts.map +0 -1
- package/build-types/menu/test/index.d.ts +0 -2
- package/build-types/menu/test/index.d.ts.map +0 -1
- package/build-types/menu-group/stories/index.story.d.ts +0 -11
- package/build-types/menu-group/stories/index.story.d.ts.map +0 -1
- package/build-types/menu-group/test/index.d.ts +0 -2
- package/build-types/menu-group/test/index.d.ts.map +0 -1
- package/build-types/menu-item/stories/index.story.d.ts +0 -70
- package/build-types/menu-item/stories/index.story.d.ts.map +0 -1
- package/build-types/menu-items-choice/stories/index.story.d.ts +0 -6
- package/build-types/menu-items-choice/stories/index.story.d.ts.map +0 -1
- package/build-types/modal/stories/index.story.d.ts +0 -11
- package/build-types/modal/stories/index.story.d.ts.map +0 -1
- package/build-types/modal/test/aria-helper.d.ts +0 -2
- package/build-types/modal/test/aria-helper.d.ts.map +0 -1
- package/build-types/modal/test/index.d.ts +0 -2
- package/build-types/modal/test/index.d.ts.map +0 -1
- package/build-types/navigable-container/stories/navigable-menu.story.d.ts +0 -6
- package/build-types/navigable-container/stories/navigable-menu.story.d.ts.map +0 -1
- package/build-types/navigable-container/stories/tabbable-container.story.d.ts +0 -6
- package/build-types/navigable-container/stories/tabbable-container.story.d.ts.map +0 -1
- package/build-types/navigable-container/test/navigable-menu.d.ts +0 -2
- package/build-types/navigable-container/test/navigable-menu.d.ts.map +0 -1
- package/build-types/navigable-container/test/tababble-container.d.ts +0 -2
- package/build-types/navigable-container/test/tababble-container.d.ts.map +0 -1
- package/build-types/navigator/stories/index.story.d.ts +0 -8
- package/build-types/navigator/stories/index.story.d.ts.map +0 -1
- package/build-types/navigator/test/index.d.ts +0 -2
- package/build-types/navigator/test/index.d.ts.map +0 -1
- package/build-types/navigator/test/router.d.ts +0 -2
- package/build-types/navigator/test/router.d.ts.map +0 -1
- package/build-types/notice/stories/index.story.d.ts +0 -15
- package/build-types/notice/stories/index.story.d.ts.map +0 -1
- package/build-types/notice/test/index.d.ts +0 -2
- package/build-types/notice/test/index.d.ts.map +0 -1
- package/build-types/notice/test/list.d.ts +0 -2
- package/build-types/notice/test/list.d.ts.map +0 -1
- package/build-types/number-control/stories/index.story.d.ts +0 -19
- package/build-types/number-control/stories/index.story.d.ts.map +0 -1
- package/build-types/number-control/test/index.d.ts +0 -2
- package/build-types/number-control/test/index.d.ts.map +0 -1
- package/build-types/palette-edit/stories/index.story.d.ts +0 -7
- package/build-types/palette-edit/stories/index.story.d.ts.map +0 -1
- package/build-types/palette-edit/test/index.d.ts +0 -2
- package/build-types/palette-edit/test/index.d.ts.map +0 -1
- package/build-types/panel/stories/index.story.d.ts +0 -13
- package/build-types/panel/stories/index.story.d.ts.map +0 -1
- package/build-types/panel/test/body.d.ts +0 -2
- package/build-types/panel/test/body.d.ts.map +0 -1
- package/build-types/panel/test/header.d.ts +0 -2
- package/build-types/panel/test/header.d.ts.map +0 -1
- package/build-types/panel/test/index.d.ts +0 -2
- package/build-types/panel/test/index.d.ts.map +0 -1
- package/build-types/panel/test/row.d.ts +0 -2
- package/build-types/panel/test/row.d.ts.map +0 -1
- package/build-types/placeholder/stories/index.story.d.ts +0 -6
- package/build-types/placeholder/stories/index.story.d.ts.map +0 -1
- package/build-types/placeholder/test/index.d.ts +0 -2
- package/build-types/placeholder/test/index.d.ts.map +0 -1
- package/build-types/popover/stories/e2e/index.story.d.ts +0 -18
- package/build-types/popover/stories/e2e/index.story.d.ts.map +0 -1
- package/build-types/popover/stories/index.story.d.ts +0 -11
- package/build-types/popover/stories/index.story.d.ts.map +0 -1
- package/build-types/popover/test/index.d.ts +0 -2
- package/build-types/popover/test/index.d.ts.map +0 -1
- package/build-types/popover/test/utils/index.d.ts +0 -3
- package/build-types/popover/test/utils/index.d.ts.map +0 -1
- package/build-types/progress-bar/stories/index.story.d.ts +0 -23
- package/build-types/progress-bar/stories/index.story.d.ts.map +0 -1
- package/build-types/progress-bar/styles.d.ts +0 -16
- package/build-types/progress-bar/styles.d.ts.map +0 -1
- package/build-types/progress-bar/test/index.d.ts +0 -2
- package/build-types/progress-bar/test/index.d.ts.map +0 -1
- package/build-types/query-controls/stories/index.story.d.ts +0 -7
- package/build-types/query-controls/stories/index.story.d.ts.map +0 -1
- package/build-types/query-controls/test/terms.d.ts +0 -2
- package/build-types/query-controls/test/terms.d.ts.map +0 -1
- package/build-types/radio-control/stories/index.story.d.ts +0 -7
- package/build-types/radio-control/stories/index.story.d.ts.map +0 -1
- package/build-types/radio-control/test/index.d.ts +0 -2
- package/build-types/radio-control/test/index.d.ts.map +0 -1
- package/build-types/radio-group/stories/index.story.d.ts +0 -8
- package/build-types/radio-group/stories/index.story.d.ts.map +0 -1
- package/build-types/range-control/stories/index.story.d.ts +0 -42
- package/build-types/range-control/stories/index.story.d.ts.map +0 -1
- package/build-types/range-control/test/index.d.ts +0 -2
- package/build-types/range-control/test/index.d.ts.map +0 -1
- package/build-types/resizable-box/resize-tooltip/styles/resize-tooltip.styles.d.ts +0 -18
- package/build-types/resizable-box/resize-tooltip/styles/resize-tooltip.styles.d.ts.map +0 -1
- package/build-types/resizable-box/stories/index.story.d.ts +0 -46
- package/build-types/resizable-box/stories/index.story.d.ts.map +0 -1
- package/build-types/responsive-wrapper/stories/index.story.d.ts +0 -16
- package/build-types/responsive-wrapper/stories/index.story.d.ts.map +0 -1
- package/build-types/sandbox/stories/index.story.d.ts +0 -7
- package/build-types/sandbox/stories/index.story.d.ts.map +0 -1
- package/build-types/sandbox/test/index.d.ts +0 -2
- package/build-types/sandbox/test/index.d.ts.map +0 -1
- package/build-types/scroll-lock/stories/index.story.d.ts +0 -6
- package/build-types/scroll-lock/stories/index.story.d.ts.map +0 -1
- package/build-types/scroll-lock/test/index.d.ts +0 -2
- package/build-types/scroll-lock/test/index.d.ts.map +0 -1
- package/build-types/scrollable/stories/index.story.d.ts +0 -6
- package/build-types/scrollable/stories/index.story.d.ts.map +0 -1
- package/build-types/scrollable/styles.d.ts +0 -8
- package/build-types/scrollable/styles.d.ts.map +0 -1
- package/build-types/scrollable/test/index.d.ts +0 -2
- package/build-types/scrollable/test/index.d.ts.map +0 -1
- package/build-types/search-control/stories/index.story.d.ts +0 -18
- package/build-types/search-control/stories/index.story.d.ts.map +0 -1
- package/build-types/search-control/test/index.d.ts +0 -2
- package/build-types/search-control/test/index.d.ts.map +0 -1
- package/build-types/select-control/stories/index.story.d.ts +0 -28
- package/build-types/select-control/stories/index.story.d.ts.map +0 -1
- package/build-types/select-control/test/select-control.d.ts +0 -2
- package/build-types/select-control/test/select-control.d.ts.map +0 -1
- package/build-types/shortcut/stories/index.story.d.ts +0 -7
- package/build-types/shortcut/stories/index.story.d.ts.map +0 -1
- package/build-types/shortcut/test/index.d.ts +0 -2
- package/build-types/shortcut/test/index.d.ts.map +0 -1
- package/build-types/slot-fill/stories/index.story.d.ts +0 -10
- package/build-types/slot-fill/stories/index.story.d.ts.map +0 -1
- package/build-types/snackbar/stories/index.story.d.ts +0 -10
- package/build-types/snackbar/stories/index.story.d.ts.map +0 -1
- package/build-types/snackbar/stories/list.story.d.ts +0 -6
- package/build-types/snackbar/stories/list.story.d.ts.map +0 -1
- package/build-types/snackbar/test/index.d.ts +0 -2
- package/build-types/snackbar/test/index.d.ts.map +0 -1
- package/build-types/snackbar/test/list.d.ts +0 -2
- package/build-types/snackbar/test/list.d.ts.map +0 -1
- package/build-types/spacer/stories/index.story.d.ts +0 -7
- package/build-types/spacer/stories/index.story.d.ts.map +0 -1
- package/build-types/spacer/test/index.d.ts +0 -2
- package/build-types/spacer/test/index.d.ts.map +0 -1
- package/build-types/spinner/stories/index.story.d.ts +0 -7
- package/build-types/spinner/stories/index.story.d.ts.map +0 -1
- package/build-types/style-provider/test/index.d.ts +0 -2
- package/build-types/style-provider/test/index.d.ts.map +0 -1
- package/build-types/surface/stories/index.story.d.ts +0 -6
- package/build-types/surface/stories/index.story.d.ts.map +0 -1
- package/build-types/surface/test/index.d.ts +0 -2
- package/build-types/surface/test/index.d.ts.map +0 -1
- package/build-types/tab-panel/stories/index.story.d.ts +0 -9
- package/build-types/tab-panel/stories/index.story.d.ts.map +0 -1
- package/build-types/tab-panel/test/index.d.ts +0 -2
- package/build-types/tab-panel/test/index.d.ts.map +0 -1
- package/build-types/tabs/stories/index.story.d.ts +0 -13
- package/build-types/tabs/stories/index.story.d.ts.map +0 -1
- package/build-types/tabs/test/index.d.ts +0 -2
- package/build-types/tabs/test/index.d.ts.map +0 -1
- package/build-types/text/stories/index.story.d.ts +0 -14
- package/build-types/text/stories/index.story.d.ts.map +0 -1
- package/build-types/text/test/index.d.ts +0 -2
- package/build-types/text/test/index.d.ts.map +0 -1
- package/build-types/text-control/stories/index.story.d.ts +0 -7
- package/build-types/text-control/stories/index.story.d.ts.map +0 -1
- package/build-types/text-control/test/text-control.d.ts +0 -2
- package/build-types/text-control/test/text-control.d.ts.map +0 -1
- package/build-types/text-highlight/stories/index.story.d.ts +0 -6
- package/build-types/text-highlight/stories/index.story.d.ts.map +0 -1
- package/build-types/text-highlight/test/index.d.ts +0 -2
- package/build-types/text-highlight/test/index.d.ts.map +0 -1
- package/build-types/textarea-control/stories/index.story.d.ts +0 -6
- package/build-types/textarea-control/stories/index.story.d.ts.map +0 -1
- package/build-types/textarea-control/styles/textarea-control-styles.d.ts +0 -5
- package/build-types/textarea-control/styles/textarea-control-styles.d.ts.map +0 -1
- package/build-types/tip/stories/index.story.d.ts +0 -6
- package/build-types/tip/stories/index.story.d.ts.map +0 -1
- package/build-types/toggle-control/stories/index.story.d.ts +0 -13
- package/build-types/toggle-control/stories/index.story.d.ts.map +0 -1
- package/build-types/toggle-control/test/index.d.ts +0 -2
- package/build-types/toggle-control/test/index.d.ts.map +0 -1
- package/build-types/toggle-group-control/stories/index.story.d.ts +0 -21
- package/build-types/toggle-group-control/stories/index.story.d.ts.map +0 -1
- package/build-types/toggle-group-control/test/index.d.ts +0 -2
- package/build-types/toggle-group-control/test/index.d.ts.map +0 -1
- package/build-types/toolbar/stories/index.story.d.ts +0 -12
- package/build-types/toolbar/stories/index.story.d.ts.map +0 -1
- package/build-types/toolbar/test/index.d.ts +0 -2
- package/build-types/toolbar/test/index.d.ts.map +0 -1
- package/build-types/toolbar/test/toolbar-group.d.ts +0 -2
- package/build-types/toolbar/test/toolbar-group.d.ts.map +0 -1
- package/build-types/tools-panel/stories/index.story.d.ts +0 -11
- package/build-types/tools-panel/stories/index.story.d.ts.map +0 -1
- package/build-types/tools-panel/test/index.d.ts +0 -2
- package/build-types/tools-panel/test/index.d.ts.map +0 -1
- package/build-types/tooltip/stories/index.story.d.ts +0 -15
- package/build-types/tooltip/stories/index.story.d.ts.map +0 -1
- package/build-types/tooltip/test/index.d.ts +0 -2
- package/build-types/tooltip/test/index.d.ts.map +0 -1
- package/build-types/tooltip/test/utils/index.d.ts +0 -7
- package/build-types/tooltip/test/utils/index.d.ts.map +0 -1
- package/build-types/tree-grid/stories/index.story.d.ts +0 -6
- package/build-types/tree-grid/stories/index.story.d.ts.map +0 -1
- package/build-types/tree-grid/test/cell.d.ts +0 -2
- package/build-types/tree-grid/test/cell.d.ts.map +0 -1
- package/build-types/tree-grid/test/index.d.ts +0 -2
- package/build-types/tree-grid/test/index.d.ts.map +0 -1
- package/build-types/tree-grid/test/roving-tab-index-item.d.ts +0 -2
- package/build-types/tree-grid/test/roving-tab-index-item.d.ts.map +0 -1
- package/build-types/tree-grid/test/roving-tab-index.d.ts +0 -2
- package/build-types/tree-grid/test/roving-tab-index.d.ts.map +0 -1
- package/build-types/tree-grid/test/row.d.ts +0 -2
- package/build-types/tree-grid/test/row.d.ts.map +0 -1
- package/build-types/tree-select/stories/index.story.d.ts +0 -6
- package/build-types/tree-select/stories/index.story.d.ts.map +0 -1
- package/build-types/truncate/stories/index.story.d.ts +0 -7
- package/build-types/truncate/stories/index.story.d.ts.map +0 -1
- package/build-types/truncate/test/index.d.ts +0 -2
- package/build-types/truncate/test/index.d.ts.map +0 -1
- package/build-types/unit-control/stories/index.story.d.ts +0 -27
- package/build-types/unit-control/stories/index.story.d.ts.map +0 -1
- package/build-types/unit-control/test/index.d.ts +0 -2
- package/build-types/unit-control/test/index.d.ts.map +0 -1
- package/build-types/unit-control/test/utils.d.ts +0 -2
- package/build-types/unit-control/test/utils.d.ts.map +0 -1
- package/build-types/utils/test/polymorphic-element.d.ts +0 -2
- package/build-types/utils/test/polymorphic-element.d.ts.map +0 -1
- package/build-types/v-stack/stories/e2e/index.story.d.ts +0 -6
- package/build-types/v-stack/stories/e2e/index.story.d.ts.map +0 -1
- package/build-types/v-stack/stories/index.story.d.ts +0 -11
- package/build-types/v-stack/stories/index.story.d.ts.map +0 -1
- package/build-types/v-stack/test/index.d.ts +0 -2
- package/build-types/v-stack/test/index.d.ts.map +0 -1
- package/build-types/validated-form-controls/components/combobox-control.d.ts +0 -20
- package/build-types/validated-form-controls/components/combobox-control.d.ts.map +0 -1
- package/build-types/validated-form-controls/components/form-token-field.d.ts +0 -3
- package/build-types/validated-form-controls/components/form-token-field.d.ts.map +0 -1
- package/build-types/validated-form-controls/components/stories/combobox-control.story.d.ts +0 -6
- package/build-types/validated-form-controls/components/stories/combobox-control.story.d.ts.map +0 -1
- package/build-types/validated-form-controls/components/stories/content-editable-control.story.d.ts +0 -6
- package/build-types/validated-form-controls/components/stories/content-editable-control.story.d.ts.map +0 -1
- package/build-types/validated-form-controls/components/stories/custom-select-control.story.d.ts +0 -6
- package/build-types/validated-form-controls/components/stories/custom-select-control.story.d.ts.map +0 -1
- package/build-types/validated-form-controls/components/stories/form-token-field.story.d.ts +0 -9
- package/build-types/validated-form-controls/components/stories/form-token-field.story.d.ts.map +0 -1
- package/build-types/validated-form-controls/components/stories/input-control.story.d.ts +0 -12
- package/build-types/validated-form-controls/components/stories/input-control.story.d.ts.map +0 -1
- package/build-types/validated-form-controls/components/stories/overview.story.d.ts +0 -60
- package/build-types/validated-form-controls/components/stories/overview.story.d.ts.map +0 -1
- package/build-types/validated-form-controls/components/stories/range-control.story.d.ts +0 -6
- package/build-types/validated-form-controls/components/stories/range-control.story.d.ts.map +0 -1
- package/build-types/validated-form-controls/components/stories/story-utils.d.ts +0 -3
- package/build-types/validated-form-controls/components/stories/story-utils.d.ts.map +0 -1
- package/build-types/validated-form-controls/components/stories/textarea-control.story.d.ts +0 -6
- package/build-types/validated-form-controls/components/stories/textarea-control.story.d.ts.map +0 -1
- package/build-types/validated-form-controls/components/stories/toggle-control.story.d.ts +0 -6
- package/build-types/validated-form-controls/components/stories/toggle-control.story.d.ts.map +0 -1
- package/build-types/validated-form-controls/components/stories/toggle-group-control.story.d.ts +0 -6
- package/build-types/validated-form-controls/components/stories/toggle-group-control.story.d.ts.map +0 -1
- package/build-types/validated-form-controls/components/toggle-control.d.ts +0 -7
- package/build-types/validated-form-controls/components/toggle-control.d.ts.map +0 -1
- package/build-types/validated-form-controls/components/toggle-group-control.d.ts +0 -15
- package/build-types/validated-form-controls/components/toggle-group-control.d.ts.map +0 -1
- package/build-types/validated-form-controls/control-with-error.d.ts +0 -36
- package/build-types/validated-form-controls/control-with-error.d.ts.map +0 -1
- package/build-types/validated-form-controls/test/combobox-control.d.ts +0 -2
- package/build-types/validated-form-controls/test/combobox-control.d.ts.map +0 -1
- package/build-types/validated-form-controls/test/content-editable-control.d.ts +0 -2
- package/build-types/validated-form-controls/test/content-editable-control.d.ts.map +0 -1
- package/build-types/validated-form-controls/test/control-with-error.d.ts +0 -2
- package/build-types/validated-form-controls/test/control-with-error.d.ts.map +0 -1
- package/build-types/validated-form-controls/test/custom-select-control.d.ts +0 -2
- package/build-types/validated-form-controls/test/custom-select-control.d.ts.map +0 -1
- package/build-types/validated-form-controls/test/form-token-field.d.ts +0 -2
- package/build-types/validated-form-controls/test/form-token-field.d.ts.map +0 -1
- package/build-types/validated-form-controls/test/input-control.d.ts +0 -2
- package/build-types/validated-form-controls/test/input-control.d.ts.map +0 -1
- package/build-types/validated-form-controls/test/range-control.d.ts +0 -2
- package/build-types/validated-form-controls/test/range-control.d.ts.map +0 -1
- package/build-types/validated-form-controls/test/textarea-control.d.ts +0 -2
- package/build-types/validated-form-controls/test/textarea-control.d.ts.map +0 -1
- package/build-types/validated-form-controls/test/toggle-control.d.ts +0 -2
- package/build-types/validated-form-controls/test/toggle-control.d.ts.map +0 -1
- package/build-types/validated-form-controls/test/toggle-group-control.d.ts +0 -2
- package/build-types/validated-form-controls/test/toggle-group-control.d.ts.map +0 -1
- package/build-types/validated-form-controls/validity-indicator.d.ts +0 -6
- package/build-types/validated-form-controls/validity-indicator.d.ts.map +0 -1
- package/build-types/view/stories/index.story.d.ts +0 -6
- package/build-types/view/stories/index.story.d.ts.map +0 -1
- package/build-types/visually-hidden/stories/index.story.d.ts +0 -8
- package/build-types/visually-hidden/stories/index.story.d.ts.map +0 -1
- package/build-types/z-stack/stories/index.story.d.ts +0 -6
- package/build-types/z-stack/stories/index.story.d.ts.map +0 -1
- package/build-types/z-stack/styles.d.ts +0 -14
- package/build-types/z-stack/styles.d.ts.map +0 -1
- package/src/base-control/styles/base-control-styles.ts +0 -46
- package/src/border-box-control/styles.ts +0 -71
- package/src/border-control/styles.ts +0 -151
- package/src/box-control/styles/box-control-styles.ts +0 -34
- package/src/color-palette/styles.ts +0 -13
- package/src/combobox-control/styles.ts +0 -9
- package/src/dropdown/styles.ts +0 -33
- package/src/progress-bar/styles.ts +0 -84
- package/src/resizable-box/resize-tooltip/styles/resize-tooltip.styles.ts +0 -47
- package/src/scrollable/styles.ts +0 -57
- package/src/scrollable/test/__snapshots__/index.tsx.snap +0 -66
- package/src/textarea-control/styles/textarea-control-styles.ts +0 -90
- package/src/validated-form-controls/components/combobox-control.tsx +0 -56
- package/src/validated-form-controls/components/form-token-field.tsx +0 -57
- package/src/validated-form-controls/components/stories/combobox-control.story.tsx +0 -56
- package/src/validated-form-controls/components/stories/form-token-field.story.tsx +0 -60
- package/src/validated-form-controls/components/stories/input-control.story.tsx +0 -126
- package/src/validated-form-controls/components/stories/overview.story.tsx +0 -560
- package/src/validated-form-controls/components/stories/textarea-control.story.tsx +0 -50
- package/src/validated-form-controls/components/stories/toggle-control.story.tsx +0 -47
- package/src/validated-form-controls/components/stories/toggle-group-control.story.tsx +0 -58
- package/src/validated-form-controls/components/toggle-control.tsx +0 -40
- package/src/validated-form-controls/components/toggle-group-control.tsx +0 -55
- package/src/validated-form-controls/control-with-error.tsx +0 -321
- package/src/validated-form-controls/test/combobox-control.tsx +0 -61
- package/src/validated-form-controls/test/control-with-error.tsx +0 -577
- package/src/validated-form-controls/test/form-token-field.tsx +0 -52
- package/src/validated-form-controls/test/toggle-control.tsx +0 -49
- package/src/validated-form-controls/test/toggle-group-control.tsx +0 -28
- package/src/validated-form-controls/validity-indicator.tsx +0 -40
- package/src/z-stack/styles.ts +0 -35
|
@@ -1,577 +0,0 @@
|
|
|
1
|
-
import { render, screen, waitFor, act } from '@testing-library/react';
|
|
2
|
-
import userEvent from '@testing-library/user-event';
|
|
3
|
-
import { useState, useCallback, useId, useRef } from '@wordpress/element';
|
|
4
|
-
import { ValidatedInputControl, ValidatedRangeControl } from '../components';
|
|
5
|
-
|
|
6
|
-
describe( 'ControlWithError', () => {
|
|
7
|
-
describe( 'Async Validation', () => {
|
|
8
|
-
beforeEach( () => {
|
|
9
|
-
jest.useFakeTimers();
|
|
10
|
-
} );
|
|
11
|
-
|
|
12
|
-
afterEach( () => {
|
|
13
|
-
jest.useRealTimers();
|
|
14
|
-
} );
|
|
15
|
-
|
|
16
|
-
const AsyncValidatedInputControl = ( {
|
|
17
|
-
serverDelayMs,
|
|
18
|
-
...restProps
|
|
19
|
-
}: {
|
|
20
|
-
serverDelayMs: number;
|
|
21
|
-
} & React.ComponentProps< typeof ValidatedInputControl > ) => {
|
|
22
|
-
const [ text, setText ] = useState( '' );
|
|
23
|
-
const [ customValidity, setCustomValidity ] =
|
|
24
|
-
useState<
|
|
25
|
-
React.ComponentProps<
|
|
26
|
-
typeof ValidatedInputControl
|
|
27
|
-
>[ 'customValidity' ]
|
|
28
|
-
>( undefined );
|
|
29
|
-
|
|
30
|
-
const onChange = useCallback(
|
|
31
|
-
( value?: string ) => {
|
|
32
|
-
setCustomValidity( {
|
|
33
|
-
type: 'validating',
|
|
34
|
-
message: 'Validating...',
|
|
35
|
-
} );
|
|
36
|
-
|
|
37
|
-
// Simulate delayed server response
|
|
38
|
-
setTimeout( () => {
|
|
39
|
-
if ( value?.toLowerCase() === 'error' ) {
|
|
40
|
-
setCustomValidity( {
|
|
41
|
-
type: 'invalid',
|
|
42
|
-
message: 'The word "error" is not allowed.',
|
|
43
|
-
} );
|
|
44
|
-
} else {
|
|
45
|
-
setCustomValidity( {
|
|
46
|
-
type: 'valid',
|
|
47
|
-
message: 'Validated',
|
|
48
|
-
} );
|
|
49
|
-
}
|
|
50
|
-
}, serverDelayMs );
|
|
51
|
-
|
|
52
|
-
setText( value ?? '' );
|
|
53
|
-
},
|
|
54
|
-
[ serverDelayMs ]
|
|
55
|
-
);
|
|
56
|
-
|
|
57
|
-
return (
|
|
58
|
-
<ValidatedInputControl
|
|
59
|
-
label="Text"
|
|
60
|
-
value={ text }
|
|
61
|
-
onChange={ onChange }
|
|
62
|
-
customValidity={ customValidity }
|
|
63
|
-
{ ...restProps }
|
|
64
|
-
/>
|
|
65
|
-
);
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
it( 'should not show "validating" state if it takes less than 1000ms', async () => {
|
|
69
|
-
const user = userEvent.setup( {
|
|
70
|
-
advanceTimers: jest.advanceTimersByTime,
|
|
71
|
-
} );
|
|
72
|
-
render( <AsyncValidatedInputControl serverDelayMs={ 500 } /> );
|
|
73
|
-
|
|
74
|
-
const input = screen.getByRole( 'textbox' );
|
|
75
|
-
|
|
76
|
-
await user.type( input, 'valid text' );
|
|
77
|
-
|
|
78
|
-
// Blur to trigger validation
|
|
79
|
-
await user.tab();
|
|
80
|
-
|
|
81
|
-
// Fast-forward to right before the server response
|
|
82
|
-
act( () => jest.advanceTimersByTime( 499 ) );
|
|
83
|
-
|
|
84
|
-
// The validating state should not be shown
|
|
85
|
-
await waitFor( () => {
|
|
86
|
-
expect(
|
|
87
|
-
screen.queryByText( 'Validating...' )
|
|
88
|
-
).not.toBeInTheDocument();
|
|
89
|
-
} );
|
|
90
|
-
|
|
91
|
-
// Fast-forward past the server delay to show validation result
|
|
92
|
-
act( () => jest.advanceTimersByTime( 1 ) );
|
|
93
|
-
|
|
94
|
-
await waitFor( () => {
|
|
95
|
-
expect( screen.getByText( 'Validated' ) ).toBeVisible();
|
|
96
|
-
} );
|
|
97
|
-
} );
|
|
98
|
-
|
|
99
|
-
it( 'should show "validating" state if it takes more than 1000ms', async () => {
|
|
100
|
-
const user = userEvent.setup( {
|
|
101
|
-
advanceTimers: jest.advanceTimersByTime,
|
|
102
|
-
} );
|
|
103
|
-
render( <AsyncValidatedInputControl serverDelayMs={ 1200 } /> );
|
|
104
|
-
|
|
105
|
-
const input = screen.getByRole( 'textbox' );
|
|
106
|
-
|
|
107
|
-
await user.type( input, 'valid text' );
|
|
108
|
-
|
|
109
|
-
// Blur to trigger validation
|
|
110
|
-
await user.tab();
|
|
111
|
-
|
|
112
|
-
// Initially, no validating message should be shown (before 1s delay)
|
|
113
|
-
expect(
|
|
114
|
-
screen.queryByText( 'Validating...' )
|
|
115
|
-
).not.toBeInTheDocument();
|
|
116
|
-
|
|
117
|
-
// Fast-forward past the 1s delay to show validating state
|
|
118
|
-
act( () => jest.advanceTimersByTime( 1000 ) );
|
|
119
|
-
|
|
120
|
-
await waitFor( () => {
|
|
121
|
-
expect( screen.getByText( 'Validating...' ) ).toBeVisible();
|
|
122
|
-
} );
|
|
123
|
-
|
|
124
|
-
// Fast-forward past the server delay to show validation result
|
|
125
|
-
act( () => jest.advanceTimersByTime( 200 ) );
|
|
126
|
-
|
|
127
|
-
await waitFor( () => {
|
|
128
|
-
expect( screen.getByText( 'Validated' ) ).toBeVisible();
|
|
129
|
-
} );
|
|
130
|
-
|
|
131
|
-
// Test error case
|
|
132
|
-
await user.clear( input );
|
|
133
|
-
await user.type( input, 'error' );
|
|
134
|
-
|
|
135
|
-
// Blur to trigger validation
|
|
136
|
-
await user.tab();
|
|
137
|
-
|
|
138
|
-
act( () => jest.advanceTimersByTime( 1000 ) );
|
|
139
|
-
|
|
140
|
-
await waitFor( () => {
|
|
141
|
-
expect( screen.getByText( 'Validating...' ) ).toBeVisible();
|
|
142
|
-
} );
|
|
143
|
-
|
|
144
|
-
act( () => jest.advanceTimersByTime( 200 ) );
|
|
145
|
-
|
|
146
|
-
await waitFor( () => {
|
|
147
|
-
expect(
|
|
148
|
-
screen.getByText( 'The word "error" is not allowed.' )
|
|
149
|
-
).toBeVisible();
|
|
150
|
-
} );
|
|
151
|
-
|
|
152
|
-
// Test editing after error
|
|
153
|
-
await user.type( input, '{backspace}' );
|
|
154
|
-
|
|
155
|
-
act( () => jest.advanceTimersByTime( 1000 ) );
|
|
156
|
-
|
|
157
|
-
await waitFor( () => {
|
|
158
|
-
expect( screen.getByText( 'Validating...' ) ).toBeVisible();
|
|
159
|
-
} );
|
|
160
|
-
|
|
161
|
-
act( () => jest.advanceTimersByTime( 200 ) );
|
|
162
|
-
|
|
163
|
-
await waitFor( () => {
|
|
164
|
-
expect( screen.getByText( 'Validated' ) ).toBeVisible();
|
|
165
|
-
} );
|
|
166
|
-
} );
|
|
167
|
-
|
|
168
|
-
it( 'should not show a "valid" state until the server response is received, even if locally valid', async () => {
|
|
169
|
-
const user = userEvent.setup( {
|
|
170
|
-
advanceTimers: jest.advanceTimersByTime,
|
|
171
|
-
} );
|
|
172
|
-
render(
|
|
173
|
-
<AsyncValidatedInputControl serverDelayMs={ 1200 } required />
|
|
174
|
-
);
|
|
175
|
-
|
|
176
|
-
const input = screen.getByRole( 'textbox' );
|
|
177
|
-
|
|
178
|
-
await user.type( input, 'valid text' );
|
|
179
|
-
|
|
180
|
-
await user.tab();
|
|
181
|
-
act( () => jest.advanceTimersByTime( 1200 ) );
|
|
182
|
-
|
|
183
|
-
await waitFor( () => {
|
|
184
|
-
expect( screen.getByText( 'Validated' ) ).toBeVisible();
|
|
185
|
-
} );
|
|
186
|
-
|
|
187
|
-
await user.clear( input );
|
|
188
|
-
|
|
189
|
-
act( () => jest.advanceTimersByTime( 1000 ) );
|
|
190
|
-
|
|
191
|
-
await waitFor( () => {
|
|
192
|
-
expect(
|
|
193
|
-
screen.getByText( 'Constraints not satisfied' )
|
|
194
|
-
).toBeVisible();
|
|
195
|
-
} );
|
|
196
|
-
|
|
197
|
-
await user.type( input, 'error' );
|
|
198
|
-
|
|
199
|
-
act( () => jest.advanceTimersByTime( 200 ) );
|
|
200
|
-
|
|
201
|
-
expect( screen.queryByText( 'Validated' ) ).not.toBeInTheDocument();
|
|
202
|
-
|
|
203
|
-
act( () => jest.advanceTimersByTime( 1000 ) );
|
|
204
|
-
|
|
205
|
-
await waitFor( () => {
|
|
206
|
-
expect(
|
|
207
|
-
screen.getByText( 'The word "error" is not allowed.' )
|
|
208
|
-
).toBeVisible();
|
|
209
|
-
} );
|
|
210
|
-
} );
|
|
211
|
-
} );
|
|
212
|
-
|
|
213
|
-
describe( 'Form submission', () => {
|
|
214
|
-
const CustomValidatedInputControl = ( {
|
|
215
|
-
...restProps
|
|
216
|
-
}: React.ComponentProps< typeof ValidatedInputControl > ) => {
|
|
217
|
-
const [ customValidity, setCustomValidity ] =
|
|
218
|
-
useState<
|
|
219
|
-
React.ComponentProps<
|
|
220
|
-
typeof ValidatedInputControl
|
|
221
|
-
>[ 'customValidity' ]
|
|
222
|
-
>( undefined );
|
|
223
|
-
return (
|
|
224
|
-
<ValidatedInputControl
|
|
225
|
-
onChange={ ( value ) =>
|
|
226
|
-
value === 'error'
|
|
227
|
-
? setCustomValidity( {
|
|
228
|
-
type: 'invalid',
|
|
229
|
-
message: 'The word "error" is not allowed.',
|
|
230
|
-
} )
|
|
231
|
-
: setCustomValidity( undefined )
|
|
232
|
-
}
|
|
233
|
-
customValidity={ customValidity }
|
|
234
|
-
{ ...restProps }
|
|
235
|
-
/>
|
|
236
|
-
);
|
|
237
|
-
};
|
|
238
|
-
|
|
239
|
-
it( 'should show custom validity messages regardless of "touched" state if parent form is submitted', async () => {
|
|
240
|
-
const user = userEvent.setup();
|
|
241
|
-
const onSubmit = jest.fn();
|
|
242
|
-
render(
|
|
243
|
-
<form onSubmit={ onSubmit }>
|
|
244
|
-
<CustomValidatedInputControl label="Text" />
|
|
245
|
-
<button type="submit">Submit</button>
|
|
246
|
-
</form>
|
|
247
|
-
);
|
|
248
|
-
|
|
249
|
-
const input = screen.getByRole< HTMLInputElement >( 'textbox', {
|
|
250
|
-
name: 'Text',
|
|
251
|
-
} );
|
|
252
|
-
|
|
253
|
-
// User has interacted, but not blurred
|
|
254
|
-
await user.type( input, 'error' );
|
|
255
|
-
await user.keyboard( '{enter}' );
|
|
256
|
-
|
|
257
|
-
// Input is marked as invalid at the HTML level
|
|
258
|
-
await waitFor( () => {
|
|
259
|
-
expect( input.checkValidity() ).toBe( false );
|
|
260
|
-
} );
|
|
261
|
-
expect( input.validationMessage ).toBe(
|
|
262
|
-
'The word "error" is not allowed.'
|
|
263
|
-
);
|
|
264
|
-
|
|
265
|
-
// Field is showing the error message
|
|
266
|
-
expect(
|
|
267
|
-
screen.getByText( 'The word "error" is not allowed.' )
|
|
268
|
-
).toBeVisible();
|
|
269
|
-
|
|
270
|
-
// Form is not submitted
|
|
271
|
-
expect( onSubmit ).not.toHaveBeenCalled();
|
|
272
|
-
} );
|
|
273
|
-
} );
|
|
274
|
-
|
|
275
|
-
describe( 'aria-describedby', () => {
|
|
276
|
-
it( 'should connect the error message to the input via aria-describedby', async () => {
|
|
277
|
-
const user = userEvent.setup();
|
|
278
|
-
render(
|
|
279
|
-
<form>
|
|
280
|
-
<ValidatedInputControl label="URL" required />
|
|
281
|
-
<button type="submit">Submit</button>
|
|
282
|
-
</form>
|
|
283
|
-
);
|
|
284
|
-
|
|
285
|
-
const input = screen.getByRole( 'textbox', { name: /^URL/ } );
|
|
286
|
-
|
|
287
|
-
expect( input ).not.toHaveAttribute( 'aria-describedby' );
|
|
288
|
-
|
|
289
|
-
await user.click(
|
|
290
|
-
screen.getByRole( 'button', { name: 'Submit' } )
|
|
291
|
-
);
|
|
292
|
-
|
|
293
|
-
await waitFor( () => {
|
|
294
|
-
expect( input ).toHaveAccessibleDescription(
|
|
295
|
-
expect.stringContaining( 'Constraints not satisfied' )
|
|
296
|
-
);
|
|
297
|
-
} );
|
|
298
|
-
} );
|
|
299
|
-
|
|
300
|
-
it( 'should preserve existing aria-describedby values', async () => {
|
|
301
|
-
const user = userEvent.setup();
|
|
302
|
-
|
|
303
|
-
function TestComponent() {
|
|
304
|
-
const hintId = useId();
|
|
305
|
-
return (
|
|
306
|
-
<form>
|
|
307
|
-
<ValidatedInputControl
|
|
308
|
-
label="URL"
|
|
309
|
-
required
|
|
310
|
-
aria-describedby={ hintId }
|
|
311
|
-
/>
|
|
312
|
-
<p id={ hintId }>Enter a full URL.</p>
|
|
313
|
-
<button type="submit">Submit</button>
|
|
314
|
-
</form>
|
|
315
|
-
);
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
render( <TestComponent /> );
|
|
319
|
-
|
|
320
|
-
const input = screen.getByRole( 'textbox', { name: /^URL/ } );
|
|
321
|
-
|
|
322
|
-
expect( input ).toHaveAccessibleDescription( 'Enter a full URL.' );
|
|
323
|
-
|
|
324
|
-
await user.click(
|
|
325
|
-
screen.getByRole( 'button', { name: 'Submit' } )
|
|
326
|
-
);
|
|
327
|
-
|
|
328
|
-
await waitFor( () => {
|
|
329
|
-
expect( input ).toHaveAccessibleDescription(
|
|
330
|
-
expect.stringContaining( 'Constraints not satisfied' )
|
|
331
|
-
);
|
|
332
|
-
} );
|
|
333
|
-
expect( input ).toHaveAccessibleDescription(
|
|
334
|
-
expect.stringContaining( 'Enter a full URL.' )
|
|
335
|
-
);
|
|
336
|
-
} );
|
|
337
|
-
|
|
338
|
-
it( 'should connect a custom validity error to the input via aria-describedby', async () => {
|
|
339
|
-
const user = userEvent.setup();
|
|
340
|
-
|
|
341
|
-
function TestComponent() {
|
|
342
|
-
const [ customValidity, setCustomValidity ] =
|
|
343
|
-
useState<
|
|
344
|
-
React.ComponentProps<
|
|
345
|
-
typeof ValidatedInputControl
|
|
346
|
-
>[ 'customValidity' ]
|
|
347
|
-
>( undefined );
|
|
348
|
-
const inputRef = useRef< HTMLInputElement >( null );
|
|
349
|
-
|
|
350
|
-
return (
|
|
351
|
-
<>
|
|
352
|
-
<ValidatedInputControl
|
|
353
|
-
ref={ inputRef }
|
|
354
|
-
label="URL"
|
|
355
|
-
customValidity={ customValidity }
|
|
356
|
-
/>
|
|
357
|
-
<button
|
|
358
|
-
type="button"
|
|
359
|
-
onClick={ () => {
|
|
360
|
-
setCustomValidity( {
|
|
361
|
-
type: 'invalid',
|
|
362
|
-
message: 'Please enter a valid URL.',
|
|
363
|
-
} );
|
|
364
|
-
requestAnimationFrame(
|
|
365
|
-
() => inputRef.current?.reportValidity()
|
|
366
|
-
);
|
|
367
|
-
} }
|
|
368
|
-
>
|
|
369
|
-
Validate
|
|
370
|
-
</button>
|
|
371
|
-
</>
|
|
372
|
-
);
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
render( <TestComponent /> );
|
|
376
|
-
|
|
377
|
-
const input = screen.getByRole( 'textbox', { name: 'URL' } );
|
|
378
|
-
expect( input ).not.toHaveAttribute( 'aria-describedby' );
|
|
379
|
-
|
|
380
|
-
await user.click(
|
|
381
|
-
screen.getByRole( 'button', { name: 'Validate' } )
|
|
382
|
-
);
|
|
383
|
-
|
|
384
|
-
await waitFor( () => {
|
|
385
|
-
expect( input ).toHaveAccessibleDescription(
|
|
386
|
-
expect.stringContaining( 'Please enter a valid URL.' )
|
|
387
|
-
);
|
|
388
|
-
} );
|
|
389
|
-
} );
|
|
390
|
-
|
|
391
|
-
it( 'should remove aria-describedby when the error is resolved', async () => {
|
|
392
|
-
const user = userEvent.setup();
|
|
393
|
-
|
|
394
|
-
function TestComponent() {
|
|
395
|
-
const [ customValidity, setCustomValidity ] =
|
|
396
|
-
useState<
|
|
397
|
-
React.ComponentProps<
|
|
398
|
-
typeof ValidatedInputControl
|
|
399
|
-
>[ 'customValidity' ]
|
|
400
|
-
>( undefined );
|
|
401
|
-
const inputRef = useRef< HTMLInputElement >( null );
|
|
402
|
-
|
|
403
|
-
return (
|
|
404
|
-
<>
|
|
405
|
-
<ValidatedInputControl
|
|
406
|
-
ref={ inputRef }
|
|
407
|
-
label="URL"
|
|
408
|
-
customValidity={ customValidity }
|
|
409
|
-
/>
|
|
410
|
-
<button
|
|
411
|
-
type="button"
|
|
412
|
-
onClick={ () => {
|
|
413
|
-
setCustomValidity( {
|
|
414
|
-
type: 'invalid',
|
|
415
|
-
message: 'Please enter a valid URL.',
|
|
416
|
-
} );
|
|
417
|
-
requestAnimationFrame(
|
|
418
|
-
() => inputRef.current?.reportValidity()
|
|
419
|
-
);
|
|
420
|
-
} }
|
|
421
|
-
>
|
|
422
|
-
Validate
|
|
423
|
-
</button>
|
|
424
|
-
<button
|
|
425
|
-
type="button"
|
|
426
|
-
onClick={ () => setCustomValidity( undefined ) }
|
|
427
|
-
>
|
|
428
|
-
Clear
|
|
429
|
-
</button>
|
|
430
|
-
</>
|
|
431
|
-
);
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
render( <TestComponent /> );
|
|
435
|
-
|
|
436
|
-
const input = screen.getByRole( 'textbox', { name: 'URL' } );
|
|
437
|
-
|
|
438
|
-
await user.click(
|
|
439
|
-
screen.getByRole( 'button', { name: 'Validate' } )
|
|
440
|
-
);
|
|
441
|
-
|
|
442
|
-
await waitFor( () => {
|
|
443
|
-
expect( input ).toHaveAccessibleDescription(
|
|
444
|
-
expect.stringContaining( 'Please enter a valid URL.' )
|
|
445
|
-
);
|
|
446
|
-
} );
|
|
447
|
-
|
|
448
|
-
await user.click( screen.getByRole( 'button', { name: 'Clear' } ) );
|
|
449
|
-
|
|
450
|
-
await waitFor( () => {
|
|
451
|
-
expect( input ).not.toHaveAttribute( 'aria-describedby' );
|
|
452
|
-
} );
|
|
453
|
-
} );
|
|
454
|
-
} );
|
|
455
|
-
|
|
456
|
-
describe( 'ValidatedRangeControl', () => {
|
|
457
|
-
it( 'should accessibly label the internal slider and spin button', () => {
|
|
458
|
-
render(
|
|
459
|
-
<ValidatedRangeControl
|
|
460
|
-
label="Opacity"
|
|
461
|
-
required
|
|
462
|
-
min={ 0 }
|
|
463
|
-
max={ 100 }
|
|
464
|
-
onChange={ () => {} }
|
|
465
|
-
/>
|
|
466
|
-
);
|
|
467
|
-
|
|
468
|
-
// The slider is styled with `opacity: 0`, so it's not "visible"
|
|
469
|
-
// in the DOM sense, but it's still accessible.
|
|
470
|
-
expect(
|
|
471
|
-
screen.getByRole( 'slider', {
|
|
472
|
-
name: 'Opacity (Required)',
|
|
473
|
-
} )
|
|
474
|
-
).toBeInTheDocument();
|
|
475
|
-
expect(
|
|
476
|
-
screen.getByRole( 'spinbutton', {
|
|
477
|
-
name: 'Opacity (Required)',
|
|
478
|
-
} )
|
|
479
|
-
).toBeVisible();
|
|
480
|
-
} );
|
|
481
|
-
} );
|
|
482
|
-
|
|
483
|
-
describe( 'Focus behavior', () => {
|
|
484
|
-
it( 'should focus the first error in the form', async () => {
|
|
485
|
-
const user = userEvent.setup();
|
|
486
|
-
render(
|
|
487
|
-
<form>
|
|
488
|
-
<ValidatedInputControl label="Text1" required />
|
|
489
|
-
<ValidatedInputControl label="Text2" required />
|
|
490
|
-
<button type="submit">Submit</button>
|
|
491
|
-
</form>
|
|
492
|
-
);
|
|
493
|
-
|
|
494
|
-
await user.click(
|
|
495
|
-
screen.getByRole( 'button', { name: 'Submit' } )
|
|
496
|
-
);
|
|
497
|
-
|
|
498
|
-
expect(
|
|
499
|
-
screen.getByRole( 'textbox', { name: /^Text1/ } )
|
|
500
|
-
).toHaveFocus();
|
|
501
|
-
} );
|
|
502
|
-
|
|
503
|
-
it( 'should focus the field on an `invalid` event, even if there is no enclosing form', async () => {
|
|
504
|
-
const user = userEvent.setup();
|
|
505
|
-
function ValidatedInputControlWithRef(
|
|
506
|
-
props: React.ComponentProps< typeof ValidatedInputControl >
|
|
507
|
-
) {
|
|
508
|
-
const ref = useRef< HTMLInputElement >( null );
|
|
509
|
-
return (
|
|
510
|
-
<>
|
|
511
|
-
<ValidatedInputControl ref={ ref } { ...props } />
|
|
512
|
-
<button
|
|
513
|
-
type="button"
|
|
514
|
-
onClick={ () => ref.current?.reportValidity() }
|
|
515
|
-
>
|
|
516
|
-
Report Validity
|
|
517
|
-
</button>
|
|
518
|
-
</>
|
|
519
|
-
);
|
|
520
|
-
}
|
|
521
|
-
|
|
522
|
-
render( <ValidatedInputControlWithRef label="Text" required /> );
|
|
523
|
-
|
|
524
|
-
await user.click(
|
|
525
|
-
screen.getByRole( 'button', { name: 'Report Validity' } )
|
|
526
|
-
);
|
|
527
|
-
|
|
528
|
-
await waitFor( () => {
|
|
529
|
-
expect(
|
|
530
|
-
screen.getByRole( 'textbox', { name: /^Text/ } )
|
|
531
|
-
).toHaveFocus();
|
|
532
|
-
} );
|
|
533
|
-
} );
|
|
534
|
-
|
|
535
|
-
it( 'should show the error message without moving focus on a synthetic `invalid` event', async () => {
|
|
536
|
-
const user = userEvent.setup();
|
|
537
|
-
function ValidatedInputControlWithRef(
|
|
538
|
-
props: React.ComponentProps< typeof ValidatedInputControl >
|
|
539
|
-
) {
|
|
540
|
-
const ref = useRef< HTMLInputElement >( null );
|
|
541
|
-
return (
|
|
542
|
-
<>
|
|
543
|
-
<ValidatedInputControl ref={ ref } { ...props } />
|
|
544
|
-
<button
|
|
545
|
-
type="button"
|
|
546
|
-
onClick={ () =>
|
|
547
|
-
ref.current?.dispatchEvent(
|
|
548
|
-
new Event( 'invalid', {
|
|
549
|
-
cancelable: true,
|
|
550
|
-
} )
|
|
551
|
-
)
|
|
552
|
-
}
|
|
553
|
-
>
|
|
554
|
-
Show errors
|
|
555
|
-
</button>
|
|
556
|
-
</>
|
|
557
|
-
);
|
|
558
|
-
}
|
|
559
|
-
|
|
560
|
-
render( <ValidatedInputControlWithRef label="Text" required /> );
|
|
561
|
-
|
|
562
|
-
const button = screen.getByRole( 'button', {
|
|
563
|
-
name: 'Show errors',
|
|
564
|
-
} );
|
|
565
|
-
await user.click( button );
|
|
566
|
-
|
|
567
|
-
// The error message is revealed...
|
|
568
|
-
await waitFor( () => {
|
|
569
|
-
expect(
|
|
570
|
-
screen.getByText( 'Constraints not satisfied' )
|
|
571
|
-
).toBeVisible();
|
|
572
|
-
} );
|
|
573
|
-
// ...but focus is not moved to the invalid field.
|
|
574
|
-
expect( button ).toHaveFocus();
|
|
575
|
-
} );
|
|
576
|
-
} );
|
|
577
|
-
} );
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { render, screen, waitFor } from '@testing-library/react';
|
|
2
|
-
import userEvent from '@testing-library/user-event';
|
|
3
|
-
import { ValidatedFormTokenField } from '../components';
|
|
4
|
-
|
|
5
|
-
describe( 'ValidatedFormTokenField', () => {
|
|
6
|
-
it( 'should preserve the built-in howto description', () => {
|
|
7
|
-
render(
|
|
8
|
-
<ValidatedFormTokenField
|
|
9
|
-
label="Tags"
|
|
10
|
-
value={ [] }
|
|
11
|
-
onChange={ () => {} }
|
|
12
|
-
/>
|
|
13
|
-
);
|
|
14
|
-
|
|
15
|
-
expect(
|
|
16
|
-
screen.getByRole( 'combobox', { name: 'Tags' } )
|
|
17
|
-
).toHaveAccessibleDescription(
|
|
18
|
-
expect.stringContaining( 'Separate with commas or the Enter key.' )
|
|
19
|
-
);
|
|
20
|
-
} );
|
|
21
|
-
|
|
22
|
-
it( 'should preserve the built-in howto description when validation is active', async () => {
|
|
23
|
-
const user = userEvent.setup();
|
|
24
|
-
render(
|
|
25
|
-
<form>
|
|
26
|
-
<ValidatedFormTokenField
|
|
27
|
-
label="Tags"
|
|
28
|
-
value={ [] }
|
|
29
|
-
onChange={ () => {} }
|
|
30
|
-
required
|
|
31
|
-
/>
|
|
32
|
-
<button type="submit">Submit</button>
|
|
33
|
-
</form>
|
|
34
|
-
);
|
|
35
|
-
|
|
36
|
-
const input = screen.getByRole( 'combobox', { name: /^Tags/ } );
|
|
37
|
-
|
|
38
|
-
await user.click( screen.getByRole( 'button', { name: 'Submit' } ) );
|
|
39
|
-
|
|
40
|
-
// The validation error targets the hidden delegate input, not the
|
|
41
|
-
// interactive combobox. The combobox's built-in description should
|
|
42
|
-
// be unaffected.
|
|
43
|
-
await waitFor( () => {
|
|
44
|
-
expect(
|
|
45
|
-
screen.getByText( 'Constraints not satisfied' )
|
|
46
|
-
).toBeVisible();
|
|
47
|
-
} );
|
|
48
|
-
expect( input ).toHaveAccessibleDescription(
|
|
49
|
-
expect.stringContaining( 'Separate with commas or the Enter key.' )
|
|
50
|
-
);
|
|
51
|
-
} );
|
|
52
|
-
} );
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { render, screen, waitFor } from '@testing-library/react';
|
|
2
|
-
import userEvent from '@testing-library/user-event';
|
|
3
|
-
import { ValidatedToggleControl } from '../components';
|
|
4
|
-
|
|
5
|
-
describe( 'ValidatedToggleControl', () => {
|
|
6
|
-
it( 'should preserve the help description', () => {
|
|
7
|
-
render(
|
|
8
|
-
<ValidatedToggleControl
|
|
9
|
-
label="Dark mode"
|
|
10
|
-
help="Enable dark mode."
|
|
11
|
-
onChange={ () => {} }
|
|
12
|
-
/>
|
|
13
|
-
);
|
|
14
|
-
|
|
15
|
-
expect(
|
|
16
|
-
screen.getByRole( 'checkbox', { name: 'Dark mode' } )
|
|
17
|
-
).toHaveAccessibleDescription( 'Enable dark mode.' );
|
|
18
|
-
} );
|
|
19
|
-
|
|
20
|
-
it( 'should append the validation error alongside the help description', async () => {
|
|
21
|
-
const user = userEvent.setup();
|
|
22
|
-
render(
|
|
23
|
-
<form>
|
|
24
|
-
<ValidatedToggleControl
|
|
25
|
-
label="Dark mode"
|
|
26
|
-
help="Enable dark mode."
|
|
27
|
-
onChange={ () => {} }
|
|
28
|
-
required
|
|
29
|
-
/>
|
|
30
|
-
<button type="submit">Submit</button>
|
|
31
|
-
</form>
|
|
32
|
-
);
|
|
33
|
-
|
|
34
|
-
const toggle = screen.getByRole( 'checkbox', {
|
|
35
|
-
name: /^Dark mode/,
|
|
36
|
-
} );
|
|
37
|
-
|
|
38
|
-
await user.click( screen.getByRole( 'button', { name: 'Submit' } ) );
|
|
39
|
-
|
|
40
|
-
await waitFor( () => {
|
|
41
|
-
expect( toggle ).toHaveAccessibleDescription(
|
|
42
|
-
expect.stringContaining( 'Constraints not satisfied' )
|
|
43
|
-
);
|
|
44
|
-
} );
|
|
45
|
-
expect( toggle ).toHaveAccessibleDescription(
|
|
46
|
-
expect.stringContaining( 'Enable dark mode.' )
|
|
47
|
-
);
|
|
48
|
-
} );
|
|
49
|
-
} );
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { render, screen } from '@testing-library/react';
|
|
2
|
-
import { ValidatedToggleGroupControl } from '../components';
|
|
3
|
-
import { ToggleGroupControlOption } from '../../toggle-group-control';
|
|
4
|
-
|
|
5
|
-
// The `help` prop is rendered visually by BaseControl but is not
|
|
6
|
-
// programmatically associated with the toggle group via aria-describedby.
|
|
7
|
-
// Additionally, the validity target is a hidden delegate radio input, not the
|
|
8
|
-
// toggle group itself. These are pre-existing bugs, not caused by ControlWithError.
|
|
9
|
-
describe( 'ValidatedToggleGroupControl', () => {
|
|
10
|
-
// eslint-disable-next-line jest/no-disabled-tests
|
|
11
|
-
it.skip( 'should preserve the help description', () => {
|
|
12
|
-
render(
|
|
13
|
-
<ValidatedToggleGroupControl
|
|
14
|
-
label="Alignment"
|
|
15
|
-
help="Choose text alignment."
|
|
16
|
-
value="left"
|
|
17
|
-
onChange={ () => {} }
|
|
18
|
-
>
|
|
19
|
-
<ToggleGroupControlOption label="Left" value="left" />
|
|
20
|
-
<ToggleGroupControlOption label="Center" value="center" />
|
|
21
|
-
</ValidatedToggleGroupControl>
|
|
22
|
-
);
|
|
23
|
-
|
|
24
|
-
expect(
|
|
25
|
-
screen.getByRole( 'radiogroup', { name: 'Alignment' } )
|
|
26
|
-
).toHaveAccessibleDescription( 'Choose text alignment.' );
|
|
27
|
-
} );
|
|
28
|
-
} );
|