@cdx-ui/primitives 0.0.1-beta.65 → 0.0.1-beta.67
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +35 -36
- package/lib/commonjs/CLAUDE.md +64 -12
- package/lib/commonjs/avatar/{createAvatarRoot.js → AvatarRoot.js} +10 -6
- package/lib/commonjs/avatar/AvatarRoot.js.map +1 -0
- package/lib/commonjs/avatar/index.js +14 -24
- package/lib/commonjs/avatar/index.js.map +1 -1
- package/lib/commonjs/button/{createButtonRoot.js → ButtonRoot.js} +13 -9
- package/lib/commonjs/button/ButtonRoot.js.map +1 -0
- package/lib/commonjs/button/index.js +7 -24
- package/lib/commonjs/button/index.js.map +1 -1
- package/lib/commonjs/checkbox/{createCheckboxGroup.js → CheckboxGroup.js} +20 -12
- package/lib/commonjs/checkbox/CheckboxGroup.js.map +1 -0
- package/lib/commonjs/checkbox/CheckboxRoot.js +103 -0
- package/lib/commonjs/checkbox/CheckboxRoot.js.map +1 -0
- package/lib/commonjs/checkbox/CheckboxRoot.web.js +94 -0
- package/lib/commonjs/checkbox/CheckboxRoot.web.js.map +1 -0
- package/lib/commonjs/checkbox/index.js +21 -24
- package/lib/commonjs/checkbox/index.js.map +1 -1
- package/lib/commonjs/chip/ChipRoot.js +147 -0
- package/lib/commonjs/chip/ChipRoot.js.map +1 -0
- package/lib/commonjs/chip/context.js +11 -0
- package/lib/commonjs/chip/context.js.map +1 -0
- package/lib/commonjs/chip/index.js +14 -10
- package/lib/commonjs/chip/index.js.map +1 -1
- package/lib/commonjs/dialog/DialogClose.js +32 -0
- package/lib/commonjs/dialog/DialogClose.js.map +1 -0
- package/lib/commonjs/dialog/{createDialogPopup.js → DialogPopup.js} +18 -14
- package/lib/commonjs/dialog/DialogPopup.js.map +1 -0
- package/lib/commonjs/dialog/{createDialogRoot.js → DialogRoot.js} +11 -8
- package/lib/commonjs/dialog/DialogRoot.js.map +1 -0
- package/lib/commonjs/dialog/DialogTrigger.js +32 -0
- package/lib/commonjs/dialog/DialogTrigger.js.map +1 -0
- package/lib/commonjs/dialog/index.js +28 -41
- package/lib/commonjs/dialog/index.js.map +1 -1
- package/lib/commonjs/field/FieldLabel.js +48 -0
- package/lib/commonjs/field/FieldLabel.js.map +1 -0
- package/lib/commonjs/field/FieldLabel.web.js +60 -0
- package/lib/commonjs/field/FieldLabel.web.js.map +1 -0
- package/lib/commonjs/field/FieldRoot.js +38 -0
- package/lib/commonjs/field/FieldRoot.js.map +1 -0
- package/lib/commonjs/field/index.js +14 -40
- package/lib/commonjs/field/index.js.map +1 -1
- package/lib/commonjs/form/FormRoot.js +25 -0
- package/lib/commonjs/form/FormRoot.js.map +1 -0
- package/lib/commonjs/{dialog/createDialogFooter.js → form/FormRoot.web.js} +14 -8
- package/lib/commonjs/form/FormRoot.web.js.map +1 -0
- package/lib/commonjs/form/index.js +7 -9
- package/lib/commonjs/form/index.js.map +1 -1
- package/lib/commonjs/index.js +42 -5
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/input/{createInputField.js → InputField.android.js} +36 -38
- package/lib/commonjs/input/InputField.android.js.map +1 -0
- package/lib/commonjs/input/InputField.js +92 -0
- package/lib/commonjs/input/InputField.js.map +1 -0
- package/lib/commonjs/input/InputField.web.js +131 -0
- package/lib/commonjs/input/InputField.web.js.map +1 -0
- package/lib/commonjs/input/{createInputRoot.js → InputRoot.js} +29 -27
- package/lib/commonjs/input/InputRoot.js.map +1 -0
- package/lib/commonjs/input/index.js +21 -16
- package/lib/commonjs/input/index.js.map +1 -1
- package/lib/commonjs/link/{createLink.js → LinkRoot.js} +20 -20
- package/lib/commonjs/link/LinkRoot.js.map +1 -0
- package/lib/commonjs/link/index.js +3 -3
- package/lib/commonjs/link/index.js.map +1 -1
- package/lib/commonjs/list-item/{createListItemRoot.js → ListItemRoot.js} +48 -68
- package/lib/commonjs/list-item/ListItemRoot.js.map +1 -0
- package/lib/commonjs/list-item/context.js.map +1 -1
- package/lib/commonjs/list-item/index.js +7 -36
- package/lib/commonjs/list-item/index.js.map +1 -1
- package/lib/commonjs/otp-input/{createOtpInputField.js → OtpInputField.js} +24 -8
- package/lib/commonjs/otp-input/OtpInputField.js.map +1 -0
- package/lib/commonjs/otp-input/index.js +39 -16
- package/lib/commonjs/otp-input/index.js.map +1 -1
- package/lib/commonjs/otp-input/{createOtpInputRoot.js → useOtpInput.js} +33 -49
- package/lib/commonjs/otp-input/useOtpInput.js.map +1 -0
- package/lib/commonjs/overlay/useDismissOverlay.js +0 -2
- package/lib/commonjs/overlay/useDismissOverlay.js.map +1 -1
- package/lib/commonjs/overlay/useEscapeKey.js +0 -2
- package/lib/commonjs/overlay/useEscapeKey.js.map +1 -1
- package/lib/commonjs/{progress/createProgressIndicator.js → progress-bar/ProgressBarIndicator.js} +12 -9
- package/lib/commonjs/progress-bar/ProgressBarIndicator.js.map +1 -0
- package/lib/commonjs/{progress/createProgressRoot.js → progress-bar/ProgressBarRoot.js} +9 -5
- package/lib/commonjs/progress-bar/ProgressBarRoot.js.map +1 -0
- package/lib/commonjs/progress-bar/context.js.map +1 -0
- package/lib/commonjs/progress-bar/index.js +27 -0
- package/lib/commonjs/progress-bar/index.js.map +1 -0
- package/lib/commonjs/{progress → progress-bar}/types.js.map +1 -1
- package/lib/commonjs/radio/{createRadioGroup.js → RadioGroup.js} +18 -10
- package/lib/commonjs/radio/RadioGroup.js.map +1 -0
- package/lib/commonjs/radio/RadioRoot.js +99 -0
- package/lib/commonjs/radio/RadioRoot.js.map +1 -0
- package/lib/commonjs/radio/RadioRoot.web.js +91 -0
- package/lib/commonjs/radio/RadioRoot.web.js.map +1 -0
- package/lib/commonjs/radio/index.js +21 -20
- package/lib/commonjs/radio/index.js.map +1 -1
- package/lib/commonjs/select/{createSelectContent.js → SelectContent.js} +14 -11
- package/lib/commonjs/select/SelectContent.js.map +1 -0
- package/lib/commonjs/select/{createSelectItem.js → SelectItem.js} +18 -15
- package/lib/commonjs/select/SelectItem.js.map +1 -0
- package/lib/commonjs/select/{createSelectRoot.js → SelectRoot.js} +11 -8
- package/lib/commonjs/select/SelectRoot.js.map +1 -0
- package/lib/commonjs/select/SelectTrigger.js +72 -0
- package/lib/commonjs/select/SelectTrigger.js.map +1 -0
- package/lib/commonjs/select/SelectTrigger.web.js +175 -0
- package/lib/commonjs/select/SelectTrigger.web.js.map +1 -0
- package/lib/commonjs/select/context.js +3 -12
- package/lib/commonjs/select/context.js.map +1 -1
- package/lib/commonjs/select/index.js +41 -32
- package/lib/commonjs/select/index.js.map +1 -1
- package/lib/commonjs/select/useContentFocus.js +1 -1
- package/lib/commonjs/select/useSelectTrigger.js +206 -0
- package/lib/commonjs/select/useSelectTrigger.js.map +1 -0
- package/lib/commonjs/select/useSelectTrigger.web.js +192 -0
- package/lib/commonjs/select/useSelectTrigger.web.js.map +1 -0
- package/lib/commonjs/slot/index.js +19 -0
- package/lib/commonjs/slot/index.js.map +1 -0
- package/lib/commonjs/switch/index.js +7 -9
- package/lib/commonjs/switch/index.js.map +1 -1
- package/lib/commonjs/switch/useSwitch.js +81 -0
- package/lib/commonjs/switch/useSwitch.js.map +1 -0
- package/lib/commonjs/tile/{createTileGroup.js → TileGroup.js} +11 -12
- package/lib/commonjs/tile/TileGroup.js.map +1 -0
- package/lib/commonjs/tile/TileRoot.js +129 -0
- package/lib/commonjs/tile/TileRoot.js.map +1 -0
- package/lib/commonjs/tile/index.js +14 -36
- package/lib/commonjs/tile/index.js.map +1 -1
- package/lib/commonjs/utils/dataAttributes.js +6 -0
- package/lib/commonjs/utils/dataAttributes.js.map +1 -1
- package/lib/commonjs/utils/dataAttributes.web.js +25 -0
- package/lib/commonjs/utils/dataAttributes.web.js.map +1 -1
- package/lib/commonjs/utils/domDataAttributes.js +30 -0
- package/lib/commonjs/utils/domDataAttributes.js.map +1 -1
- package/lib/module/CLAUDE.md +64 -12
- package/lib/module/avatar/{createAvatarRoot.js → AvatarRoot.js} +9 -4
- package/lib/module/avatar/AvatarRoot.js.map +1 -0
- package/lib/module/avatar/index.js +2 -23
- package/lib/module/avatar/index.js.map +1 -1
- package/lib/module/button/{createButtonRoot.js → ButtonRoot.js} +13 -8
- package/lib/module/button/ButtonRoot.js.map +1 -0
- package/lib/module/button/index.js +1 -23
- package/lib/module/button/index.js.map +1 -1
- package/lib/module/checkbox/{createCheckboxGroup.js → CheckboxGroup.js} +20 -11
- package/lib/module/checkbox/CheckboxGroup.js.map +1 -0
- package/lib/module/checkbox/CheckboxRoot.js +99 -0
- package/lib/module/checkbox/CheckboxRoot.js.map +1 -0
- package/lib/module/checkbox/CheckboxRoot.web.js +90 -0
- package/lib/module/checkbox/CheckboxRoot.web.js.map +1 -0
- package/lib/module/checkbox/index.js +3 -23
- package/lib/module/checkbox/index.js.map +1 -1
- package/lib/module/chip/ChipRoot.js +142 -0
- package/lib/module/chip/ChipRoot.js.map +1 -0
- package/lib/module/chip/context.js +5 -0
- package/lib/module/chip/context.js.map +1 -0
- package/lib/module/chip/index.js +2 -9
- package/lib/module/chip/index.js.map +1 -1
- package/lib/module/dialog/DialogClose.js +28 -0
- package/lib/module/dialog/DialogClose.js.map +1 -0
- package/lib/module/dialog/{createDialogPopup.js → DialogPopup.js} +19 -14
- package/lib/module/dialog/DialogPopup.js.map +1 -0
- package/lib/module/dialog/{createDialogRoot.js → DialogRoot.js} +11 -7
- package/lib/module/dialog/DialogRoot.js.map +1 -0
- package/lib/module/dialog/DialogTrigger.js +28 -0
- package/lib/module/dialog/DialogTrigger.js.map +1 -0
- package/lib/module/dialog/index.js +5 -42
- package/lib/module/dialog/index.js.map +1 -1
- package/lib/module/field/FieldLabel.js +44 -0
- package/lib/module/field/FieldLabel.js.map +1 -0
- package/lib/module/field/FieldLabel.web.js +55 -0
- package/lib/module/field/FieldLabel.web.js.map +1 -0
- package/lib/module/field/FieldRoot.js +34 -0
- package/lib/module/field/FieldRoot.js.map +1 -0
- package/lib/module/field/index.js +2 -39
- package/lib/module/field/index.js.map +1 -1
- package/lib/module/form/FormRoot.js +21 -0
- package/lib/module/form/FormRoot.js.map +1 -0
- package/lib/module/form/FormRoot.web.js +22 -0
- package/lib/module/form/FormRoot.web.js.map +1 -0
- package/lib/module/form/index.js +1 -8
- package/lib/module/form/index.js.map +1 -1
- package/lib/module/index.js +5 -3
- package/lib/module/index.js.map +1 -1
- package/lib/module/input/{createInputField.js → InputField.android.js} +36 -37
- package/lib/module/input/InputField.android.js.map +1 -0
- package/lib/module/input/InputField.js +88 -0
- package/lib/module/input/InputField.js.map +1 -0
- package/lib/module/input/InputField.web.js +126 -0
- package/lib/module/input/InputField.web.js.map +1 -0
- package/lib/module/input/{createInputRoot.js → InputRoot.js} +29 -25
- package/lib/module/input/InputRoot.js.map +1 -0
- package/lib/module/input/index.js +3 -15
- package/lib/module/input/index.js.map +1 -1
- package/lib/module/link/{createLink.js → LinkRoot.js} +21 -19
- package/lib/module/link/LinkRoot.js.map +1 -0
- package/lib/module/link/index.js +1 -1
- package/lib/module/link/index.js.map +1 -1
- package/lib/module/list-item/{createListItemRoot.js → ListItemRoot.js} +49 -68
- package/lib/module/list-item/ListItemRoot.js.map +1 -0
- package/lib/module/list-item/context.js.map +1 -1
- package/lib/module/list-item/index.js +1 -35
- package/lib/module/list-item/index.js.map +1 -1
- package/lib/module/otp-input/{createOtpInputField.js → OtpInputField.js} +24 -7
- package/lib/module/otp-input/OtpInputField.js.map +1 -0
- package/lib/module/otp-input/index.js +3 -15
- package/lib/module/otp-input/index.js.map +1 -1
- package/lib/module/otp-input/{createOtpInputRoot.js → useOtpInput.js} +33 -48
- package/lib/module/otp-input/useOtpInput.js.map +1 -0
- package/lib/module/overlay/useDismissOverlay.js +0 -2
- package/lib/module/overlay/useDismissOverlay.js.map +1 -1
- package/lib/module/overlay/useEscapeKey.js +0 -2
- package/lib/module/overlay/useEscapeKey.js.map +1 -1
- package/lib/module/{progress/createProgressIndicator.js → progress-bar/ProgressBarIndicator.js} +11 -7
- package/lib/module/progress-bar/ProgressBarIndicator.js.map +1 -0
- package/lib/module/{progress/createProgressRoot.js → progress-bar/ProgressBarRoot.js} +8 -3
- package/lib/module/progress-bar/ProgressBarRoot.js.map +1 -0
- package/lib/module/progress-bar/context.js.map +1 -0
- package/lib/module/progress-bar/index.js +6 -0
- package/lib/module/progress-bar/index.js.map +1 -0
- package/lib/module/{progress → progress-bar}/types.js.map +1 -1
- package/lib/module/radio/{createRadioGroup.js → RadioGroup.js} +18 -9
- package/lib/module/radio/RadioGroup.js.map +1 -0
- package/lib/module/radio/RadioRoot.js +95 -0
- package/lib/module/radio/RadioRoot.js.map +1 -0
- package/lib/module/radio/RadioRoot.web.js +87 -0
- package/lib/module/radio/RadioRoot.web.js.map +1 -0
- package/lib/module/radio/index.js +3 -19
- package/lib/module/radio/index.js.map +1 -1
- package/lib/module/select/{createSelectContent.js → SelectContent.js} +14 -11
- package/lib/module/select/SelectContent.js.map +1 -0
- package/lib/module/select/{createSelectItem.js → SelectItem.js} +18 -14
- package/lib/module/select/SelectItem.js.map +1 -0
- package/lib/module/select/{createSelectRoot.js → SelectRoot.js} +11 -7
- package/lib/module/select/SelectRoot.js.map +1 -0
- package/lib/module/select/SelectTrigger.js +67 -0
- package/lib/module/select/SelectTrigger.js.map +1 -0
- package/lib/module/select/SelectTrigger.web.js +170 -0
- package/lib/module/select/SelectTrigger.web.js.map +1 -0
- package/lib/module/select/context.js +1 -8
- package/lib/module/select/context.js.map +1 -1
- package/lib/module/select/index.js +5 -31
- package/lib/module/select/index.js.map +1 -1
- package/lib/module/select/useContentFocus.js +1 -1
- package/lib/module/select/useSelectTrigger.js +202 -0
- package/lib/module/select/useSelectTrigger.js.map +1 -0
- package/lib/module/select/useSelectTrigger.web.js +188 -0
- package/lib/module/select/useSelectTrigger.web.js.map +1 -0
- package/lib/module/slot/index.js +4 -0
- package/lib/module/slot/index.js.map +1 -0
- package/lib/module/switch/index.js +1 -8
- package/lib/module/switch/index.js.map +1 -1
- package/lib/module/switch/useSwitch.js +77 -0
- package/lib/module/switch/useSwitch.js.map +1 -0
- package/lib/module/tile/{createTileGroup.js → TileGroup.js} +10 -9
- package/lib/module/tile/TileGroup.js.map +1 -0
- package/lib/module/tile/{createTileRoot.js → TileRoot.js} +52 -54
- package/lib/module/tile/TileRoot.js.map +1 -0
- package/lib/module/tile/index.js +2 -35
- package/lib/module/tile/index.js.map +1 -1
- package/lib/module/utils/dataAttributes.js +1 -1
- package/lib/module/utils/dataAttributes.js.map +1 -1
- package/lib/module/utils/dataAttributes.web.js +24 -0
- package/lib/module/utils/dataAttributes.web.js.map +1 -1
- package/lib/module/utils/domDataAttributes.js +29 -0
- package/lib/module/utils/domDataAttributes.js.map +1 -1
- package/lib/typescript/avatar/AvatarRoot.d.ts +8 -0
- package/lib/typescript/avatar/AvatarRoot.d.ts.map +1 -0
- package/lib/typescript/avatar/index.d.ts +3 -10
- package/lib/typescript/avatar/index.d.ts.map +1 -1
- package/lib/typescript/avatar/types.d.ts +1 -17
- package/lib/typescript/avatar/types.d.ts.map +1 -1
- package/lib/typescript/button/ButtonRoot.d.ts +9 -0
- package/lib/typescript/button/ButtonRoot.d.ts.map +1 -0
- package/lib/typescript/button/index.d.ts +2 -10
- package/lib/typescript/button/index.d.ts.map +1 -1
- package/lib/typescript/button/types.d.ts +1 -34
- package/lib/typescript/button/types.d.ts.map +1 -1
- package/lib/typescript/checkbox/CheckboxGroup.d.ts +9 -0
- package/lib/typescript/checkbox/CheckboxGroup.d.ts.map +1 -0
- package/lib/typescript/checkbox/CheckboxRoot.d.ts +6 -0
- package/lib/typescript/checkbox/CheckboxRoot.d.ts.map +1 -0
- package/lib/typescript/checkbox/CheckboxRoot.web.d.ts +6 -0
- package/lib/typescript/checkbox/CheckboxRoot.web.d.ts.map +1 -0
- package/lib/typescript/checkbox/index.d.ts +4 -10
- package/lib/typescript/checkbox/index.d.ts.map +1 -1
- package/lib/typescript/checkbox/types.d.ts +0 -17
- package/lib/typescript/checkbox/types.d.ts.map +1 -1
- package/lib/typescript/checkbox/useCheckboxRoot.d.ts +1 -1
- package/lib/typescript/chip/ChipRoot.d.ts +7 -0
- package/lib/typescript/chip/ChipRoot.d.ts.map +1 -0
- package/lib/typescript/chip/context.d.ts +6 -0
- package/lib/typescript/chip/context.d.ts.map +1 -0
- package/lib/typescript/chip/index.d.ts +3 -8
- package/lib/typescript/chip/index.d.ts.map +1 -1
- package/lib/typescript/chip/types.d.ts +3 -4
- package/lib/typescript/chip/types.d.ts.map +1 -1
- package/lib/typescript/dialog/DialogClose.d.ts +5 -0
- package/lib/typescript/dialog/DialogClose.d.ts.map +1 -0
- package/lib/typescript/dialog/DialogPopup.d.ts +14 -0
- package/lib/typescript/dialog/DialogPopup.d.ts.map +1 -0
- package/lib/typescript/dialog/DialogRoot.d.ts +7 -0
- package/lib/typescript/dialog/DialogRoot.d.ts.map +1 -0
- package/lib/typescript/dialog/DialogTrigger.d.ts +5 -0
- package/lib/typescript/dialog/DialogTrigger.d.ts.map +1 -0
- package/lib/typescript/dialog/index.d.ts +6 -17
- package/lib/typescript/dialog/index.d.ts.map +1 -1
- package/lib/typescript/dialog/types.d.ts +2 -24
- package/lib/typescript/dialog/types.d.ts.map +1 -1
- package/lib/typescript/field/FieldLabel.d.ts +12 -0
- package/lib/typescript/field/FieldLabel.d.ts.map +1 -0
- package/lib/typescript/field/FieldLabel.web.d.ts +24 -0
- package/lib/typescript/field/FieldLabel.web.d.ts.map +1 -0
- package/lib/typescript/field/FieldRoot.d.ts +8 -0
- package/lib/typescript/field/FieldRoot.d.ts.map +1 -0
- package/lib/typescript/field/index.d.ts +3 -12
- package/lib/typescript/field/index.d.ts.map +1 -1
- package/lib/typescript/field/types.d.ts +0 -20
- package/lib/typescript/field/types.d.ts.map +1 -1
- package/lib/typescript/form/FormRoot.d.ts +8 -0
- package/lib/typescript/form/FormRoot.d.ts.map +1 -0
- package/lib/typescript/form/FormRoot.web.d.ts +8 -0
- package/lib/typescript/form/FormRoot.web.d.ts.map +1 -0
- package/lib/typescript/form/index.d.ts +2 -5
- package/lib/typescript/form/index.d.ts.map +1 -1
- package/lib/typescript/form/types.d.ts +8 -9
- package/lib/typescript/form/types.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +5 -3
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/input/InputField.android.d.ts +5 -0
- package/lib/typescript/input/InputField.android.d.ts.map +1 -0
- package/lib/typescript/input/InputField.d.ts +5 -0
- package/lib/typescript/input/InputField.d.ts.map +1 -0
- package/lib/typescript/input/InputField.web.d.ts +6 -0
- package/lib/typescript/input/InputField.web.d.ts.map +1 -0
- package/lib/typescript/input/InputRoot.d.ts +5 -0
- package/lib/typescript/input/InputRoot.d.ts.map +1 -0
- package/lib/typescript/input/index.d.ts +4 -8
- package/lib/typescript/input/index.d.ts.map +1 -1
- package/lib/typescript/input/types.d.ts +20 -39
- package/lib/typescript/input/types.d.ts.map +1 -1
- package/lib/typescript/link/LinkRoot.d.ts +9 -0
- package/lib/typescript/link/LinkRoot.d.ts.map +1 -0
- package/lib/typescript/link/index.d.ts +1 -1
- package/lib/typescript/link/index.d.ts.map +1 -1
- package/lib/typescript/list-item/ListItemRoot.d.ts +7 -0
- package/lib/typescript/list-item/ListItemRoot.d.ts.map +1 -0
- package/lib/typescript/list-item/context.d.ts +3 -3
- package/lib/typescript/list-item/context.d.ts.map +1 -1
- package/lib/typescript/list-item/index.d.ts +2 -14
- package/lib/typescript/list-item/index.d.ts.map +1 -1
- package/lib/typescript/list-item/types.d.ts +4 -52
- package/lib/typescript/list-item/types.d.ts.map +1 -1
- package/lib/typescript/otp-input/OtpInputField.d.ts +19 -0
- package/lib/typescript/otp-input/OtpInputField.d.ts.map +1 -0
- package/lib/typescript/otp-input/index.d.ts +4 -8
- package/lib/typescript/otp-input/index.d.ts.map +1 -1
- package/lib/typescript/otp-input/types.d.ts +0 -9
- package/lib/typescript/otp-input/types.d.ts.map +1 -1
- package/lib/typescript/otp-input/useOtpInput.d.ts +19 -0
- package/lib/typescript/otp-input/useOtpInput.d.ts.map +1 -0
- package/lib/typescript/overlay/useDismissOverlay.d.ts.map +1 -1
- package/lib/typescript/overlay/useEscapeKey.d.ts.map +1 -1
- package/lib/typescript/progress-bar/ProgressBarIndicator.d.ts +6 -0
- package/lib/typescript/progress-bar/ProgressBarIndicator.d.ts.map +1 -0
- package/lib/typescript/progress-bar/ProgressBarRoot.d.ts +6 -0
- package/lib/typescript/progress-bar/ProgressBarRoot.d.ts.map +1 -0
- package/lib/typescript/progress-bar/context.d.ts.map +1 -0
- package/lib/typescript/progress-bar/index.d.ts +6 -0
- package/lib/typescript/progress-bar/index.d.ts.map +1 -0
- package/lib/typescript/{progress → progress-bar}/types.d.ts +1 -4
- package/lib/typescript/progress-bar/types.d.ts.map +1 -0
- package/lib/typescript/radio/RadioGroup.d.ts +9 -0
- package/lib/typescript/radio/RadioGroup.d.ts.map +1 -0
- package/lib/typescript/radio/RadioRoot.d.ts +6 -0
- package/lib/typescript/radio/RadioRoot.d.ts.map +1 -0
- package/lib/typescript/radio/RadioRoot.web.d.ts +6 -0
- package/lib/typescript/radio/RadioRoot.web.d.ts.map +1 -0
- package/lib/typescript/radio/index.d.ts +4 -9
- package/lib/typescript/radio/index.d.ts.map +1 -1
- package/lib/typescript/radio/types.d.ts +0 -11
- package/lib/typescript/radio/types.d.ts.map +1 -1
- package/lib/typescript/radio/useRadioRoot.d.ts +1 -1
- package/lib/typescript/select/SelectContent.d.ts +9 -0
- package/lib/typescript/select/SelectContent.d.ts.map +1 -0
- package/lib/typescript/select/SelectItem.d.ts +8 -0
- package/lib/typescript/select/SelectItem.d.ts.map +1 -0
- package/lib/typescript/select/SelectRoot.d.ts +8 -0
- package/lib/typescript/select/SelectRoot.d.ts.map +1 -0
- package/lib/typescript/select/SelectTrigger.d.ts +9 -0
- package/lib/typescript/select/SelectTrigger.d.ts.map +1 -0
- package/lib/typescript/select/SelectTrigger.web.d.ts +13 -0
- package/lib/typescript/select/SelectTrigger.web.d.ts.map +1 -0
- package/lib/typescript/select/context.d.ts +1 -11
- package/lib/typescript/select/context.d.ts.map +1 -1
- package/lib/typescript/select/index.d.ts +6 -12
- package/lib/typescript/select/index.d.ts.map +1 -1
- package/lib/typescript/select/types.d.ts +1 -9
- package/lib/typescript/select/types.d.ts.map +1 -1
- package/lib/typescript/select/useContentFocus.d.ts +1 -1
- package/lib/typescript/select/useSelectTrigger.d.ts +77 -0
- package/lib/typescript/select/useSelectTrigger.d.ts.map +1 -0
- package/lib/typescript/select/useSelectTrigger.web.d.ts +16 -0
- package/lib/typescript/select/useSelectTrigger.web.d.ts.map +1 -0
- package/lib/typescript/slot/index.d.ts +2 -0
- package/lib/typescript/slot/index.d.ts.map +1 -0
- package/lib/typescript/switch/index.d.ts +2 -6
- package/lib/typescript/switch/index.d.ts.map +1 -1
- package/lib/typescript/switch/types.d.ts +35 -6
- package/lib/typescript/switch/types.d.ts.map +1 -1
- package/lib/typescript/switch/useSwitch.d.ts +20 -0
- package/lib/typescript/switch/useSwitch.d.ts.map +1 -0
- package/lib/typescript/tile/TileGroup.d.ts +5 -0
- package/lib/typescript/tile/TileGroup.d.ts.map +1 -0
- package/lib/typescript/tile/TileRoot.d.ts +5 -0
- package/lib/typescript/tile/TileRoot.d.ts.map +1 -0
- package/lib/typescript/tile/index.d.ts +3 -13
- package/lib/typescript/tile/index.d.ts.map +1 -1
- package/lib/typescript/tile/types.d.ts +7 -18
- package/lib/typescript/tile/types.d.ts.map +1 -1
- package/lib/typescript/utils/dataAttributes.d.ts +1 -1
- package/lib/typescript/utils/dataAttributes.d.ts.map +1 -1
- package/lib/typescript/utils/dataAttributes.web.d.ts +16 -0
- package/lib/typescript/utils/dataAttributes.web.d.ts.map +1 -1
- package/lib/typescript/utils/domDataAttributes.d.ts +13 -0
- package/lib/typescript/utils/domDataAttributes.d.ts.map +1 -1
- package/package.json +3 -2
- package/src/CLAUDE.md +64 -12
- package/src/avatar/AvatarRoot.tsx +39 -0
- package/src/avatar/index.ts +3 -43
- package/src/avatar/types.ts +1 -47
- package/src/button/ButtonRoot.tsx +115 -0
- package/src/button/index.ts +3 -0
- package/src/button/types.ts +1 -52
- package/src/checkbox/CheckboxGroup.tsx +50 -0
- package/src/checkbox/CheckboxRoot.tsx +102 -0
- package/src/checkbox/CheckboxRoot.web.tsx +92 -0
- package/src/checkbox/index.ts +4 -42
- package/src/checkbox/types.ts +1 -32
- package/src/chip/ChipRoot.tsx +168 -0
- package/src/chip/context.tsx +4 -0
- package/src/chip/index.ts +3 -18
- package/src/chip/types.ts +3 -6
- package/src/dialog/DialogClose.tsx +26 -0
- package/src/dialog/DialogPopup.tsx +162 -0
- package/src/dialog/DialogRoot.tsx +72 -0
- package/src/dialog/DialogTrigger.tsx +26 -0
- package/src/dialog/index.tsx +5 -86
- package/src/dialog/types.ts +2 -56
- package/src/field/FieldLabel.tsx +43 -0
- package/src/field/FieldLabel.web.tsx +71 -0
- package/src/field/FieldRoot.tsx +39 -0
- package/src/field/index.tsx +3 -68
- package/src/field/types.tsx +0 -34
- package/src/form/FormRoot.tsx +18 -0
- package/src/form/FormRoot.web.tsx +17 -0
- package/src/form/index.tsx +2 -12
- package/src/form/types.tsx +9 -11
- package/src/index.ts +9 -3
- package/src/input/InputField.android.tsx +107 -0
- package/src/input/InputField.tsx +100 -0
- package/src/input/InputField.web.tsx +141 -0
- package/src/input/InputRoot.tsx +104 -0
- package/src/input/index.tsx +4 -38
- package/src/input/types.ts +21 -53
- package/src/link/LinkRoot.tsx +108 -0
- package/src/link/index.tsx +1 -1
- package/src/list-item/ListItemRoot.tsx +183 -0
- package/src/list-item/context.tsx +2 -2
- package/src/list-item/index.ts +2 -79
- package/src/list-item/types.ts +4 -81
- package/src/otp-input/OtpInputField.tsx +122 -0
- package/src/otp-input/index.ts +16 -0
- package/src/otp-input/types.ts +0 -23
- package/src/otp-input/useOtpInput.ts +156 -0
- package/src/overlay/useDismissOverlay.ts +0 -2
- package/src/overlay/useEscapeKey.ts +0 -2
- package/src/progress-bar/ProgressBarIndicator.tsx +34 -0
- package/src/{progress/createProgressRoot.tsx → progress-bar/ProgressBarRoot.tsx} +17 -9
- package/src/progress-bar/index.ts +5 -0
- package/src/{progress → progress-bar}/types.ts +1 -14
- package/src/radio/{createRadioGroup.tsx → RadioGroup.tsx} +31 -13
- package/src/radio/RadioRoot.tsx +98 -0
- package/src/radio/RadioRoot.web.tsx +90 -0
- package/src/radio/index.ts +4 -36
- package/src/radio/types.ts +0 -22
- package/src/select/SelectContent.tsx +120 -0
- package/src/select/SelectItem.tsx +139 -0
- package/src/select/SelectRoot.tsx +154 -0
- package/src/select/SelectTrigger.tsx +82 -0
- package/src/select/SelectTrigger.web.tsx +238 -0
- package/src/select/context.tsx +1 -10
- package/src/select/index.ts +17 -0
- package/src/select/types.ts +1 -32
- package/src/select/useContentFocus.ts +1 -1
- package/src/select/useSelectTrigger.ts +345 -0
- package/src/select/useSelectTrigger.web.ts +267 -0
- package/src/slot/index.ts +1 -0
- package/src/switch/index.ts +7 -16
- package/src/switch/types.ts +35 -10
- package/src/switch/useSwitch.ts +75 -0
- package/src/tile/TileGroup.tsx +137 -0
- package/src/tile/{createTileRoot.tsx → TileRoot.tsx} +58 -45
- package/src/tile/index.ts +2 -72
- package/src/tile/types.ts +7 -39
- package/src/utils/dataAttributes.ts +4 -1
- package/src/utils/dataAttributes.web.ts +24 -0
- package/src/utils/domDataAttributes.ts +31 -0
- package/lib/commonjs/avatar/createAvatarBadge.js +0 -20
- package/lib/commonjs/avatar/createAvatarBadge.js.map +0 -1
- package/lib/commonjs/avatar/createAvatarIcon.js +0 -30
- package/lib/commonjs/avatar/createAvatarIcon.js.map +0 -1
- package/lib/commonjs/avatar/createAvatarImage.js +0 -51
- package/lib/commonjs/avatar/createAvatarImage.js.map +0 -1
- package/lib/commonjs/avatar/createAvatarRoot.js.map +0 -1
- package/lib/commonjs/avatar/createAvatarText.js +0 -50
- package/lib/commonjs/avatar/createAvatarText.js.map +0 -1
- package/lib/commonjs/button/createButtonGroup.js +0 -80
- package/lib/commonjs/button/createButtonGroup.js.map +0 -1
- package/lib/commonjs/button/createButtonIcon.js +0 -18
- package/lib/commonjs/button/createButtonIcon.js.map +0 -1
- package/lib/commonjs/button/createButtonRoot.js.map +0 -1
- package/lib/commonjs/button/createButtonSpinner.js +0 -34
- package/lib/commonjs/button/createButtonSpinner.js.map +0 -1
- package/lib/commonjs/button/createButtonText.js +0 -39
- package/lib/commonjs/button/createButtonText.js.map +0 -1
- package/lib/commonjs/checkbox/createCheckboxGroup.js.map +0 -1
- package/lib/commonjs/checkbox/createCheckboxIcon.js +0 -29
- package/lib/commonjs/checkbox/createCheckboxIcon.js.map +0 -1
- package/lib/commonjs/checkbox/createCheckboxIndicator.js +0 -47
- package/lib/commonjs/checkbox/createCheckboxIndicator.js.map +0 -1
- package/lib/commonjs/checkbox/createCheckboxLabel.js +0 -46
- package/lib/commonjs/checkbox/createCheckboxLabel.js.map +0 -1
- package/lib/commonjs/checkbox/createCheckboxRoot.js +0 -99
- package/lib/commonjs/checkbox/createCheckboxRoot.js.map +0 -1
- package/lib/commonjs/checkbox/createCheckboxRoot.web.js +0 -95
- package/lib/commonjs/checkbox/createCheckboxRoot.web.js.map +0 -1
- package/lib/commonjs/chip/createChipRoot.js +0 -132
- package/lib/commonjs/chip/createChipRoot.js.map +0 -1
- package/lib/commonjs/dialog/createDialogClose.js +0 -37
- package/lib/commonjs/dialog/createDialogClose.js.map +0 -1
- package/lib/commonjs/dialog/createDialogContent.js +0 -21
- package/lib/commonjs/dialog/createDialogContent.js.map +0 -1
- package/lib/commonjs/dialog/createDialogDescription.js +0 -30
- package/lib/commonjs/dialog/createDialogDescription.js.map +0 -1
- package/lib/commonjs/dialog/createDialogFooter.js.map +0 -1
- package/lib/commonjs/dialog/createDialogHeader.js +0 -21
- package/lib/commonjs/dialog/createDialogHeader.js.map +0 -1
- package/lib/commonjs/dialog/createDialogPopup.js.map +0 -1
- package/lib/commonjs/dialog/createDialogRoot.js.map +0 -1
- package/lib/commonjs/dialog/createDialogTitle.js +0 -21
- package/lib/commonjs/dialog/createDialogTitle.js.map +0 -1
- package/lib/commonjs/dialog/createDialogTrigger.js +0 -37
- package/lib/commonjs/dialog/createDialogTrigger.js.map +0 -1
- package/lib/commonjs/field/createFieldError.js +0 -41
- package/lib/commonjs/field/createFieldError.js.map +0 -1
- package/lib/commonjs/field/createFieldErrorIcon.js +0 -18
- package/lib/commonjs/field/createFieldErrorIcon.js.map +0 -1
- package/lib/commonjs/field/createFieldErrorText.js +0 -18
- package/lib/commonjs/field/createFieldErrorText.js.map +0 -1
- package/lib/commonjs/field/createFieldHelper.js +0 -41
- package/lib/commonjs/field/createFieldHelper.js.map +0 -1
- package/lib/commonjs/field/createFieldHelperText.js +0 -18
- package/lib/commonjs/field/createFieldHelperText.js.map +0 -1
- package/lib/commonjs/field/createFieldLabel.js +0 -36
- package/lib/commonjs/field/createFieldLabel.js.map +0 -1
- package/lib/commonjs/field/createFieldRoot.js +0 -35
- package/lib/commonjs/field/createFieldRoot.js.map +0 -1
- package/lib/commonjs/form/createFormRoot.js +0 -21
- package/lib/commonjs/form/createFormRoot.js.map +0 -1
- package/lib/commonjs/input/createInputField.js.map +0 -1
- package/lib/commonjs/input/createInputRoot.js.map +0 -1
- package/lib/commonjs/input/createInputSlot.js +0 -44
- package/lib/commonjs/input/createInputSlot.js.map +0 -1
- package/lib/commonjs/link/createLink.js.map +0 -1
- package/lib/commonjs/list-item/createListItemContent.js +0 -30
- package/lib/commonjs/list-item/createListItemContent.js.map +0 -1
- package/lib/commonjs/list-item/createListItemDescription.js +0 -25
- package/lib/commonjs/list-item/createListItemDescription.js.map +0 -1
- package/lib/commonjs/list-item/createListItemLeadingSlot.js +0 -34
- package/lib/commonjs/list-item/createListItemLeadingSlot.js.map +0 -1
- package/lib/commonjs/list-item/createListItemMeta.js +0 -25
- package/lib/commonjs/list-item/createListItemMeta.js.map +0 -1
- package/lib/commonjs/list-item/createListItemRoot.js.map +0 -1
- package/lib/commonjs/list-item/createListItemSectionHeader.js +0 -54
- package/lib/commonjs/list-item/createListItemSectionHeader.js.map +0 -1
- package/lib/commonjs/list-item/createListItemTitle.js +0 -25
- package/lib/commonjs/list-item/createListItemTitle.js.map +0 -1
- package/lib/commonjs/list-item/createListItemTrailingSlot.js +0 -28
- package/lib/commonjs/list-item/createListItemTrailingSlot.js.map +0 -1
- package/lib/commonjs/otp-input/createOtpInputCell.js +0 -29
- package/lib/commonjs/otp-input/createOtpInputCell.js.map +0 -1
- package/lib/commonjs/otp-input/createOtpInputField.js.map +0 -1
- package/lib/commonjs/otp-input/createOtpInputRoot.js.map +0 -1
- package/lib/commonjs/progress/context.js.map +0 -1
- package/lib/commonjs/progress/createProgressIndicator.js.map +0 -1
- package/lib/commonjs/progress/createProgressRoot.js.map +0 -1
- package/lib/commonjs/progress/index.js +0 -25
- package/lib/commonjs/progress/index.js.map +0 -1
- package/lib/commonjs/radio/createRadioGroup.js.map +0 -1
- package/lib/commonjs/radio/createRadioIndicator.js +0 -43
- package/lib/commonjs/radio/createRadioIndicator.js.map +0 -1
- package/lib/commonjs/radio/createRadioLabel.js +0 -38
- package/lib/commonjs/radio/createRadioLabel.js.map +0 -1
- package/lib/commonjs/radio/createRadioRoot.js +0 -95
- package/lib/commonjs/radio/createRadioRoot.js.map +0 -1
- package/lib/commonjs/radio/createRadioRoot.web.js +0 -87
- package/lib/commonjs/radio/createRadioRoot.web.js.map +0 -1
- package/lib/commonjs/select/createSelectContent.js.map +0 -1
- package/lib/commonjs/select/createSelectIcon.js +0 -43
- package/lib/commonjs/select/createSelectIcon.js.map +0 -1
- package/lib/commonjs/select/createSelectItem.js.map +0 -1
- package/lib/commonjs/select/createSelectItemLabel.js +0 -41
- package/lib/commonjs/select/createSelectItemLabel.js.map +0 -1
- package/lib/commonjs/select/createSelectRoot.js.map +0 -1
- package/lib/commonjs/select/createSelectTrigger.js +0 -192
- package/lib/commonjs/select/createSelectTrigger.js.map +0 -1
- package/lib/commonjs/select/createSelectValue.js +0 -53
- package/lib/commonjs/select/createSelectValue.js.map +0 -1
- package/lib/commonjs/switch/createSwitchRoot.js +0 -73
- package/lib/commonjs/switch/createSwitchRoot.js.map +0 -1
- package/lib/commonjs/tile/createTileContent.js +0 -30
- package/lib/commonjs/tile/createTileContent.js.map +0 -1
- package/lib/commonjs/tile/createTileDescription.js +0 -28
- package/lib/commonjs/tile/createTileDescription.js.map +0 -1
- package/lib/commonjs/tile/createTileGroup.js.map +0 -1
- package/lib/commonjs/tile/createTileIndicator.js +0 -46
- package/lib/commonjs/tile/createTileIndicator.js.map +0 -1
- package/lib/commonjs/tile/createTileLeadingSlot.js +0 -34
- package/lib/commonjs/tile/createTileLeadingSlot.js.map +0 -1
- package/lib/commonjs/tile/createTileRoot.js +0 -133
- package/lib/commonjs/tile/createTileRoot.js.map +0 -1
- package/lib/commonjs/tile/createTileTitle.js +0 -28
- package/lib/commonjs/tile/createTileTitle.js.map +0 -1
- package/lib/commonjs/tile/createTileTrailingSlot.js +0 -35
- package/lib/commonjs/tile/createTileTrailingSlot.js.map +0 -1
- package/lib/module/avatar/createAvatarBadge.js +0 -15
- package/lib/module/avatar/createAvatarBadge.js.map +0 -1
- package/lib/module/avatar/createAvatarIcon.js +0 -25
- package/lib/module/avatar/createAvatarIcon.js.map +0 -1
- package/lib/module/avatar/createAvatarImage.js +0 -46
- package/lib/module/avatar/createAvatarImage.js.map +0 -1
- package/lib/module/avatar/createAvatarRoot.js.map +0 -1
- package/lib/module/avatar/createAvatarText.js +0 -45
- package/lib/module/avatar/createAvatarText.js.map +0 -1
- package/lib/module/button/createButtonGroup.js +0 -74
- package/lib/module/button/createButtonGroup.js.map +0 -1
- package/lib/module/button/createButtonIcon.js +0 -13
- package/lib/module/button/createButtonIcon.js.map +0 -1
- package/lib/module/button/createButtonRoot.js.map +0 -1
- package/lib/module/button/createButtonSpinner.js +0 -29
- package/lib/module/button/createButtonSpinner.js.map +0 -1
- package/lib/module/button/createButtonText.js +0 -34
- package/lib/module/button/createButtonText.js.map +0 -1
- package/lib/module/checkbox/createCheckboxGroup.js.map +0 -1
- package/lib/module/checkbox/createCheckboxIcon.js +0 -24
- package/lib/module/checkbox/createCheckboxIcon.js.map +0 -1
- package/lib/module/checkbox/createCheckboxIndicator.js +0 -42
- package/lib/module/checkbox/createCheckboxIndicator.js.map +0 -1
- package/lib/module/checkbox/createCheckboxLabel.js +0 -41
- package/lib/module/checkbox/createCheckboxLabel.js.map +0 -1
- package/lib/module/checkbox/createCheckboxRoot.js +0 -94
- package/lib/module/checkbox/createCheckboxRoot.js.map +0 -1
- package/lib/module/checkbox/createCheckboxRoot.web.js +0 -91
- package/lib/module/checkbox/createCheckboxRoot.web.js.map +0 -1
- package/lib/module/chip/createChipRoot.js +0 -126
- package/lib/module/chip/createChipRoot.js.map +0 -1
- package/lib/module/dialog/createDialogClose.js +0 -31
- package/lib/module/dialog/createDialogClose.js.map +0 -1
- package/lib/module/dialog/createDialogContent.js +0 -15
- package/lib/module/dialog/createDialogContent.js.map +0 -1
- package/lib/module/dialog/createDialogDescription.js +0 -24
- package/lib/module/dialog/createDialogDescription.js.map +0 -1
- package/lib/module/dialog/createDialogFooter.js +0 -15
- package/lib/module/dialog/createDialogFooter.js.map +0 -1
- package/lib/module/dialog/createDialogHeader.js +0 -15
- package/lib/module/dialog/createDialogHeader.js.map +0 -1
- package/lib/module/dialog/createDialogPopup.js.map +0 -1
- package/lib/module/dialog/createDialogRoot.js.map +0 -1
- package/lib/module/dialog/createDialogTitle.js +0 -15
- package/lib/module/dialog/createDialogTitle.js.map +0 -1
- package/lib/module/dialog/createDialogTrigger.js +0 -31
- package/lib/module/dialog/createDialogTrigger.js.map +0 -1
- package/lib/module/field/createFieldError.js +0 -35
- package/lib/module/field/createFieldError.js.map +0 -1
- package/lib/module/field/createFieldErrorIcon.js +0 -13
- package/lib/module/field/createFieldErrorIcon.js.map +0 -1
- package/lib/module/field/createFieldErrorText.js +0 -13
- package/lib/module/field/createFieldErrorText.js.map +0 -1
- package/lib/module/field/createFieldHelper.js +0 -35
- package/lib/module/field/createFieldHelper.js.map +0 -1
- package/lib/module/field/createFieldHelperText.js +0 -13
- package/lib/module/field/createFieldHelperText.js.map +0 -1
- package/lib/module/field/createFieldLabel.js +0 -31
- package/lib/module/field/createFieldLabel.js.map +0 -1
- package/lib/module/field/createFieldRoot.js +0 -29
- package/lib/module/field/createFieldRoot.js.map +0 -1
- package/lib/module/form/createFormRoot.js +0 -15
- package/lib/module/form/createFormRoot.js.map +0 -1
- package/lib/module/input/createInputField.js.map +0 -1
- package/lib/module/input/createInputRoot.js.map +0 -1
- package/lib/module/input/createInputSlot.js +0 -39
- package/lib/module/input/createInputSlot.js.map +0 -1
- package/lib/module/link/createLink.js.map +0 -1
- package/lib/module/list-item/createListItemContent.js +0 -24
- package/lib/module/list-item/createListItemContent.js.map +0 -1
- package/lib/module/list-item/createListItemDescription.js +0 -19
- package/lib/module/list-item/createListItemDescription.js.map +0 -1
- package/lib/module/list-item/createListItemLeadingSlot.js +0 -28
- package/lib/module/list-item/createListItemLeadingSlot.js.map +0 -1
- package/lib/module/list-item/createListItemMeta.js +0 -19
- package/lib/module/list-item/createListItemMeta.js.map +0 -1
- package/lib/module/list-item/createListItemRoot.js.map +0 -1
- package/lib/module/list-item/createListItemSectionHeader.js +0 -48
- package/lib/module/list-item/createListItemSectionHeader.js.map +0 -1
- package/lib/module/list-item/createListItemTitle.js +0 -19
- package/lib/module/list-item/createListItemTitle.js.map +0 -1
- package/lib/module/list-item/createListItemTrailingSlot.js +0 -22
- package/lib/module/list-item/createListItemTrailingSlot.js.map +0 -1
- package/lib/module/otp-input/createOtpInputCell.js +0 -24
- package/lib/module/otp-input/createOtpInputCell.js.map +0 -1
- package/lib/module/otp-input/createOtpInputField.js.map +0 -1
- package/lib/module/otp-input/createOtpInputRoot.js.map +0 -1
- package/lib/module/progress/context.js.map +0 -1
- package/lib/module/progress/createProgressIndicator.js.map +0 -1
- package/lib/module/progress/createProgressRoot.js.map +0 -1
- package/lib/module/progress/index.js +0 -15
- package/lib/module/progress/index.js.map +0 -1
- package/lib/module/radio/createRadioGroup.js.map +0 -1
- package/lib/module/radio/createRadioIndicator.js +0 -38
- package/lib/module/radio/createRadioIndicator.js.map +0 -1
- package/lib/module/radio/createRadioLabel.js +0 -33
- package/lib/module/radio/createRadioLabel.js.map +0 -1
- package/lib/module/radio/createRadioRoot.js +0 -90
- package/lib/module/radio/createRadioRoot.js.map +0 -1
- package/lib/module/radio/createRadioRoot.web.js +0 -82
- package/lib/module/radio/createRadioRoot.web.js.map +0 -1
- package/lib/module/select/createSelectContent.js.map +0 -1
- package/lib/module/select/createSelectIcon.js +0 -38
- package/lib/module/select/createSelectIcon.js.map +0 -1
- package/lib/module/select/createSelectItem.js.map +0 -1
- package/lib/module/select/createSelectItemLabel.js +0 -36
- package/lib/module/select/createSelectItemLabel.js.map +0 -1
- package/lib/module/select/createSelectRoot.js.map +0 -1
- package/lib/module/select/createSelectTrigger.js +0 -187
- package/lib/module/select/createSelectTrigger.js.map +0 -1
- package/lib/module/select/createSelectValue.js +0 -48
- package/lib/module/select/createSelectValue.js.map +0 -1
- package/lib/module/switch/createSwitchRoot.js +0 -67
- package/lib/module/switch/createSwitchRoot.js.map +0 -1
- package/lib/module/tile/createTileContent.js +0 -24
- package/lib/module/tile/createTileContent.js.map +0 -1
- package/lib/module/tile/createTileDescription.js +0 -22
- package/lib/module/tile/createTileDescription.js.map +0 -1
- package/lib/module/tile/createTileGroup.js.map +0 -1
- package/lib/module/tile/createTileIndicator.js +0 -40
- package/lib/module/tile/createTileIndicator.js.map +0 -1
- package/lib/module/tile/createTileLeadingSlot.js +0 -28
- package/lib/module/tile/createTileLeadingSlot.js.map +0 -1
- package/lib/module/tile/createTileRoot.js.map +0 -1
- package/lib/module/tile/createTileTitle.js +0 -22
- package/lib/module/tile/createTileTitle.js.map +0 -1
- package/lib/module/tile/createTileTrailingSlot.js +0 -29
- package/lib/module/tile/createTileTrailingSlot.js.map +0 -1
- package/lib/typescript/avatar/createAvatarBadge.d.ts +0 -4
- package/lib/typescript/avatar/createAvatarBadge.d.ts.map +0 -1
- package/lib/typescript/avatar/createAvatarIcon.d.ts +0 -4
- package/lib/typescript/avatar/createAvatarIcon.d.ts.map +0 -1
- package/lib/typescript/avatar/createAvatarImage.d.ts +0 -4
- package/lib/typescript/avatar/createAvatarImage.d.ts.map +0 -1
- package/lib/typescript/avatar/createAvatarRoot.d.ts +0 -4
- package/lib/typescript/avatar/createAvatarRoot.d.ts.map +0 -1
- package/lib/typescript/avatar/createAvatarText.d.ts +0 -4
- package/lib/typescript/avatar/createAvatarText.d.ts.map +0 -1
- package/lib/typescript/button/createButtonGroup.d.ts +0 -4
- package/lib/typescript/button/createButtonGroup.d.ts.map +0 -1
- package/lib/typescript/button/createButtonIcon.d.ts +0 -2
- package/lib/typescript/button/createButtonIcon.d.ts.map +0 -1
- package/lib/typescript/button/createButtonRoot.d.ts +0 -6
- package/lib/typescript/button/createButtonRoot.d.ts.map +0 -1
- package/lib/typescript/button/createButtonSpinner.d.ts +0 -4
- package/lib/typescript/button/createButtonSpinner.d.ts.map +0 -1
- package/lib/typescript/button/createButtonText.d.ts +0 -4
- package/lib/typescript/button/createButtonText.d.ts.map +0 -1
- package/lib/typescript/checkbox/createCheckboxGroup.d.ts +0 -3
- package/lib/typescript/checkbox/createCheckboxGroup.d.ts.map +0 -1
- package/lib/typescript/checkbox/createCheckboxIcon.d.ts +0 -3
- package/lib/typescript/checkbox/createCheckboxIcon.d.ts.map +0 -1
- package/lib/typescript/checkbox/createCheckboxIndicator.d.ts +0 -5
- package/lib/typescript/checkbox/createCheckboxIndicator.d.ts.map +0 -1
- package/lib/typescript/checkbox/createCheckboxLabel.d.ts +0 -5
- package/lib/typescript/checkbox/createCheckboxLabel.d.ts.map +0 -1
- package/lib/typescript/checkbox/createCheckboxRoot.d.ts +0 -2
- package/lib/typescript/checkbox/createCheckboxRoot.d.ts.map +0 -1
- package/lib/typescript/checkbox/createCheckboxRoot.web.d.ts +0 -6
- package/lib/typescript/checkbox/createCheckboxRoot.web.d.ts.map +0 -1
- package/lib/typescript/chip/createChipRoot.d.ts +0 -4
- package/lib/typescript/chip/createChipRoot.d.ts.map +0 -1
- package/lib/typescript/dialog/createDialogClose.d.ts +0 -4
- package/lib/typescript/dialog/createDialogClose.d.ts.map +0 -1
- package/lib/typescript/dialog/createDialogContent.d.ts +0 -4
- package/lib/typescript/dialog/createDialogContent.d.ts.map +0 -1
- package/lib/typescript/dialog/createDialogDescription.d.ts +0 -4
- package/lib/typescript/dialog/createDialogDescription.d.ts.map +0 -1
- package/lib/typescript/dialog/createDialogFooter.d.ts +0 -4
- package/lib/typescript/dialog/createDialogFooter.d.ts.map +0 -1
- package/lib/typescript/dialog/createDialogHeader.d.ts +0 -4
- package/lib/typescript/dialog/createDialogHeader.d.ts.map +0 -1
- package/lib/typescript/dialog/createDialogPopup.d.ts +0 -4
- package/lib/typescript/dialog/createDialogPopup.d.ts.map +0 -1
- package/lib/typescript/dialog/createDialogRoot.d.ts +0 -4
- package/lib/typescript/dialog/createDialogRoot.d.ts.map +0 -1
- package/lib/typescript/dialog/createDialogTitle.d.ts +0 -4
- package/lib/typescript/dialog/createDialogTitle.d.ts.map +0 -1
- package/lib/typescript/dialog/createDialogTrigger.d.ts +0 -4
- package/lib/typescript/dialog/createDialogTrigger.d.ts.map +0 -1
- package/lib/typescript/field/createFieldError.d.ts +0 -5
- package/lib/typescript/field/createFieldError.d.ts.map +0 -1
- package/lib/typescript/field/createFieldErrorIcon.d.ts +0 -5
- package/lib/typescript/field/createFieldErrorIcon.d.ts.map +0 -1
- package/lib/typescript/field/createFieldErrorText.d.ts +0 -5
- package/lib/typescript/field/createFieldErrorText.d.ts.map +0 -1
- package/lib/typescript/field/createFieldHelper.d.ts +0 -5
- package/lib/typescript/field/createFieldHelper.d.ts.map +0 -1
- package/lib/typescript/field/createFieldHelperText.d.ts +0 -5
- package/lib/typescript/field/createFieldHelperText.d.ts.map +0 -1
- package/lib/typescript/field/createFieldLabel.d.ts +0 -6
- package/lib/typescript/field/createFieldLabel.d.ts.map +0 -1
- package/lib/typescript/field/createFieldRoot.d.ts +0 -6
- package/lib/typescript/field/createFieldRoot.d.ts.map +0 -1
- package/lib/typescript/form/createFormRoot.d.ts +0 -4
- package/lib/typescript/form/createFormRoot.d.ts.map +0 -1
- package/lib/typescript/input/createInputField.d.ts +0 -4
- package/lib/typescript/input/createInputField.d.ts.map +0 -1
- package/lib/typescript/input/createInputRoot.d.ts +0 -4
- package/lib/typescript/input/createInputRoot.d.ts.map +0 -1
- package/lib/typescript/input/createInputSlot.d.ts +0 -4
- package/lib/typescript/input/createInputSlot.d.ts.map +0 -1
- package/lib/typescript/link/createLink.d.ts +0 -6
- package/lib/typescript/link/createLink.d.ts.map +0 -1
- package/lib/typescript/list-item/createListItemContent.d.ts +0 -3
- package/lib/typescript/list-item/createListItemContent.d.ts.map +0 -1
- package/lib/typescript/list-item/createListItemDescription.d.ts +0 -3
- package/lib/typescript/list-item/createListItemDescription.d.ts.map +0 -1
- package/lib/typescript/list-item/createListItemLeadingSlot.d.ts +0 -4
- package/lib/typescript/list-item/createListItemLeadingSlot.d.ts.map +0 -1
- package/lib/typescript/list-item/createListItemMeta.d.ts +0 -3
- package/lib/typescript/list-item/createListItemMeta.d.ts.map +0 -1
- package/lib/typescript/list-item/createListItemRoot.d.ts +0 -4
- package/lib/typescript/list-item/createListItemRoot.d.ts.map +0 -1
- package/lib/typescript/list-item/createListItemSectionHeader.d.ts +0 -4
- package/lib/typescript/list-item/createListItemSectionHeader.d.ts.map +0 -1
- package/lib/typescript/list-item/createListItemTitle.d.ts +0 -3
- package/lib/typescript/list-item/createListItemTitle.d.ts.map +0 -1
- package/lib/typescript/list-item/createListItemTrailingSlot.d.ts +0 -3
- package/lib/typescript/list-item/createListItemTrailingSlot.d.ts.map +0 -1
- package/lib/typescript/otp-input/createOtpInputCell.d.ts +0 -4
- package/lib/typescript/otp-input/createOtpInputCell.d.ts.map +0 -1
- package/lib/typescript/otp-input/createOtpInputField.d.ts +0 -4
- package/lib/typescript/otp-input/createOtpInputField.d.ts.map +0 -1
- package/lib/typescript/otp-input/createOtpInputRoot.d.ts +0 -4
- package/lib/typescript/otp-input/createOtpInputRoot.d.ts.map +0 -1
- package/lib/typescript/progress/context.d.ts.map +0 -1
- package/lib/typescript/progress/createProgressIndicator.d.ts +0 -3
- package/lib/typescript/progress/createProgressIndicator.d.ts.map +0 -1
- package/lib/typescript/progress/createProgressRoot.d.ts +0 -4
- package/lib/typescript/progress/createProgressRoot.d.ts.map +0 -1
- package/lib/typescript/progress/index.d.ts +0 -10
- package/lib/typescript/progress/index.d.ts.map +0 -1
- package/lib/typescript/progress/types.d.ts.map +0 -1
- package/lib/typescript/radio/createRadioGroup.d.ts +0 -3
- package/lib/typescript/radio/createRadioGroup.d.ts.map +0 -1
- package/lib/typescript/radio/createRadioIndicator.d.ts +0 -5
- package/lib/typescript/radio/createRadioIndicator.d.ts.map +0 -1
- package/lib/typescript/radio/createRadioLabel.d.ts +0 -5
- package/lib/typescript/radio/createRadioLabel.d.ts.map +0 -1
- package/lib/typescript/radio/createRadioRoot.d.ts +0 -3
- package/lib/typescript/radio/createRadioRoot.d.ts.map +0 -1
- package/lib/typescript/radio/createRadioRoot.web.d.ts +0 -3
- package/lib/typescript/radio/createRadioRoot.web.d.ts.map +0 -1
- package/lib/typescript/select/createSelectContent.d.ts +0 -4
- package/lib/typescript/select/createSelectContent.d.ts.map +0 -1
- package/lib/typescript/select/createSelectIcon.d.ts +0 -2
- package/lib/typescript/select/createSelectIcon.d.ts.map +0 -1
- package/lib/typescript/select/createSelectItem.d.ts +0 -6
- package/lib/typescript/select/createSelectItem.d.ts.map +0 -1
- package/lib/typescript/select/createSelectItemLabel.d.ts +0 -4
- package/lib/typescript/select/createSelectItemLabel.d.ts.map +0 -1
- package/lib/typescript/select/createSelectRoot.d.ts +0 -4
- package/lib/typescript/select/createSelectRoot.d.ts.map +0 -1
- package/lib/typescript/select/createSelectTrigger.d.ts +0 -7
- package/lib/typescript/select/createSelectTrigger.d.ts.map +0 -1
- package/lib/typescript/select/createSelectValue.d.ts +0 -4
- package/lib/typescript/select/createSelectValue.d.ts.map +0 -1
- package/lib/typescript/switch/createSwitchRoot.d.ts +0 -3
- package/lib/typescript/switch/createSwitchRoot.d.ts.map +0 -1
- package/lib/typescript/tile/createTileContent.d.ts +0 -3
- package/lib/typescript/tile/createTileContent.d.ts.map +0 -1
- package/lib/typescript/tile/createTileDescription.d.ts +0 -3
- package/lib/typescript/tile/createTileDescription.d.ts.map +0 -1
- package/lib/typescript/tile/createTileGroup.d.ts +0 -4
- package/lib/typescript/tile/createTileGroup.d.ts.map +0 -1
- package/lib/typescript/tile/createTileIndicator.d.ts +0 -4
- package/lib/typescript/tile/createTileIndicator.d.ts.map +0 -1
- package/lib/typescript/tile/createTileLeadingSlot.d.ts +0 -4
- package/lib/typescript/tile/createTileLeadingSlot.d.ts.map +0 -1
- package/lib/typescript/tile/createTileRoot.d.ts +0 -4
- package/lib/typescript/tile/createTileRoot.d.ts.map +0 -1
- package/lib/typescript/tile/createTileTitle.d.ts +0 -3
- package/lib/typescript/tile/createTileTitle.d.ts.map +0 -1
- package/lib/typescript/tile/createTileTrailingSlot.d.ts +0 -9
- package/lib/typescript/tile/createTileTrailingSlot.d.ts.map +0 -1
- package/src/avatar/createAvatarBadge.tsx +0 -12
- package/src/avatar/createAvatarIcon.tsx +0 -16
- package/src/avatar/createAvatarImage.tsx +0 -40
- package/src/avatar/createAvatarRoot.tsx +0 -23
- package/src/avatar/createAvatarText.tsx +0 -39
- package/src/button/createButtonGroup.tsx +0 -88
- package/src/button/createButtonIcon.tsx +0 -8
- package/src/button/createButtonRoot.tsx +0 -102
- package/src/button/createButtonSpinner.tsx +0 -20
- package/src/button/createButtonText.tsx +0 -23
- package/src/button/index.tsx +0 -53
- package/src/checkbox/createCheckboxGroup.tsx +0 -32
- package/src/checkbox/createCheckboxIcon.tsx +0 -18
- package/src/checkbox/createCheckboxIndicator.tsx +0 -43
- package/src/checkbox/createCheckboxLabel.tsx +0 -42
- package/src/checkbox/createCheckboxRoot.tsx +0 -100
- package/src/checkbox/createCheckboxRoot.web.tsx +0 -83
- package/src/chip/createChipRoot.tsx +0 -144
- package/src/dialog/createDialogClose.tsx +0 -27
- package/src/dialog/createDialogContent.tsx +0 -11
- package/src/dialog/createDialogDescription.tsx +0 -20
- package/src/dialog/createDialogFooter.tsx +0 -11
- package/src/dialog/createDialogHeader.tsx +0 -11
- package/src/dialog/createDialogPopup.tsx +0 -146
- package/src/dialog/createDialogRoot.tsx +0 -66
- package/src/dialog/createDialogTitle.tsx +0 -11
- package/src/dialog/createDialogTrigger.tsx +0 -27
- package/src/field/createFieldError.tsx +0 -32
- package/src/field/createFieldErrorIcon.tsx +0 -9
- package/src/field/createFieldErrorText.tsx +0 -9
- package/src/field/createFieldHelper.tsx +0 -28
- package/src/field/createFieldHelperText.tsx +0 -9
- package/src/field/createFieldLabel.tsx +0 -33
- package/src/field/createFieldRoot.tsx +0 -27
- package/src/form/createFormRoot.tsx +0 -13
- package/src/input/createInputField.tsx +0 -120
- package/src/input/createInputRoot.tsx +0 -92
- package/src/input/createInputSlot.tsx +0 -39
- package/src/link/createLink.tsx +0 -89
- package/src/list-item/createListItemContent.tsx +0 -23
- package/src/list-item/createListItemDescription.tsx +0 -19
- package/src/list-item/createListItemLeadingSlot.tsx +0 -30
- package/src/list-item/createListItemMeta.tsx +0 -17
- package/src/list-item/createListItemRoot.tsx +0 -195
- package/src/list-item/createListItemSectionHeader.tsx +0 -53
- package/src/list-item/createListItemTitle.tsx +0 -17
- package/src/list-item/createListItemTrailingSlot.tsx +0 -21
- package/src/otp-input/createOtpInputCell.tsx +0 -22
- package/src/otp-input/createOtpInputField.tsx +0 -98
- package/src/otp-input/createOtpInputRoot.tsx +0 -179
- package/src/otp-input/index.tsx +0 -34
- package/src/progress/createProgressIndicator.tsx +0 -35
- package/src/progress/index.ts +0 -28
- package/src/radio/createRadioIndicator.tsx +0 -32
- package/src/radio/createRadioLabel.tsx +0 -28
- package/src/radio/createRadioRoot.tsx +0 -100
- package/src/radio/createRadioRoot.web.tsx +0 -81
- package/src/select/createSelectContent.tsx +0 -115
- package/src/select/createSelectIcon.tsx +0 -28
- package/src/select/createSelectItem.tsx +0 -121
- package/src/select/createSelectItemLabel.tsx +0 -30
- package/src/select/createSelectRoot.tsx +0 -134
- package/src/select/createSelectTrigger.tsx +0 -241
- package/src/select/createSelectValue.tsx +0 -38
- package/src/select/index.tsx +0 -73
- package/src/switch/createSwitchRoot.tsx +0 -72
- package/src/tile/createTileContent.tsx +0 -23
- package/src/tile/createTileDescription.tsx +0 -19
- package/src/tile/createTileGroup.tsx +0 -134
- package/src/tile/createTileIndicator.tsx +0 -38
- package/src/tile/createTileLeadingSlot.tsx +0 -30
- package/src/tile/createTileTitle.tsx +0 -19
- package/src/tile/createTileTrailingSlot.tsx +0 -25
- /package/lib/commonjs/{progress → progress-bar}/context.js +0 -0
- /package/lib/commonjs/{progress → progress-bar}/types.js +0 -0
- /package/lib/module/{progress → progress-bar}/context.js +0 -0
- /package/lib/module/{progress → progress-bar}/types.js +0 -0
- /package/lib/typescript/{progress → progress-bar}/context.d.ts +0 -0
- /package/src/{progress → progress-bar}/context.tsx +0 -0
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.TileRoot = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _utils = require("@cdx-ui/utils");
|
|
10
|
+
var _focus = require("@react-native-aria/focus");
|
|
11
|
+
var _interactions = require("@react-native-aria/interactions");
|
|
12
|
+
var _slot = require("../slot");
|
|
13
|
+
var _dataAttributes = require("../utils/dataAttributes");
|
|
14
|
+
var _context = require("./context");
|
|
15
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
|
+
const rowStyle = {
|
|
17
|
+
flexDirection: 'row',
|
|
18
|
+
alignSelf: 'stretch',
|
|
19
|
+
alignItems: 'center'
|
|
20
|
+
};
|
|
21
|
+
const TileRoot = exports.TileRoot = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
22
|
+
asChild = false,
|
|
23
|
+
value,
|
|
24
|
+
disabled: disabledProp = false,
|
|
25
|
+
isSelected: controlledSelected,
|
|
26
|
+
defaultSelected,
|
|
27
|
+
onSelectedChange,
|
|
28
|
+
children,
|
|
29
|
+
onPress,
|
|
30
|
+
onFocus,
|
|
31
|
+
onBlur,
|
|
32
|
+
style,
|
|
33
|
+
...rest
|
|
34
|
+
}, ref) => {
|
|
35
|
+
const group = (0, _context.useOptionalTileGroupContext)();
|
|
36
|
+
const [standaloneSelected = false, setStandaloneSelected] = (0, _utils.useControllableState)({
|
|
37
|
+
prop: controlledSelected,
|
|
38
|
+
defaultProp: defaultSelected ?? false,
|
|
39
|
+
onChange: next => {
|
|
40
|
+
onSelectedChange?.(next);
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
const isSelected = group ? group.isSelected(value) : standaloneSelected;
|
|
44
|
+
const disabledByGroup = group ? group.isTileDisabledByGroup(value) : false;
|
|
45
|
+
const isDisabled = disabledByGroup || disabledProp;
|
|
46
|
+
const cannotToggle = isDisabled;
|
|
47
|
+
const {
|
|
48
|
+
focusProps,
|
|
49
|
+
isFocused
|
|
50
|
+
} = (0, _focus.useFocus)();
|
|
51
|
+
const {
|
|
52
|
+
isFocusVisible,
|
|
53
|
+
focusProps: focusRingProps
|
|
54
|
+
} = (0, _focus.useFocusRing)();
|
|
55
|
+
const {
|
|
56
|
+
pressProps,
|
|
57
|
+
isPressed
|
|
58
|
+
} = (0, _interactions.usePress)({
|
|
59
|
+
isDisabled: cannotToggle
|
|
60
|
+
});
|
|
61
|
+
const {
|
|
62
|
+
hoverProps,
|
|
63
|
+
isHovered
|
|
64
|
+
} = (0, _interactions.useHover)();
|
|
65
|
+
|
|
66
|
+
// Standalone tiles use checkbox semantics (independent on/off toggle).
|
|
67
|
+
const selectionType = group ? group.type : 'multiple';
|
|
68
|
+
const accessibilityState = (0, _react.useMemo)(() => ({
|
|
69
|
+
disabled: isDisabled,
|
|
70
|
+
...(selectionType === 'single' ? {
|
|
71
|
+
selected: isSelected
|
|
72
|
+
} : {
|
|
73
|
+
checked: isSelected
|
|
74
|
+
})
|
|
75
|
+
}), [isDisabled, isSelected, selectionType]);
|
|
76
|
+
const tileContext = (0, _react.useMemo)(() => ({
|
|
77
|
+
value,
|
|
78
|
+
isSelected,
|
|
79
|
+
isDisabled,
|
|
80
|
+
selectionType
|
|
81
|
+
}), [value, isSelected, isDisabled, selectionType]);
|
|
82
|
+
const passthrough = rest;
|
|
83
|
+
const composedOnPress = (0, _utils.composeEventHandlers)(onPress, () => {
|
|
84
|
+
if (cannotToggle) {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
if (group) {
|
|
88
|
+
group.toggleValue(value);
|
|
89
|
+
} else {
|
|
90
|
+
setStandaloneSelected(!standaloneSelected);
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
const role = selectionType === 'single' ? 'radio' : 'checkbox';
|
|
94
|
+
const Comp = asChild ? _slot.Slot : _reactNative.Pressable;
|
|
95
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_context.TileProvider, {
|
|
96
|
+
value: tileContext,
|
|
97
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, {
|
|
98
|
+
ref: ref,
|
|
99
|
+
accessibilityRole: role,
|
|
100
|
+
role: role,
|
|
101
|
+
accessibilityState: accessibilityState,
|
|
102
|
+
"aria-checked": isSelected,
|
|
103
|
+
...(isDisabled ? {
|
|
104
|
+
'aria-disabled': true
|
|
105
|
+
} : {}),
|
|
106
|
+
disabled: isDisabled,
|
|
107
|
+
...rest,
|
|
108
|
+
...(0, _dataAttributes.mergeDataAttributes)(rest, (0, _dataAttributes.dataAttributes)({
|
|
109
|
+
state: isSelected ? 'selected' : 'unselected',
|
|
110
|
+
disabled: isDisabled,
|
|
111
|
+
active: isPressed,
|
|
112
|
+
hover: isHovered,
|
|
113
|
+
focus: isFocused,
|
|
114
|
+
focusVisible: isFocusVisible
|
|
115
|
+
})),
|
|
116
|
+
style: [rowStyle, style],
|
|
117
|
+
onPress: isDisabled ? undefined : composedOnPress,
|
|
118
|
+
onPressIn: (0, _utils.composeEventHandlers)(passthrough.onPressIn, pressProps.onPressIn),
|
|
119
|
+
onPressOut: (0, _utils.composeEventHandlers)(passthrough.onPressOut, pressProps.onPressOut),
|
|
120
|
+
onHoverIn: (0, _utils.composeEventHandlers)(passthrough.onHoverIn, hoverProps.onHoverIn),
|
|
121
|
+
onHoverOut: (0, _utils.composeEventHandlers)(passthrough.onHoverOut, hoverProps.onHoverOut),
|
|
122
|
+
onFocus: (0, _utils.composeEventHandlers)((0, _utils.composeEventHandlers)(onFocus, focusProps.onFocus), focusRingProps.onFocus),
|
|
123
|
+
onBlur: (0, _utils.composeEventHandlers)((0, _utils.composeEventHandlers)(onBlur, focusProps.onBlur), focusRingProps.onBlur),
|
|
124
|
+
children: children
|
|
125
|
+
})
|
|
126
|
+
});
|
|
127
|
+
});
|
|
128
|
+
TileRoot.displayName = 'TileRoot';
|
|
129
|
+
//# sourceMappingURL=TileRoot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_utils","_focus","_interactions","_slot","_dataAttributes","_context","_jsxRuntime","rowStyle","flexDirection","alignSelf","alignItems","TileRoot","exports","forwardRef","asChild","value","disabled","disabledProp","isSelected","controlledSelected","defaultSelected","onSelectedChange","children","onPress","onFocus","onBlur","style","rest","ref","group","useOptionalTileGroupContext","standaloneSelected","setStandaloneSelected","useControllableState","prop","defaultProp","onChange","next","disabledByGroup","isTileDisabledByGroup","isDisabled","cannotToggle","focusProps","isFocused","useFocus","isFocusVisible","focusRingProps","useFocusRing","pressProps","isPressed","usePress","hoverProps","isHovered","useHover","selectionType","type","accessibilityState","useMemo","selected","checked","tileContext","passthrough","composedOnPress","composeEventHandlers","toggleValue","role","Comp","Slot","Pressable","jsx","TileProvider","accessibilityRole","mergeDataAttributes","dataAttributes","state","active","hover","focus","focusVisible","undefined","onPressIn","onPressOut","onHoverIn","onHoverOut","displayName"],"sourceRoot":"../../../src","sources":["tile/TileRoot.tsx"],"mappings":"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","ignoreList":[]}
|
|
@@ -3,53 +3,31 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
Object.defineProperty(exports, "TileGroup", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _TileGroup.TileGroup;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
6
12
|
Object.defineProperty(exports, "TileProvider", {
|
|
7
13
|
enumerable: true,
|
|
8
14
|
get: function () {
|
|
9
15
|
return _context.TileProvider;
|
|
10
16
|
}
|
|
11
17
|
});
|
|
12
|
-
exports
|
|
18
|
+
Object.defineProperty(exports, "TileRoot", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _TileRoot.TileRoot;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
13
24
|
Object.defineProperty(exports, "useTileContext", {
|
|
14
25
|
enumerable: true,
|
|
15
26
|
get: function () {
|
|
16
27
|
return _context.useTileContext;
|
|
17
28
|
}
|
|
18
29
|
});
|
|
19
|
-
var _createTileContent = require("./createTileContent");
|
|
20
|
-
var _createTileDescription = require("./createTileDescription");
|
|
21
|
-
var _createTileGroup = require("./createTileGroup");
|
|
22
|
-
var _createTileIndicator = require("./createTileIndicator");
|
|
23
|
-
var _createTileLeadingSlot = require("./createTileLeadingSlot");
|
|
24
|
-
var _createTileRoot = require("./createTileRoot");
|
|
25
|
-
var _createTileTitle = require("./createTileTitle");
|
|
26
|
-
var _createTileTrailingSlot = require("./createTileTrailingSlot");
|
|
27
30
|
var _context = require("./context");
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
const Group = (0, _createTileGroup.createTileGroup)(BaseComponents.Group);
|
|
31
|
-
const LeadingSlot = (0, _createTileLeadingSlot.createTileLeadingSlot)(BaseComponents.LeadingSlot);
|
|
32
|
-
const Content = (0, _createTileContent.createTileContent)(BaseComponents.Content);
|
|
33
|
-
const Title = (0, _createTileTitle.createTileTitle)(BaseComponents.Title);
|
|
34
|
-
const Description = (0, _createTileDescription.createTileDescription)(BaseComponents.Description);
|
|
35
|
-
const Indicator = (0, _createTileIndicator.createTileIndicator)(BaseComponents.Indicator);
|
|
36
|
-
const TrailingSlot = (0, _createTileTrailingSlot.createTileTrailingSlot)(BaseComponents.TrailingSlot);
|
|
37
|
-
Tile.displayName = 'TilePrimitive';
|
|
38
|
-
Group.displayName = 'TilePrimitive.Group';
|
|
39
|
-
LeadingSlot.displayName = 'TilePrimitive.LeadingSlot';
|
|
40
|
-
Content.displayName = 'TilePrimitive.Content';
|
|
41
|
-
Title.displayName = 'TilePrimitive.Title';
|
|
42
|
-
Description.displayName = 'TilePrimitive.Description';
|
|
43
|
-
Indicator.displayName = 'TilePrimitive.Indicator';
|
|
44
|
-
TrailingSlot.displayName = 'TilePrimitive.TrailingSlot';
|
|
45
|
-
return Object.assign(Tile, {
|
|
46
|
-
Group,
|
|
47
|
-
LeadingSlot,
|
|
48
|
-
Content,
|
|
49
|
-
Title,
|
|
50
|
-
Description,
|
|
51
|
-
Indicator,
|
|
52
|
-
TrailingSlot
|
|
53
|
-
});
|
|
54
|
-
}
|
|
31
|
+
var _TileRoot = require("./TileRoot");
|
|
32
|
+
var _TileGroup = require("./TileGroup");
|
|
55
33
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_context","require","_TileRoot","_TileGroup"],"sourceRoot":"../../../src","sources":["tile/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA","ignoreList":[]}
|
|
@@ -9,5 +9,11 @@ Object.defineProperty(exports, "dataAttributes", {
|
|
|
9
9
|
return _domDataAttributes.domDataAttributes;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
+
Object.defineProperty(exports, "mergeDataAttributes", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _domDataAttributes.mergeDomDataAttributes;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
12
18
|
var _domDataAttributes = require("./domDataAttributes");
|
|
13
19
|
//# sourceMappingURL=dataAttributes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_domDataAttributes","require"],"sourceRoot":"../../../src","sources":["utils/dataAttributes.ts"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_domDataAttributes","require"],"sourceRoot":"../../../src","sources":["utils/dataAttributes.ts"],"mappings":";;;;;;;;;;;;;;;;;AAMA,IAAAA,kBAAA,GAAAC,OAAA","ignoreList":[]}
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.dataAttributes = dataAttributes;
|
|
7
|
+
exports.mergeDataAttributes = mergeDataAttributes;
|
|
7
8
|
/**
|
|
8
9
|
* Produces platform-specific props for data attributes.
|
|
9
10
|
*
|
|
@@ -25,4 +26,28 @@ function dataAttributes(attrs) {
|
|
|
25
26
|
dataSet
|
|
26
27
|
};
|
|
27
28
|
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Merges multiple sources of data attributes into a single `{ dataSet }` prop
|
|
32
|
+
* on web. Each source may be a `dataAttributes()` output (`{ dataSet: {...} }`)
|
|
33
|
+
* or any props object that contains a `dataSet` key — other keys are ignored.
|
|
34
|
+
* Later sources override earlier sources on inner-key conflicts.
|
|
35
|
+
*
|
|
36
|
+
* Required when an element receives data attributes from more than one source:
|
|
37
|
+
* a plain prop spread merges by replacing the `dataSet` key entirely, so e.g.
|
|
38
|
+
* `{...dataAttributes({ slot })} {...dataAttributes({ hover })}` keeps only the
|
|
39
|
+
* second `dataSet`. Use `mergeDataAttributes(...)` to combine them safely.
|
|
40
|
+
*/
|
|
41
|
+
function mergeDataAttributes(...sources) {
|
|
42
|
+
const dataSet = {};
|
|
43
|
+
for (const source of sources) {
|
|
44
|
+
if (!source) continue;
|
|
45
|
+
const sourceDataSet = source.dataSet;
|
|
46
|
+
if (!sourceDataSet) continue;
|
|
47
|
+
Object.assign(dataSet, sourceDataSet);
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
dataSet
|
|
51
|
+
};
|
|
52
|
+
}
|
|
28
53
|
//# sourceMappingURL=dataAttributes.web.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["dataAttributes","attrs","dataSet","key","value"],"sourceRoot":"../../../src","sources":["utils/dataAttributes.web.ts"],"mappings":"
|
|
1
|
+
{"version":3,"names":["dataAttributes","attrs","dataSet","key","value","mergeDataAttributes","sources","source","sourceDataSet","Object","assign"],"sourceRoot":"../../../src","sources":["utils/dataAttributes.web.ts"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIO,SAASA,cAAcA,CAACC,KAAyC,EAEtE;EACA,MAAMC,OAAyC,GAAG,CAAC,CAAC;EACpD,KAAK,MAAMC,GAAG,IAAIF,KAAK,EAAE;IACvB,MAAMG,KAAK,GAAGH,KAAK,CAACE,GAAG,CAAC;IAExBD,OAAO,CAACC,GAAG,CAAC,GAAGC,KAAK,IAAI,KAAK;EAC/B;EACA,OAAO;IAAEF;EAAQ,CAAC;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASG,mBAAmBA,CACjC,GAAGC,OAAwF,EACrD;EACtC,MAAMJ,OAAgC,GAAG,CAAC,CAAC;EAC3C,KAAK,MAAMK,MAAM,IAAID,OAAO,EAAE;IAC5B,IAAI,CAACC,MAAM,EAAE;IACb,MAAMC,aAAa,GAAID,MAAM,CAA2CL,OAAO;IAC/E,IAAI,CAACM,aAAa,EAAE;IACpBC,MAAM,CAACC,MAAM,CAACR,OAAO,EAAEM,aAAa,CAAC;EACvC;EACA,OAAO;IAAEN;EAAQ,CAAC;AACpB","ignoreList":[]}
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.domDataAttributes = domDataAttributes;
|
|
7
|
+
exports.mergeDomDataAttributes = mergeDomDataAttributes;
|
|
7
8
|
/**
|
|
8
9
|
* Produces `data-*` DOM attribute props for use on raw HTML elements (e.g. `<button>`).
|
|
9
10
|
*
|
|
@@ -31,4 +32,33 @@ function domDataAttributes(attrs) {
|
|
|
31
32
|
}
|
|
32
33
|
return result;
|
|
33
34
|
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Merges multiple sources of DOM data attributes into a single flat object of
|
|
38
|
+
* `data-*` keys. Each source can be a `domDataAttributes()` output or any props
|
|
39
|
+
* object — non-`data-*` keys are ignored. Later sources override earlier sources
|
|
40
|
+
* on key conflicts.
|
|
41
|
+
*
|
|
42
|
+
* Use this when an element receives `data-*` attributes from more than one
|
|
43
|
+
* source (e.g. a styled layer's `data-slot` and a primitive's interaction-state
|
|
44
|
+
* `data-hover`/`data-focus` etc.) and a plain prop spread would otherwise be
|
|
45
|
+
* fine on native but lose attributes on web (where `dataAttributes()` returns
|
|
46
|
+
* `{ dataSet }` — see the `.web.ts` sibling for the web merge).
|
|
47
|
+
*/
|
|
48
|
+
function mergeDomDataAttributes(...sources) {
|
|
49
|
+
const result = {};
|
|
50
|
+
for (const source of sources) {
|
|
51
|
+
if (!source) continue;
|
|
52
|
+
for (const key in source) {
|
|
53
|
+
if (!key.startsWith('data-')) continue;
|
|
54
|
+
const value = source[key];
|
|
55
|
+
if (typeof value === 'boolean') {
|
|
56
|
+
result[key] = String(value);
|
|
57
|
+
} else if (typeof value === 'string') {
|
|
58
|
+
result[key] = value;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return result;
|
|
63
|
+
}
|
|
34
64
|
//# sourceMappingURL=domDataAttributes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["camelToKebab","str","replaceAll","ch","toLowerCase","domDataAttributes","attrs","result","key","value","undefined","String"],"sourceRoot":"../../../src","sources":["utils/domDataAttributes.ts"],"mappings":"
|
|
1
|
+
{"version":3,"names":["camelToKebab","str","replaceAll","ch","toLowerCase","domDataAttributes","attrs","result","key","value","undefined","String","mergeDomDataAttributes","sources","source","startsWith"],"sourceRoot":"../../../src","sources":["utils/domDataAttributes.ts"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,SAASA,YAAYA,CAACC,GAAW,EAAU;EACzC,OAAOA,GAAG,CAACC,UAAU,CAAC,QAAQ,EAAGC,EAAE,IAAK,IAAIA,EAAE,CAACC,WAAW,CAAC,CAAC,EAAE,CAAC;AACjE;AAEO,SAASC,iBAAiBA,CAC/BC,KAA4C,EACpB;EACxB,MAAMC,MAA8B,GAAG,CAAC,CAAC;EACzC,KAAK,MAAMC,GAAG,IAAIF,KAAK,EAAE;IACvB,MAAMG,KAAK,GAAGH,KAAK,CAACE,GAAG,CAAC;IACxB,IAAIC,KAAK,KAAKC,SAAS,EAAE;MACvB;IACF;IACAH,MAAM,CAAC,QAAQP,YAAY,CAACQ,GAAG,CAAC,EAAE,CAAC,GAAG,OAAOC,KAAK,KAAK,SAAS,GAAGE,MAAM,CAACF,KAAK,CAAC,GAAGA,KAAK;EAC1F;EACA,OAAOF,MAAM;AACf;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASK,sBAAsBA,CACpC,GAAGC,OAAgD,EAC3B;EACxB,MAAMN,MAA8B,GAAG,CAAC,CAAC;EACzC,KAAK,MAAMO,MAAM,IAAID,OAAO,EAAE;IAC5B,IAAI,CAACC,MAAM,EAAE;IACb,KAAK,MAAMN,GAAG,IAAIM,MAAM,EAAE;MACxB,IAAI,CAACN,GAAG,CAACO,UAAU,CAAC,OAAO,CAAC,EAAE;MAC9B,MAAMN,KAAK,GAAGK,MAAM,CAACN,GAAG,CAAC;MACzB,IAAI,OAAOC,KAAK,KAAK,SAAS,EAAE;QAC9BF,MAAM,CAACC,GAAG,CAAC,GAAGG,MAAM,CAACF,KAAK,CAAC;MAC7B,CAAC,MAAM,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE;QACpCF,MAAM,CAACC,GAAG,CAAC,GAAGC,KAAK;MACrB;IACF;EACF;EACA,OAAOF,MAAM;AACf","ignoreList":[]}
|
package/lib/module/CLAUDE.md
CHANGED
|
@@ -8,25 +8,77 @@ Primitives in `@cdx-ui/primitives` are unstyled behavioral components that handl
|
|
|
8
8
|
- `docs/internal/practices/types.md` — `I*Props` convention, extending RN base types
|
|
9
9
|
- `docs/internal/practices/accessibility.md` — ARIA roles, keyboard nav, screen reader support
|
|
10
10
|
- `docs/internal/practices/as-child.md` — `asChild` prop pattern
|
|
11
|
+
- `docs/internal/practices/data-attributes.md` — `data-state` and `data-slot` conventions
|
|
12
|
+
|
|
13
|
+
## Six standards
|
|
14
|
+
|
|
15
|
+
Forge UI primitives and their styled counterparts follow six standards. The first three govern primitive-layer authoring; the last three govern the styled layer (see `packages/components/src/components/CLAUDE.md`).
|
|
16
|
+
|
|
17
|
+
### Standard 1 — Data attributes for interaction states
|
|
18
|
+
|
|
19
|
+
Root primitives emit `data-*` attributes for the interaction state they own and expose that state via context. Sub-slots **do not** subscribe to context and **do not** emit interaction `data-*` attributes — they opt in only when their own styling or behavior reacts to that state.
|
|
20
|
+
|
|
21
|
+
- **Root** — emits + provides context. Always.
|
|
22
|
+
- **Sub-slot** — does not subscribe, does not emit. Opt in only when the styled layer (or the slot's own behavior) demonstrably reacts to the state.
|
|
23
|
+
|
|
24
|
+
Pointlessly emitting on every sub-slot multiplies bridge writes (native) and DOM attribute writes (web) for no consumer benefit. A sub-slot that calls `useButtonContext()` becomes a subscriber — every interaction re-renders it even when nothing visually changes.
|
|
25
|
+
|
|
26
|
+
`useButtonContext()` stays exported so styled-layer slots and external consumers can opt in when they actually need it.
|
|
27
|
+
|
|
28
|
+
### Standard 2 — `asChild` support
|
|
29
|
+
|
|
30
|
+
Every public primitive supports `asChild` via `Slot` (re-exported from `packages/primitives/src/slot`). The runtime cost when `asChild` is `false` is a single boolean check; consumers who opt in pay the merge cost themselves.
|
|
31
|
+
|
|
32
|
+
```tsx
|
|
33
|
+
const Comp = asChild ? Slot : DefaultElement;
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Standard 3 — When to create a primitive (the primitive-existence test)
|
|
37
|
+
|
|
38
|
+
Create a primitive **only** when the slot owns behavior. A slot earns a primitive if it has at least one of:
|
|
39
|
+
|
|
40
|
+
1. **Behavioral state machinery** — interaction hooks (`useFocus`, `useFocusRing`, `useHover`, `usePress`), controlled/uncontrolled state, open/closed/checked/value management.
|
|
41
|
+
2. **Non-host accessibility semantics** — ARIA role/state beyond what the host element provides natively, custom keyboard handling, screen-reader announcements, focus traps.
|
|
42
|
+
3. **Cross-platform host abstraction** — different host element per platform (e.g., a `.web.tsx` / `.native.tsx` split).
|
|
43
|
+
4. **Compound contract ownership** — defines the compound's state surface and is the context provider (i.e., the Root).
|
|
44
|
+
|
|
45
|
+
A slot does **not** earn a primitive if it only:
|
|
46
|
+
|
|
47
|
+
- Wraps a host element with `className`/`style`.
|
|
48
|
+
- Reads context for styling (the styled layer reads it directly via `useButtonContext`, `useStyleContext`, etc.).
|
|
49
|
+
- Wants `asChild` (the styled layer uses `Slot` directly — it is re-exported from `@cdx-ui/primitives`).
|
|
50
|
+
|
|
51
|
+
This eliminates the "factory pass-through" anti-pattern (e.g., a `ButtonIcon` primitive whose body is `<View {...props} ref={ref} />`). Such wrappers add nothing and force every consumer through a useless layer.
|
|
52
|
+
|
|
53
|
+
## Canonical reference
|
|
54
|
+
|
|
55
|
+
`packages/primitives/src/button/ButtonRoot.tsx` is the canonical concrete primitive. It demonstrates every Standard 1–3 requirement: concrete `forwardRef` component over `Pressable`, `asChild` via `Slot`, `dataAttributes()` for interaction state, `ButtonProvider` for context, function-as-children, ARIA defaults, and composed event handlers.
|
|
56
|
+
|
|
57
|
+
`packages/primitives/src/button/` only ships `ButtonRoot` + `useButtonContext` + types. There is intentionally no `ButtonLabel`/`ButtonIcon`/`ButtonSpinner`/`ButtonGroup` primitive — those slots fail the primitive-existence test, so they live in `@cdx-ui/components` only.
|
|
58
|
+
|
|
59
|
+
The styled-layer glyph inside `packages/components/src/components/IconButton/index.tsx` is the canonical example of a sub-slot that legitimately opts into interaction state. When (and only when) its own styling reacts to hover/focus/press, it reads `useButtonContext()` and emits `data-*` via `dataAttributes()` — the same pattern external consumers use.
|
|
11
60
|
|
|
12
61
|
## Pattern summary
|
|
13
62
|
|
|
14
|
-
Each primitive
|
|
63
|
+
Each concrete primitive is a `forwardRef` component that hardcodes its default RN base element and supports `asChild` via `Slot`:
|
|
15
64
|
|
|
16
|
-
1. **
|
|
65
|
+
1. **Concrete component** — `export const ComponentRoot = forwardRef<View, Props>(...)` hardcodes `View`/`Pressable`/`Text` as the default; uses `const Comp = asChild ? Slot : View` for the escape hatch
|
|
17
66
|
2. **Interaction hooks** — `useFocus`, `useFocusRing`, `useHover`, `usePress` from `@react-native-aria/*`
|
|
18
67
|
3. **Data attributes** — `dataAttributes({ hover, focus, active, disabled, focusVisible })` emitted on the rendered element for Uniwind `data-[state]` selectors
|
|
19
|
-
4. **Context provider** — interaction state exposed via context so
|
|
20
|
-
5. **Barrel export** — `index.
|
|
68
|
+
4. **Context provider** — interaction state exposed via context so sub-slots and external consumers can opt in
|
|
69
|
+
5. **Barrel export** — `index.ts` re-exports the concrete components, context, and types
|
|
70
|
+
6. **`displayName`** — set on every exported component
|
|
21
71
|
|
|
22
72
|
## Key rules
|
|
23
73
|
|
|
24
74
|
- **Unstyled** — no visual styling (no `className`, no color/spacing classes). Only behavioral and a11y concerns.
|
|
25
|
-
- **`
|
|
26
|
-
- **`
|
|
27
|
-
- **`
|
|
28
|
-
- **`
|
|
29
|
-
- **`
|
|
30
|
-
-
|
|
31
|
-
-
|
|
32
|
-
- **
|
|
75
|
+
- **`asChild` via `Slot`** — import `Slot` from `../slot`; use `const Comp = asChild ? Slot : DefaultElement`.
|
|
76
|
+
- **`I*Props` convention** — public prop types are aliased with `I` prefix (e.g., `IButtonProps`), exported from `types.ts`.
|
|
77
|
+
- **`Interface*Props` pattern** — the full interface (e.g., `InterfaceButtonProps`) extends the appropriate RN base type (`PressableProps`, `ViewProps`, etc.) with interaction state booleans (`isHovered`, `isActive`, `isFocused`, `isFocusVisible`, `isDisabled`); re-exported as `I*Props`.
|
|
78
|
+
- **`dataAttributes()` helper** — always use the helper from `../utils/dataAttributes` to emit `data-*` props; it handles platform differences (native vs web).
|
|
79
|
+
- **`mergeDataAttributes(...sources)` helper** — when a primitive Root receives data attrs through `props` from its styled layer (e.g. `data-slot`) AND emits its own data attrs (e.g. interaction state), combine them via `mergeDataAttributes(props, dataAttributes({...}))`. A plain `{...dataAttributes({...})} {...props}` spread chain wipes out one side on web — `dataAttributes` returns `{ dataSet }`, so back-to-back spreads replace each other. The merge helper preserves both. `ButtonRoot.tsx` shows the canonical pattern.
|
|
80
|
+
- **`composeEventHandlers`** from `@cdx-ui/utils` — merge consumer handlers with internal handlers; never silently override.
|
|
81
|
+
- **`forwardRef`** on every component — refs forwarded to the underlying host element.
|
|
82
|
+
- **ARIA roles** — set `role` with a sensible default (e.g., `role={props?.role || 'button'}`).
|
|
83
|
+
- **Render children as function** — support `children` as `(state: InteractionState) => ReactNode` for state-driven rendering where the Root exposes interaction state.
|
|
84
|
+
- **Consumable independently** of `@cdx-ui/components` — no imports from the styled layer.
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { forwardRef, useMemo, useState } from 'react';
|
|
4
|
+
import { View } from 'react-native';
|
|
5
|
+
import { Slot } from '../slot';
|
|
4
6
|
import { AvatarProvider } from './context';
|
|
5
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
-
export const
|
|
8
|
+
export const AvatarRoot = /*#__PURE__*/forwardRef(({
|
|
9
|
+
asChild,
|
|
7
10
|
children,
|
|
8
11
|
...props
|
|
9
12
|
}, ref) => {
|
|
@@ -15,15 +18,17 @@ export const createAvatarRoot = BaseAvatar => /*#__PURE__*/forwardRef(({
|
|
|
15
18
|
setImageLoaded,
|
|
16
19
|
setImageError
|
|
17
20
|
}), [imageLoaded, imageError]);
|
|
21
|
+
const Comp = asChild ? Slot : View;
|
|
18
22
|
return /*#__PURE__*/_jsx(AvatarProvider, {
|
|
19
23
|
value: contextValue,
|
|
20
|
-
children: /*#__PURE__*/_jsx(
|
|
24
|
+
children: /*#__PURE__*/_jsx(Comp, {
|
|
21
25
|
ref: ref,
|
|
22
|
-
role:
|
|
26
|
+
role: props.role || 'img',
|
|
23
27
|
accessibilityRole: "image",
|
|
24
28
|
...props,
|
|
25
29
|
children: children
|
|
26
30
|
})
|
|
27
31
|
});
|
|
28
32
|
});
|
|
29
|
-
|
|
33
|
+
AvatarRoot.displayName = 'AvatarRoot';
|
|
34
|
+
//# sourceMappingURL=AvatarRoot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["forwardRef","useMemo","useState","View","Slot","AvatarProvider","jsx","_jsx","AvatarRoot","asChild","children","props","ref","imageLoaded","setImageLoaded","imageError","setImageError","contextValue","Comp","value","role","accessibilityRole","displayName"],"sourceRoot":"../../../src","sources":["avatar/AvatarRoot.tsx"],"mappings":";;AACA,SAASA,UAAU,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AACrD,SAASC,IAAI,QAAwB,cAAc;AACnD,SAASC,IAAI,QAAQ,SAAS;AAC9B,SAASC,cAAc,QAAQ,WAAW;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAO3C,OAAO,MAAMC,UAAU,gBAAGR,UAAU,CAClC,CAAC;EAAES,OAAO;EAAEC,QAAQ;EAAE,GAAGC;AAAM,CAAC,EAAEC,GAAG,KAAK;EACxC,MAAM,CAACC,WAAW,EAAEC,cAAc,CAAC,GAAGZ,QAAQ,CAAC,KAAK,CAAC;EACrD,MAAM,CAACa,UAAU,EAAEC,aAAa,CAAC,GAAGd,QAAQ,CAAC,KAAK,CAAC;EAEnD,MAAMe,YAAY,GAAGhB,OAAO,CAC1B,OAAO;IAAEY,WAAW;IAAEE,UAAU;IAAED,cAAc;IAAEE;EAAc,CAAC,CAAC,EAClE,CAACH,WAAW,EAAEE,UAAU,CAC1B,CAAC;EAED,MAAMG,IAAI,GAAGT,OAAO,GAAGL,IAAI,GAAGD,IAAI;EAElC,oBACEI,IAAA,CAACF,cAAc;IAACc,KAAK,EAAEF,YAAa;IAAAP,QAAA,eAClCH,IAAA,CAACW,IAAI;MACHN,GAAG,EAAEA,GAAI;MACTQ,IAAI,EAAET,KAAK,CAACS,IAAI,IAAI,KAAM;MAC1BC,iBAAiB,EAAC,OAAO;MAAA,GACpBV,KAAK;MAAAD,QAAA,EAETA;IAAQ,CACL;EAAC,CACO,CAAC;AAErB,CACF,CAAC;AAEDF,UAAU,CAACc,WAAW,GAAG,YAAY","ignoreList":[]}
|
|
@@ -1,26 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { createAvatarText } from './createAvatarText';
|
|
6
|
-
import { createAvatarImage } from './createAvatarImage';
|
|
7
|
-
import { createAvatarRoot } from './createAvatarRoot';
|
|
8
|
-
export function createAvatar(BaseComponents) {
|
|
9
|
-
const Avatar = createAvatarRoot(BaseComponents.Root);
|
|
10
|
-
const AvatarImage = createAvatarImage(BaseComponents.Image);
|
|
11
|
-
const Text = createAvatarText(BaseComponents.Text);
|
|
12
|
-
const AvatarIcon = createAvatarIcon(BaseComponents.Icon);
|
|
13
|
-
const Badge = createAvatarBadge(BaseComponents.Badge);
|
|
14
|
-
Avatar.displayName = 'AvatarPrimitive';
|
|
15
|
-
AvatarImage.displayName = 'AvatarPrimitive.Image';
|
|
16
|
-
Text.displayName = 'AvatarPrimitive.Text';
|
|
17
|
-
AvatarIcon.displayName = 'AvatarPrimitive.Icon';
|
|
18
|
-
Badge.displayName = 'AvatarPrimitive.Badge';
|
|
19
|
-
return Object.assign(Avatar, {
|
|
20
|
-
Image: AvatarImage,
|
|
21
|
-
Text,
|
|
22
|
-
Icon: AvatarIcon,
|
|
23
|
-
Badge
|
|
24
|
-
});
|
|
25
|
-
}
|
|
3
|
+
export { useAvatarContext } from './context';
|
|
4
|
+
export { AvatarRoot } from './AvatarRoot';
|
|
26
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["useAvatarContext","AvatarRoot"],"sourceRoot":"../../../src","sources":["avatar/index.ts"],"mappings":";;AACA,SAASA,gBAAgB,QAAQ,WAAW;AAC5C,SAASC,UAAU,QAA8B,cAAc","ignoreList":[]}
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { forwardRef, useMemo } from 'react';
|
|
4
|
+
import { Pressable } from 'react-native';
|
|
4
5
|
import { composeEventHandlers } from '@cdx-ui/utils';
|
|
5
6
|
import { useFocus, useFocusRing } from '@react-native-aria/focus';
|
|
6
7
|
import { useHover, usePress } from '@react-native-aria/interactions';
|
|
7
|
-
import {
|
|
8
|
+
import { Slot } from '../slot';
|
|
9
|
+
import { dataAttributes, mergeDataAttributes } from '../utils/dataAttributes';
|
|
8
10
|
import { ButtonProvider } from './context';
|
|
9
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
-
export const
|
|
12
|
+
export const ButtonRoot = /*#__PURE__*/forwardRef(({
|
|
13
|
+
asChild,
|
|
11
14
|
children,
|
|
12
15
|
isDisabled,
|
|
13
16
|
isHovered: isHoveredProp,
|
|
@@ -43,20 +46,21 @@ export const createButtonRoot = BaseButton => /*#__PURE__*/forwardRef(({
|
|
|
43
46
|
focusVisible: isFocusVisibleProp || isFocusVisible
|
|
44
47
|
};
|
|
45
48
|
}, [isHovered, isHoveredProp, isFocused, isFocusedProp, isActive, isActiveProp, isDisabled, isFocusVisible, isFocusVisibleProp]);
|
|
49
|
+
const Comp = asChild ? Slot : Pressable;
|
|
46
50
|
return /*#__PURE__*/_jsx(ButtonProvider, {
|
|
47
51
|
value: contextValue,
|
|
48
|
-
children: /*#__PURE__*/_jsx(
|
|
52
|
+
children: /*#__PURE__*/_jsx(Comp, {
|
|
49
53
|
ref: ref,
|
|
50
54
|
role: props?.role || 'button',
|
|
51
|
-
|
|
55
|
+
disabled: isDisabled,
|
|
56
|
+
...props,
|
|
57
|
+
...mergeDataAttributes(props, dataAttributes({
|
|
52
58
|
hover: isHoveredProp || isHovered,
|
|
53
59
|
focus: isFocusedProp || isFocused,
|
|
54
60
|
active: isActiveProp || isActive,
|
|
55
61
|
disabled: !!isDisabled,
|
|
56
62
|
focusVisible: isFocusVisibleProp || isFocusVisible
|
|
57
|
-
}),
|
|
58
|
-
disabled: isDisabled,
|
|
59
|
-
...props,
|
|
63
|
+
})),
|
|
60
64
|
onPressIn: composeEventHandlers(props?.onPressIn, pressableProps.onPressIn),
|
|
61
65
|
onPressOut: composeEventHandlers(props?.onPressOut, pressableProps.onPressOut),
|
|
62
66
|
onHoverIn: composeEventHandlers(props?.onHoverIn, hoverProps.onHoverIn),
|
|
@@ -73,4 +77,5 @@ export const createButtonRoot = BaseButton => /*#__PURE__*/forwardRef(({
|
|
|
73
77
|
})
|
|
74
78
|
});
|
|
75
79
|
});
|
|
76
|
-
|
|
80
|
+
ButtonRoot.displayName = 'ButtonRoot';
|
|
81
|
+
//# sourceMappingURL=ButtonRoot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["forwardRef","useMemo","Pressable","composeEventHandlers","useFocus","useFocusRing","useHover","usePress","Slot","dataAttributes","mergeDataAttributes","ButtonProvider","jsx","_jsx","ButtonRoot","asChild","children","isDisabled","isHovered","isHoveredProp","isActive","isActiveProp","isFocused","isFocusedProp","isFocusVisible","isFocusVisibleProp","props","ref","focusProps","focusRingProps","pressProps","pressableProps","isPressed","hoverProps","contextValue","hover","focus","active","disabled","focusVisible","Comp","value","role","onPressIn","onPressOut","onHoverIn","onHoverOut","onFocus","onBlur","displayName"],"sourceRoot":"../../../src","sources":["button/ButtonRoot.tsx"],"mappings":"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","ignoreList":[]}
|
|
@@ -1,27 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { createButtonGroup } from './createButtonGroup';
|
|
4
|
-
import { createButtonIcon } from './createButtonIcon';
|
|
5
|
-
import { createButtonRoot } from './createButtonRoot';
|
|
6
|
-
import { createButtonSpinner } from './createButtonSpinner';
|
|
7
|
-
import { createButtonText } from './createButtonText';
|
|
8
3
|
export { useButtonContext } from './context';
|
|
9
|
-
export
|
|
10
|
-
const Button = createButtonRoot(BaseComponents.Root);
|
|
11
|
-
const Text = createButtonText(BaseComponents.Text);
|
|
12
|
-
const Group = createButtonGroup(BaseComponents.Group);
|
|
13
|
-
const Spinner = createButtonSpinner(BaseComponents.Spinner);
|
|
14
|
-
const Icon = createButtonIcon(BaseComponents.Icon);
|
|
15
|
-
Button.displayName = 'ButtonPrimitive';
|
|
16
|
-
Text.displayName = 'ButtonPrimitive.Text';
|
|
17
|
-
Group.displayName = 'ButtonPrimitive.Group';
|
|
18
|
-
Spinner.displayName = 'ButtonPrimitive.Spinner';
|
|
19
|
-
Icon.displayName = 'ButtonPrimitive.Icon';
|
|
20
|
-
return Object.assign(Button, {
|
|
21
|
-
Text,
|
|
22
|
-
Group,
|
|
23
|
-
Spinner,
|
|
24
|
-
Icon
|
|
25
|
-
});
|
|
26
|
-
}
|
|
4
|
+
export { ButtonRoot } from './ButtonRoot';
|
|
27
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["useButtonContext","ButtonRoot"],"sourceRoot":"../../../src","sources":["button/index.ts"],"mappings":";;AACA,SAASA,gBAAgB,QAAQ,WAAW;AAC5C,SAASC,UAAU,QAA8B,cAAc","ignoreList":[]}
|